> ## Documentation Index
> Fetch the complete documentation index at: https://developers.criteo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Onsite Sponsored Products Line Items

export const EndpointBadge = ({method = "GET", children}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-[#2AB673]"
    },
    POST: {
      bg: "mint-bg-[#3064E3]"
    },
    PUT: {
      bg: "mint-bg-[#C28C30]"
    },
    PATCH: {
      bg: "mint-bg-[#DA622B]"
    },
    DELETE: {
      bg: "mint-bg-[#CB3A32]"
    },
    API: {
      bg: "mint-bg-black"
    }
  };
  const key = method.toUpperCase();
  const styles = METHOD_STYLES[key] ?? METHOD_STYLES.API;
  return <div className="relative mt-7">
      <span className={`absolute -top-2 -left-2 z-10 ${styles.bg} text-white px-2.5 py-0.5 rounded-full text-xs font-bold tracking-wide`}>
        {key}
      </span>
      {children}
    </div>;
};

<Info>
  **Get Started**

  Learn more about how open auction line items work with our API in [Onsite Sponsored Products](/retail-media/docs/onsite-sponsored-products).
</Info>

***

## Endpoints

<table>
  <thead>
    <tr>
      <th>
        <p>
          Method
        </p>
      </th>

      <th>
        <p>
          Endpoint
        </p>
      </th>

      <th>
        <p>
          Description
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          <b>
            GET
          </b>
        </p>
      </td>

      <td>
        <p>
          <code>
            /campaigns/\{campaignId}/auction-line-items
          </code>
        </p>
      </td>

      <td>
        <p>
          Get all auction line items from a specific campaign
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <b>
            POST
          </b>
        </p>
      </td>

      <td>
        <p>
          <code>
            /campaigns/\{campaignId}/auction-line-items
          </code>
        </p>
      </td>

      <td>
        <p>
          Create a new auction line item
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <b>
            GET
          </b>
        </p>
      </td>

      <td>
        <p>
          <code>
            /auction-line-items/\{lineItemId}
          </code>
        </p>
      </td>

      <td>
        <p>
          Get a specific auction line item
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <b>
            PUT
          </b>
        </p>
      </td>

      <td>
        <p>
          <code>
            /auction-line-items/\{lineItemId}
          </code>
        </p>
      </td>

      <td>
        <p>
          Update a specific auction line item
        </p>
      </td>
    </tr>
  </tbody>
</table>

<Info>
  **Field Definitions**

  * `Create` operations using the `POST` method expect every **Required** field; omitting **Optional** fields will set those fields to **Default** values.
  * `Update` operations using the `PUT` method expect every **Writeable** field; omitting these fields is equivalent to setting them to `null`, if possible.
</Info>

***

## Line Item Attributes

