Itemset Expression
Use this API to retrieve itemset metadata in expression format
Note: This API allows you to retrieve details only for successfully built item sets. Also, be aware that metadata may take 3-5 minutes (or longer for larger item sets) to become available.
Request Parameters
| Parameter | Notes | Type | Required | Possible Values |
|---|---|---|---|---|
| advertiserId | ID of the advertiser | integer | Y | Unique numeric identifier |
| Filter[itemsetId] | ID of the itemset for which details are to be retrieved. It accepts only single value for ID | integer | Y | Unique itemset |
Sample Request
curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/itemset/expression' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>'
--header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' \ --data '{ "advertiserId": 1, "Filter[itemsetId]": 13240239
}'Response
| Element | Description | Optional field/Nullable? | Type | Possible Values |
|---|---|---|---|---|
| code | The response code can have following values:
Click here for more information about Status Codes and Errors | Y | string | success, failure |
| details | Details will populate success or error message depending upon value of code. | N | array of strings | |
| itemsetId | ID of the item set | integer | ||
| expression | This is a JSON object with following parameters:
value has following elements: | |||
| message | High-level summary of the error, when available. | Y | string | |
| errors | Detailed information about one or more errors, including the affected field (when applicable), error code, and a human-readable description. | Y | array<object> |
errors array object details
| Field | Description | Optional field/Nullable? | Type | Possible values |
|---|---|---|---|---|
| field | JSON field associated with the error. Omitted if the error applies to the request as a whole. | Y | string | |
| errorType | Machine-readable error code that uniquely identifies the error condition. Applications should use this value for error handling logic. | N | string | |
| description | Human-readable explanation of the error, including why the request failed and, when possible, how to resolve it | N | string |
Sample Response 1: (Only Brands)
{ "code": "success", "itemsetId": 13240239, "expression": { "or": [ { "type": "BRAND", "value": { "name": "pepsi" } }, { "type": "BRAND", "value": { "name": "red bull" } } ] }
}Sample Response 2: (Only Categories)
{ "code": "success", "itemsetId": 13240239, "expression": { "or": [ { "type": "CATEGORY", "value": { "name": "baby food", "level": 1 } }, { "type": "CATEGORY", "value": { "name": "Quilting Basting Guns", "level": 1 } } ] }
}Sample Response 3: (Hybrid)
For type = ITEMSET, use the POST /api/v1/itemset/info endpoint to retrieve the list of items in the child itemset
{ "code": "success", "itemsetId": 13240239, "expression": { "or": [ { "type": "ITEMSET", "value": { "id": 12345679 } }, { "type": "BRAND", "value": { "name": "pepsi" } }, { "type": "CATEGORY", "value": { "name": "baby food", "level": 1, "attributes": [ { "type": "age-group", "values": [ "Infant", "toddler" ] }, { "type": "skin_type", "values": [ "all", "sensitive" ] } ] } } ] } }Sample Response Failure
{
"code": "failure",
"details": [
"string"
], "message": "string",
"errors": [ { "field": "string", "errorType": "string", "description": "string" } ]
}Updated about 3 hours ago
Did this page help you?
