Getting StartedLearn more about campaign management with our API here
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /accounts/{accountId}/balances | Retrieve all balances associated with a specific account. |
| POST | /accounts/{accountId}/balances | Create a new balance for a specified account. |
| PATCH | /accounts/{accountId}/balances/{balanceId} | Modify balance’s metadata (name, start/end date - for deposited funds, see below) |
| POST | /accounts/{accountId}/balances/{balanceId}/add-funds | Add/remove funds deposited in a specific balance. |
| GET | /balances/{balanceId}/campaigns | Retrieve all campaigns linked to a specific balance. |
| POST | /balances/{balanceId}/campaigns/append | Add campaigns to a specific balance. |
| POST | /balances/{balanceId}/campaigns/delete | Remove campaigns from a specific balance. |
| GET | /balances/{balanceId}/history | Retrieve all changes made historically to a balance |
Balance Parameters
| Attribute | Data Type | Description |
|---|---|---|
id | string | Balance IDAccepted values: string of int64 Writeable? N / Nullable? N |
name* | string | Balance nameAccepted values: up to 255-char strings Writeable? Y / Nullable? N |
poNumber | string | Purchase order numberAccepted values: up to 32-char strings Writeable? Y / Nullable? Y |
deposited | decimal | Amount of funds deposited; uncapped if nullAccepted values: deposited ≥ 0.0Writeable? Y / Nullable? Y |
spent | decimal | Amount of funds already spentAccepted values: 0 ≤ spent ≤ depositedWriteable? N / Nullable? N |
remaining | decimal | Amount of funds already spentAccepted values: 0 ≤ remaining ≤ deposited (or null, if deposited not set)Writeable? N / Nullable? Y |
startDate* | timestamp | Balance start date; if time zone is not set, will consider Account’s time zone as defaultAccepted 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 defaultAccepted values: yyyy-mm-ddThh:mm:ss±hh:mm(in ISO-8601 )Default: if null or absent, balance will be available indefinitelyWriteable? Y / Nullable? Y |
status | enum | Balance current statusAccepted values: active, scheduled, endedWriteable? N / Nullable? N |
createdAt | timestamp | Timestamp of balance creation, in UTCAccepted values: yyyy-mm-ddThh:mm:ss±hh:mm (in ISO-8601)Writeable? N / Nullable? N |
updatedAt | timestamp | Timestamp of last balance update, in UTCAccepted values: yyyy-mm-ddThh:mm:ss±hh:mm (in ISO-8601)Writeable? N / Nullable? N |
memo | string | An optional memo note that can be set in the balanceAccepted values: up to 250-char strings Writeable? Y / Nullable? Y |
balanceType | enum | The balance type is computed based on the deposited amount:Accepted values: capped, uncappedWriteable? N / Nullable? N
|
spendType | enum | The type of balance that will be used based on the campaign typeAccepted values: Onsite, Offsite, OffsiteAwarenessWriteable? N / Nullable? N |
privateMarketBillingType | enum | Billing type of the balance (for Private Market)Accepted values: notApplicable, billByRetailer, billByCriteoWriteable? N / Nullable? N |
Balance History Parameters
| Attribute | Data Type | Description |
|---|---|---|
dateOfModification | timestamp | Timestamp of balance updateAccepted values: yyyy-mm-ddThh:mm:ss±hh:mm (in ISO-8601)Writeable? N / Nullable? N |
modifiedByUser | string | Username who modified the insertion orderAccepted values: strings in format “j.doe” Writeable? N / Nullable? N |
changeType | enum | Definition of the type of change in a balanceAccepted values:
|
changeDetails | object | Structure with the change details (from Balance History endpoint)Parameters:
|
Get all Balances
This endpoint lists all balances in an account. The results are provided in a paginated format. Sample RequestCreate a Balance
This endpoint creates a new balance in the specified account. Sample RequestModify Balance metadata
This endpoint modifies the metadata of a specified balance, likename, poNumber, startDate or endDate.
To modify deposited funds, check the following endpoint /accounts/{accountId}/balances/{balanceId}/add-funds
Sample Request
Add or remove Balance funds
This endpoint allows to add or remove funds deposited in a specific balance Request Body Parameters| Attribute | Data Type | Description |
|---|---|---|
deltaAmount* | decimal | Difference amount of fund to be added/removed from balance; it cannot reduce the current amount of funds deposited to less than zeroAccepted values: deltaAmount≥ deposited * (-1) Writeable? N / Nullable? N |
poNumber | string | New purchase order numberAccepted values: up to 32-char strings Writeable? Y / Nullable? Y |
memo* | string | A memo note that should be set in the balance together with this modificationAccepted values: up to 250-char strings Writeable? Y / Nullable? Y |
Get all Campaigns on a specific Balance
This endpoint lists all campaigns on the specified balance. The results are provided in a paginated format. Response Body Parameters| Attribute | Data Type | Description |
|---|---|---|
id | string | Campaign ID, respective to the campaign(s) currently appended to the balanceAccepted values: string of int64 Writeable? N / Nullable? N |
Add Campaigns to a specific Balance
This endpoint adds one or more campaigns to the specified balance. The results are provided in a single page. In this example, a campaign had already existed on the balance before two new additions. Request Body Parameters| Attribute | Data Type | Description |
|---|---|---|
id | string | Campaign ID, required to define to which campaign(s) the balance should be appended or deletedAccepted values: string of int64 Writeable? N / Nullable? N |
Remove Campaigns from a specific Balance
This endpoint removes one or more campaigns from the specified balance. The resulting state of the balance is returned as a single page. Request Body Parameters| Attribute | Data Type | Description |
|---|---|---|
id | string | Campaign ID, required to define to which campaign(s) the balance should be appended or deletedAccepted values: string of int64 Writeable? N / Nullable? N |
Get Balance History
This endpoint lists all changes made to a specific balance. The results are provided in a paginated format (using query parametersoffset and limit) and can be filtered by a comma-separated list of changeType values.
Modified Users
modifiedByUser - When a balance is updated via Criteo’s Retail Media UI, the user login name will be provided. For instance, if “Kip Heaney” updated the balance on 2023-11-07, it indicates that Kip made the change through the Criteo Retail Media UI.If a balance is updated through the Criteo API, the name of the API application responsible for the change will be shown. For example, on 2024-03-20, the balance was updated by the API application Retail Media API Application.Responses
| Response | Title | Detail | Troubleshooting |
|---|---|---|---|
🟢 200 | Call executed with success | ||
🟢 201 | Balance request created with success | ||
🔴 400 | Error deserializing request | Field xyz is not valid | Review the value of field xyz provided in the request |
🔴 400 | Change data capture type xxx is not supported | Change data capture type xxx is not supported | The value of limitToChangeTypes is not supported for /balances/{balanceId} /history - ensure to use a comma-separated list of availablechangeType values defined above |
🔴 400 | Invalid name | Balance name should be unique. There exists balance with the specified name. Balance creation/update has been canceled | Check value of name in the request trying to create/edit a balance. In case of editing, either provided a new name value or omit this parameter to maintain its same value |
🔴 400 | Invalid deltaamount | Can not decrease funds to less than zero | Review value of deltaAmount and make sure it’s greater than current balance’s deposited * (-1) |
🔴 403 | Authorization error | Resource access forbidden: does not have permissions | One of the permission levels was not respected. Make sure that the respective API app has access to:
|