<table>
  <thead>
    <tr>
      <th>
        <p>
          Attribute
        </p>
      </th>

      <th>
        <p>
          Data Type
        </p>
      </th>

      <th>
        <p>
          Description
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          <code>
            id
          </code>
        </p>
      </td>

      <td>
        <p>
          string
        </p>
      </td>

      <td>
        <p>
          Auction line item ID, generated internally by Criteo
        </p>

        <p>
          Accepted values: string of int64
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            name
          </code>

          <span>\*</span>
        </p>
      </td>

      <td>
        <p>
          string
        </p>
      </td>

      <td>
        <p>
          Line item name, must be unique within the <a href="/retail-media/docs/campaign">Campaign</a>
        </p>

        <p>
          Accepted values: between 2 and 255-chars string
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            campaignId
          </code>

          <span>\*</span>
        </p>
      </td>

      <td>
        <p>
          string
        </p>
      </td>

      <td>
        <p>
          Campaign ID, in which the respective line item belongs and generated internally by Criteo
        </p>

        <p>
          Accepted values: string of int64
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            targetRetailerId
          </code>

          <span>\*</span>
        </p>
      </td>

      <td>
        <p>
          string
        </p>
      </td>

      <td>
        <p>
          Retailer ID where the line item will serve ads on. For retailer-budgets campaigns, must match the campaign's

          <code>
            retailerId
          </code>

          . Only one retailer is allowed per retailer-billed campaign.
        </p>

        <p>
          Accepted values: string of int64
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            startDate
          </code>

          <span>\*</span>
        </p>
      </td>

      <td>
        <p>
          date
        </p>
      </td>

      <td>
        <p>
          Start date of the line item, used to schedule its activation and start serving ads. To understand the conditions that will cause a status to change, check out Campaign & Line Item Status
        </p>

        <p>
          ℹ️ This now supports datetime offset to define the desired time zone, in the format of

          <code>
            ±hh:mm
          </code>

          . If omitted in create/update operations, UTC will be considered the default time zone. Values are returned in UTC in responses; dates are normalized to account timezone internally.
        </p>

        <p>
          Accepted values:

          <code>
            yyyy-mm-ddThh:mm:ss±hh:mm or yyyy-mm-dd
          </code>

          (in ISO-8601)
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            endDate
          </code>
        </p>
      </td>

      <td>
        <p>
          date
        </p>
      </td>

      <td>
        <p>
          End date of the line item; serves ads indefinitely if omitted or set to

          <code>
            null
          </code>

          . To understand the conditions that will cause a status to change, check out Campaign & Line Item Status
        </p>

        <p>
          ℹ️ This now supports datetime offset to define the desired time zone, in the format of

          <code>
            ±hh:mm
          </code>

          . If omitted in create/update operations, UTC will be considered the default time zone. Values are returned in UTC in responses; dates are normalized to account timezone internally.
        </p>

        <p>
          Accepted values:

          <code>
            yyyy-mm-ddThh:mm:ss±hh:mm or yyyy-mm-dd
          </code>

          (in ISO-8601 )
        </p>

        <p>
          Default: if

          <code>
            null
          </code>

          or absent, line item will serve ads indefinitely
        </p>

        <p>
          Writeable? Y / Nullable? Y
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            budget
          </code>
        </p>
      </td>

      <td>
        <p>
          decimal
        </p>
      </td>

      <td>
        <p>
          Lifetime spend cap of line item (optional), uncapped if omitted or set to

          <code>
            null
          </code>
        </p>

        <p>
          Accepted values:

          <code>
            budget
          </code>

          ≥ 0.0
        </p>

        <p>
          Default:

          <code>
            null
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? Y
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            budgetSpent
          </code>
        </p>
      </td>

      <td>
        <p>
          decimal
        </p>
      </td>

      <td>
        <p>
          Budget amount the line item has already spent
        </p>

        <p>
          Accepted values:

          <code>
            budgetSpent
          </code>

          ≥ 0.0
        </p>

        <p>
          Default:

          <code>
            0.0
          </code>
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            budgetRemaining
          </code>
        </p>
      </td>

      <td>
        <p>
          decimal
        </p>
      </td>

      <td>
        <p>
          Amount the line item has remaining until cap is hit;

          <code>
            null
          </code>

          if budget is uncapped
        </p>

        <p>
          Accepted values: 0 ≤

          <code>
            budgetRemaining
          </code>

          ≤

          <code>
            budget
          </code>
        </p>

        <p>
          Default:

          <code>
            0.0
          </code>
        </p>

        <p>
          Writeable? N / Nullable? Y
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            monthlyPacing
          </code>
        </p>
      </td>

      <td>
        <p>
          decimal
        </p>
      </td>

      <td>
        <p>
          Amount the line item can spend per calendar month (optional), in the Account time zone. Omitting or setting to

          <code>
            null
          </code>

          leaves the monthly spend uncapped.
        </p>

        <p>
          Accepted values:

          <code>
            monthlyPacing
          </code>

          ≥ 0.0 (or

          <code>
            null
          </code>

          )
        </p>

        <p>
          Default:

          <code>
            0.0
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? Y
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            dailyPacing
          </code>
        </p>
      </td>

      <td>
        <p>
          decimal
        </p>
      </td>

      <td>
        <p>
          Amount the line item can spend per calendar day (optional), in the Account time zone. It resets each day; overwritten by calculation if

          <code>
            isAutoDailyPacing
          </code>

          is enabled; uncapped if omitted or set to

          <code>
            null
          </code>
        </p>

        <p>
          Accepted values:

          <code>
            dailyPacing
          </code>

          ≥ 0.0 (or

          <code>
            null
          </code>

          )
        </p>

        <p>
          Default:

          <code>
            0.0
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? Y
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            isAutoDailyPacing
          </code>
        </p>
      </td>

      <td>
        <p>
          boolean
        </p>
      </td>

      <td>
        <p>
          To activate, either line item

          <code>
            endDate
          </code>

          and budget, or

          <code>
            monthlyPace
          </code>

          , must be specified; overwrites

          <code>
            dailyPacing
          </code>

          with calculation if not set prior
        </p>

        <p>
          Accepted values:

          <code>
            true
          </code>

          ,

          <code>
            false
          </code>
        </p>

        <p>
          Default:

          <code>
            false
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            bidStrategy
          </code>
        </p>
      </td>

      <td>
        <p>
          enum
        </p>
      </td>

      <td>
        <p>
          Indicate whether Adaptive CPC is enabled or not

          <code>
            automated
          </code>

          will trigger a validation against the

          <code>
            maxBid
          </code>

          to ensure that it is present.

          <code>
            manual
          </code>

          will trigger a validation against the

          <code>
            targetBid
          </code>

          to ensure that a bid for the line item have been input.
        </p>

        <p>
          Accepted values:

          <code>
            automated
          </code>

          ,

          <code>
            manual
          </code>
        </p>

        <p>
          Default:

          <code>
            manual
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            optimizationStrategy
          </code>
        </p>
      </td>

      <td>
        <p>
          enum
        </p>
      </td>

      <td>
        <p>
          Bid algorithm optimizing for sales conversions, sales revenue or clicks
        </p>

        <p>
          Accepted values:

          <code>
            conversion
          </code>

          ,

          <code>
            revenue
          </code>

          ,

          <code>
            clicks
          </code>
        </p>

        <p>
          Default:

          <code>
            conversion
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            targetBid
          </code>
        </p>
      </td>

      <td>
        <p>
          bidStrategy decimal
        </p>
      </td>

      <td>
        <p>
          If optimizing for

          <code>
            conversion
          </code>

          or

          <code>
            revenue
          </code>

          , a target average amount to bid (as each bid is modulated up/down by our optimization algorithm); else bids stay constant, if optimizing for

          <code>
            clicks
          </code>

          Bidding is uncapped if omitted or set to

          <code>
            null
          </code>
        </p>

        <p>
          ℹ️ Note:
        </p>

        <ul>
          <li>
            Must meet

            <code>
              minBid
            </code>

            for line item to deliver ads, which depends on selected products (available through the Catalog)
          </li>

          <li>
            Input excludes platform fees
          </li>
        </ul>

        <p>
          Accepted values: at least the greatest value of

          <code>
            minBid
          </code>

          across all products in the line item
        </p>

        <p>
          Default:

          <code>
            0.3
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? Y
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            maxBid
          </code>
        </p>
      </td>

      <td>
        <p>
          decimal
        </p>
      </td>

      <td>
        <p>
          If optimizing for

          <code>
            conversion
          </code>

          or

          <code>
            revenue
          </code>

          , the maximum amount allowed to bid for each display (respected regardless of

          <code>
            targetBid
          </code>

          ). Does not apply if optimizing for

          <code>
            clicks
          </code>

          Bidding is uncapped if omitted or set to

          <code>
            null
          </code>
        </p>

        <p>
          ℹ️ Note:
        </p>

        <ul>
          <li>
            Must meet

            <code>
              minBid
            </code>

            for line item to deliver ads, which depends on selected products (available through the Catalog)
          </li>

          <li>
            Input excludes platform fees
          </li>
        </ul>

        <p>
          Accepted values: at least

          <code>
            0.1
          </code>
        </p>

        <p>
          ⚠️ <b>Note:</b> As of <code>2026-01</code>, <code>maxBid</code> is required when <code>bidStrategy: automated</code>. When set to <code>null</code>, the API returns <code>0</code> in responses, but the system treats it internally as uncapped (no bid ceiling).
        </p>

        <p>
          Writeable? Y / Nullable? Y
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            status
          </code>
        </p>
      </td>

      <td>
        <p>
          enum
        </p>
      </td>

      <td>
        <p>
          Line item status; can only be updated by a user to

          <code>
            active
          </code>

          or

          <code>
            paused
          </code>

          ; all other values are applied automatically depending on financials, flight dates, or missing attributes required for line item to serve. To understand the conditions that will cause a status to change, check out Campaign & Line Item Status
        </p>

        <p>
          Accepted values:

          <code>
            active
          </code>

          ,

          <code>
            paused
          </code>

          ,

          <code>
            scheduled
          </code>

          ,

          <code>
            ended
          </code>

          ,

          <code>
            budgetHit
          </code>

          ,

          <code>
            noFunds
          </code>

          ,

          <code>
            draft
          </code>

          ,

          <code>
            archived
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            flightSchedule
          </code>
        </p>
      </td>

      <td>
        <p>
          object
        </p>
      </td>

      <td>
        <p>
          Settings allowing custom scheduling for serving ads serving, organized by a combination of

          <code>
            legs
          </code>

          . In case of

          <code>
            null
          </code>

          or empty

          <code>
            legs
          </code>

          , the line item status will remain unchanged along the weekdays and hours, as long as other delivery parameters are respected - see Campaign & Line Item Status
        </p>

        <p>
          Accepted values: see below
        </p>

        <p>
          Writeable? Y / Nullable? Y
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            keywordStrategy
          </code>
        </p>
      </td>

      <td>
        <p>
          enum
        </p>
      </td>

      <td>
        <p>
          Keyword strategy used to target users according to the promoted products appended in the line item and their competitors
        </p>

        <p>
          ℹ️ Note: "*Conquesting*" is not available for all retailers; when creating a new line item for those retailers, a validation error will return which can be avoided by omitting this attribute from the request
        </p>

        <p>
          Accepted values:
        </p>

        <ul>
          <li>
            <code>
              genericAndBranded
            </code>

            : enables users who submit general keywords and also keywords related to the brand(s) to target the promoted products associated with the line item (default behavior)
          </li>

          <li>
            <code>
              conquesting
            </code>

            : enables users who submit keywords identified as competitor(s) from the brand(s) related to the promoted products associated with the line item (manual review required)
          </li>

          <li>
            <code>
              genericBrandedAndConquesting
            </code>

            : enables users who submit keywords related to both brand(s) and competitor(s) from the promoted products of line item (manual review required)
          </li>
        </ul>

        <p>
          Default:

          <code>
            genericAndBranded
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            createdAt
          </code>
        </p>
      </td>

      <td>
        <p>
          timestamp
        </p>
      </td>

      <td>
        <p>
          Timestamp of line item creation, in UTC
        </p>

        <p>
          Accepted values:

          <code>
            yyyy-mm-ddThh:mm:ss±hh:mm
          </code>

          (in ISO-8601)
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            updatedAt
          </code>
        </p>
      </td>

      <td>
        <p>
          timestamp
        </p>
      </td>

      <td>
        <p>
          Timestamp of last line item update, in UTC
        </p>

        <p>
          Accepted values:

          <code>
            yyyy-mm-ddThh:mm:ss±hh:mm
          </code>

          (in ISO-8601)
        </p>

        <p>
          Default: same as

          <code>
            createdAt
          </code>
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>
  </tbody>
