Page Style Template
Markdown
You should familiarize yourself with Markdown, the syntax that readme.io uses.
A good Markdown overview can be found here.
Headlines Should Be Bold
Always use the Markdown bold syntax of **wrapping text in double asterisks**
to ensure that headlines are bolded.
Spacing
Keep sections spaced apart with at least one additional line break for visual clarity.
This allows you to control the spacing, like this:
Brevity
Keep sentences and paragraphs short. No walls of text - break things down into small, discrete ideas and separate with line breaks.
This keeps the content digestible and visually clean.
Tone, Formatting and Structure
Comprehensive guidelines for tone, formatting and structure can be found on Confluence.
Use Callouts
For cautionary notes or easily-overlooked functionality, use callouts to ensure clarity.
Code Fields Should Be Styled Inline
Any references to specific query parameters (e.g. campaignIds
or bidValue
) should employ the code comment Markdown syntax of wrapping in backticks
.
Code Examples
Every code example should be prefaced with a brief description of the request and the API endpoint being used.
https://api.criteo.com/v1/my-endpoint
The endpoint should be block-quoted with three backticks and always immediately follow the brief description.
Code examples should use the publicly-available API client libraries / SDKs. Ask others if you need assistance generating code examples.
Examples should be added in as many languages as possible:
console.log('Hello world.');
print('Hello world.')
echo 'Hello world.';
Link to API Reference Frequently
Instead of describing every possible filter or optional parameter, make sure to include frequent references to relevant technical reference pages, which will be automatically be kept up to date as the Swagger documentation JSON is updated.
API Response Examples
Example requests, especially GET
requests, should include an example response payload:
{
"status": "OK",
"data": []
}
Once a sample response has been shown on a page, there is no need to repeat the example for subsequent example requests unless there is a substantial or notable difference in response payloads for similar requests.
Guides Structure
Endpoints
Verb | Endpoint | Description |
---|---|---|
GET | /entities/{entityId}/endpoint-path | Gets all items from Entity blablabla |
POST | /entities/{entityId}/endpoint-path | Creates a new item from Entity blablabla |
PUT | /entities/{entityId}/endpoint-path | Updates a specific Entity item blablabla |
{name} Attributes (NEW - table format)
Attribute | Data Type | Description |
---|---|---|
id * | string | Account ID, from a demand or supply account, generated internally by Criteo Accepted values: string of int64 Writeable? N / Nullable? N |
name | string | Account name Accepted values: up to 510-chars string Writeable? Y / Nullable? N |
countries | list | Countries associated with the account Accepted values: 2-chars country codes (in ISO-3166; e.g. US , FR )Writeable? N / Nullable? N |
currency | list | Default currency for bulling, budgeting, bid settings & campaign performance metrics Accepted values: 3-chars currency code (in ISO-4217; e.g. USD , EUR )Writeable? N / Nullable? N |
parentAccountLabel | string | Label used to associate multiple accounts; defaults to the account name Accepted values: up to 510-chars string Writeable? Y / Nullable? N |
timeZone | string | Account time zone Accepted values: time zone identifiers from IANA (TZ database) (e.g. America/New_York , Europe/Paris , Asia/Tokyo , UTC )Writeable? N / Nullable? N |
startDate * | timestamp | Balance start date; if time zone is not set, will consider Account's time zone as default Accepted values: yyyy-mm-ddThh:mm:ss±hh:mm (in ISO-8601 )Writeable? Y / Nullable? N |
endDate | timestamp | Balance end date; if time zone is not set, will consider Account's time zone as default Accepted values: yyyy-mm-ddThh:mm:ss±hh:mm (in ISO-8601 )Default: if null or absent, balance will be available indefinitelyWriteable? Y / Nullable? Y |
createdAt | timestamp | Timestamp of campaign creation, in UTC Accepted values: yyyy-mm-ddThh:mm:ss±hh:mm (in ISO-8601)Writeable? N / Nullable? N |
updatedAt | timestamp | Timestamp of last campaign update, in UTC Accepted values: yyyy-mm-ddThh:mm:ss±hh:mm (in ISO-8601)Writeable? N / Nullable? N |
paramString | string | Example of param description here, with data type being string Accepted values: up to 255-chars string Writeable? Y / Nullable? Y |
paramEnum | enum | Example of param description here, with data type being enum Accepted values: json , json-compact , json-newline , csv Default: json Writeable? N / Nullable? N |
paramBoolean * | boolean | Example of param description here, with data type being boolean Accepted values: true , false Default: false Writeable? Y / Nullable? N |
paramInteger | integer | Example of param description here, with data type being integer Accepted values: between 0 and 100 Writeable? Y / Nullable? N |
paramDecimal | decimal | Example of param description here, with data type being decimal/float Accepted values: paramDecimal ≥ 0.0 (or 0 ≤ paramDecimal ≤ 100.0)Default: 0.0 Writeable? N / Nullable? N |
paramDate | date | Example of param description here, with data type being date Accepted values: YYYY-MM-DD Writeable? Y / Nullable? N |
paramTimestamp * | timestamp | Example of param description here, with data type being timestamp Accepted values: yyyy-mm-ddThh:mm:ss±hh:mm (in ISO-8601 ) with max interval of 100 days with endDate Writeable? N / Nullable? N |
paramListStr * | list | Example of param description here, with data type being list/array of strings/int64 Accepted values: array of strings/int64 Writeable? N / Nullable? N |
paramListEnum * | list | Example of param description here, with data type being list/array of enums Accepted values: refer to Metrics and Dimensions for the complete list of supported dimensions Writeable? N / Nullable? N |
paramObject | object | Example of param description here, with data type being object/data structure Parameters: * paramOne : definition of param one* paramTwo : definition of param two* paramThree : definition of param threeWriteable? N / Nullable? N |
* Required
{name} Attributes (DEPRECATED - see table format above)
- Data Type: -
- Values: -
Description: -
- Data Type: -
- Values: -
Description: -
[Example GET request] Get entity name
This endpoint retrieves all entities blablabla
Results are paginated using offset
and limit
query parameters; if omitted, defaults to 0
and 500
, respective - see API Response
OR
Results are paginated using pageIndex
and pageSize
query parameters; if omitted, defaults to 0
and 25
, respective - see API Response
(above can be skipped if not applicable)

