All URIs are relative to https://marketplace.walmartapis.com, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
createFileOnRequest() | POST /v3/growth/assortment/recommendations/fileOnRequest | Download Recommendations |
downloadFileAsPerTheRequestId() | GET /v3/growth/assortment/recommendations/download/{requestId} | Get Download URL |
getAssortmentRecommendations() | POST /v3/growth/assortment/recommendations | Get Recommendations |
getCategorizationDetailsOfAssortmentRecommendations() | POST /v3/growth/assortment/recommendations/categorization/counts | Get Categorization |
getFileOnRequestStatus() | GET /v3/growth/assortment/recommendations/fileOnRequest/{requestId} | Get Download Request Status |
rejectAssortmentRecommendations() | PUT /v3/growth/assortment/recommendations/rejections | Reject Recommendations |
createFileOnRequest($fileOnRequestPayload): \Walmart\Models\MP\US\AssortmentRecommendations\RejectRecommendationsResponse
Download Recommendations
You can create a request to download the item recommendations created for you. Currently you can create a file having maximum 50,000 recommendations. Using ITEM as a recommendationType, * Here you can create a request to get a file having the item recommendations.
<?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)->assortmentRecommendations();
$fileOnRequestPayload = {"recommendationType":"ITEM"}; // \Walmart\Models\MP\US\AssortmentRecommendations\FileOnRequestPayload | Request payload
try {
$result = $api->createFileOnRequest($fileOnRequestPayload);
print_r($result);
} catch (Exception $e) {
echo "Exception when calling AssortmentRecommendationsApi->createFileOnRequest: {$e->getMessage()}\n";
}
Name | Type | Description | Notes |
---|---|---|---|
fileOnRequestPayload | \Walmart\Models\MP\US\AssortmentRecommendations\FileOnRequestPayload | Request payload |
\Walmart\Models\MP\US\AssortmentRecommendations\RejectRecommendationsResponse
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]
downloadFileAsPerTheRequestId($requestId): \Walmart\Models\MP\US\AssortmentRecommendations\FileDownloadDetailResponsePayload
Get Download URL
You can fetch URL to download a generated file which corresponds to the requested ID. You can fetch download URL for the request created in the last 30 days only. Once the URL is fetched, it will be active for 15 minutes during which the user should download the file. If the user fails to download within the 15 minutes, a new download URL could be fetched using this API again.
<?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)->assortmentRecommendations();
$requestId = 'requestId_example'; // string | Automated ID generated by system that uniquely identifies the request.
try {
$result = $api->downloadFileAsPerTheRequestId($requestId);
print_r($result);
} catch (Exception $e) {
echo "Exception when calling AssortmentRecommendationsApi->downloadFileAsPerTheRequestId: {$e->getMessage()}\n";
}
Name | Type | Description | Notes |
---|---|---|---|
requestId | string | Automated ID generated by system that uniquely identifies the request. |
\Walmart\Models\MP\US\AssortmentRecommendations\FileDownloadDetailResponsePayload
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]
getAssortmentRecommendations($recommendationRequest): \Walmart\Models\MP\US\AssortmentRecommendations\RejectRecommendationsResponse
Get Recommendations
You can fetch the list of recommendations that are recommended for you. Using ITEM as a recommendationType, * You can get the list of ITEM recommendations. You can apply filters to fetch selective item recommendations.
<?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)->assortmentRecommendations();
$recommendationRequest = {"recommendationType":"ITEM","meta":{"limit":2}}; // \Walmart\Models\MP\US\AssortmentRecommendations\RecommendationRequest | Request payload
try {
$result = $api->getAssortmentRecommendations($recommendationRequest);
print_r($result);
} catch (Exception $e) {
echo "Exception when calling AssortmentRecommendationsApi->getAssortmentRecommendations: {$e->getMessage()}\n";
}
Name | Type | Description | Notes |
---|---|---|---|
recommendationRequest | \Walmart\Models\MP\US\AssortmentRecommendations\RecommendationRequest | Request payload |
\Walmart\Models\MP\US\AssortmentRecommendations\RejectRecommendationsResponse
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]
getCategorizationDetailsOfAssortmentRecommendations($categorizationRequest): \Walmart\Models\MP\US\AssortmentRecommendations\CategorizationResponse
Get Categorization
You can get the list of brands or categories associated with the items recommendations that are recommended for you. Using BRAND as a categorizationType * You can get the list of brands sorted by the number of item recommendations associated with it. This is then sorted in lexicographic order of brand name. Using CATEGORY as a categorizationType * You can get the list of categories sorted by the number of item recommendations associated with it. This is then sorted in lexicographic order of category name.
<?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)->assortmentRecommendations();
$categorizationRequest = {"categorizationType":"BRAND","meta":{"limit":2}}; // \Walmart\Models\MP\US\AssortmentRecommendations\CategorizationRequest | Request payload
try {
$result = $api->getCategorizationDetailsOfAssortmentRecommendations($categorizationRequest);
print_r($result);
} catch (Exception $e) {
echo "Exception when calling AssortmentRecommendationsApi->getCategorizationDetailsOfAssortmentRecommendations: {$e->getMessage()}\n";
}
Name | Type | Description | Notes |
---|---|---|---|
categorizationRequest | \Walmart\Models\MP\US\AssortmentRecommendations\CategorizationRequest | Request payload |
\Walmart\Models\MP\US\AssortmentRecommendations\CategorizationResponse
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]
getFileOnRequestStatus($requestId): \Walmart\Models\MP\US\AssortmentRecommendations\RequestStatusResponseObj
Get Download Request Status
You can fetch status and other details of a request by providing a requestID.
<?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)->assortmentRecommendations();
$requestId = 'requestId_example'; // string | Automated ID generated by system that uniquely identifies the request.
try {
$result = $api->getFileOnRequestStatus($requestId);
print_r($result);
} catch (Exception $e) {
echo "Exception when calling AssortmentRecommendationsApi->getFileOnRequestStatus: {$e->getMessage()}\n";
}
Name | Type | Description | Notes |
---|---|---|---|
requestId | string | Automated ID generated by system that uniquely identifies the request. |
\Walmart\Models\MP\US\AssortmentRecommendations\RequestStatusResponseObj
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]
rejectAssortmentRecommendations($rejectRecommendationRequest): \Walmart\Models\MP\US\AssortmentRecommendations\RejectRecommendationsResponse
Reject Recommendations
You can reject a list of recommendations that are recommended for you. Using ITEM as a recommendationType, * You can reject specific item recommendations using the filterCriteria or by providing the list of itemRecommendationUniqueIds. * You will need to provide valid rejection code(s) while submitting the reject request. You are required to send the custom rejection message if the rejection code is OTHER_REASON
<?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)->assortmentRecommendations();
$rejectRecommendationRequest = {"recommendationType":"ITEM","filterCriteria":{"searchText":"and","multiValueFilter":[{"parameter":"BRAND","values":["Florida Atlantic University","maximalpower","delsit"]},{"parameter":"CATEGORY","values":["TOPS SPORTSWEAR ECOMM MENS","TODDLER FURNITURE","FLOORCARE"]}],"enumFilter":[{"parameter":"ITEM_AVAILABILITY_STATUS","values":["NEW_TO_WALMART","EXISTING_IN_WALMART"]},{"parameter":"SHOPPING_TRENDS","values":["MOST_SEARCHED_FOR","BEST_SELLERS","DEAL_ITEMS"]}],"rangeFilter":[{"parameter":"PRICE","from":"10.0","to":"80.5"}]},"rejectionCodes":["NOT_SELLING_THESE_ITEMS","OTHER_REASON"],"customRejectionMessage":"Removal of this item from other marketplace is in progress"}; // \Walmart\Models\MP\US\AssortmentRecommendations\RejectRecommendationRequest | Request payload
try {
$result = $api->rejectAssortmentRecommendations($rejectRecommendationRequest);
print_r($result);
} catch (Exception $e) {
echo "Exception when calling AssortmentRecommendationsApi->rejectAssortmentRecommendations: {$e->getMessage()}\n";
}
Name | Type | Description | Notes |
---|---|---|---|
rejectRecommendationRequest | \Walmart\Models\MP\US\AssortmentRecommendations\RejectRecommendationRequest | Request payload |
\Walmart\Models\MP\US\AssortmentRecommendations\RejectRecommendationsResponse
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]