List Brands
Retrieve the list of advertiser's brands
Request Parameters
| Parameters | Notes | Type | Required | Possible Values |
|---|---|---|---|---|
| advertiserId | ID of advertiser | integer | Y | Unique numeric identifier |
| isRestricted | specifies whether to retrieve from list of advertiser's brands or all brands Note:
| Boolean | N | Values:
|
| filter[brandName] | Specify the name of the brand to search for Note:
| string | N | Valid brand name for items to be retrieved |
| startIndex | Use this parameter to fetch specific number of brands from a list, in combination with count. This indicates the starting position of the list Note: Value of startIndex must be greater than and equal to 0. The default value is 0 | integer | N | Integer value Example: To return the first ten catalog item brands, set startIndex=0 and count=10 |
| count | Defines the total number of items to be returned. Note: Value of count must be greater than 0. The default value is 100 | integer | N | Integer value Example: To return the first ten catalog item brands, set startIndex=0 and count=1 |
Note: The error message TOO_MANY_FILTERS_PROVIDED_IN_REQUEST is returned when too many filters are used and the request is not processed.
Sample Request
curl --request POST 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/brands/list' \
--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: ************' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \
--data '{ "advertiserId": 1, "isRestricted": true, "filter[brandName]": ["Brand Name"], "startIndex": 0, "count": 5 }'Sample Request - When isRestricted is false but filter[brandName] is omitted from Request
curl --request POST 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/brands/list' \
--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: ************' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \
--data '{ "advertiserId": 16274575, "startIndex": 0, "count": 100, "isRestricted": false }'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 |
| totalResults | Total number of rows returned in the response Only returned when code=success | integer | ||
| data | data will populate details of brands retrieved through request, if code is success
Only returned when code=success | array | ||
| details | List of error codes associated with the request. Use these codes for programmatic error handling. | N | array<string> | Refer to this link for detailed error messages |
| 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 Success
{ "code": "success", "totalResults": 1, "data": [ { "brandName": " Brand Name", "itemCount": 891 } ]
}Sample Response Failure - When isRestricted is false but filter[brandName] is omitted from Request
{ "code": "failure", "message": "Invalid brand list request. One or more fields are invalid.", "errors": [ { "field": "filter[brandName]", "errorType": "FILTER_NAME_IS_REQUIRED_WHEN_IS_RESTRICTED_IS_FALSE", "description": "filter[brandName] field is required when isRestricted field is false. Provide filter[brandName] when isRestricted is false." } ], "details": [ "FILTER_NAME_IS_REQUIRED_WHEN_IS_RESTRICTED_IS_FALSE" ]
}Updated 4 days ago
