All URIs are relative to https://api-gateway.walmart.com, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
getItemReport() | GET /v3/getReport | Item Report |
getItemReport($type, $version): \Walmart\Models\Supplier\US\Reports\ReportDTO
Item Report
This API is used to generate the Item Report for DSVs. It returns all the information associated with vendor items that are set up on Walmart’s platform.
<?php
use Walmart\Configuration;
use Walmart\Enums\Country;
use Walmart\Walmart;
require_once __DIR__ . '/vendor/autoload.php';
$config = new Walmart\Configuration([
'clientId' => 'CLIENT_ID', // May not be necessary for all endpoints, particularly outside the US
'clientSecret' => 'CLIENT_SECRET', // Ditto above
'country' => Country::US, // Default Country::US if not set
'privateKey' => 'PRIVATE_KEY',
'consumerId' => 'CONSUMER_ID',
]);
$api = Walmart::supplier($config)->reports();
$type = 'vendor_item'; // string | Use this to mention the type of report. Use type=vendor_item for fetching Item Report for DSVs
$version = '2'; // string | Use this parameter(version = 2) to access the latest version of the DSV report.
try {
$result = $api->getItemReport($type, $version);
print_r($result);
} catch (Exception $e) {
echo "Exception when calling ReportsApi->getItemReport: {$e->getMessage()}\n";
}
Name | Type | Description | Notes |
---|---|---|---|
type | string | Use this to mention the type of report. Use type=vendor_item for fetching Item Report for DSVs | [default to 'vendor_item'] |
version | string | Use this parameter(version = 2) to access the latest version of the DSV report. | [default to '2'] |
\Walmart\Models\Supplier\US\Reports\ReportDTO
This endpoint requires the following authorization methods:
partner
: Header authentication with your Walmart partner ID, which is passed in the WM_PARTNER.ID header. Required by Supplier API endpoints. When using endpoints that require partner ID authentication, you must pass thepartnerId
option to theConfiguration
constructor.signature
: Request signature authentication. Request signatures are generated using a combination of request info, a timestamp, and your Walmart consumer ID and private key. The signature is passed in the WM_SEC.AUTH_SIGNATURE header. This is always used in tandem with consumer ID authentication (above). When using endpoints that require signature authentication, you must pass theprivateKey
andconsumerId
options to theConfiguration
constructor.consumerId
: Header authentication with your Walmart consumer ID, which is passed in the WM_CONSUMER.ID header. This is always used in tandem with signature authentication (below). When using endpoints that require consumer ID authentication, you must pass theconsumerId
option to theConfiguration
constructor.accessToken
: Header authentication with a Walmart access token, which is automatically generated using your Client ID and Client Secret. The token is valid for 15 minutes, and will be passed in the WM_SEC.ACCESS_TOKEN header
See the Authorization section of the README for more information.
[Back to top] [Back to API list] [Back to Model list] [Back to README]