## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://developers.criteo.com/llms.txt)

Use this file to discover all available pages before exploring further.

### API Endpoint

**GET**  `/2026-01/retail-media/campaigns/{campaign-id}/preferred-line-items`

### cURL

```bash
curl --request GET \
  --url https://api.criteo.com/2026-01/retail-media/campaigns/{campaign-id}/preferred-line-items \
  --header 'Authorization: Bearer <token>'
```

### Python

```python
import requests

url = "https://api.criteo.com/2026-01/retail-media/campaigns/{campaign-id}/preferred-line-items"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

### JavaScript (Fetch API)

```javascript
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.criteo.com/2026-01/retail-media/campaigns/{campaign-id}/preferred-line-items', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### PHP

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.criteo.com/2026-01/retail-media/campaigns/{campaign-id}/preferred-line-items",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
```

### Go

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

url := "https://api.criteo.com/2026-01/retail-media/campaigns/{campaign-id}/preferred-line-items"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))
}
```

### Response Example

#### 200 OK
```json
{
  "data": [
    {
      "attributes": {
        "budget": 123,
        "campaignId": "<string>",
        "name": "<string>",
        "startDate": "2023-12-25",
        "targetRetailerId": "<string>",
        "budgetRemaining": 123,
        "budgetSpent": 123,
        "capping": {
          "count": 123
        },
        "createdAt": "2023-11-07T05:31:56Z",
        "creativeId": "<string>",
        "endDate": "2023-12-25",
        "id": "<string>",
        "page": {
          "categories": [
            {
              "categoryId": "<string>",
              "includeChildren": true
            }
          ],
          "searchKeywords": [
            "<string>"
          ]
        },
        "updatedAt": "2023-11-07T05:31:56Z"
      },
      "id": "<string>",
      "type": "<string>"
    }
  ],
  "errors": [
    {
      "code": "<string>",
      "detail": "<string>",
      "instance": "<string>",
      "source": {},
      "stackTrace": "<string>",
      "title": "<string>",
      "traceId": "<string>",
      "traceIdentifier": "<string>"
    }
  ],
  "metadata": {
    "currentPageIndex": 123,
    "currentPageSize": 123,
    "nextPage": "<string>",
    "previousPage": "<string>",
    "totalItemsAcrossAllPages": 123,
    "totalPages": 123
  },
  "warnings": [
    {
      "code": "<string>",
      "detail": "<string>",
      "instance": "<string>",
      "source": {},
      "stackTrace": "<string>",
      "title": "<string>",
      "traceId": "<string>",
      "traceIdentifier": "<string>"
    }
  ]
}
```

### Authorizations

#### Authorization
- **Type**: `Bearer` token
- **Required**: Yes

### Path Parameters
- **campaign-id**: The given campaign ID (required)

### Query Parameters
- **limitToId**: The IDs to limit the result set to
- **pageIndex**: The 0-indexed page index to receive (default: 0)
- **pageSize**: The maximum number of items to receive (default: 25)

### Response
- **200**: Success, returns a paged list of response resources.