https://api.criteo.com/{version}/retail-media/..../...?pageIndex={pageIndex}&pageSize={pageSize}
Sample Request
curl -X GET "https://api.criteo.com/{version}/retail-media/.../...?pageIndex=0&pageSize=25" \
-H "Authorization: Bearer <MY_ACCESS_TOKEN>"
Sample Response
🔵 HTTP code 200
: (can be skipped if 200 and valid response body)
{
"data": [
{
"foo": "bar1"
},
// ...
{
"foo": "bar2"
}
],
"metadata": {
"totalItemsAcrossAllPages": 15,
"currentPageSize": 25,
"currentPageIndex": 0,
"totalPages": 1
}
}
[Example POST request] Create entity name

https://api.criteo.com/{version}/retail-media/.../...
Sample Request
curl -L -X POST 'https://api.criteo.com/{version}/retail-media/.../...' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <MY_ACCESS_TOKEN>'
-d '{
"foo": "bar"
}'
Sample Response
🔵 HTTP code 204
(no body content) (required if not 200 and no response body)
{
"foo": "bar"
}
[Example PUT request] Edit entity name
...
[Example DELETE request] Delete entity name
...
Responses
Response | Title | Detail | Troubleshooting |
---|---|---|---|
🟢 200 | Call executed with success | ||
🟢 201 | Entity request created with success | ||
🔴 400 | |||
🔴 400 | startDate and endDate | ||
🔴 400 | |||
🔴 403 | |||
🔴 403 |
Updated about 2 months ago