> ## 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.

# Bid Multipliers

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>
  **Getting Started**

  The Criteo engine maximizes advertising performance while optimizing the shopper experience. It can automatically and intelligently control how much a line item delivers on each page type. In addition, bid multipliers provide campaign managers more control over managing bids at the line item level while also optimizing campaign performance goals at a page-type level.

  -Bid multipliers are available at the Onsite Sponsored Products line items level. In addition, campaign managers can modify bids only on enabled page types.

  -Bids can be **increased up to 500%** or **decreased up to 50%** on each page targeted at the line item level. **For example:** *If a line item bid is \$1, with a bid multiplier, you can increase the Search page bid by 20% and decrease the homepage bid by 10%. The Criteo engine will optimize more delivery and performance on the search page while also allowing the control of which page types budget is mostly allocated towards.*
</Info>

 

## **Endpoints**

| Verb    | Endpoint                                   | Description                                                                                                                                                                                          |
| ------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **GET** | `/line-items/{lineItemId}/bid-multipliers` | Returns all bid multipliers for valid page types of the specified line item.                                                                                                                         |
| **PUT** | `/line-items/{lineItemId}/bid-multipliers` | Replaces all existing bid multipliers with the provided bid multipliers or the default value (1.0).- Note:\_ A PUT operation with an empty attributes object will reset all values to their default. |

 

## **Bid Multiplier Attributes**

<ResponseField name="id">
  **Data Type:** string

  **Default Value:** long-id

  **Description:** Line item Id
</ResponseField>

<ResponseField name="Search">
  **Data Type:** decimal

  **Default Value:** 1.0

  *Note: Bids can be increased up to 500% (6.00) or decreased up to 50% (0.50)*

  **Description:** Bid Multiplier applied to the `search` page type
</ResponseField>

<ResponseField name="Home">
  **Data Type:** decimal

  **Default Value:** 1.0

  *Note: Bids can be increased up to 500% (6.00) or decreased up to 50% (0.50)*

  **Description:** Bid Multiplier applied to the `home` page type
</ResponseField>

<ResponseField name="Category">
  **Data Type:** decimal

  **Default Value:** 1.0

  *Note: Bids can be increased up to 500% (6.00) or decreased up to 50% (0.50)*

  **Description:** Bid Multiplier applied to the `category` page type
</ResponseField>

<ResponseField name="ProductDetail">
  **Data Type:** decimal

  **Default Value:** 1.0

  *Note: Bids can be increased up to 500% (6.00) or decreased up to 50% (0.50)*

  **Description:** Bid Multiplier applied to the `productDetail` page type
</ResponseField>

<ResponseField name="Confirmation">
  **Data Type:** decimal

  **Default Value:** 1.0

  *Note: Bids can be increased up to 500% (6.00) or decreased up to 50% (0.50)*

  **Description:** Bid Multiplier applied to the `confirmation` page type
</ResponseField>

<ResponseField name="Merchandising">
  **Data Type:** decimal

  **Default Value:** 1.0

  *Note: Bids can be increased up to 500% (6.00) or decreased up to 50% (0.50)*

  **Description:** Bid Multiplier applied to the `merchandising` page type
</ResponseField>

<ResponseField name="Deals">
  **Data Type:** decimal

  **Default Value:** 1.0

  *Note: Bids can be increased up to 500% (6.00) or decreased up to 50% (0.50)*

  **Description:** Bid Multiplier applied to the `deals` page type
</ResponseField>

<ResponseField name="Checkout">
  **Data Type:** decimal

  **Default Value:** 1.0

  *Note: Bids can be increased up to 500% (6.00) or decreased up to 50% (0.50)*

  **Description:** Bid Multiplier applied to the `checkout` page type
</ResponseField>

<ResponseField name="Favorites">
  **Data Type:** decimal

  **Default Value:** 1.0

  *Note: Bids can be increased up to 500% (6.00) or decreased up to 50% (0.50)*

  **Description:** Bid Multiplier applied to the `favorites` page type
</ResponseField>

