Skip to content

Commit 0ba8316

Browse files
committed
Add support for the Marketplace Reviews and Assortment Recommendations APIs
1 parent fa7b0fd commit 0ba8316

109 files changed

Lines changed: 19471 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ If you've found any of our packages useful, please consider [becoming a Sponsor]
2929

3030
## Features
3131

32-
* Supports all Walmart API operations for Marketplace Sellers, 1P Suppliers, and Content Providers as of 7/24/2023 ([see here](#supported-api-segments) for links to documentation for all calls)
32+
* Supports all Walmart API operations for Marketplace Sellers, 1P Suppliers, and Content Providers as of 8/17/2023 ([see here](#supported-api-segments) for links to documentation for all calls)
3333
* Supports the United States, Canada, and Mexico marketplaces
3434
* Automatically handles all forms of authentication used by Walmart (basic auth, access tokens, and request signatures) with minimal configuration
3535

@@ -229,6 +229,7 @@ This is an exhaustive list of all the APIs supported by this library, organized
229229

230230
#### Marketplace
231231

232+
* [Assortment Recommendations API](https://github.com/highsidelabs/walmart-api-php/blob/main/docs/Apis/MP/US/AssortmentRecommendationsApi.md): `Walmart::marketplace($config)->assortmentRecommendations()` (US only)
232233
* [Authentication API](https://github.com/highsidelabs/walmart-api-php/blob/main/docs/Apis/MP/US/AuthenticationApi.md): `Walmart::marketplace($config)->auth()` (MX, US)
233234
* [Events API](https://github.com/highsidelabs/walmart-api-php/blob/main/docs/Apis/MP/CA/Api.md): `Walmart::marketplace($config)->events()` (CA only)
234235
* [Feeds API](https://github.com/highsidelabs/walmart-api-php/blob/main/docs/Apis/MP/US/FeedsApi.md): `Walmart::marketplace($config)->feeds()` (CA, MX, US)
@@ -246,6 +247,7 @@ This is an exhaustive list of all the APIs supported by this library, organized
246247
* [Promotions API](https://github.com/highsidelabs/walmart-api-php/blob/main/docs/Apis/MP/US/PromotionsApi.md): `Walmart::marketplace($config)->promotions()` (CA, US)
247248
* [Reports API](https://github.com/highsidelabs/walmart-api-php/blob/main/docs/Apis/MP/US/ReportsApi.md): `Walmart::marketplace($config)->reports()` (CA, MX, US)
248249
* [Returns API](https://github.com/highsidelabs/walmart-api-php/blob/main/docs/Apis/MP/US/ReturnsApi.md): `Walmart::marketplace($config)->returns()` (MX, US)
250+
* [Reviews API](https://github.com/highsidelabs/walmart-api-php/blob/main/docs/Apis/MP/US/ReviewsApi.md): `Walmart::marketplace($config)->reviews()` (US only)
249251
* [Rules API](https://github.com/highsidelabs/walmart-api-php/blob/main/docs/Apis/MP/US/RulesApi.md): `Walmart::marketplace($config)->rules()` (US only)
250252
* [Settings API](https://github.com/highsidelabs/walmart-api-php/blob/main/docs/Apis/MP/US/SettingsApi.md): `Walmart::marketplace($config)->settings()` (US only)
251253
* [Utilities API](https://github.com/highsidelabs/walmart-api-php/blob/main/docs/Apis/MP/US/UtilitiesApi.md): `Walmart::marketplace($config)->utilities()` (US only)

docs/Apis/MP/US/AssortmentRecommendationsApi.md

Lines changed: 372 additions & 0 deletions
Large diffs are not rendered by default.

docs/Apis/MP/US/ReviewsApi.md

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# Walmart\Apis\MP\US\ReviewsApi
2+
All URIs are relative to https://marketplace.walmartapis.com, except if the operation defines another base path.
3+
4+
| Method | HTTP request | Description |
5+
| ------------- | ------------- | ------------- |
6+
| [**bulkUpdateItemStatus()**](#bulkUpdateItemStatus) | **PUT** /v3/growth/reviews-accelerator/items/status | Bulk update item status |
7+
| [**getIrpCategories()**](#getIrpCategories) | **POST** /v3/growth/reviews-accelerator/categories | Get categories |
8+
| [**getIrpItems()**](#getIrpItems) | **POST** /v3/growth/reviews-accelerator/items | Get RAP post-purchase items |
9+
10+
11+
## `bulkUpdateItemStatus()`
12+
13+
```php
14+
bulkUpdateItemStatus($bulkItemStatusUpdateRequest): \Walmart\Models\MP\US\Reviews\BulkItemUpdateResponse
15+
```
16+
Bulk update item status
17+
18+
To enroll a product in/out of the Reviews acceleration post-purchase program.
19+
20+
### Example
21+
22+
```php
23+
<?php
24+
use Walmart\Configuration;
25+
use Walmart\Enums\Country;
26+
use Walmart\Walmart;
27+
28+
require_once __DIR__ . '/vendor/autoload.php';
29+
30+
$config = new Walmart\Configuration([
31+
'clientId' => 'CLIENT_ID', // May not be necessary for all endpoints, particularly outside the US
32+
'clientSecret' => 'CLIENT_SECRET', // Ditto above
33+
'country' => Country::US, // Default Country::US if not set
34+
]);
35+
36+
$api = Walmart::marketplace($config)->reviews();
37+
38+
$bulkItemStatusUpdateRequest = {"status":"ENROLL","items":[{"itemId":"2719243"},{"itemId":"2719255"}]}; // \Walmart\Models\MP\US\Reviews\BulkItemStatusUpdateRequest | Request fields
39+
40+
try {
41+
$result = $api->bulkUpdateItemStatus($bulkItemStatusUpdateRequest);
42+
print_r($result);
43+
} catch (Exception $e) {
44+
echo "Exception when calling ReviewsApi->bulkUpdateItemStatus: {$e->getMessage()}\n";
45+
}
46+
```
47+
48+
### Parameters
49+
| Name | Type | Description | Notes |
50+
| ------------- | ------------- | ------------- | ------------- |
51+
| **bulkItemStatusUpdateRequest** | [**\Walmart\Models\MP\US\Reviews\BulkItemStatusUpdateRequest**](../../../Models/MP/US/Reviews/BulkItemStatusUpdateRequest.md)| Request fields | |
52+
53+
54+
### Return type
55+
56+
[**\Walmart\Models\MP\US\Reviews\BulkItemUpdateResponse**](../../../Models/MP/US/Reviews/BulkItemUpdateResponse.md)
57+
58+
### Authorization
59+
60+
This endpoint requires the following authorization methods:
61+
62+
* `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
63+
64+
See the [Authorization](../../../../README.md#authorization) section of the README for more information.
65+
66+
67+
[[Back to top]](#) [[Back to API list]](../../../../README.md#supported-apis)
68+
[[Back to Model list]](../../../Models/MP/US)
69+
[[Back to README]](../../../../README.md)
70+
71+
## `getIrpCategories()`
72+
73+
```php
74+
getIrpCategories($getCategoriesRequest): \Walmart\Models\MP\US\Reviews\GetCategoriesResponse
75+
```
76+
Get categories
77+
78+
To get the set of categories the RAP post-purchase items belong to.
79+
80+
### Example
81+
82+
```php
83+
<?php
84+
use Walmart\Configuration;
85+
use Walmart\Enums\Country;
86+
use Walmart\Walmart;
87+
88+
require_once __DIR__ . '/vendor/autoload.php';
89+
90+
$config = new Walmart\Configuration([
91+
'clientId' => 'CLIENT_ID', // May not be necessary for all endpoints, particularly outside the US
92+
'clientSecret' => 'CLIENT_SECRET', // Ditto above
93+
'country' => Country::US, // Default Country::US if not set
94+
]);
95+
96+
$api = Walmart::marketplace($config)->reviews();
97+
98+
$getCategoriesRequest = {"itemStatus":["ENROLLED","ELIGIBLE","COMPLETE"]}; // \Walmart\Models\MP\US\Reviews\GetCategoriesRequest | Request payload
99+
100+
try {
101+
$result = $api->getIrpCategories($getCategoriesRequest);
102+
print_r($result);
103+
} catch (Exception $e) {
104+
echo "Exception when calling ReviewsApi->getIrpCategories: {$e->getMessage()}\n";
105+
}
106+
```
107+
108+
### Parameters
109+
| Name | Type | Description | Notes |
110+
| ------------- | ------------- | ------------- | ------------- |
111+
| **getCategoriesRequest** | [**\Walmart\Models\MP\US\Reviews\GetCategoriesRequest**](../../../Models/MP/US/Reviews/GetCategoriesRequest.md)| Request payload | |
112+
113+
114+
### Return type
115+
116+
[**\Walmart\Models\MP\US\Reviews\GetCategoriesResponse**](../../../Models/MP/US/Reviews/GetCategoriesResponse.md)
117+
118+
### Authorization
119+
120+
This endpoint requires the following authorization methods:
121+
122+
* `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
123+
124+
See the [Authorization](../../../../README.md#authorization) section of the README for more information.
125+
126+
127+
[[Back to top]](#) [[Back to API list]](../../../../README.md#supported-apis)
128+
[[Back to Model list]](../../../Models/MP/US)
129+
[[Back to README]](../../../../README.md)
130+
131+
## `getIrpItems()`
132+
133+
```php
134+
getIrpItems($scrollId, $getIrpItemsRequest): \Walmart\Models\MP\US\Reviews\GetIrpItemsResponse
135+
```
136+
Get RAP post-purchase items
137+
138+
To get all eligible products that can be enrolled into the Reviews accelerator post-purchase program. To get all products that are currently enrolled into the program. To get all products that have attained target reviews after enrolment into the program. Products can be filtered by category and price. Products can be sorted by Walmart-recommended item priorities. Searched using wildcards matching the product name and SKU.
139+
140+
### Example
141+
142+
```php
143+
<?php
144+
use Walmart\Configuration;
145+
use Walmart\Enums\Country;
146+
use Walmart\Walmart;
147+
148+
require_once __DIR__ . '/vendor/autoload.php';
149+
150+
$config = new Walmart\Configuration([
151+
'clientId' => 'CLIENT_ID', // May not be necessary for all endpoints, particularly outside the US
152+
'clientSecret' => 'CLIENT_SECRET', // Ditto above
153+
'country' => Country::US, // Default Country::US if not set
154+
]);
155+
156+
$api = Walmart::marketplace($config)->reviews();
157+
158+
$scrollId = '*'; // string | Optional parameter specifying the scrollId to return the next set of results.
159+
$getIrpItemsRequest = {"filter":{"itemStatus":"ELIGIBLE"}}; // \Walmart\Models\MP\US\Reviews\GetIrpItemsRequest | Request payload
160+
161+
try {
162+
$result = $api->getIrpItems($scrollId, $getIrpItemsRequest);
163+
print_r($result);
164+
} catch (Exception $e) {
165+
echo "Exception when calling ReviewsApi->getIrpItems: {$e->getMessage()}\n";
166+
}
167+
```
168+
169+
### Parameters
170+
| Name | Type | Description | Notes |
171+
| ------------- | ------------- | ------------- | ------------- |
172+
| **scrollId** | **string**| Optional parameter specifying the scrollId to return the next set of results. | [default to '*'] |
173+
| **getIrpItemsRequest** | [**\Walmart\Models\MP\US\Reviews\GetIrpItemsRequest**](../../../Models/MP/US/Reviews/GetIrpItemsRequest.md)| Request payload | |
174+
175+
176+
### Return type
177+
178+
[**\Walmart\Models\MP\US\Reviews\GetIrpItemsResponse**](../../../Models/MP/US/Reviews/GetIrpItemsResponse.md)
179+
180+
### Authorization
181+
182+
This endpoint requires the following authorization methods:
183+
184+
* `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
185+
186+
See the [Authorization](../../../../README.md#authorization) section of the README for more information.
187+
188+
189+
[[Back to top]](#) [[Back to API list]](../../../../README.md#supported-apis)
190+
[[Back to Model list]](../../../Models/MP/US)
191+
[[Back to README]](../../../../README.md)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Walmart\Models\MP\US\AssortmentRecommendations\CategorizationFacet
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **string** | Name of the brand or category as per the categorizationType. | [optional]
8+
**numberOfItemRecommendations** | **int** | The number of item recommendations associated with the name. The name can be associated with the categorization type. | [optional]
9+
10+
11+
[[Back to Model list]](./) [[Back to API list]](../../../../../README.md#supported-apis) [[Back to README]](../../../../../README.md)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Walmart\Models\MP\US\AssortmentRecommendations\CategorizationRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**categorizationType** | **string** | | Attribute | Description | Data Type | | --- | ----------- | ------- | | BRAND | To get list of brands which are associated with the assortment recommendations | string | | CATEGORY | To get list of categories which are associated with the assortment recommendations | string | |
8+
**meta** | [**\Walmart\Models\MP\US\AssortmentRecommendations\MetaDataRequest**](MetaDataRequest.md) | | [optional]
9+
**filterCriteria** | [**\Walmart\Models\MP\US\AssortmentRecommendations\CategorizationRequestFilter**](CategorizationRequestFilter.md) | | [optional]
10+
11+
12+
[[Back to Model list]](./) [[Back to API list]](../../../../../README.md#supported-apis) [[Back to README]](../../../../../README.md)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Walmart\Models\MP\US\AssortmentRecommendations\CategorizationRequestFilter
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**searchText** | **string** | To filter with a search text having a word that can be part of the categorization data. | [optional]
8+
**multiValueFilter** | [**\Walmart\Models\MP\US\AssortmentRecommendations\MultiValueFilterCriteriaForCategorization[]**](MultiValueFilterCriteriaForCategorization.md) | Filters based on multiple values associated with a specific parameter. No parameter should be repeated. | [optional]
9+
10+
11+
[[Back to Model list]](./) [[Back to API list]](../../../../../README.md#supported-apis) [[Back to README]](../../../../../README.md)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Walmart\Models\MP\US\AssortmentRecommendations\CategorizationResponse
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**payload** | [**\Walmart\Models\MP\US\AssortmentRecommendations\CategorizationResponsePayload**](CategorizationResponsePayload.md) | | [optional]
8+
9+
10+
[[Back to Model list]](./) [[Back to API list]](../../../../../README.md#supported-apis) [[Back to README]](../../../../../README.md)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Walmart\Models\MP\US\AssortmentRecommendations\CategorizationResponsePayload
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**categorizationType** | **string** | | Attribute | Description | Data Type | | --- | ----------- | ------- | | BRAND | To get list of brands which are associated with the assortment recommendations | string | | CATEGORY | To get list of categories which are associated with the assortment recommendations | string | | [optional]
8+
**meta** | [**\Walmart\Models\MP\US\AssortmentRecommendations\MetaDataResponse**](MetaDataResponse.md) | | [optional]
9+
**records** | [**\Walmart\Models\MP\US\AssortmentRecommendations\CategorizationFacet[]**](CategorizationFacet.md) | Information of item recommendations based on the categorizationType. | [optional]
10+
11+
12+
[[Back to Model list]](./) [[Back to API list]](../../../../../README.md#supported-apis) [[Back to README]](../../../../../README.md)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Walmart\Models\MP\US\AssortmentRecommendations\CompetitorItemInfo
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**itemId** | **string** | Competitor item id. | [optional]
8+
**url** | **string** | Competitor item url. | [optional]
9+
**itemPrice** | [**\Walmart\Models\MP\US\AssortmentRecommendations\Price**](Price.md) | | [optional]
10+
**shippingPrice** | [**\Walmart\Models\MP\US\AssortmentRecommendations\Price**](Price.md) | | [optional]
11+
12+
13+
[[Back to Model list]](./) [[Back to API list]](../../../../../README.md#supported-apis) [[Back to README]](../../../../../README.md)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Walmart\Models\MP\US\AssortmentRecommendations\EnumFilterCriteria
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**parameter** | **string** | To apply an enum filter based on the predefined parameter. | Attribute | Description | Data Type | | --- | ----------- | ------- | | ITEM_AVAILABILITY_STATUS | To filter based on whether the items which are new to Walmart or existing in Walmart. | string | | SHOPPING_TRENDS | Indicates the demand types identified in the market for an item. An item can have more than one value for this parameter. | string | | [optional]
8+
**values** | **string[]** | Values correspond to the parameter for applying filter on the response. The data in values[] are predefined. OR operator is used between the values. | Attribute | Associated parameter of enumFilter | Description | Data Type | | --- | ----------- | ----------- | ------- | | EXISTING_IN_WALMART | ITEM_AVAILABILITY_STATUS | To filters based on the items which are existing in Walmart. | string | | NEW_TO_WALMART | ITEM_AVAILABILITY_STATUS | To filters based on the items which are new to Walmart. | string | | MOST_SEARCHED_FOR | SHOPPING_TRENDS | Item is most searched for in the market. | string | | BEST_SELLERS | SHOPPING_TRENDS | Item is best seller in the market. | string | | DEAL_ITEMS | SHOPPING_TRENDS | Item is in demand and is a part of deals in the other marketplaces. | string | | [optional]
9+
10+
11+
[[Back to Model list]](./) [[Back to API list]](../../../../../README.md#supported-apis) [[Back to README]](../../../../../README.md)

0 commit comments

Comments
 (0)