All URIs are relative to https://marketplace.walmartapis.com, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
downloadReport() | GET /v3/reports/downloadReport | Download Report URL |
generateReport() | POST /v3/reports/reportRequests | Create Report Request |
getRequestsStatus() | GET /v3/reports/reportRequests | Get All Report Requests |
getSingleRequestStatus() | GET /v3/reports/reportRequests/{requestId} | Report Request Status |
downloadReport($requestId): \Walmart\Models\MP\US\OnRequestReports\DownloadReportResponse
Download Report URL
Fetches URL to download a generated report.
<?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
]);
$api = Walmart::marketplace($config)->onRequestReports();
$requestId = 'requestId_example'; // string | Automated ID generated by system that uniquely identifies the report request.
try {
$result = $api->downloadReport($requestId);
print_r($result);
} catch (Exception $e) {
echo "Exception when calling OnRequestReportsApi->downloadReport: {$e->getMessage()}\n";
}
Name | Type | Description | Notes |
---|---|---|---|
requestId | string | Automated ID generated by system that uniquely identifies the report request. |
\Walmart\Models\MP\US\OnRequestReports\DownloadReportResponse
This endpoint requires the following authorization methods:
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]
generateReport($reportType, $reportVersion, $generateReportPayload): \Walmart\Models\MP\US\OnRequestReports\GenerateReportResponse
Create Report Request
Creates a new request for report by specifying the reportType and reportVersion.
<?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
]);
$api = Walmart::marketplace($config)->onRequestReports();
$reportType = 'reportType_example'; // string | Specifies the report type for the request. For example, reportType=ITEM creates an Item Report.
$reportVersion = 'reportVersion_example'; // string | Version of report for which the request is created. Supported versions for each report type are currently 'reportVersion=v1' for the following reportType(s): INVENTORY, CANCELLATION, DELIVERY_DEFECT, ITEM_PERFORMANCE, PROMO, RETURN_OVERRIDES, CPA, SHIPPING_CONFIGURATION, SHIPPING_PROGRAM, FITMENT_MISSING_ATTR, FITMENT_ACES_COVERAGE, BUYBOX and 'reportVersion=v1', 'reportVersion=v2', 'reportVersion=v3', 'reportVersion=v4' for the following reportType(s): ITEM.
$generateReportPayload = {"rowFilters":[{"type":"rangeFilter","columnName":"Offer Start Date","from":"2020-03-16"},{"type":"rangeFilter","columnName":"Offer End Date","to":"2021-06-16"},{"type":"rangeFilter","columnName":"Price","from":"10","to":"100"},{"type":"enumFilter","columnName":"Publish Status","values":["PUBLISHED"]}],"excludeColumns":["Average Rating","Shelf Name"]}; // \Walmart\Models\MP\US\OnRequestReports\GenerateReportPayload | Request body
try {
$result = $api->generateReport($reportType, $reportVersion, $generateReportPayload);
print_r($result);
} catch (Exception $e) {
echo "Exception when calling OnRequestReportsApi->generateReport: {$e->getMessage()}\n";
}
Name | Type | Description | Notes |
---|---|---|---|
reportType | string | Specifies the report type for the request. For example, reportType=ITEM creates an Item Report. | |
reportVersion | string | Version of report for which the request is created. Supported versions for each report type are currently 'reportVersion=v1' for the following reportType(s): INVENTORY, CANCELLATION, DELIVERY_DEFECT, ITEM_PERFORMANCE, PROMO, RETURN_OVERRIDES, CPA, SHIPPING_CONFIGURATION, SHIPPING_PROGRAM, FITMENT_MISSING_ATTR, FITMENT_ACES_COVERAGE, BUYBOX and 'reportVersion=v1', 'reportVersion=v2', 'reportVersion=v3', 'reportVersion=v4' for the following reportType(s): ITEM. | |
generateReportPayload | \Walmart\Models\MP\US\OnRequestReports\GenerateReportPayload | Request body | [optional] |
\Walmart\Models\MP\US\OnRequestReports\GenerateReportResponse
This endpoint requires the following authorization methods:
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]
getRequestsStatus($reportType, $reportVersion, $requestStatus, $requestSubmissionStartDate, $requestSubmissionEndDate): \Walmart\Models\MP\US\OnRequestReports\RequestsStatusResponse
Get All Report Requests
Fetches a list of all report requests for specified search criteria by using query parameters. You can fetch details of report requests created in the last 30 days only.
<?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
]);
$api = Walmart::marketplace($config)->onRequestReports();
$reportType = 'reportType_example'; // string | Type of report for which the request is created. Example, ITEM for Item Report.
$reportVersion = 'reportVersion_example'; // string | Version of report for which the request is created. Example, v1.
$requestStatus = 'requestStatus_example'; // string | Status of report request. Possible values are RECEIVED, INPROGRESS, READY, ERROR.
$requestSubmissionStartDate = 'requestSubmissionStartDate_example'; // string | Report request submittal start date for range of reports requested, in format: YYYY-MM-DDTHH:mm:ssZ
$requestSubmissionEndDate = 'requestSubmissionEndDate_example'; // string | Report request submittal end date for range of reports requested, in format YYYY-MM-DDTHH:mm:ssZ
try {
$result = $api->getRequestsStatus($reportType, $reportVersion, $requestStatus, $requestSubmissionStartDate, $requestSubmissionEndDate);
print_r($result);
} catch (Exception $e) {
echo "Exception when calling OnRequestReportsApi->getRequestsStatus: {$e->getMessage()}\n";
}
Name | Type | Description | Notes |
---|---|---|---|
reportType | string | Type of report for which the request is created. Example, ITEM for Item Report. | |
reportVersion | string | Version of report for which the request is created. Example, v1. | [optional] |
requestStatus | string | Status of report request. Possible values are RECEIVED, INPROGRESS, READY, ERROR. | [optional] |
requestSubmissionStartDate | string | Report request submittal start date for range of reports requested, in format: YYYY-MM-DDTHH:mm:ssZ | [optional] |
requestSubmissionEndDate | string | Report request submittal end date for range of reports requested, in format YYYY-MM-DDTHH:mm:ssZ | [optional] |
\Walmart\Models\MP\US\OnRequestReports\RequestsStatusResponse
This endpoint requires the following authorization methods:
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]
getSingleRequestStatus($requestId): \Walmart\Models\MP\US\OnRequestReports\RequestStatusResponse
Report Request Status
Fetches status and other details of a report request by providing a requestID. You can fetch details of report request created in the last 30 days only.
<?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
]);
$api = Walmart::marketplace($config)->onRequestReports();
$requestId = 'requestId_example'; // string | Automated ID generated by system that uniquely identifies the report request.
try {
$result = $api->getSingleRequestStatus($requestId);
print_r($result);
} catch (Exception $e) {
echo "Exception when calling OnRequestReportsApi->getSingleRequestStatus: {$e->getMessage()}\n";
}
Name | Type | Description | Notes |
---|---|---|---|
requestId | string | Automated ID generated by system that uniquely identifies the report request. |
\Walmart\Models\MP\US\OnRequestReports\RequestStatusResponse
This endpoint requires the following authorization methods:
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]