Get categories
The Get categories API retrieves the list of product categories for items in the Walmart Reviews Accelerator Program (RAP), filtered by their enrollment status. The response will typically include information about the categories that match the specified item statuses (such as ENROLLED, ELIGIBLE, or COMPLETE). This is useful if you want to filter or display only the relevant categories for items in certain stages of the RAP, helping you target or analyze specific segments of your catalog.
Note: This page describes an example using only the required parameters and inputs to get a list of product categories for items in the RAP. For a full list of customization options and additional capabilities, refer to the
Walmart Reviews API reference guide.
How it works
- You provide a list of item statuses you are interested in. For example, items that are currently enrolled, eligible, or have completed the program.
- The API responds with the product categories that contain items matching those statuses.
Endpoint
POST https://marketplace.walmartapis.com/v3/growth/reviews-accelerator/categories
Sample request
This example shows you how to set the necessary headers and structure your API call to retrieve a list of product categories for items with the requested status. It demonstrates how to include required headers such as content-type
and accept
, and how to format the JSON payload to specify a filter (for example, filtering by itemStatus: ENROLLED, ELIGIBLE, COMPLETE
). Use this sample as a starting point, then modify it with your actual data and any additional parameters as described in the API reference.
curl --request POST \ --url https://marketplace.walmartapis.com/v3/growth/reviews-accelerator/categories \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data '
{ "itemStatus": [ "ENROLLED", "ELIGIBLE", "COMPLETE" ]
}
'
import requests url = "https://marketplace.walmartapis.com/v3/growth/reviews-accelerator/categories"
headers = { "accept": "application/json", "content-type": "application/json"
}
data = { "itemStatus": ["ENROLLED", "ELIGIBLE", "COMPLETE"]
} response = requests.post(url, headers=headers, json=data) print("Status Code:", response.status_code)
print("Response Body:", response.json())
Modify your code
- Change the
itemStatus
value to include only the statuses you want. For example, you can change the status to onlyENROLLED
andCOMPLETE
.
Sample response
The following is a sample successful response provided by the API.
{ "statusCode": 200, "payload": { "itemStatus": [ "ENROLLED", "ELIGIBLE", "COMPLETE" ], "categories": [ "HARDLINES", "HOME", "APPAREL" ] }
}
Result
If successful, the API responds with an HTTP status: 200 OK
and a JSON payload containing a list of items that match your filter criteriaIn this example, the response shows that items with the statuses ENROLLED, ELIGIBLE, or COMPLETE are found in the following categories: HARDLINES, HOME, and APPAREL. This means your request was processed correctly, and these categories contain items that meet your specified status filter.
Use this information to further analyze or retrieve details about items within these categories, or adjust your filter criteria for different results.
Updated 7 days ago