<ResponseField name="SearchBar">
  **Data Type:** decimal

  **Default Value:** 1.0

  *Note: Bids can be increased up to 500% (6.00) or decreased up to 50% (0.50)*

  **Description:** Bid Multiplier applied to the `searchBar` page type
</ResponseField>

<ResponseField name="CategoryMenu">
  **Data Type:** decimal

  **Default Value:** 1.0

  *Note: Bids can be increased up to 500% (6.00) or decreased up to 50% (0.50)*

  **Description:** Bid Multiplier applied to the `categoryMenu` page type
</ResponseField>

## **Get Bid Multipliers**

Returns all bid multipliers for valid page types of the specified line item.

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

**Sample Request**

<CodeGroup>
  ```bash cURL theme={null}
  curl -L -X GET 'https://api.criteo.com/{version}/retail-media/line-items/347413132777078784/bid-multipliers' \
  -H 'Accept: text/plain' \
  -H 'Authorization: Bearer MY_ACCESS_TOKEN'
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.criteo.com/{version}/retail-media/line-items/347413132777078784/bid-multipliers"

  payload={}
  headers = {
    'Accept': 'text/plain',
    'Authorization': 'Bearer MY_ACCESS_TOKEN'
  }

  response = requests.request("GET", url, headers=headers, data=payload)

  print(response.text)
  ```

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

  MediaType mediaType = MediaType.parse("text/plain");

  RequestBody body = RequestBody.create(mediaType, "");

  Request request = new Request.Builder()
    .url("https://api.criteo.com/{version}/retail-media/line-items/347413132777078784/bid-multipliers")
    .method("GET", body)
    .addHeader("Accept", "text/plain")
    .addHeader("Authorization", "Bearer MY_ACCESS_TOKEN")
    .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/line-items/347413132777078784/bid-multipliers');
  $request->setMethod(HTTP_Request2::METHOD_GET);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  $request->setHeader(array(
    'Accept' => 'text/plain',
    'Authorization' => 'Bearer MY_ACCESS_TOKEN'
  ));
  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**

<CodeGroup>
  ```json JSON theme={null}
  {
      "data": {
          "type": "LineItemBidMultipliersV2",
          "attributes": {
              "search": 1.10,
              "home": 1.90,
              "category": 1.50,
              "productDetail": 1.60,
              "confirmation": 1.30,
              "merchandising": 1.70,
              "deals": 2.00,
              "checkout": 2.50,
              "favorites": 2.30,
              "searchBar": 1.00,
              "categoryMenu": 1.10,
              "id": null
          }
      },
      "warnings": [],
      "errors": []
  }
  ```
</CodeGroup>

## **Update Page Type Bid Multipliers**

Replaces all existing bid multipliers with the provided bid multipliers or the default value (1.0).

* **Note:** A **PUT** operation with an empty attributes object will reset all values to their default.

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

**Sample Request**

