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

VerbEndpointDescription
GET/entities/{entityId}/endpoint-pathGets all items from Entity blablabla
POST/entities/{entityId}/endpoint-pathCreates a new item from Entity blablabla
PUT/entities/{entityId}/endpoint-pathUpdates a specific Entity item blablabla

 

{name} Attributes (NEW - table format)

AttributeData TypeDescription
id*stringAccount ID, from a demand or supply account, generated internally by Criteo

Accepted values: string of int64
Writeable? N / Nullable? N
namestringAccount name

Accepted values: up to 510-chars string
Writeable? Y / Nullable? N
countrieslistCountries associated with the account

Accepted values: 2-chars country codes (in ISO-3166; e.g. US, FR)
Writeable? N / Nullable? N
currencylistDefault 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
parentAccountLabelstringLabel used to associate multiple accounts; defaults to the account name

Accepted values: up to 510-chars string
Writeable? Y / Nullable? N
timeZonestringAccount 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*timestampBalance 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
endDatetimestampBalance 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 indefinitely
Writeable? Y / Nullable? Y
createdAttimestampTimestamp of campaign creation, in UTC

Accepted values: yyyy-mm-ddThh:mm:ss±hh:mm(in ISO-8601)
Writeable? N / Nullable? N
updatedAttimestampTimestamp of last campaign update, in UTC

Accepted values: yyyy-mm-ddThh:mm:ss±hh:mm(in ISO-8601)
Writeable? N / Nullable? N
paramStringstringExample of param description here, with data type being string

Accepted values: up to 255-chars string
Writeable? Y / Nullable? Y
paramEnumenumExample of param description here, with data type being enum

Accepted values: json, json-compact, json-newline, csv
Default: json
Writeable? N / Nullable? N
paramBoolean*booleanExample of param description here, with data type being boolean

Accepted values: true, false
Default: false
Writeable? Y / Nullable? N
paramIntegerintegerExample of param description here, with data type being integer

Accepted values: between 0 and 100
Writeable? Y / Nullable? N
paramDecimaldecimalExample 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
paramDatedateExample of param description here, with data type being date

Accepted values: YYYY-MM-DD
Writeable? Y / Nullable? N
paramTimestamp*timestampExample 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*listExample of param description here, with data type being list/array of strings/int64

Accepted values: array of strings/int64
Writeable? N / Nullable? N
paramListEnum*listExample 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
paramObjectobjectExample 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 three

Writeable? 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

ResponseTitleDetailTroubleshooting
🟢 200Call executed with success
🟢 201Entity request created with success
🔴 400Deserialization errorone or more input parameters is not supported; see details for more info
🔴 400Please select an interval under 100 daysusing a date range with more than 100 days apart between startDate and endDate
🔴 400Time zone xyz is not validusing a time zone value that is not listed in the list TZ database time zones
🔴 403The scope Billing is missingThe scope Billing is required to access this endpoint and is missing from the provided tokenThe respective API app doesn't have access to the domain/scope Billing. Review the Types of Permissions in Authorization Requests
🔴 403Authorization errorResource access forbidden: all the retailers are not accessible.Review the Retailer ID(s) informed in the report request