</table>

(\*) *Required for create operations*

<Info>
  **Field Definitions**

  * **Writeable (Y/N)**: Indicates if the field can be modified in requests.
  * **Nullable (Y/N)**: Indicates if the field can accept null/empty values.
  * **Primary Key**: A unique, immutable identifier of the entity, generated internally by Criteo. Primary keys are typically ID fields (e.g., `retailerId`, `campaignId`, `lineItemId`) and are usually required in the URL path.
</Info>

***

## Flight Schedule Legs Attributes

<table>
  <thead>
    <tr>
      <th>
        <p>
          Attribute
        </p>
      </th>

      <th>
        <p>
          Data Type
        </p>
      </th>

      <th>
        <p>
          Description
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          <code>
            dayOfWeek
          </code>
        </p>
      </td>

      <td>
        <p>
          enum
        </p>
      </td>

      <td>
        <p>
          Day of the week or day type that the respective

          <code>
            leg
          </code>

          should be effective, i.e., the respective line item should be activated (in case all other conditions are satisfied)
        </p>

        <p>
          Accepted values:

          <code>
            sunday
          </code>

          ,

          <code>
            monday
          </code>

          ,

          <code>
            tuesday
          </code>

          ,

          <code>
            wednesday
          </code>

          ,

          <code>
            thursday
          </code>

          ,

          <code>
            friday
          </code>

          ,

          <code>
            saturday
          </code>

          ,

          <code>
            everyday
          </code>

          ,

          <code>
            weekdays
          </code>

          ,

          <code>
            weekends
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            startTime
          </code>
        </p>
      </td>

      <td>
        <p>
          time
        </p>
      </td>

      <td>
        <p>
          Start time that the respective

          <code>
            leg
          </code>

          should be effective, i.e., the respective line item should be activated (in case all other conditions are satisfied)
        </p>

        <p>
          ℹ️ This time value will be interpreted considering the time zone provided in the

          <code>
            startDate
          </code>

          /

          <code>
            endDate
          </code>

          above
        </p>

        <p>
          Accepted values:

          <code>
            hh:mm
          </code>

          , with values between

          <code>
            00:00
          </code>

          and

          <code>
            23:59
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            endTime
          </code>
        </p>
      </td>

      <td>
        <p>
          time
        </p>
      </td>

      <td>
        <p>
          End time that the respective

          <code>
            leg
          </code>

          should be effective, i.e., the respective line item should be deactivated (in case all other conditions are satisfied)
        </p>

        <p>
          ℹ️ This time value will be interpreted considering the time zone provided in the

          <code>
            startDate
          </code>

          /

          <code>
            endDate
          </code>

          above
        </p>

        <p>
          Accepted values:

          <code>
            hh:mm
          </code>

          , with values between

          <code>
            00:00
          </code>

          and

          <code>
            23:59
          </code>
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>
  </tbody>
