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

# Marketplace

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>;
};

## Introduction

The Marketplace endpoints are used to update the product catalog with the latest status of a product. Products should be updated with the same information on the Product Detail Page found on the retailer's website.

Note: These APIs are going to be processed **asynchronously**, so success response indicates the request was accepted but not yet completed.

<Info>
  You can also find the Marketplace endpoints in our API Reference [here](/retail-media/v2026-preview/reference/catalog/offer-set-bbw-v-1) for updating the buy box winner and [here](/retail-media/v2026-preview/reference/catalog/offer-update-v-1) for updating offers.
</Info>

***

## URLs

* For AMERICAS: `api.us.criteo.com`
* For APAC: `api.as.criteo.com`
* For EMEA: `api.eu.criteo.com`

***

## Endpoints

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

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

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

  <tbody>
    <tr>
      <td>
        <p>
          POST
        </p>
      </td>

      <td>
        <p>
          <code>
            /preview/retail-media/retailers/\{retailer-id}/products/set-buy-box-winners
          </code>
        </p>
      </td>

      <td>
        <p>
          Update the buy box winner for one or more products
        </p>
      </td>
    </tr>

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

      <td>
        <p>
          <code>
            /preview/retail-media/retailers/\{retailer-id}/offers/update
          </code>
        </p>
      </td>

      <td>
        <p>
          Update one or more offers by replacing each offer's price and availability with the given values
        </p>
      </td>
    </tr>
  </tbody>
</table>

***

## Marketplace Properties

<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>
            retailer-id
          </code>

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

      <td>
        <p>
          String
        </p>
      </td>

      <td>
        <p>
          The ID of the retailer.
        </p>

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

    <tr>
      <td>
        <p>
          <code>
            offerId
          </code>

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

      <td>
        <p>
          String
        </p>
      </td>

      <td>
        <p>
          Identifies an existing offer.
        </p>

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

    <tr>
      <td>
        <p>
          <code>
            availability
          </code>

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

      <td>
        <p>
          String
        </p>
      </td>

      <td>
        <p>
          Accepted values: outOfStock, preOrder, inStock, backOrder
        </p>

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

    <tr>
      <td>
        <p>
          <code>
            price
          </code>

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

      <td>
        <p>
          double
        </p>
      </td>

      <td>
        <p>
          Product’s price at this store
        </p>

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

(\*) Required

<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.
</Info>

***

## Update BuyBoxWinner

The Buy Box Winner for multiple products can be updated for a retailer by making a `POST` call to the BuyBoxWinner endpoint. For each product specified, the designated offer becomes the new buy box winner, while the previous buy box winner for that product becomes a loser.

The request body should specify the **Offer ID** of the current buy box winner. We support a maximum of 5000 buy box winners to be updated simultaneously.

<Info>
  **Use case**: Update the Buy Box Winner for one or more products by only sending the new winner
</Info>

<EndpointBadge method="post">
  ```http theme={null}
  https://api.criteo.com/preview/retail-media/retailers/{retailer-id}/products/set-buy-box-winners
  ```
</EndpointBadge>

**Sample request**

```json JSON theme={null}
{
  "data": {
    "type": "SetProductBuyBoxWinnersRequest",
    "attributes": {
      "productBuyBoxWinners": [
        {
          "offerId": "123"
        },
        {
          "offerId": "456"
        }
      ]
    }
  }
}

```

**Sample response**

```json JSON theme={null}
{
  "warnings": [],
  "errors": []
}
```

***

## Update Offers

Offers can be updated for multiple offers on a specific retailer by making a `POST` call to the Offer endpoint.

The request body should specify the **Offer ID**, availability, and price of the offer. We support a maximum of 5000 offers to be updated simultaneously.

<Info>
  **Use case**: Update the price and availability for an offer
</Info>

<EndpointBadge method="post">
  ```http theme={null}
  https://api.criteo.com/preview/retail-media/retailers/{retailer-id}/offers/update
  ```
</EndpointBadge>

**Sample request**

```json JSON theme={null}
{
  "data": {
    "type": "UpdateOffersRequest",
    "attributes": {
      "offerUpdates": [
        {
          "offerId": "123",
          "price": 100.00,
          "availability": "preOrder"
        },
        {
          "offerId": "456",
          "price": 200.00,
          "availability": "preOrder"
        }
      ]
    }
  }
}
```

**Sample response**

```json JSON theme={null}
{
  "warnings": [],
  "errors": []
}
```

***

## Validation errors

**`invalid-retailer-id`**\
The request contains an invalid Retailer ID

**`duplicate-offer-id`**\
An duplicate Offer ID has been found in the request.

**`REQUIRED_FIELD`**\
The required field is missing.