<CodeGroup>
  ```bash Bash theme={null}
  --Request

  curl -L -X PUT 'https://api.criteo.com/{version}/retail-media/line-items/347112182987198464/bid-multipliers' \
  -H 'Content-Type: application/json' \
  -H 'Accept: text/plain' \
  -H 'Authorization: Bearer MY_ACCESS_TOKEN' \
  --data-raw '{
  	"data": {
  		"attributes": {
  			"search": "1.10",
  			"home": "1.90",
  			"category": "1.50",
  			"productDetail": "1.60",
  			"confirmation": "1.30",
  			"merchandising": "1.70",
        "deals": "2.00",
        "checkout": "2.50",
        "favorites": "2.30",
        "searchBar": "1.00",
        "categoryMenu": "1.10"
  		},
  		"id": "347112182987198464",
  		"type": "RetailMediaBidMultiplier"
  	}
  }'
  ```

  ```python Python expandable theme={null}
  import requests
  import json

  url = "https://api.criteo.com/{version}/retail-media/line-items/347112182987198464/bid-multipliers"

  payload = json.dumps({
    "data": {
      "attributes": {
        "search": "1.10",
        "home": "1.90",
        "category": "1.50",
        "productDetail": "0.49",
        "confirmation": "1.30",
        "merchandising": "1.70",
        "deals": "2.00",
        "checkout": "2.50",
        "favorites": "2.30",
        "searchBar": "1.00",
        "categoryMenu": "1.10"
      },
      "id": "347112182987198464",
      "type": "RetailMediaBidMultiplier"
    }
  })
  headers = {
    'Content-Type': 'application/json',
    'Accept': 'text/plain',
    'Authorization': 'Bearer MY_ACCESS_TOKEN'
  }

  response = requests.request("PUT", url, headers=headers, data=payload)

  print(response.text)
  ```

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

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

  RequestBody body = RequestBody.create(mediaType, "{\"data\":{\"attributes\":{\"search\":\"1.10\",\"home\":\"1.90\",\"category\":\"1.50\",\"productDetail\":\"1.60\",\"confirmation\":\"1.30\",\"merchandising\":\"1.70\",\"deals\":\"2.00\",\"checkout\":\"2.50\",\"favorites\":\"2.30\",\"searchBar\":\"1.00\",\"categoryMenu\":\"1.10\"},\"id\":\"347112182987198464\",\"type\":\"RetailMediaBidMultiplier\"}}");

  Request request = new Request.Builder()
    .url("https://api.criteo.com/{version}/retail-media/line-items/347112182987198464/bid-multipliers")
    .method("PUT", body)
    .addHeader("Content-Type", "application/json")
    .addHeader("Accept", "text/plain")
    .addHeader("Authorization", "Bearer MY_ACCESS_TOKEN")
    .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/{version}/retail-media/line-items/347112182987198464/bid-multipliers"
  );
  $request->setMethod(HTTP_Request2::METHOD_PUT);
  $request->setConfig([
      "follow_redirects" => true,
  ]);

  $request->setHeader([
      "Content-Type" => "application/json",
      "Accept" => "text/plain",
      "Authorization" => "Bearer MY_ACCESS_TOKEN",
  ]);

  $request->setBody(
      '{\n	"data": {\n		"attributes": {\n			"search": "1.10",
                                        \n			"home": "1.90",
                                        \n			"category": "1.50",
                                        \n			"productDetail": "1.60",
                                        \n			"confirmation": "1.30",
                                        \n			"merchandising": "1.70",
                                        \n      "deals": "2.00",
                                        \n      "checkout": "2.50",
                                        \n      "favorites": "2.30",
                                        \n      "searchBar": "1.00",
                                        \n      "categoryMenu": "1.10"
                                        \n		},
                                        \n		"id": "347112182987198464",
                                        \n		"type": "RetailMediaBidMultiplier"
                                        \n	}
                                        \n}'
  );
  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**

<CodeGroup>
  ```json JSON theme={null}
  {
      "data": {
          "attributes": {
              "search": 1.10,
              "home": 1.90,
              "category": 1.50,
              "productDetail": 0.50,
              "confirmation": 1.30,
              "merchandising": 1.70,
              "deals": 2.00,
              "checkout": 2.50,
              "favorites": 2.30,
              "searchBar": 1.00,
              "categoryMenu": 1.10,
              "id": null
          },
          "id": null,
          "type": "LineItemBidMultipliersV2"
      },
      "warnings": [],
      "errors": []
  }
  ```
</CodeGroup>

## **Responses**

| Response | Description                                                                                                                                                                                                        |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 🔵 `200` | Call executed with success                                                                                                                                                                                         |
| 🔴 `400` | **BidMultiplierOutOfRange** A bid multiplier provided is out of range of the expected range and could not be accepted**IllegalValueProvided** An invalid page type or poorly formatted bid multiplier was provided |
| 🔴 `401` | **Unauthorized** User doesnt have permission to edit a specified line item                                                                                                                                         |
| 🔴 `404` | **LineItemDoesntExist** Attempted to fetch or manipulate a line item that does not exist                                                                                                                           |
