API Response
- Our APIs respond with
data
,errors
, andmetadata
blocks where appropriate - For example,
metadata
appears only for paginated responses - A response expected to return multiple entities may contain both
data
anderrors
blocks - Entity IDs are unique across all Retail Media entities
{
"data": [
{
"type": "{entityType}",
"id": "{entityId}",
"attributes": {
"{fieldName}": {numericValue},
"{fieldName}": "{stringValue}",
// ...
}
},
// ...
{...}
],
"errors": [
{
"traceId": "{traceId}",
"type": "{errorType}",
"code": "{errorCode}",
"instance": "{uri}",
"title": "{errorTitle}",
"detail": "{errorDetail}",
"source": {
"{fieldName}": "{fieldPath}",
// ...
}
},
// ...
{...}
],
"metadata": {
"totalItemsAcrossAllPages": {numberOfEntities},
"currentPageSize": {pageSize},
"currentPageIndex": {pageIndex},
"totalPages": {numberOfPages},
"nextPage": "https://{endpoint}?pageIndex={pageIndex}&pageSize={pageSize}",
"previousPage": "https://{endpoint}?pageIndex={pageIndex}&pageSize={pageSize}"
}
}
Data Attributes
Attribute | Descrption |
---|---|
| Unique ID for the entity; entity IDs are unique across all Retail Media entities |
| Type of entity |
| Entity attributes; may be omitted entirely if an entity does not have additional attributes |
Error Attributes
Attribute | Description |
---|---|
| Unique ID for the error response |
| Type of error; machine-readable (eg. |
| Short machine-readable string for the error (eg. |
| URI referencing the endpoint that caused the error |
| Short human-readable string that summarizes the issue |
| Human-readable explanation of the issue |
| Object referencing the field that caused the error |
Pagination
- Pagination is supported via query parameters for a subset of endpoints that list multiple entities
- Results are returned in ascending order by
id
- List all Accounts associated with your API credentials
- List all Brands associated with the Account
- List all Retailers associated with the Account
- List all Campaigns within the Account
- List all Line Items within the Campaign
- List all Promoted Products on the Line Item
- List all Balances on the Account
- List all Campaigns on the Balance
Query Parameters | Description |
---|---|
| Returns the specified page of results given a |
| Specifies the maximum number of entities returned in a single page; defaults to |
| Limits results to the entity IDs specified; parameter key is repeated, eg. |
HTTP Response Codes
200 OK
: Request successful201 Created
: New entity was successfully created207 Multi-Status
: May occur when operating on multiple entities, such as the call resulting in some successes but also some failures400 Bad Request
: Improper syntax, check your call structure401 Unauthorized
: Unauthenticated, refresh your access token403 Forbidden
: Insufficient rights to perform this action404 Not Found
: Resource not found, check your entity IDs in the call408 Timeout
: Request timed out409 Conflict
: Request conflicts with something, such as a campaign name that already exists429 Too Many Requests
: Too many requests5xx
: Something's wrong on Criteo's end...
Updated 11 months ago