</table>

***

## Get all Onsite Sponsored Products Line Items

This endpoint lists all Onsite Sponsored Products line items in the specified campaign.

<Warning>
  This endpoint now returns `null` in the `budgetRemaining` field for line items with uncapped budgets and line items with missing budgets.
</Warning>

Results are paginated using `offset` and `limit` query parameters; if omitted, defaults to `0` and `500`, respectively. See [API Response](/retail-media/docs/api-response#pagination).

<EndpointBadge method="get">
  ```http theme={null}
  https://api.criteo.com/{version}/retail-media/campaigns/{campaignId}/auction-line-items
  ```
</EndpointBadge>

**Sample Request**

<CodeGroup>
  ```bash cURL theme={null}
  curl -L -X GET "https://api.criteo.com/{version}/retail-media/campaigns/544937665113018368/auction-line-items?offset=0&limit=500" \
      -H "Authorization: Bearer <MY_ACCESS_TOKEN>" \
      -H "Accept: application/json"
  ```

  ```python Python theme={null}
  import http.client

  conn = http.client.HTTPSConnection("api.criteo.com")

  headers = {
      'Authorization': 'Bearer <MY_ACCESS_TOKEN>',
      'Accept': 'application/json'
  }

  conn.request("GET", "/{version}/retail-media/campaigns/544937665113018368/auction-line-items?offset=0&limit=500", headers=headers)

  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
  ```

  ```java Java theme={null}
  OkHttpClient client = new OkHttpClient().newBuilder()
      .build();

  Request request = new Request.Builder()
      .url("https://api.criteo.com/{version}/retail-media/campaigns/544937665113018368/auction-line-items?offset=0&limit=500")
      .method("GET", null)
      .addHeader("Authorization", "Bearer <MY_ACCESS_TOKEN>")
      .addHeader("Accept", "application/json")
      .build();

  Response response = client.newCall(request).execute();
  ```

  ```php PHP theme={null}
  <?php
  require_once 'HTTP/Request2.php';
  $request = new HTTP_Request2();
  $request->setUrl('https://api.criteo.com/{version}/retail-media/campaigns/544937665113018368/auction-line-items?offset=0&limit=500');
  $request->setMethod(HTTP_Request2::METHOD_GET);
  $request->setConfig([
      'follow_redirects' => TRUE
  ]);
  $request->setHeader([
      'Authorization' => 'Bearer <MY_ACCESS_TOKEN>',
      'Accept' => 'application/json'
  ]);

  try {
      $response = $request->send();
      if ($response->getStatus() == 200) {
          echo $response->getBody();
      } else {
          echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase();
      }
  } catch(HTTP_Request2_Exception $e) {
      echo 'Error: ' . $e->getMessage();
  }
  ```
</CodeGroup>

**Sample Response**

```json expandable theme={null}
{
    "data": [
        {
            "id": "9979917896105882144",
            "type": "SponsoredProductsLineItem",
            "attributes": {
                "name": "Line Item 123 Always On",
                "campaignId": "544937665113018368",
                "targetRetailerId": "12345",
                "startDate": "2024-09-01T04:00:00+00:00",
                "endDate": null,
                "status": "active",
                "budget": 5000.00,
                "budgetSpent": 2354.38,
                "budgetRemaining": 2645.62,
                "maxBid": 2.50,
                "targetBid": null,
                "monthlyPacing": null,
                "dailyPacing": null,
                "isAutoDailyPacing": false,
                "bidStrategy": "automated",
                "optimizationStrategy": "conversion",
                "flightSchedule": null,
                "keywordStrategy": "genericBrandedAndConquesting",
                "createdAt": "2024-08-24T15:46:45.1578781+00:00",
                "updatedAt": "2025-08-12T08:02:36.9158515+00:00"
            }
        },
        // ...
        {
            "id": "6854840188706902009",
            "type": "SponsoredProductsLineItem",
            "attributes": {
                "name": "Line Item 456 - Weekends Only",
                "campaignId": "544937665113018368",
                "targetRetailerId": "6789",
                "startDate": "2025-08-09T04:00:00+00:00",
                "endDate": "2026-01-01T03:59:59+00:00",
                "status": "draft",
                "budget": 12000.00,
                "budgetSpent": 0.00,
                "budgetRemaining": 12000.00,
                "maxBid": 5.0,
                "targetBid": null,
                "monthlyPacing": null,
                "dailyPacing": null,
                "bidStrategy": "automated",
                "optimizationStrategy": "conversion",
                "isAutoDailyPacing": false,
                "flightSchedule": {
                    "legs": [
                        {
                            "dayOfWeek": "Weekends",
                            "startTime": "00:00",
                            "endTime": "23:59"
                        }
                    ]
                },
                "keywordStrategy": "genericAndBranded",
                "createdAt": "2025-07-24T15:46:45.7793506-04:00",
                "updatedAt": "2025-08-12T08:02:36.9158515-04:00"
            }
        },
    ],
    "metadata": {
        "count": 35,
        "offset": 0,
        "limit": 25
    },
    "warnings": [],
    "errors": []
}
```

**Sample response with uncapped or missing budget**

```json theme={null}
{
  "data": [
    {
      "attributes": {
        "name": "Oscar Mayer Bacon - Giant Eagle",
        "startDate": "2026-01-01",
        "endDate": null,
        "maxBid": null,
        "budget": null,
        "monthlyPacing": 744,
        "dailyPacing": 24.88888889,
        "bidStrategy": "automated",
        "targetRetailerId": "1084",
        "status": "active",
        "targetBid": 0.6,
        "isAutoDailyPacing": true,
        "campaignId": "789229599621738496",
        "budgetSpent": 1576.8,
        "budgetRemaining": null,
        "createdAt": "2025-12-17T20:37:31+00:00",
        "updatedAt": "2026-03-05T11:01:11+00:00",
        "id": "789229817782235136"
      },
      "id": "789229817782235136",
      "type": "RetailMediaAuctionLineItem"
    }
  ]
}
```

***

## Create an Onsite Sponsored Products Line Item

This endpoint creates a new Onsite Sponsored Products line item in the specified campaign.

<Warning>
  **Retailer Budgets Campaigns**

  For retailer-budget campaigns, `targetRetailerId` must match the campaign's `retailerId`. Mismatched values will return a `RetailerMismatchWithCampaign` error.

  Learn more about Retailer Budgets [here](/retail-media/docs/retailer-budgets).

  **Note:** `bidStrategy: "automated"` requires `maxBid` to be set.
</Warning>

<EndpointBadge method="post">
  ```http theme={null}
  https://api.criteo.com/{version}/retail-media/campaigns/{campaignId}/auction-line-items
  ```
</EndpointBadge>

**Sample Request**

```bash cURL theme={null}
curl -L -X POST '{version}/retail-media/campaigns/{campaignId}/auction-line-items' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <MY_ACCESS_TOKEN>' \
-d '{
  "data": {
    "type": "SponsoredProductsLineItem",
    "attributes": {
      "name": "My Retailer Budget Line Item",
      "targetRetailerId": "123",
      "startDate": "2026-06-01T00:00:00+00:00",
      "bidStrategy": "automated",
      "maxBid": 5.0,
      "optimizationStrategy": "conversion",
      "keywordStrategy": "genericAndBranded"
    }
  }
}'
```

**Sample Response**

```json expandable theme={null}
{
  "data": {
    "id": "100000000000000001",
    "type": "SponsoredProductsLineItem",
    "attributes": {
      "name": "My Retailer Budget Line Item",
      "startDate": "2026-06-01T00:00:00+00:00",
      "endDate": null,
      "status": "draft",
      "targetBid": null,
      "targetRetailerId": "123",
      "budget": null,
      "campaignId": "100000000000000001",
      "budgetSpent": 0.0,
      "budgetRemaining": null,
      "createdAt": "2026-05-29T20:33:29+00:00",
      "updatedAt": "2026-05-29T20:33:29+00:00",
      "maxBid": 5.0,
      "monthlyPacing": null,
      "dailyPacing": null,
      "optimizationStrategy": "conversion",
      "isAutoDailyPacing": false,
      "flightSchedule": null,
      "keywordStrategy": "genericAndBranded",
      "bidStrategy": "automated"
    }
  },
  "warnings": [],
  "errors": []
}
```

***

## Get a Specific Onsite Sponsored Products Line Item

This endpoint returns the specified Onsite Sponsored Products line item.

<Warning>
  * This endpoint returns `null` in the `budgetRemaining` field for line items with uncapped budgets and line items with missing budgets.
  * `targetRetailerId` is returned in the attributes for retailer budget line items.
</Warning>

<EndpointBadge method="get">
  ```http theme={null}
  https://api.criteo.com/{version}/retail-media/auction-line-items/{lineItemId}
  ```
</EndpointBadge>

**Sample Request**

<CodeGroup>
  ```bash cURL theme={null}
  curl -L -X GET "https://api.criteo.com/{version}/retail-media/auction-line-items/6854840188706902009" \
      -H "Authorization: Bearer <MY_ACCESS_TOKEN>" \
      -H "Accept: application/json"
  ```

  ```python Python theme={null}
  import http.client

  conn = http.client.HTTPSConnection("api.criteo.com")

  headers = {
      'Authorization': 'Bearer <MY_ACCESS_TOKEN>',
      'Accept': 'application/json'
  }

  conn.request("GET", "/preview/retail-media/auction-line-items/6854840188706902009", headers=headers)

  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
  ```

  ```java Java theme={null}
  OkHttpClient client = new OkHttpClient().newBuilder()
      .build();

  Request request = new Request.Builder()
      .url("https://api.criteo.com/preview/retail-media/auction-line-items/6854840188706902009")
      .method("GET", null)
      .addHeader("Authorization", "Bearer <MY_ACCESS_TOKEN>")
      .addHeader("Accept", "application/json")
      .build();

  Response response = client.newCall(request).execute();
  ```

  ```php PHP theme={null}
  <?php
  require_once 'HTTP/Request2.php';
  $request = new HTTP_Request2();
  $request->setUrl('https://api.criteo.com/preview/retail-media/auction-line-items/6854840188706902009');
  $request->setMethod(HTTP_Request2::METHOD_GET);
  $request->setConfig([
      'follow_redirects' => TRUE
  ]);
  $request->setHeader([
      'Authorization' => 'Bearer <MY_ACCESS_TOKEN>',
      'Accept' => 'application/json'
  ]);

  try {
      $response = $request->send();
      if ($response->getStatus() == 200) {
          echo $response->getBody();
      } else {
          echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase();
      }
  } catch(HTTP_Request2_Exception $e) {
      echo 'Error: ' . $e->getMessage();
  }
  ```
</CodeGroup>

**Sample Response**

```json expandable theme={null}
{
  "data": {
    "id": "100000000000000001",
    "type": "SponsoredProductsLineItem",
    "attributes": {
      "name": "My Retailer Budget Line Item",
      "startDate": "2026-06-01T00:00:00+00:00",
      "endDate": null,
      "status": "draft",
      "targetBid": null,
      "targetRetailerId": "123",
      "budget": null,
      "campaignId": "100000000000000001",
      "budgetSpent": 0.0,
      "budgetRemaining": null,
      "createdAt": "2026-05-29T20:33:29+00:00",
      "updatedAt": "2026-05-29T20:33:29+00:00",
      "maxBid": 5.0,
      "monthlyPacing": null,
      "dailyPacing": null,
      "optimizationStrategy": "conversion",
      "isAutoDailyPacing": false,
      "flightSchedule": null,
      "keywordStrategy": "genericAndBranded",
      "bidStrategy": "automated"
    }
  },
  "warnings": [],
  "errors": []
}
```

***

**Sample request with uncapped or missing budget**

```json theme={null}
	
{
  "data": {
    "attributes": {
      "name": "Bagel Bites - Giant Eagle",
      "startDate": "2026-01-01",
      "endDate": null,
      "maxBid": null,
      "budget": null,
      "monthlyPacing": 230,
      "dailyPacing": 5.10567297,
      "bidStrategy": "revenue",
      "targetRetailerId": "1084",
      "status": "active",
      "targetBid": 0.7,
      "isAutoDailyPacing": true,
      "campaignId": "789229599621738496",
      "budgetSpent": 820.72682981,
      "budgetRemaining": null,
      "createdAt": "2025-12-17T21:05:51+00:00",
      "updatedAt": "2026-03-05T11:01:11+00:00",
      "id": "789236949010575360"
    },
    "id": "789236949010575360",
    "type": "RetailMediaAuctionLineItem"
  },
  "warnings": [],
  "errors": []
}
```

***

## Update a Specific Onsite Sponsored Products Line Item

This endpoint updates the specified Onsite Sponsored Products line item.  In this example, we are:

* renaming the line item and start date, to be scheduled to deliver during Q4.
* enabling auto daily pacing by setting a monthly pace simultaneously.  Note that with auto daily pacing enabled, daily pacing is automatically calculated and overwrites its previous value, if any.
* modifying the day scheduling to deliver ads during extended weekend evenings only, i.e., Fridays, Saturdays and Sundays from 18h until 0h (local time)

Also, note the draft state of the line item because products to be promoted have not yet been added.

<EndpointBadge method="put">
  ```http theme={null}
  https://api.criteo.com/{version}/retail-media/auction-line-items/{lineItemId}
  ```
</EndpointBadge>

**Sample Request**

<CodeGroup>
  ```bash cURL expandable theme={null}
  curl -L -X PUT "https://api.criteo.com/{version}/retail-media/auction-line-items/6854840188706902009" \
      -H "Authorization: Bearer <MY_ACCESS_TOKEN>" \
      -H "Content-Type: application/json" \
      -H "Accept: application/json" \
      -d '{
              "data": {
                  "id": "6854840188706902009",
                  "type": "SponsoredProductsLineItem",
                  "attributes": {
                      "name": "Line Item 456 - Q4 Weekends Evenings",
                      "campaignId": "544937665113018368",
                      "targetRetailerId": "6789",
                      "startDate": "2025-10-01T00:00:00-04:00",
                      "endDate": "2025-12-31T23:59:59-04:00",
                      "status": "active",
                      "budget": 12000.00,
                      "maxBid": 5.0,
                      "targetBid": 1.0,
                      "monthlyPacing": 4000.00,
                      "isAutoDailyPacing": true,
                      "flightSchedule": {
                          "legs": [
                              {
                                  "dayOfWeek": "friday",
                                  "startTime": "18:00",
                                  "endTime": "23:59"
                              },
                              {
                                  "dayOfWeek": "weekends",
                                  "startTime": "18:00",
                                  "endTime": "23:59"
                              }
                          ]
                      }
                  }
              }
          }'
  ```

  ```python Python expandable theme={null}
  import http.client
  import json

  conn = http.client.HTTPSConnection("api.criteo.com")
  payload = json.dumps({
      "data": {
          "id": "6854840188706902009",
          "type": "SponsoredProductsLineItem",
          "attributes": {
              "name": "Line Item 456 - Q4 Weekends Evenings",
              "campaignId": "8343086999167541140",
              "targetRetailerId": "6789",
              "startDate": "2025-10-01T00:00:00-04:00",
              "endDate": "2025-12-31T23:59:59-04:00",
              "status": "active",
              "budget": 12000.00,
              "maxBid": 5.0,
              "targetBid": 1.0,
              "monthlyPacing": 4000.00,
              "isAutoDailyPacing": True,
              "flightSchedule": {
                  "legs": [
                      {
                          "dayOfWeek": "friday",
                          "startTime": "18:00",
                          "endTime": "23:59"
                      },
                      {
                          "dayOfWeek": "weekends",
                          "startTime": "18:00",
                          "endTime": "23:59"
                      }
                  ]
              }
          }
      }
  })

  headers = {
      'Authorization': 'Bearer <MY_ACCESS_TOKEN>',
      'Content-Type': 'application/json',
      'Accept': 'application/json'
  }

  conn.request("PUT", "/preview/retail-media/auction-line-items/6854840188706902009", payload, headers)

  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
  ```

  ```java Java expandable theme={null}
  OkHttpClient client = new OkHttpClient().newBuilder()
      .build();

  MediaType mediaType = MediaType.parse("application/json");

  RequestBody body = RequestBody.create(mediaType, """
  {
      "data": {
          "id": "6854840188706902009",
          "type": "SponsoredProductsLineItem",
          "attributes": {
              "name": "Line Item 456 - Q4 Weekends Evenings",
              "campaignId": "8343086999167541140",
              "targetRetailerId": "6789",
              "startDate": "2025-10-01T00:00:00-04:00",
              "endDate": "2025-12-31T23:59:59-04:00",
              "status": "active",
              "budget": 12000.00,
              "maxBid": 5.0,
              "targetBid": 1.0,
              "monthlyPacing": 4000.00,
              "isAutoDailyPacing": true,
              "flightSchedule": {
                  "legs": [
                      {
                          "dayOfWeek": "friday",
                          "startTime": "18:00",
                          "endTime": "23:59"
                      },
                      {
                          "dayOfWeek": "weekends",
                          "startTime": "18:00",
                          "endTime": "23:59"
                      }
                  ]
              }
          }
      }
  }
  """);

  Request request = new Request.Builder()
      .url("https://api.criteo.com/preview/retail-media/auction-line-items/6854840188706902009")
      .method("PUT", body)
      .addHeader("Authorization", "Bearer <MY_ACCESS_TOKEN>")
      .addHeader("Content-Type", "application/json")
      .addHeader("Accept", "application/json")
      .build();

  Response response = client.newCall(request).execute();
  ```

  ```php PHP expandable theme={null}
  <?php
  require_once 'HTTP/Request2.php';
  $request = new HTTP_Request2();
  $request->setUrl('https://api.criteo.com/preview/retail-media/auction-line-items/6854840188706902009');
  $request->setMethod(HTTP_Request2::METHOD_PUT);
  $request->setConfig([
      'follow_redirects' => TRUE
  ]);
  $request->setHeader([
      'Authorization' => 'Bearer <MY_ACCESS_TOKEN>',
      'Content-Type' => 'application/json',
      'Accept' => 'application/json'
  ]);

  $request->setBody(json_encode([
      "data" => [
          "id" => "6854840188706902009",
          "type" => "SponsoredProductsLineItem",
          "attributes" => [
              "name" => "Line Item 456 - Q4 Weekends Evenings",
              "campaignId" => "8343086999167541140",
              "targetRetailerId" => "6789",
              "startDate" => "2025-10-01T00:00:00-04:00",
              "endDate" => "2025-12-31T23:59:59-04:00",
              "status" => "active",
              "budget" => 12000.00,
              "maxBid" => 5.0,
              "targetBid" => 1.0,
              "monthlyPacing" => 4000.00,
              "isAutoDailyPacing" => true,
              "flightSchedule" => [
                  "legs" => [
                      [
                          "dayOfWeek" => "friday",
                          "startTime" => "18:00",
                          "endTime" => "23:59"
                      ],
                      [
                          "dayOfWeek" => "weekends",
                          "startTime" => "18:00",
                          "endTime" => "23:59"
                      ]
                  ]
              ]
          ]
      ]
  ], JSON_PRETTY_PRINT));

  try {
      $response = $request->send();
      if ($response->getStatus() == 200) {
          echo $response->getBody();
      } else {
          echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase();
      }
  } catch(HTTP_Request2_Exception $e) {
      echo 'Error: ' . $e->getMessage();
  }
  ```
</CodeGroup>

**Sample Response**

```json expandable theme={null}
{
    "data": {
        "id": "6854840188706902009",
        "type": "SponsoredProductsLineItem",
        "attributes": {
            "name": "Line Item 456 - Q4 Weekends Evenings",
            "campaignId": "544937665113018368",
            "targetRetailerId": "6789",
            "startDate": "2025-10-01T04:00:00+00:00",
            "endDate": "2026-01-01T03:59:59+00:00",
            "status": "draft",
            "budget": 12000.00,
            "budgetSpent": 0.00,
            "budgetRemaining": 12000.00,
            "maxBid": 5.0,
            "targetBid": 1.00000000,
            "monthlyPacing": 4000.00,
            "dailyPacing": 200.00,
            "bidStrategy": "manual",
            "optimizationStrategy": "conversion",
            "isAutoDailyPacing": true,
            "flightSchedule": {
                "legs": [
                    {
                        "dayOfWeek": "friday",
                        "startTime": "18:00",
                        "endTime": "23:59"
                    },
                    {
                        "dayOfWeek": "weekends",
                        "startTime": "18:00",
                        "endTime": "23:59"
                    }
                ]
            },
            "keywordStrategy": "genericAndBranded",
            "createdAt": "2024-09-24T15:47:03.228224+00:00",
            "updatedAt": "2025-08-12T09:34:07.6168328+00:00"
        }
    },
    "warnings": [],
    "errors": []
}
```

***

## Responses

<table>
  <thead>
    <tr>
      <th>
        <p>
          Response
        </p>
      </th>

      <th>
        <p>
          Title
        </p>
      </th>

      <th>
        <p>
          Description
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          🔵

          <code>
            200
          </code>
        </p>
      </td>

      <td />

      <td>
        <p>
          Call completed with success
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          🔵

          <code>
            201
          </code>
        </p>
      </td>

      <td />

      <td>
        <p>
          Line item created with success
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          🔴

          <code>
            400
          </code>
        </p>
      </td>

      <td>
        <p>
          <b>
            Invalid

            <code>
              isAutoDailyPacing
            </code>
          </b>
        </p>
      </td>

      <td>
        <p>
          Cannot turn on

          <code>
            IsAutoDailyPacing
          </code>

          and add a

          <code>
            dailyPacing
          </code>

          value. Only one of the two options can be used.
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          🔴

          <code>
            400
          </code>
        </p>
      </td>

      <td>
        <p>
          <b>
            Conquesting not enabled
          </b>
        </p>
      </td>

      <td>
        <p>
          <code>
            Conquesting
          </code>

          is not enabled for the specified retailer. Remove the

          <code>
            keywordStrategy
          </code>

          property from the creation request.
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          🔴

          <code>
            400
          </code>
        </p>
      </td>

      <td>
        <p>
          <code>
            RetailerMismatchWithCampaign
          </code>

          * Invalid Target Retailer
        </p>
      </td>

      <td>
        <p>
          <code>
            targetRetailerId
          </code>

          on the line item doesn't match the parent campaign's

          <code>
            retailerId
          </code>

          . The

          <code>
            detail
          </code>

          field names both IDs: "Line item's targetRetailerId {x} does not match the retailer-billed campaign's retailer ID {y}". Ensure

          <code>
            targetRetailerId
          </code>

          on the line item matches the

          <code>
            retailerId
          </code>

          set on the parent campaign.
        </p>
      </td>
    </tr>
  </tbody>
</table>
