Discard
GuidesAPI ReferenceChangelogDiscussions
GuidesAPI ReferenceChangelogDiscussionsLog In

Line Items settings

  • A line item holds promoted products to advertise on any single retailer
  • Line items have basic settings such as start & end dates, optional budget settings & associated retailers on which ads are served
  • Budgets may additionally be controlled at the campaign level
  • Several reports are available to measure line item performance
  • Campaigns are limited to 10,000 non-archived line items
  • Line items are archived automatically 90 days after its end date

Endpoints

  • GET /accounts/{accountId}/line-items Get All Line Items
  • GET /line-items/{lineItemId} Get a Specific Line Item

Line Item Attributes

Attribute

Description

Values

Required

Default

Write

Nullable

id string

Line item ID

int64

type enum

Campaign type

auction, preferred

Required

campaignId string

Campaign ID

int64

R

name string

Line item name; must be unique within a campaign

255 char limit

R

Write

targetRetailerId string

ID of the retailer the line item serves on

int64

R

startDate date

Line item start date in the account timeZone

YYYY-MM-DD

R

W

endDate date

Line item end date in the account timeZone; serves indefinitely if omitted or set to null

YYYY-MM-DD

Optional

null

W

Yes

budget number

Line item lifetime spend cap; uncapped if omitted or set to null

at least 0

O

budgetSpent number

Amount the line item has already spent

at least 0

0.0

budgetRemaining number

Amount the line item has remaining until cap is hit; null if budget is uncapped

between 0 and budget

null

Yes

status enum

Line item status; can only be updated by a user to active or paused; all other values are applied automatically depending on flight dates, financials, or missing attributes required for line item to serve

active, paused, scheduled, ended, budgetHit, noFunds, draft, archived

W

createdAt timestamp

Timestamp in UTC of line item creation

ISO-8601

updatedAt timestamp

Timestamp in UTC of last line item update

ISO-8601

Get All Line Items

This endpoint lists all line items in the specified campaign. Results are paginated.

https://api.criteo.com/2022-04/retail-media/accounts/{accountId}/line-items

Sample Request

curl -X GET "https://api.criteo.com/2022-04/retail-media/accounts/123456/line-items" \
    -H "Authorization: Bearer myaccesstoken"

Sample Response

{
    "data": [
        {
            "type": "RetailMediaLineItem",
            "id": "9979917896105882144",
            "attributes": {
                "campaignId": "8343086999167541140",
                "name": "Line Item 123",
                "targetRetailerId": "3239117063738827231",
                "startDate": "2020-04-06",
                "endDate": null,
                "budget": null,
                "budgetSpent": 2383.87,
                "budgetRemaining": null,
                "status": "active",
                "createdAt": "2020-04-06T17:29:11+00:00",
                "updatedAt": "2020-04-06T17:29:11+00:00"
            }
        },
 
        // ...
 
        {
            "type": "RetailMediaLineItem",
            "id": "6854840188706902009",
            "attributes": {
                "campaignId": "8343086999167541140",
                "name": "Line Item 789",
                "targetRetailerId": "18159942378514859684",
                "startDate": "2020-04-08",
                "endDate": null,
                "budget": 8000.00,
                "budgetSpent": 1921.23,
                "budgetRemaining": 6078.77,
                "status": "paused",
                "createdAt": "2020-04-06T23:42:47+00:00",
                "updatedAt": "2020-06-03T03:01:52+00:00"       
            }
        }
    ],
    "metadata": {
        "totalItemsAcrossAllPages": 105,
        "currentPageSize": 25,
        "currentPageIndex": 0,
        "totalPages": 5,
        "nextPage": "https://api.criteo.com/2022-04/retail-media/accounts/123456/line-items?pageIndex=1&pageSize=25",
        "previousPage": null
    }
}

Get a Specific Line Item

This endpoint retrieves the specified line item

https://api.criteo.com/2022-04/retail-media/line-items/{lineItemId}

Sample Request

curl -X GET "https://api.criteo.com/2022-04/retail-media/line-item/2465695028166499188" \
    -H "Authorization: Bearer myaccesstoken"

Sample Response

{
    "data": { 
        "type": "RetailMediaLineItem",
        "id": "2465695028166499188",
        "attributes": {
            "campaignId": "8343086999167541140",
            "name": "My New Line Item",
            "targetRetailerId": "18159942378514859684",
            "startDate": "2020-04-06",
            "endDate": null,
            "budget": null,
            "budgetSpent": 0.00,
            "budgetRemaining": null,
            "status": "draft",
            "createdAt": "2020-04-06T06:11:23+00:00",
            "updatedAt": "2020-04-06T06:11:23+00:00"
        }
    }
}

Did this page help you?