# Adhese API

This section details available Adhese API's.

# Where to find the Adhese APIs

### API Usage

This page provides info on where to find detailed explanation on the Adhese APIs. See [this guide](https://documentation.adhese.eu/books/adhese-api/page/how-to-get-access-to-the-api) on how to gain access to the APIs. It is intended as a starting point for developers and users who need to integrate with the API.

Adhese stores its detailed API documentation in Swagger. Next to the documentation on Swagger, there will be explanations on every endpoint here on our documentation platform.

### Capabilities of Swagger

- **Data retrieval** – fetch structured data from the system.
- **Data submission** – send and store data on the platform.
- **Schema definition** – provides information on request/response objects, parameters, query strings, and headers.
- **Configuration access** – interact with specific configurations and settings.
- **Monitoring &amp; Diagnostics** – review statuses, logs, and operational information.
- **“Try It Out” feature** – execute real API requests directly from the UI.

For full details on all endpoints, see the Swagger UI.

### Where to find endpoints

All available endpoints are documented in Swagger:

[![afbeelding.png](https://documentation.adhese.eu/uploads/images/gallery/2025-10/scaled-1680-/JnECwCbcasmfYHVX-afbeelding.png)](https://documentation.adhese.eu/uploads/images/gallery/2025-10/JnECwCbcasmfYHVX-afbeelding.png)

The Swagger UI allows you to:

<div class="rich-media-item mediaSingleView-content-wrap image-center cc-1uj41td" id="bkmrk--1"></div>- Browse the list of endpoints.
- Review request/response schemas.
- Test endpoints directly in the browser.

### Where to find Swagger

Swagger is publicly accessible under:

<div class="code-block cc-19e6trp" id="bkmrk-https%3A%2F%2F%7Bcustomer-ur"><span class="prismjs _2rko12b0 _1dqoglyw _1wyb1crf _k48pi7a9 _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhktkvp _syaz1fxt _ect41odn _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srn17d7 _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gww7y _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909m7j4 _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgcpf9b _bu7zpf9b _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3moej _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eiht5x2v _t9zb5x2v _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t361fxt _137bh55r _1k7d1fxt _97lipnps _12nh9lu1 _1g0517qg _i2ig10m5 _326z1fxt _113p131l _1n6tpnps _tgu817qg _1k47pnps _g0lx1fxt _ys4e131l _7gp8h55r _1yvq10m5 _1vww10m5 _1rju10m5 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o610m5 _kxov17qg _1np517qg _m2f517qg _1b9tpnps _1tq6pnps _1rd2pnps _1pbkpnps _k3lipnps _13zt131l _2g12fb2s _k86b10m5 _b5iy131l _gti3131l _1f0gpnps _9d3e17qg _qdiapnps _72uvpnps _13dgkb7n _17071olh _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf">`<span><span>https://{customer-url}/swagger-ui/index.html</span></span>`</span></div><p class="callout warning">To access Swagger's interactive features, such as executing requests, please [contact Support](https://documentation.adhese.eu/books/introduction/page/adhese-support).</p>

### OpenAPI Specification

In addition to the interactive Swagger UI, the raw **OpenAPI v3 specification** can be retrieved in human-readable format (JSON).

- URL:
    
    <span class="prismjs _2rko12b0 _1dqoglyw _1wyb1crf _k48pi7a9 _1e0c1txw _vwz4gktf _1reo1wug _o572qvpr _1eimjvyg _bfhktkvp _syaz1fxt _ect41odn _1ozdn7od _7xinn7od _t7aun7od _r28du2gc _tajqu2gc _1ohiu2gc _m802u2gc _i6ntu2gc _1w2xu2gc _1hmyegat _vblregat _vbulegat _196q1xv3 _1vbw1xv3 _1v9c1xv3 _1srn17d7 _18r6myb0 _vyvc1n1a _1d4j1y44 _1f8gstnw _1pzyb3bt _ra6gww7y _13cdh2mm _1pp0126e _zvy9f705 _qcxof705 _qzn01a66 _j0l11wug _1weckb7n _1na21hna _vsnzgrf3 _x7c815vq _lh0y15vq _1m3815vq _qk1e15vq _12l6ysn8 _uga3ysn8 _mx8b7mnp _1kr87mnp _xo19t94y _1bemt94y _nalpstnw _151dstnw _1exb1q9c _1hgu1q9c _1mgnt94y _nhket94y _h909m7j4 _scgayz1z _ipl81e17 _40uk1l04 _i81p1a66 _1gx21e5h _1ls01ule _vm2c1rh5 _12ok1rh5 _rude1ule _1q16glyw _1io6glyw _juomusic _lcwuusic _pyovu2gc _ccm6u2gc _1ascu2gc _1yuau2gc _xr0w1a66 _4io21a66 _euyxusvi _cahfusvi _zhnuidpf _1amdidpf _mbgcpf9b _bu7zpf9b _131n1giz _gy101giz _1wfuwrk5 _16kzwrk5 _9kk3moej _cjus1w1g _9k2r1m30 _nhmw1m30 _yl021m30 _eiht5x2v _t9zb5x2v _mqok1w1g _3hsg1w1g _i7ngn7od _9wu1fb2s _1xcoh55r _1t361fxt _137bh55r _1k7d1fxt _97lipnps _12nh9lu1 _1g0517qg _i2ig10m5 _326z1fxt _113p131l _1n6tpnps _tgu817qg _1k47pnps _g0lx1fxt _ys4e131l _7gp8h55r _1yvq10m5 _1vww10m5 _1rju10m5 _1v0lh55r _wmyy17qg _748n17qg _1mfn17qg _1d7e17qg _p2vr17qg _19o610m5 _kxov17qg _1np517qg _m2f517qg _1b9tpnps _1tq6pnps _1rd2pnps _1pbkpnps _k3lipnps _13zt131l _2g12fb2s _k86b10m5 _b5iy131l _gti3131l _1f0gpnps _9d3e17qg _qdiapnps _72uvpnps _13dgkb7n _17071olh _1i3h1txw _16noidpf _h4fuidpf _pp6yidpf _1g4tidpf _11wmidpf _1bx8idpf">`<span><span>https://{customer-url}/api/v3/api-docs/campaign-api</span></span>`</span>
- This file defines:
    
    
    - All endpoints, parameters, and request/response schemas
    - Authentication requirements
    - Metadata (titles, descriptions, tags)
- Typical use cases:
    
    
    - **Import into Postman** to quickly generate a workspace.
    - **Client SDK generation** via tools like Swagger Codegen or OpenAPI Generator.
    - **Validation &amp; automation** as part of CI/CD pipelines.

### Sending a request with Keycloak authentication

- Ensure the **Use-Keycloak-Auth** header is included and set to `true` (default value)[![afbeelding.png](https://documentation.adhese.eu/uploads/images/gallery/2025-10/scaled-1680-/fhIEdidyz8hBv37L-afbeelding.png)](https://documentation.adhese.eu/uploads/images/gallery/2025-10/fhIEdidyz8hBv37L-afbeelding.png)

<div class="rich-media-item mediaSingleView-content-wrap image-center cc-1di80mj" id="bkmrk-optional-field-with%C2%A0"><div class="cc-1b21syk"><div><div class="_2rko12b0 _vchhusvi _kqswh2mm _ect41gqc _p12f1osq _c71l1osq _1bsb1qmm _4t3ine4n _1hlmi3bv _1rquusvi _eg5410xm _mts3kb7n _1ntskb7n _80omtlke new-file-experience-wrapper" id="bkmrk-optional-field-with%C2%A0-1" style="font-size:14px;line-height:22px;"><div class="_1reo15vq _18m915vq _2rko12b0 _1e0c1txw _kqswh2mm _p12f1osq _1bsb1osq _4t3i1osq _c71l1osq media-file-card-view"><div class="_kqswstnw _1bsb1osq _4t3i1osq _1e0c1txw _2lx21bp4 _1bah1h6o _4cvr1h6o">- optional field with **api-version** header should be left empty

</div></div></div></div></div></div>Once ready, you can test the endpoints directly in Swagger (provided you have the necessary permissions).

# How to get Access to the API

In order to get access to the API's of Adhese, you require a service account, your service account lets your backend system call the Adhese API without a user login. It uses the OAuth 2.0 **client credentials** flow: you exchange a client ID and secret for a short-lived access token, then include that token in every API request.

## Prerequisites

Your Adhese support agent will provide:

- **Client ID** — the identifier for your service account (e.g. `my-company-integration`)
- **Client secret** — treat this like a password; keep it out of source control
- **Realm** — your Adhese realm name (e.g. `customer-name`)
- **Region** — determines the auth server URL (see below)

## Token endpoint

```
POST https://auth.{region}.adhese.org/realms/{realm}/protocol/openid-connect/token
```

| Region | Value |
|---|---|
| Europe West | `we` |
| Central US | `cus` |

## Getting a token

Send a `POST` request with `Content-Type: application/x-www-form-urlencoded`.

**curl**

```bash
curl -X POST \
  "https://auth.we.adhese.org/realms/customer-name/protocol/openid-connect/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=my-customer-integration" \
  -d "client_secret=<your-secret>" \
  -d "scope=adhese-api"
```

**Python**

```python
import requests

response = requests.post(
    "https://auth.we.adhese.org/realms/customer-name/protocol/openid-connect/token",
    data={
        "grant_type":    "client_credentials",
        "client_id":     "my-customer-integration",
        "client_secret": "<your-secret>",
        "scope":         "adhese-api",  # or "adhese-api ratecard"
    },
)
token = response.json()["access_token"]
```

**Response**

```json
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5...",
  "token_type": "Bearer",
  "expires_in": 300,
  "scope": "adhese-api"
}
```

## Scopes

The `scope` parameter controls which permissions appear in your token. Your support agent configures which scopes are available to your service account.

| Scope | Use when |
|---|---|
| `adhese-api` | Calling the Adhese API |
| `ratecard` | Calling the Ratecard API |

To request multiple scopes, separate them with a space:

```
scope=adhese-api ratecard
```

Only request scopes for the APIs you will actually call. Roles for a scope you did not request will not appear in the token even if they were granted.

## Token contents

The access token is a signed JWT. When decoded, it contains your granted permissions under `permissions.adhese-api` and/or `permissions.ratecard`:

```json
{
  "permissions": {
    "adhese-api": [
      "booking:view",
      "campaign:view",
      "creative:view"
    ]
  }
}
```

The exact roles listed depend on what your support agent has configured for your service account.

## Calling the API

Pass the token as a `Bearer` in the `Authorization` header of every request:

```bash
curl "https://api.adhese.org/..." \
  -H "Authorization: Bearer <access_token>"
```

## Token expiry

Tokens expire after a while. Cache the token and reuse it across requests for its remaining lifetime. When it expires, request a new one using the same client credentials — the client credentials flow has no refresh token.

A simple approach: track the `expires_in` value from the token response, subtract a small buffer (e.g. 30 seconds), and request a new token when that time has elapsed.

# Campaign API

## Campaigns

Campaigns are a grouping of bookings and their associated creatives.

### Create a campaign

```
POST /v1/campaigns
```

Creates a new campaign.

**Request body** - `CreateCampaignDto`

<table id="bkmrk-field-type-required-" style="width:100%;height:551.6px;"><thead><tr style="height:46.6px;"><th style="width:15.9714%;height:46.6px;">**Field**</th><th style="width:13.5876%;height:46.6px;">**Type**</th><th style="width:10.3703%;height:46.6px;">**Required**</th><th style="width:60.0707%;height:46.6px;">**Description**</th></tr></thead><tbody><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`name`</td><td style="width:13.5876%;height:29.8px;">string</td><td style="width:10.3703%;height:29.8px;">Yes</td><td style="width:60.0707%;height:29.8px;">Display name of the company.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`advertiserId`</td><td style="width:13.5876%;height:46.6px;">integer</td><td style="width:10.3703%;height:46.6px;">No</td><td style="width:60.0707%;height:46.6px;">ID of the advertiser/media partner you want to attach to this campaign.</td></tr><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`brandIds`</td><td style="width:13.5876%;height:29.8px;">integer</td><td style="width:10.3703%;height:29.8px;">No</td><td style="width:60.0707%;height:29.8px;">IDs of the brands you want attached to this campaign.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`externalKey`</td><td style="width:13.5876%;height:46.6px;">string</td><td style="width:10.3703%;height:46.6px;">No</td><td style="width:60.0707%;height:46.6px;">Your own external reference key.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`frequencyLimits`</td><td style="width:13.5876%;height:46.6px;">integer, string</td><td style="width:10.3703%;height:46.6px;">No</td><td style="width:60.0707%;height:46.6px;">Frequency limit settings for the campaign.</td></tr><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`- amount`</td><td style="width:13.5876%;height:29.8px;">integer</td><td style="width:10.3703%;height:29.8px;">No</td><td style="width:60.0707%;height:29.8px;">Limit of `event` per set `period` per `scope`.</td></tr><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`- event`</td><td style="width:13.5876%;height:29.8px;">string</td><td style="width:10.3703%;height:29.8px;">No</td><td style="width:60.0707%;height:29.8px;">Set the limit to either `IMPRESSIONS` or `CLICKS`.</td></tr><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`- period`</td><td style="width:13.5876%;height:29.8px;">string</td><td style="width:10.3703%;height:29.8px;">No</td><td style="width:60.0707%;height:29.8px;">Period for which the `amount` is applied as limit to the `event`. Either `DAILY` or `HOURLY`.</td></tr><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`- scope`</td><td style="width:13.5876%;height:29.8px;">string</td><td style="width:10.3703%;height:29.8px;">No</td><td style="width:60.0707%;height:29.8px;">On which level the limit is applied. In this case always `CAMPAIGN`.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`priorityId`</td><td style="width:13.5876%;height:46.6px;">integer</td><td style="width:10.3703%;height:46.6px;">Yes</td><td style="width:60.0707%;height:46.6px;">Priority of the campaign. 1 is the highest priority, with higher numbers representing lower priorities. By default clients have priorities 1 through 5 configured.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`campaignType`</td><td style="width:13.5876%;height:46.6px;">string</td><td style="width:10.3703%;height:46.6px;">Yes</td><td style="width:60.0707%;height:46.6px;">Campaign type is either `FULL` for managed campaigns and, `GUARANTEED` or `AUCTIONED` for Self Service. In case of doubt with Self Service, pick `GUARANTEED`.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`reservationType`</td><td style="width:13.5876%;height:46.6px;">string</td><td style="width:10.3703%;height:46.6px;">Yes</td><td style="width:60.0707%;height:46.6px;">Type of the campaign, either `CAMPAIGN`, `OFFER`, `Option` or `DRAFT` in the case of an Advendio campaign.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`deliveryFactors`</td><td style="width:13.5876%;height:46.6px;">integer, string</td><td style="width:10.3703%;height:46.6px;">No</td><td style="width:60.0707%;height:46.6px;">Campaign goals expressed in`volume` of `unit`, or in `budget`.</td></tr><tr><td style="width:15.9714%;">`- unit`</td><td style="width:13.5876%;">string</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">Unit of the to reach `volume`. Either `IMPRESSIONS` or `CLICKS`.</td></tr><tr><td style="width:15.9714%;">`- volume`</td><td style="width:13.5876%;">integer</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">Amount of `unit` to reach as campaign goal.</td></tr><tr><td style="width:15.9714%;">`- budget`</td><td style="width:13.5876%;">integer</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">Campaign budget that can be spend before the delivery stops</td></tr><tr><td style="width:15.9714%;">`internalNote`</td><td style="width:13.5876%;">string</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">Fills in the Internal ID</td></tr><tr><td style="width:15.9714%;">`externalKey`</td><td style="width:13.5876%;">string</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">Fills in the External ID</td></tr><tr><td style="width:15.9714%;">`publisherId`</td><td style="width:13.5876%;">integer</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">ID of the publisher you want to associate with the campaign. `1` is the main publisher </td></tr></tbody></table>

**Creating a Campaign**

```
{
  "name": "Apitest",
  "poNumber": "95",
  "advertiserId": 1,
  "invoiceCompanyId": 1,
  "brandIds": [
    1
  ],
  "frequencyLimits": [
    {
      "amount": 1000,
      "event": "IMPRESSIONS",
      "period": "DAILY",
      "scope": "CAMPAIGN"
    }
  ],
  "priorityId": 1,
  "campaignType": "FULL",
  "reservationType": "CAMPAIGN",
  "deliveryFactors": {
    "unit": "IMPRESSIONS",
    "volume": 10000,
    "budget": 2000
  },
  "internalNote": "apitest",
  "externalKey": "testapi",
  "publisherId": 1
}
```

**Response** - 201

```
{
    "internalId": 21,
    "name": "Apitest",
    "lifetimeStatus": "INCOMPLETE",
    "startDate": null,
    "endDate": null,
    "budget": "2000.00",
    "bookingBudgetSum": "0",
    "volume": 10000,
    "toReachUnit": "IMPRESSIONS",
    "advertiser": 1,
    "advertiserName": "Philips",
    "invoiceCompany": 1,
    "invoiceCompanyName": "Philips",
    "brands": [
        1
    ],
    "mediaBrands": [
        {
            "id": 1,
            "name": "Evnia"
        }
    ],
    "status": "CAMPAIGN",
    "priority": 1,
    "origin": "OTHER",
    "type": "FULL",
    "frequencyLimits": [
        {
            "amount": 1000,
            "event": "IMPRESSIONS",
            "period": "DAILY",
            "scope": "CAMPAIGN"
        }
    ],
    "createdBy": 33,
    "creationDate": "2026-07-14T12:36:00Z",
    "lastEditedBy": null,
    "lastEditedDate": "2026-07-14T12:36:00Z",
    "externalKey": "testapi",
    "poNumber": "95",
    "validTill": null,
    "deliveryScheme": {
        "uniform": true
    },
    "message": null,
    "creativeCount": 0,
    "internalNote": "apitest",
    "publisherId": 1
}
```

**Response codes**

<table id="bkmrk-status-meaning-201-c" style="border-collapse:collapse;width:100%;height:207.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`201`</td><td style="height:29.8px;">Campaign created.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:28.8px;"><td style="height:28.8px;">`404`</td><td style="height:28.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### List campaigns

```
GET /v1/campaigns
```

Retrieves a list of campaigns.

**Request body -** `CampaignDto`

<table id="bkmrk-parameter-in-require" style="border-collapse:collapse;width:100%;height:178.8px;"><colgroup><col style="width:20.023%;"></col><col style="width:10.965%;"></col><col style="width:11.3226%;"></col><col style="width:11.2248%;"></col><col style="width:46.5799%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">**Parameter**</td><td style="width:8.49478%;height:29.8px;">**In**</td><td style="width:11.6244%;height:29.8px;">**Required**</td><td style="width:10.8793%;height:29.8px;">**Type**</td><td style="width:50.8197%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">`InternalId`</td><td style="width:8.49478%;height:29.8px;">path</td><td style="width:11.6244%;height:29.8px;">Yes</td><td style="width:10.8793%;height:29.8px;">integer</td><td style="width:50.8197%;height:29.8px;">The campaign's ID.</td></tr><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">`limit`</td><td style="width:8.49478%;height:29.8px;">query</td><td style="width:11.6244%;height:29.8px;">Yes</td><td style="width:10.8793%;height:29.8px;">integer</td><td style="width:50.8197%;height:29.8px;">Max number of results.</td></tr><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">`offset`</td><td style="width:8.49478%;height:29.8px;">query</td><td style="width:11.6244%;height:29.8px;">Yes</td><td style="width:10.8793%;height:29.8px;">integer</td><td style="width:50.8197%;height:29.8px;">Results to skip.</td></tr><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">`includeInactive`</td><td style="width:8.49478%;height:29.8px;">query</td><td style="width:11.6244%;height:29.8px;">No</td><td style="width:10.8793%;height:29.8px;">boolean</td><td style="width:50.8197%;height:29.8px;">Include deactivated brands.</td></tr><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">`search`</td><td style="width:8.49478%;height:29.8px;">query</td><td style="width:11.6244%;height:29.8px;">No</td><td style="width:10.8793%;height:29.8px;">string</td><td style="width:50.8197%;height:29.8px;">URL-encoded, case-insensitive match on name.</td></tr></tbody></table>

**Response** - 201

```
[
    {
        "internalId": 1,
        "name": "Example Display",
        "lifetimeStatus": "COMPLETED",
        "startDate": "2026-03-18T23:00:00Z",
        "endDate": "2026-04-30T21:59:59Z",
        "budget": "0.00",
        "bookingBudgetSum": "0.0",
        "volume": 0,
        "toReachUnit": "IMPRESSIONS",
        "advertiser": null,
        "advertiserName": null,
        "invoiceCompany": null,
        "invoiceCompanyName": null,
        "brands": [],
        "mediaBrands": [],
        "status": "CAMPAIGN",
        "priority": 1,
        "origin": "CLASSIC",
        "type": "FULL",
        "frequencyLimits": [],
        "createdBy": 2,
        "creationDate": "2026-03-19T13:46:14Z",
        "lastEditedBy": null,
        "lastEditedDate": "2026-03-19T13:46:14Z",
        "externalKey": null,
        "poNumber": "",
        "validTill": "1974-09-15T23:00:00Z",
        "deliveryScheme": {
            "uniform": true
        },
        "message": null,
        "creativeCount": 2,
        "internalNote": "",
        "publisherId": 1
    }
]
```

**Response codes**

<table id="bkmrk-status-meaning-201-c-1" style="border-collapse:collapse;width:100%;height:207.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Campaigns found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:28.8px;"><td style="height:28.8px;">`404`</td><td style="height:28.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Update campaigns

```
PUT /v1/campaigns/{campaignId}
```

Update a single campaign.

**Request body** - `CreateCampaignDto`

<table id="bkmrk-field-type-required--1" style="width:100%;height:551.6px;"><thead><tr style="height:46.6px;"><th style="width:15.9714%;height:46.6px;">**Field**</th><th style="width:13.5876%;height:46.6px;">**Type**</th><th style="width:10.3703%;height:46.6px;">**Required**</th><th style="width:60.0707%;height:46.6px;">**Description**</th></tr></thead><tbody><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`name`</td><td style="width:13.5876%;height:29.8px;">string</td><td style="width:10.3703%;height:29.8px;">Yes</td><td style="width:60.0707%;height:29.8px;">Display name of the company.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`advertiserId`</td><td style="width:13.5876%;height:46.6px;">integer</td><td style="width:10.3703%;height:46.6px;">No</td><td style="width:60.0707%;height:46.6px;">ID of the advertiser/media partner you want to attach to this campaign.</td></tr><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`brandIds`</td><td style="width:13.5876%;height:29.8px;">integer</td><td style="width:10.3703%;height:29.8px;">No</td><td style="width:60.0707%;height:29.8px;">IDs of the brands you want attached to this campaign.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`externalKey`</td><td style="width:13.5876%;height:46.6px;">string</td><td style="width:10.3703%;height:46.6px;">No</td><td style="width:60.0707%;height:46.6px;">Your own external reference key.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`frequencyLimits`</td><td style="width:13.5876%;height:46.6px;">integer, string</td><td style="width:10.3703%;height:46.6px;">No</td><td style="width:60.0707%;height:46.6px;">Frequency limit settings for the campaign.</td></tr><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`- amount`</td><td style="width:13.5876%;height:29.8px;">integer</td><td style="width:10.3703%;height:29.8px;">No</td><td style="width:60.0707%;height:29.8px;">Limit of `event` per set `period` per `scope`.</td></tr><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`- event`</td><td style="width:13.5876%;height:29.8px;">string</td><td style="width:10.3703%;height:29.8px;">No</td><td style="width:60.0707%;height:29.8px;">Set the limit to either `IMPRESSIONS` or `CLICKS`.</td></tr><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`- period`</td><td style="width:13.5876%;height:29.8px;">string</td><td style="width:10.3703%;height:29.8px;">No</td><td style="width:60.0707%;height:29.8px;">Period for which the `amount` is applied as limit to the `event`. Either `DAILY` or `HOURLY`.</td></tr><tr style="height:29.8px;"><td style="width:15.9714%;height:29.8px;">`- scope`</td><td style="width:13.5876%;height:29.8px;">string</td><td style="width:10.3703%;height:29.8px;">No</td><td style="width:60.0707%;height:29.8px;">On which level the limit is applied. In this case always `CAMPAIGN`.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`priorityId`</td><td style="width:13.5876%;height:46.6px;">integer</td><td style="width:10.3703%;height:46.6px;">Yes</td><td style="width:60.0707%;height:46.6px;">Priority of the campaign. 1 is the highest priority, with higher numbers representing lower priorities. By default clients have priorities 1 through 5 configured.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`campaignType`</td><td style="width:13.5876%;height:46.6px;">string</td><td style="width:10.3703%;height:46.6px;">Yes</td><td style="width:60.0707%;height:46.6px;">Campaign type is either `FULL` for managed campaigns and, `GUARANTEED` or `AUCTIONED` for Self Service. In case of doubt with Self Service, pick `GUARANTEED`.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`reservationType`</td><td style="width:13.5876%;height:46.6px;">string</td><td style="width:10.3703%;height:46.6px;">Yes</td><td style="width:60.0707%;height:46.6px;">Type of the campaign, either `CAMPAIGN`, `OFFER`, `Option` or `DRAFT` in the case of an Advendio campaign.</td></tr><tr style="height:46.6px;"><td style="width:15.9714%;height:46.6px;">`deliveryFactors`</td><td style="width:13.5876%;height:46.6px;">integer, string</td><td style="width:10.3703%;height:46.6px;">No</td><td style="width:60.0707%;height:46.6px;">Campaign goals expressed in`volume` of `unit`, or in `budget`.</td></tr><tr><td style="width:15.9714%;">`- unit`</td><td style="width:13.5876%;">string</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">Unit of the to reach `volume`. Either `IMPRESSIONS` or `CLICKS`.</td></tr><tr><td style="width:15.9714%;">`- volume`</td><td style="width:13.5876%;">integer</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">Amount of `unit` to reach as campaign goal.</td></tr><tr><td style="width:15.9714%;">`- budget`</td><td style="width:13.5876%;">integer</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">Campaign budget that can be spend before the delivery stops</td></tr><tr><td style="width:15.9714%;">`internalNote`</td><td style="width:13.5876%;">string</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">Fills in the Internal ID</td></tr><tr><td style="width:15.9714%;">`externalKey`</td><td style="width:13.5876%;">string</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">Fills in the External ID</td></tr><tr><td style="width:15.9714%;">`publisherId`</td><td style="width:13.5876%;">integer</td><td style="width:10.3703%;">No</td><td style="width:60.0707%;">ID of the publisher you want to associate with the campaign. `1` is the main publisher </td></tr></tbody></table>

**Updating a campaign**

```
{
  "name": "Apitest",
  "poNumber": "95",
  "advertiserId": 1,
  "invoiceCompanyId": 1,
  "brandIds": [
    1
  ],
  "frequencyLimits": [
    {
      "amount": 1200,
      "event": "IMPRESSIONS",
      "period": "DAILY",
      "scope": "CAMPAIGN"
    }
  ],
  "priorityId": 1,
  "campaignType": "FULL",
  "reservationType": "CAMPAIGN",
  "deliveryFactors": {
    "unit": "IMPRESSIONS",
    "volume": 10000,
    "budget": 2000
  },
  "internalNote": "apitest",
  "externalKey": "testapi",
  "publisherId": 1
}
```

**Response** - 200

```
{
    "internalId": 21,
    "name": "Apitest",
    "lifetimeStatus": "INCOMPLETE",
    "startDate": null,
    "endDate": null,
    "budget": "2000.00",
    "bookingBudgetSum": "0",
    "volume": 10000,
    "toReachUnit": "IMPRESSIONS",
    "advertiser": 1,
    "advertiserName": "Philips",
    "invoiceCompany": 1,
    "invoiceCompanyName": "Philips",
    "brands": [
        1
    ],
    "mediaBrands": [
        {
            "id": 1,
            "name": "Evnia"
        }
    ],
    "status": "CAMPAIGN",
    "priority": 1,
    "origin": "OTHER",
    "type": "FULL",
    "frequencyLimits": [
        {
            "amount": 1200,
            "event": "IMPRESSIONS",
            "period": "DAILY",
            "scope": "CAMPAIGN"
        }
    ],
    "createdBy": 33,
    "creationDate": "2026-07-14T12:36:00Z",
    "lastEditedBy": null,
    "lastEditedDate": "2026-07-15T13:31:14Z",
    "externalKey": "testapi",
    "poNumber": "95",
    "validTill": null,
    "deliveryScheme": {
        "uniform": true
    },
    "message": null,
    "creativeCount": 0,
    "internalNote": "apitest",
    "publisherId": 1
}
```

**Response codes**

<table id="bkmrk-status-meaning-200-c" style="border-collapse:collapse;width:100%;height:208.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Campaign updated.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Delete campaigns

```
DELETE /v1/campaigns/{campaignId}
```

(soft)delete Campaign by ID by (soft)deleting all its Bookings. Is limited by state (draft, or non-started auction).

**Request**

<table id="bkmrk-parameter-in-require-1" style="border-collapse:collapse;width:100%;height:59.6px;"><colgroup><col style="width:20.023%;"></col><col style="width:10.965%;"></col><col style="width:11.3226%;"></col><col style="width:11.2248%;"></col><col style="width:46.5799%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">**Parameter**</td><td style="width:8.49478%;height:29.8px;">**In**</td><td style="width:11.6244%;height:29.8px;">**Required**</td><td style="width:10.8793%;height:29.8px;">**Type**</td><td style="width:50.8197%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">`InternalId`</td><td style="width:8.49478%;height:29.8px;">path</td><td style="width:11.6244%;height:29.8px;">Yes</td><td style="width:10.8793%;height:29.8px;">integer</td><td style="width:50.8197%;height:29.8px;">The campaign's ID.</td></tr></tbody></table>

**Response codes**

<table id="bkmrk-status-meaning-204-c" style="border-collapse:collapse;width:100%;height:207.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**

</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`204`</td><td style="height:29.8px;">Campaign deleted.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:28.8px;"><td style="height:28.8px;">`404`</td><td style="height:28.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Get a single campaign

```
GET /v1/campaigns/{campaignId}
```

Retrieves information on a single campaign.

**Request body -** `CampaignDto`

<table id="bkmrk-parameter-in-require-2" style="border-collapse:collapse;width:100%;height:178.8px;"><colgroup><col style="width:20.023%;"></col><col style="width:10.965%;"></col><col style="width:11.3226%;"></col><col style="width:11.2248%;"></col><col style="width:46.5799%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">**Parameter**</td><td style="width:8.49478%;height:29.8px;">**In**</td><td style="width:11.6244%;height:29.8px;">**Required**</td><td style="width:10.8793%;height:29.8px;">**Type**</td><td style="width:50.8197%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">`InternalId`</td><td style="width:8.49478%;height:29.8px;">path</td><td style="width:11.6244%;height:29.8px;">Yes</td><td style="width:10.8793%;height:29.8px;">integer</td><td style="width:50.8197%;height:29.8px;">The campaign's ID.</td></tr></tbody></table>

**Response** - 201

```
{
    "internalId": 17,
    "name": "Philips Evnia QD OLED",
    "lifetimeStatus": "COMPLETED",
    "startDate": "2026-07-04T22:00:00Z",
    "endDate": "2026-07-10T21:59:00Z",
    "budget": "6600.00",
    "bookingBudgetSum": "4500.0",
    "volume": 1500000,
    "toReachUnit": "IMPRESSIONS",
    "advertiser": null,
    "advertiserName": null,
    "invoiceCompany": null,
    "invoiceCompanyName": null,
    "brands": [],
    "mediaBrands": [],
    "status": "CAMPAIGN",
    "priority": 1,
    "origin": "MCB",
    "type": "FULL",
    "frequencyLimits": [
        {
            "amount": 200000,
            "event": "IMPRESSIONS",
            "period": "HOURLY",
            "scope": "CAMPAIGN"
        },
        {
            "amount": 500000,
            "event": "IMPRESSIONS",
            "period": "DAILY",
            "scope": "CAMPAIGN"
        }
    ],
    "createdBy": 1,
    "creationDate": "2026-07-01T09:35:02Z",
    "lastEditedBy": null,
    "lastEditedDate": "2026-07-01T09:35:02Z",
    "externalKey": null,
    "poNumber": null,
    "validTill": null,
    "deliveryScheme": {
        "uniform": true
    },
    "message": null,
    "creativeCount": 2,
    "internalNote": "1.000.000 impressies\n6000 euro budget",
    "publisherId": 1
}
```

**Response codes**

<table id="bkmrk-status-meaning-200-c-1" style="border-collapse:collapse;width:100%;height:207.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Campaign found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:28.8px;"><td style="height:28.8px;">`404`</td><td style="height:28.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Update campaign status

```
POST /v1/campaigns/{campaignId}/status
```

<span><span><span>Update the status of a guaranteed campaign.</span></span></span>

<p class="callout success"><span><span><span>Changes only go in the following direction: draft -&gt; offer (-&gt; option) -&gt; campaign  
Any other changes to status (from example from *draft* to *campaign*) will result in an error.</span></span></span></p>

**<span><span><span>Request Body</span></span></span>**<span><span><span> - <span class="model"><span><span class="pointer"><span class="model-title"><span class="model-title__text">UpdateCampaignStatusRequest</span></span></span></span></span></span></span></span>

<table id="bkmrk-parameter-required-t" style="border-collapse:collapse;width:100%;height:59.6px;"><colgroup><col style="width:22.4076%;"></col><col style="width:12.7533%;"></col><col style="width:12.6341%;"></col><col style="width:52.205%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">**Parameter**</td><td style="width:11.6244%;height:29.8px;">**Required**</td><td style="width:10.8793%;height:29.8px;">**Type**</td><td style="width:50.8197%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">`status`</td><td style="width:11.6244%;height:29.8px;">Yes</td><td style="width:10.8793%;height:29.8px;">string</td><td style="width:50.8197%;height:29.8px;">Status you want to change the campaign to. Options are `DRAFT`, `OFFER`, `OPTION` or `CAMPAIGN`</td></tr><tr><td style="width:18.1818%;">`message`</td><td style="width:11.6244%;">No</td><td style="width:10.8793%;">string</td><td style="width:50.8197%;">Message to attach to the status change.</td></tr></tbody></table>

**Changing a campaigns status**

```
{
  "status": "OFFER",
  "message": "Apitest4"
}
```

**Response** - 200

```
{
    "internalId": 27,
    "name": "Apitest4",
    "lifetimeStatus": "PENDING",
    "startDate": "2026-07-19T22:00:00Z",
    "endDate": "2026-07-31T21:59:00Z",
    "budget": "0.00",
    "bookingBudgetSum": "1.0",
    "volume": 0,
    "toReachUnit": "IMPRESSIONS",
    "advertiser": 2,
    "advertiserName": "Logitech International S.A.",
    "invoiceCompany": null,
    "invoiceCompanyName": null,
    "brands": [
        2
    ],
    "mediaBrands": [
        {
            "id": 2,
            "name": "Logitech"
        }
    ],
    "status": "OFFER",
    "priority": 8,
    "origin": "MCB",
    "type": "GUARANTEED",
    "frequencyLimits": [],
    "createdBy": 30,
    "creationDate": "2026-07-20T13:01:12Z",
    "lastEditedBy": null,
    "lastEditedDate": "2026-07-22T07:40:52Z",
    "externalKey": null,
    "poNumber": "",
    "validTill": null,
    "deliveryScheme": {
        "uniform": true
    },
    "message": "Apitest4",
    "creativeCount": 0,
    "internalNote": "",
    "publisherId": 1
}
```

**Response codes**

<table id="bkmrk-status-meaning-200-c-2" style="border-collapse:collapse;width:100%;height:207.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Campaign status update.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:28.8px;"><td style="height:28.8px;">`404`</td><td style="height:28.8px;">Not Found - Resource not found.</td></tr><tr><td>`422`</td><td>Unprocessable entity (status change not allowed by business rules, see callout)</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Change the status of the bookings in a campaign

```
PATCH /v1/campaigns/{campaignId}/bookings/status
```

Conditionally update the status of the bookings in a campaign.

**Request body**

<table id="bkmrk-parameter-required-t-1" style="border-collapse:collapse;width:100%;height:59.6px;"><colgroup><col style="width:12.7533%;"></col><col style="width:12.0381%;"></col><col style="width:11.2179%;"></col><col style="width:63.9907%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">**Parameter**</td><td style="width:11.6244%;height:29.8px;">**Required**</td><td style="width:10.8793%;height:29.8px;">**Type**</td><td style="width:50.8197%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">/</td><td style="width:11.6244%;height:29.8px;">Yes</td><td style="width:10.8793%;height:29.8px;">string</td><td style="width:50.8197%;height:29.8px;">Status you want to change the bookings to. Options are `ACTIVE`, `PAUSED`, or `STOPPED`</td></tr></tbody></table>

**Change the status of a campaigns' bookings**

```
"PAUSED"
```

**Response** - 200

```
[
    28
]
```

**Response codes**

<table id="bkmrk-status-meaning-200-c-3" style="border-collapse:collapse;width:100%;height:207.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Booking status changed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:28.8px;"><td style="height:28.8px;">`404`</td><td style="height:28.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Get the booking shares of a campaign

```
GET /v1/campaigns/{campaignId}/booking-shares
```

Get Booking shares per booking ID for the campaign.

**Request body** - <span class="model"><span><span class="pointer"><span class="model-title"><span class="model-title__text">BookingShareDto</span></span></span></span></span>

<table id="bkmrk-parameter-in-require-3" style="border-collapse:collapse;width:100%;height:178.8px;"><colgroup><col style="width:20.023%;"></col><col style="width:10.965%;"></col><col style="width:11.3226%;"></col><col style="width:11.2248%;"></col><col style="width:46.5799%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">**Parameter**</td><td style="width:8.49478%;height:29.8px;">**In**</td><td style="width:11.6244%;height:29.8px;">**Required**</td><td style="width:10.8793%;height:29.8px;">**Type**</td><td style="width:50.8197%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="width:18.1818%;height:29.8px;">`InternalId`</td><td style="width:8.49478%;height:29.8px;">path</td><td style="width:11.6244%;height:29.8px;">Yes</td><td style="width:10.8793%;height:29.8px;">integer</td><td style="width:50.8197%;height:29.8px;">The campaign's ID.</td></tr></tbody></table>

**Response** - 200

```
[
    {
        "bookingId": 28,
        "share": 1.0
    }
]
```

**Response codes**

<table id="bkmrk-status-meaning-200-b" style="border-collapse:collapse;width:100%;height:207.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Booking share found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:28.8px;"><td style="height:28.8px;">`404`</td><td style="height:28.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Get list of campaign types visible to user

```
GET /v1/campaigns/filterValues/types
```

Get a unique list of campaign types for campaign filtering. Only values used in campaigns visible to the users are returned.

**Response** - 200

```
[
    "FULL",
    "GUARANTEED",
    "AUCTIONED"
]
```

**Response codes**

<table id="bkmrk-status-meaning-200-b-1" style="border-collapse:collapse;width:100%;height:207.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Booking share found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:28.8px;"><td style="height:28.8px;">`404`</td><td style="height:28.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

# Booking API

### Bookings

Bookings determine that what, where, how and when of ad delivery.

### Get a booking

```
GET /v1/bookings/{bookingId}
```

Returns a single bookings' details by booking ID.

**Request body**

<table id="bkmrk-parameter-in-require" style="border-collapse:collapse;width:100%;height:59.6px;"><thead><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">**Parameter**</td><td style="width:8.46246%;height:29.8px;">**In**</td><td style="width:10.1311%;height:29.8px;">**Required**</td><td style="width:12.3957%;height:29.8px;">**Type**</td><td style="width:50.7747%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">`InternalId`</td><td style="width:8.46246%;height:29.8px;">path</td><td style="width:10.1311%;height:29.8px;">Yes</td><td style="width:12.3957%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">The booking's ID.</td></tr></tbody></table>

**Response** - 200

```
{
    "internalId": 22,
    "name": "Evnia 27M2N8500/01",
    "status": "ACTIVE",
    "lifetimeStatus": "STARTED",
    "positionId": 8,
    "positionName": "Home Halfpage",
    "formatId": 1,
    "formatName": "Halfpage",
    "startDate": "2026-07-04T22:00:00Z",
    "endDate": "2026-07-31T21:59:00Z",
    "creationDate": "2026-07-01T10:14:28Z",
    "lastEditedDate": "2026-07-15T13:42:55Z",
    "deliveryFactors": {
        "unit": "IMPRESSIONS",
        "volume": 1500000,
        "pricingType": "CPM",
        "price": 3.0,
        "budget": 4500.0,
        "currency": "EUR",
        "cpcOptimized": true
    },
    "activeDays": [
        "MONDAY",
        "TUESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY",
        "SUNDAY"
    ],
    "creativeCount": 2,
    "frequencyLimits": [],
    "userFrequencies": [
        {
            "impressionsAmount": 10,
            "expiryInSeconds": 86400
        }
    ],
    "pacing": "FRONTLOADED",
    "deliveryMethod": "AUTO",
    "deliveryParameter": 0.0,
    "deliveryMultiples": "FREE",
    "campaignId": 17,
    "comment": null,
    "priority": null,
    "isBookedOnChannel": false,
    "excludePositionIds": [],
    "excludePublicationIds": [],
    "rtbEnabled": false,
    "targetExpressions": {},
    "autoDeliveryLimits": false,
    "bookingType": null,
    "startTime": "00:00:00",
    "endTime": "23:59:59"
}
```

**Response codes**

<table id="bkmrk-status-meaning-201-c" style="border-collapse:collapse;width:100%;height:208.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Booking found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Update a booking

```
PUT /v1/bookings/{bookingId}
```

Updates a single booking by booking ID.

**Request body** - <span class="model"><span><span class="pointer"><span class="model-title"><span class="model-title__text">UpdateBookingDto</span></span></span></span></span>

<table id="bkmrk-parameter-in-require-1" style="border-collapse:collapse;width:100%;height:89.4px;"><thead><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">**Parameter**</td><td style="width:8.46246%;height:29.8px;">**In**</td><td style="width:11.6806%;height:29.8px;">**Required**</td><td style="width:10.8462%;height:29.8px;">**Type**</td><td style="width:50.7747%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">`InternalId`</td><td style="width:8.46246%;height:29.8px;">path</td><td style="width:11.6806%;height:29.8px;">Yes</td><td style="width:10.8462%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">The booking's ID.</td></tr><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">`name`</td><td style="width:8.46246%;height:29.8px;">body</td><td style="width:11.6806%;height:29.8px;">Yes</td><td style="width:10.8462%;height:29.8px;">string</td><td style="width:50.7747%;height:29.8px;">Name of the campaign under which the booking is active.</td></tr><tr><td style="width:18.236%;height:46.6px;">`startDate`</td><td style="width:8.46246%;height:46.6px;">body</td><td style="width:11.6806%;height:46.6px;">Yes</td><td style="width:10.8462%;height:46.6px;">string</td><td style="width:50.7747%;height:46.6px;">Start date of the booking in date-time format `yyyy-mm-ddThh:mm:ssZ`</td></tr><tr><td style="width:18.236%;height:46.6px;">`endDate`</td><td style="width:8.46246%;height:46.6px;">body</td><td style="width:11.6806%;height:46.6px;">Yes</td><td style="width:10.8462%;height:46.6px;">string</td><td style="width:50.7747%;height:46.6px;">End date of the booking in date-time format `yyyy-mm-ddThh:mm:ssZ`</td></tr><tr><td style="width:18.236%;height:63.4px;">`activeDays`

</td><td style="width:8.46246%;height:63.4px;">body</td><td style="width:11.6806%;height:63.4px;">Yes</td><td style="width:10.8462%;height:63.4px;">string</td><td style="width:50.7747%;height:63.4px;">Days of the week the booking is active. Possible values are: <span class="model"><span><span class="inner-object"><span class="prop"><span class="prop-enum">`MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`</span></span></span></span></span></td></tr><tr><td style="width:18.236%;height:86.2px;">`deliveryFactors`

</td><td style="width:8.46246%;height:86.2px;">body</td><td style="width:11.6806%;height:86.2px;">Yes</td><td style="width:10.8462%;height:86.2px;">string, integer, number, boolean</td><td style="width:50.7747%;height:86.2px;">Options that set the goals and to reach of the booking.</td></tr><tr><td style="width:18.236%;height:46.6px;">\- `unit`

</td><td style="width:8.46246%;height:46.6px;">body</td><td style="width:11.6806%;height:46.6px;">Yes</td><td style="width:10.8462%;height:46.6px;">string</td><td style="width:50.7747%;height:46.6px;">Unit of the to reach volume of the booking. Possible values are: `Impressions` or `Clicks`</td></tr><tr><td style="width:18.236%;height:29.8px;">\- `volume`

</td><td style="width:8.46246%;height:29.8px;">body</td><td style="width:11.6806%;height:29.8px;">No</td><td style="width:10.8462%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">Amount of the unit to reach before the booking stops.</td></tr><tr><td style="width:18.236%;height:29.8px;">\- `price`

</td><td style="width:8.46246%;height:29.8px;">body</td><td style="width:11.6806%;height:29.8px;">No</td><td style="width:10.8462%;height:29.8px;">number</td><td style="width:50.7747%;height:29.8px;">Price of the booking set by pricing type.</td></tr><tr><td style="width:18.236%;height:46.6px;">\- `budget`

</td><td style="width:8.46246%;height:46.6px;">body</td><td style="width:11.6806%;height:46.6px;">No</td><td style="width:10.8462%;height:46.6px;">number</td><td style="width:50.7747%;height:46.6px;">Budget of the booking. When the budget is spent by the booking, delivery stops.</td></tr><tr><td style="width:18.236%;height:46.6px;">\- `pricingType`

</td><td style="width:8.46246%;height:46.6px;">body</td><td style="width:11.6806%;height:46.6px;">Yes</td><td style="width:10.8462%;height:46.6px;">string</td><td style="width:50.7747%;height:46.6px;">Method for determining ad spend via price. Possible values are: `CPM`, `CPC`, `CPP`, `CPL` or `ADM`</td></tr><tr><td style="width:18.236%;height:29.8px;">\- `cpcOptimized`

</td><td style="width:8.46246%;height:29.8px;">body</td><td style="width:11.6806%;height:29.8px;">No</td><td style="width:10.8462%;height:29.8px;">boolean</td><td style="width:50.7747%;height:29.8px;">Is CPC optimisation enabled for the booking: `true` or `false`</td></tr><tr><td style="width:18.236%;height:29.8px;">`mediaProduct`

</td><td style="width:8.46246%;height:29.8px;">body</td><td style="width:11.6806%;height:29.8px;">Yes</td><td style="width:10.8462%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">Position and format ID of the position of the booking.</td></tr><tr><td style="width:18.236%;height:29.8px;">\- `positionID`

</td><td style="width:8.46246%;height:29.8px;">body</td><td style="width:11.6806%;height:29.8px;">Yes</td><td style="width:10.8462%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">Slot ID of the position.</td></tr><tr><td style="width:18.236%;height:29.8px;">\- `formatID`

</td><td style="width:8.46246%;height:29.8px;">body</td><td style="width:11.6806%;height:29.8px;">Yes</td><td style="width:10.8462%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">ID of the format used in the position.</td></tr><tr><td style="width:18.236%;">`frequencyLimits`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">integer, string</td><td style="width:50.7747%;">Setting for capping delivery.</td></tr><tr><td style="width:18.236%;">\- `amount`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">string</td><td style="width:50.7747%;">Amount of *event* to cap delivery by.</td></tr><tr><td style="width:18.236%;">\- `event`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">string</td><td style="width:50.7747%;">Unit to measure for capping delivery. Either `IMPRESSIONS` or `CLICKS`</td></tr><tr><td style="width:18.236%;">\- `period`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">string</td><td style="width:50.7747%;">Period where the cap is active, either `HOURLY` or `DAILY`. After the period has run out, the cap resets, either for the next hour or next day.</td></tr><tr><td style="width:18.236%;">`pacing`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">Yes</td><td style="width:10.8462%;">string</td><td style="width:50.7747%;">Delivery pacing options for the booking. Possible values are: `EVEN`, `FRONTLOADED`, `AS_FAST_AS_POSSIBLE`, `ROTATION`, `SHARE_OF_VOICE` or `ACCOUNT_SETTING`. Account setting takes the default pacing option set for the account</td></tr><tr><td style="width:18.236%;">`deliveryParameter`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">number</td><td style="width:50.7747%;">Sets the delivery percentage for SOV. Expressed as `1` for 100% of desired delivery share.</td></tr><tr><td style="width:18.236%;">`comment`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">string</td><td style="width:50.7747%;">Optional comment in the booking UI.</td></tr><tr><td style="width:18.236%;">`rtbEnabled`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">boolean</td><td style="width:50.7747%;">Can the booking go in competition with RTB bookings. Possible values are `true` or `false`</td></tr><tr><td style="width:18.236%;">`priorityID`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">integer</td><td style="width:50.7747%;">Priority of the booking expressed from `1` till `5`, If no value is chosen, the campaign priority will be picked.</td></tr><tr><td style="width:18.236%;">`deliveryMultiples`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">string</td><td style="width:50.7747%;">Extra exclusion settings for bookings. Possible values are: `EXCLUSIVE_ON_CAMPAIGN`, `EXCLUSIVE_ON_CREATIVE`, `ONE_AT_A_TIME`, `FREE`. Free is the default option and means no deliveryMultiples is set. ONE\_AT\_A\_TIME refers to [Exclusive on Advertiser](https://documentation.adhese.eu/books/campaign-management/page/bookings#bkmrk-exclude-delivery).</td></tr><tr><td style="width:18.236%;">`excludePositionIds`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">integer</td><td style="width:50.7747%;">Position IDs to exclude from the selected media product (if it's a channel).</td></tr><tr><td style="width:18.236%;">`excludePublicationIds`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">integer</td><td style="width:50.7747%;">Publication IDs to exclude certain publication's inventory from the selected media product (if it's a channel)</td></tr><tr><td style="width:18.236%;">`autoDeliveryLimits`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">boolean</td><td style="width:50.7747%;">Activate auto delivery limits. Possible values are `true` or `false`.</td></tr><tr><td style="width:18.236%;">`sponsoredProductIds`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">string</td><td style="width:50.7747%;">ID's of the sponsored products attached to this booking.</td></tr><tr><td style="width:18.236%;">`startTime`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">string</td><td style="width:50.7747%;">Hour of the day when the booking will start delivery. formatted as `hh:mm:ss`.</td></tr><tr><td style="width:18.236%;">`endTime`

</td><td style="width:8.46246%;">body</td><td style="width:11.6806%;">No</td><td style="width:10.8462%;">string</td><td style="width:50.7747%;">Hour of the day when the booking will stop delivery (until the next day). formatted as `hh:mm:ss`.</td></tr></tbody></table>

**Updating a booking**

```
{
    "internalId": 22,
    "name": "Evnia 27M2N8500/01",
    "status": "ACTIVE",
    "lifetimeStatus": "STARTED",
    "positionId": 8,
    "positionName": "Home Halfpage",
    "formatId": 1,
    "formatName": "Halfpage",
    "startDate": "2026-07-04T22:00:00Z",
    "endDate": "2026-07-31T21:59:00Z",
    "creationDate": "2026-07-01T10:14:28Z",
    "lastEditedDate": "2026-07-15T13:42:55Z",
    "deliveryFactors": {
        "unit": "IMPRESSIONS",
        "volume": 2500000,
        "pricingType": "CPM",
        "price": 3.0,
        "budget": 5500.0,
        "currency": "EUR",
        "cpcOptimized": true
    },
    "mediaProduct": {
      "positionId": 8,
      "formatId": 1
    },
    "activeDays": [
        "MONDAY",
        "TUESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY",
        "SUNDAY"
    ],
    "creativeCount": 2,
    "frequencyLimits": [],
    "userFrequencies": [
        {
            "impressionsAmount": 10,
            "expiryInSeconds": 86400
        }
    ],
    "pacing": "FRONTLOADED",
    "deliveryMethod": "AUTO",
    "deliveryMultiples": "FREE",
    "campaignId": 17,
    "comment": null,
    "priority": null,
    "isBookedOnChannel": false,
    "excludePositionIds": [],
    "excludePublicationIds": [],
    "rtbEnabled": false,
    "targetExpressions": {},
    "autoDeliveryLimits": false,
    "bookingType": null,
    "startTime": "00:00:00",
    "endTime": "23:59:59"
}
```

**Response** - 200

```
{
    "internalId": 22,
    "name": "Evnia 27M2N8500/01",
    "status": "ACTIVE",
    "lifetimeStatus": "STARTED",
    "positionId": 8,
    "positionName": "Home Halfpage",
    "formatId": 1,
    "formatName": "Halfpage",
    "startDate": "2026-07-04T22:00:00Z",
    "endDate": "2026-07-31T21:59:00Z",
    "creationDate": "2026-07-01T10:14:28Z",
    "lastEditedDate": "2026-07-31T12:02:18Z",
    "deliveryFactors": {
        "unit": "IMPRESSIONS",
        "volume": 2500000,
        "pricingType": "CPM",
        "price": 3.0,
        "budget": 5500.0,
        "currency": "EUR",
        "cpcOptimized": true
    },
    "activeDays": [
        "MONDAY",
        "TUESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY",
        "SUNDAY"
    ],
    "creativeCount": 2,
    "frequencyLimits": [],
    "userFrequencies": [
        {
            "impressionsAmount": 10,
            "expiryInSeconds": 86400
        }
    ],
    "pacing": "FRONTLOADED",
    "deliveryMethod": "AUTO",
    "deliveryParameter": null,
    "deliveryMultiples": "FREE",
    "campaignId": 17,
    "comment": null,
    "priority": null,
    "isBookedOnChannel": false,
    "excludePositionIds": [],
    "excludePublicationIds": [],
    "rtbEnabled": false,
    "targetExpressions": {},
    "autoDeliveryLimits": false,
    "bookingType": null,
    "startTime": "00:00:00",
    "endTime": "23:59:59"
}
```

**Response codes**

<table id="bkmrk-status-meaning-200-b" style="border-collapse:collapse;width:100%;height:238.4px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Booking updated.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`422`</td><td style="height:29.8px;">Unprocessable Entity</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Change the status of a booking

```
PUT /v1/bookings/{bookingId}/status
```

Change the status of a booking

**Request** **body**

<table id="bkmrk-parameter-in-require-2" style="border-collapse:collapse;width:100%;height:107.2px;"><thead><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">**Parameter**</td><td style="width:8.46246%;height:29.8px;">**In**</td><td style="width:10.1311%;height:29.8px;">**Required**</td><td style="width:12.3957%;height:29.8px;">**Type**</td><td style="width:50.7747%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">`bookingId`</td><td style="width:8.46246%;height:29.8px;">path</td><td style="width:10.1311%;height:29.8px;">Yes</td><td style="width:12.3957%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">The booking's ID.</td></tr><tr style="height:47.6px;"><td style="width:18.236%;height:47.6px;">/</td><td style="width:8.46246%;height:47.6px;">body</td><td style="width:10.1311%;height:47.6px;">Yes</td><td style="width:12.3957%;height:47.6px;">string</td><td style="width:50.7747%;height:47.6px;">Desired booking status. Possible values are: `ACTIVE`, `PAUSED`, `STOPPED`</td></tr></tbody></table>

**Changing the status of a booking**

```
"ACTIVE"
```

**Response codes**

<table id="bkmrk-status-meaning-204-b" style="border-collapse:collapse;width:100%;height:208.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`204`</td><td style="height:29.8px;">Booking status updated.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### List bookings

```
GET /v1/bookings
```

List one or multiple bookings depending on filters chosen. Filtering is required for retrieving a list of bookings.

**Request body**

<table id="bkmrk-parameter-in-require-3" style="border-collapse:collapse;width:100%;height:416.6px;"><thead><tr style="height:29.8px;"><td style="width:16.0906%;height:29.8px;">**Parameter**</td><td style="width:13.4684%;height:29.8px;">**In**</td><td style="width:10.0119%;height:29.8px;">**Required**</td><td style="width:9.65435%;height:29.8px;">**Type**</td><td style="width:50.7747%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:46.6px;"><td style="width:16.0906%;height:46.6px;">`campaignId`</td><td style="width:13.4684%;height:46.6px;">parameters</td><td style="width:10.0119%;height:46.6px;">No</td><td style="width:9.65435%;height:46.6px;">integer</td><td style="width:50.7747%;height:46.6px;">Campaign Id of the campaign whose bookings you want to list</td></tr><tr style="height:47.6px;"><td style="width:16.0906%;height:47.6px;">`boookingId`</td><td style="width:13.4684%;height:47.6px;">parameters</td><td style="width:10.0119%;height:47.6px;">No</td><td style="width:9.65435%;height:47.6px;">integer</td><td style="width:50.7747%;height:47.6px;">Booking Ids of the booking(s) you want to list. IDs are comma separated.</td></tr><tr style="height:46.6px;"><td style="width:16.0906%;height:46.6px;">`creativeId`</td><td style="width:13.4684%;height:46.6px;">parameters</td><td style="width:10.0119%;height:46.6px;">No</td><td style="width:9.65435%;height:46.6px;">integer</td><td style="width:50.7747%;height:46.6px;">ID of the creatives by which you want to return trafficked bookings. IDs are comma separated.</td></tr><tr style="height:29.8px;"><td style="width:16.0906%;height:29.8px;">`limit`</td><td style="width:13.4684%;height:29.8px;">parameters</td><td style="width:10.0119%;height:29.8px;">No</td><td style="width:9.65435%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">Pagination property to limit the number of returned targets.</td></tr><tr style="height:29.8px;"><td style="width:16.0906%;height:29.8px;">`offset`</td><td style="width:13.4684%;height:29.8px;">parameters</td><td style="width:10.0119%;height:29.8px;">No</td><td style="width:9.65435%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">Pagination property to offset the returned targets.</td></tr><tr style="height:46.6px;"><td style="width:16.0906%;height:46.6px;">`search`</td><td style="width:13.4684%;height:46.6px;">parameters</td><td style="width:10.0119%;height:46.6px;">No</td><td style="width:9.65435%;height:46.6px;">string</td><td style="width:50.7747%;height:46.6px;">An url-encoded search string to apply to the list of bookings (ignoring case, on id and name).</td></tr><tr style="height:46.6px;"><td style="width:16.0906%;height:46.6px;">`status`</td><td style="width:13.4684%;height:46.6px;">parameters</td><td style="width:10.0119%;height:46.6px;">No</td><td style="width:9.65435%;height:46.6px;">string</td><td style="width:50.7747%;height:46.6px;">Filter applied to one or more booking statuses. Possible values are: `ACTIVE`, `PAUSED`, `STOPPED`</td></tr><tr style="height:63.4px;"><td style="width:16.0906%;height:63.4px;">`sortField`</td><td style="width:13.4684%;height:63.4px;">parameters</td><td style="width:10.0119%;height:63.4px;">No</td><td style="width:9.65435%;height:63.4px;">string</td><td style="width:50.7747%;height:63.4px;">Field that results should be sorted on. Possible values are: `INTERNAL_ID`, `NAME`, `STATUS`, `START_DATE`, `END_DATE`, `BOOKING_TYPE`</td></tr><tr style="height:29.8px;"><td style="width:16.0906%;height:29.8px;">`sortDirection`</td><td style="width:13.4684%;height:29.8px;">parameters</td><td style="width:10.0119%;height:29.8px;">No</td><td style="width:9.65435%;height:29.8px;">string</td><td style="width:50.7747%;height:29.8px;">Sort direction to be applied. Possible values are: `ASC`, `DESC`</td></tr></tbody></table>

**Response** - 200

```
[
    {
        "internalId": 26,
        "name": "",
        "status": "ACTIVE",
        "lifetimeStatus": "COMPLETED",
        "positionId": 10,
        "positionName": "",
        "formatId": 1,
        "formatName": "Halfpage",
        "startDate": "2026-07-14T22:00:00Z",
        "endDate": "2026-07-31T21:59:59Z",
        "creationDate": "2026-07-15T13:44:13Z",
        "lastEditedDate": "2026-07-15T13:46:38Z",
        "deliveryFactors": {
            "unit": "IMPRESSIONS",
            "volume": 20000,
            "pricingType": "CPM",
            "price": 0.0,
            "budget": 0.0,
            "currency": "EUR",
            "cpcOptimized": false
        },
        "activeDays": [
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
        ],
        "creativeCount": 1,
        "frequencyLimits": [],
        "userFrequencies": [],
        "pacing": "EVEN",
        "deliveryMethod": "AUTO",
        "deliveryParameter": 0.0,
        "deliveryMultiples": "FREE",
        "campaignId": 21,
        "comment": "",
        "priority": null,
        "isBookedOnChannel": true,
        "excludePositionIds": [],
        "excludePublicationIds": [],
        "rtbEnabled": false,
        "targetExpressions": {},
        "autoDeliveryLimits": false,
        "bookingType": null,
        "startTime": "00:00:00",
        "endTime": "23:59:59"
    },
    {
        "internalId": 29,
        "name": "",
        "status": "ACTIVE",
        "lifetimeStatus": "COMPLETED",
        "positionId": 15,
        "positionName": "",
        "formatId": 7,
        "formatName": "Portrait Screen",
        "startDate": "2026-07-28T22:00:00Z",
        "endDate": "2026-07-29T21:59:59Z",
        "creationDate": "2026-07-29T07:48:51Z",
        "lastEditedDate": "2026-07-29T07:49:31Z",
        "deliveryFactors": {
            "unit": "IMPRESSIONS",
            "volume": 0,
            "pricingType": "CPM",
            "price": 0.0,
            "budget": 0.0,
            "currency": "EUR",
            "cpcOptimized": false
        },
        "activeDays": [
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
        ],
        "creativeCount": 0,
        "frequencyLimits": [],
        "userFrequencies": [],
        "pacing": "SHARE_OF_VOICE",
        "deliveryMethod": "SOV",
        "deliveryParameter": 1.0,
        "deliveryMultiples": "FREE",
        "campaignId": 21,
        "comment": "",
        "priority": null,
        "isBookedOnChannel": false,
        "excludePositionIds": [],
        "excludePublicationIds": [],
        "rtbEnabled": false,
        "targetExpressions": {},
        "autoDeliveryLimits": false,
        "bookingType": null,
        "startTime": "00:00:00",
        "endTime": "23:59:59"
    }
]
```

**Response codes**

<table id="bkmrk-status-meaning-200-b-1" style="border-collapse:collapse;width:100%;height:208.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Bookings returned successfully. </td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Create a booking

```
POST /v1/bookings
```

Create a new booking based on the parameters entered in the request.

**Request body**

<table id="bkmrk-parameter-in-require-4" style="border-collapse:collapse;width:100%;height:1613.8px;"><thead><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">**Parameter**</td><td style="width:8.10489%;height:29.8px;">**In**</td><td style="width:10.8462%;height:29.8px;">**Required**</td><td style="width:9.77482%;height:29.8px;">**Type**</td><td style="width:51.8462%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`InternalId`</td><td style="width:8.10489%;height:46.6px;">path</td><td style="width:10.8462%;height:46.6px;">Yes</td><td style="width:9.77482%;height:46.6px;">integer</td><td style="width:51.8462%;height:46.6px;">The booking's ID.</td></tr><tr style="height:47.6px;"><td style="width:19.4279%;height:47.6px;">`name`</td><td style="width:8.10489%;height:47.6px;">body</td><td style="width:10.8462%;height:47.6px;">Yes</td><td style="width:9.77482%;height:47.6px;">string</td><td style="width:51.8462%;height:47.6px;">Name of the campaign under which the booking is active.</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`startDate`</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">Yes</td><td style="width:9.77482%;height:46.6px;">string</td><td style="width:51.8462%;height:46.6px;">Start date of the booking in date-time format `yyyy-mm-ddThh:mm:ssZ`</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`endDate`</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">Yes</td><td style="width:9.77482%;height:46.6px;">string</td><td style="width:51.8462%;height:46.6px;">End date of the booking in date-time format `yyyy-mm-ddThh:mm:ssZ`</td></tr><tr style="height:63.4px;"><td style="width:19.4279%;height:63.4px;">`activeDays`

</td><td style="width:8.10489%;height:63.4px;">body</td><td style="width:10.8462%;height:63.4px;">Yes</td><td style="width:9.77482%;height:63.4px;">string</td><td style="width:51.8462%;height:63.4px;">Days of the week the booking is active. Possible values are: <span class="model"><span><span class="inner-object"><span class="prop"><span class="prop-enum">`MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`</span></span></span></span></span></td></tr><tr style="height:86.2px;"><td style="width:19.4279%;height:86.2px;">`deliveryFactors`

</td><td style="width:8.10489%;height:86.2px;">body</td><td style="width:10.8462%;height:86.2px;">Yes</td><td style="width:9.77482%;height:86.2px;">string, integer, number, boolean</td><td style="width:51.8462%;height:86.2px;">Options that set the goals and to reach of the booking.</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">\- `unit`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">Yes</td><td style="width:9.77482%;height:46.6px;">string</td><td style="width:51.8462%;height:46.6px;">Unit of the to reach volume of the booking. Possible values are: `Impressions` or `Clicks`</td></tr><tr style="height:63.4px;"><td style="width:19.4279%;height:63.4px;">\- `volume`

</td><td style="width:8.10489%;height:63.4px;">body</td><td style="width:10.8462%;height:63.4px;">No</td><td style="width:9.77482%;height:63.4px;">integer</td><td style="width:51.8462%;height:63.4px;">Amount of the unit to reach before the booking stops.</td></tr><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">\- `price`

</td><td style="width:8.10489%;height:29.8px;">body</td><td style="width:10.8462%;height:29.8px;">No</td><td style="width:9.77482%;height:29.8px;">number</td><td style="width:51.8462%;height:29.8px;">Price of the booking set by pricing type.</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">\- `budget`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">number</td><td style="width:51.8462%;height:46.6px;">Budget of the booking. When the budget is spent by the booking, delivery stops.</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">\- `pricingType`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">Yes</td><td style="width:9.77482%;height:46.6px;">string</td><td style="width:51.8462%;height:46.6px;">Method for determining ad spend via price. Possible values are: `CPM`, `CPC`, `CPP`, `CPL` or `ADM`</td></tr><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">\- `cpcOptimized`

</td><td style="width:8.10489%;height:29.8px;">body</td><td style="width:10.8462%;height:29.8px;">No</td><td style="width:9.77482%;height:29.8px;">boolean</td><td style="width:51.8462%;height:29.8px;">Is CPC optimisation enabled for the booking: `true` or `false`</td></tr><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">`mediaProduct`

</td><td style="width:8.10489%;height:29.8px;">body</td><td style="width:10.8462%;height:29.8px;">Yes</td><td style="width:9.77482%;height:29.8px;">integer</td><td style="width:51.8462%;height:29.8px;">Position and format ID of the position of the booking.</td></tr><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">\- `positionID`

</td><td style="width:8.10489%;height:29.8px;">body</td><td style="width:10.8462%;height:29.8px;">Yes</td><td style="width:9.77482%;height:29.8px;">integer</td><td style="width:51.8462%;height:29.8px;">Slot ID of the position.</td></tr><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">\- `formatID`

</td><td style="width:8.10489%;height:29.8px;">body</td><td style="width:10.8462%;height:29.8px;">Yes</td><td style="width:9.77482%;height:29.8px;">integer</td><td style="width:51.8462%;height:29.8px;">ID of the format used in the position.</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`frequencyLimits`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">integer, string</td><td style="width:51.8462%;height:46.6px;">Setting for capping delivery.</td></tr><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">\- `amount`

</td><td style="width:8.10489%;height:29.8px;">body</td><td style="width:10.8462%;height:29.8px;">No</td><td style="width:9.77482%;height:29.8px;">string</td><td style="width:51.8462%;height:29.8px;">Amount of *event* to cap delivery by.</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">\- `event`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">string</td><td style="width:51.8462%;height:46.6px;">Unit to measure for capping delivery. Either `IMPRESSIONS` or `CLICKS`</td></tr><tr style="height:63.4px;"><td style="width:19.4279%;height:63.4px;">\- `period`

</td><td style="width:8.10489%;height:63.4px;">body</td><td style="width:10.8462%;height:63.4px;">No</td><td style="width:9.77482%;height:63.4px;">string</td><td style="width:51.8462%;height:63.4px;">Period where the cap is active, either `HOURLY` or `DAILY`. After the period has run out, the cap resets, either for the next hour or next day.</td></tr><tr style="height:80.2px;"><td style="width:19.4279%;height:80.2px;">`pacing`

</td><td style="width:8.10489%;height:80.2px;">body</td><td style="width:10.8462%;height:80.2px;">Yes</td><td style="width:9.77482%;height:80.2px;">string</td><td style="width:51.8462%;height:80.2px;">Delivery pacing options for the booking. Possible values are: `EVEN`, `FRONTLOADED`, `AS_FAST_AS_POSSIBLE`, `ROTATION`, `SHARE_OF_VOICE` or `ACCOUNT_SETTING`. Account setting takes the default pacing option set for the account</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`deliveryParameter`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">number</td><td style="width:51.8462%;height:46.6px;">Sets the delivery percentage for SOV. Expressed as `1` for 100% of desired delivery share.</td></tr><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">`comment`

</td><td style="width:8.10489%;height:29.8px;">body</td><td style="width:10.8462%;height:29.8px;">No</td><td style="width:9.77482%;height:29.8px;">string</td><td style="width:51.8462%;height:29.8px;">Optional comment in the booking UI.</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`rtbEnabled`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">boolean</td><td style="width:51.8462%;height:46.6px;">Can the booking go in competition with RTB bookings. Possible values are `true` or `false`</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`priorityID`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">integer</td><td style="width:51.8462%;height:46.6px;">Priority of the booking expressed from `1` till `5`, If no value is chosen, the campaign priority will be picked.</td></tr><tr style="height:102.6px;"><td style="width:19.4279%;height:102.6px;">`deliveryMultiples`

</td><td style="width:8.10489%;height:102.6px;">body</td><td style="width:10.8462%;height:102.6px;">No</td><td style="width:9.77482%;height:102.6px;">string</td><td style="width:51.8462%;height:102.6px;">Extra exclusion settings for bookings. Possible values are: `EXCLUSIVE_ON_CAMPAIGN`, `EXCLUSIVE_ON_CREATIVE`, `ONE_AT_A_TIME`, `FREE`. Free is the default option and means no deliveryMultiples is set. ONE\_AT\_A\_TIME refers to [Exclusive on Advertiser](https://documentation.adhese.eu/books/campaign-management/page/bookings#bkmrk-exclude-delivery).</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`excludePositionIds`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">integer</td><td style="width:51.8462%;height:46.6px;">Position IDs to exclude from the selected media product (if it's a channel).</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`excludePublicationIds`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">integer</td><td style="width:51.8462%;height:46.6px;">Publication IDs to exclude certain publication's inventory from the selected media product (if it's a channel)</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`autoDeliveryLimits`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">boolean</td><td style="width:51.8462%;height:46.6px;">Activate auto delivery limits. Possible values are `true` or `false`.</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`sponsoredProductIds`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">string</td><td style="width:51.8462%;height:46.6px;">ID's of the sponsored products attached to this booking.</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`startTime`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">string</td><td style="width:51.8462%;height:46.6px;">Hour of the day when the booking will start delivery. formatted as `hh:mm:ss`.</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`endTime`

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">No</td><td style="width:9.77482%;height:46.6px;">string</td><td style="width:51.8462%;height:46.6px;">Hour of the day when the booking will stop delivery (until the next day). formatted as `hh:mm:ss`.</td></tr><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">campaignId

</td><td style="width:8.10489%;height:29.8px;">body</td><td style="width:10.8462%;height:29.8px;">Yes</td><td style="width:9.77482%;height:29.8px;">integer</td><td style="width:51.8462%;height:29.8px;">ID of the campaign you want to create the booking under.</td></tr><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">bookingType

</td><td style="width:8.10489%;height:46.6px;">body</td><td style="width:10.8462%;height:46.6px;">Yes</td><td style="width:9.77482%;height:46.6px;">string</td><td style="width:51.8462%;height:46.6px;">Booking type. Possible values are: `DISPLAY`, `IN_STORE`, `SPONSORED_PRODUCT`</td></tr></tbody></table>

**Create a booking - <span class="model"><span><span class="pointer"><span class="model-title"><span class="model-title__text">CreateBookingDto</span></span></span></span></span>**

```
{
  "name": "apibooking",
  "startDate": "2026-08-03T12:28:35.965Z",
  "endDate": "2026-08-30T12:28:35.965Z",
  "activeDays": [
    "MONDAY",
    "TUESDAY",
    "WEDNESDAY",
    "THURSDAY",
    "FRIDAY",
    "SATURDAY",
    "SUNDAY"
  ],
  "deliveryFactors": {
    "unit": "IMPRESSIONS",
    "volume": 10000,
    "price": 5,
    "budget": 3000,
    "pricingType": "CPM",
    "cpcOptimized": false
  },
  "mediaProduct": {
    "positionId": 2,
    "formatId": 1 
  },
  "frequencyLimits": [
  ],
  "userFrequencies": [
    {
      "impressionsAmount": 0,
      "expiryInSeconds": 0
    }
  ],
  "pacing": "FRONTLOADED",
  "comment": "string",
  "rtbEnabled": true,
  "priorityId": 1,
  "deliveryMultiples": null,
  "excludePositionIds": [
  ],
  "excludePublicationIds": [
  ],
  "autoDeliveryLimits": true,
  "sponsoredProductIds": [
    "string"
  ],
  "startTime": "08:30:00",
  "endTime": "20:30:00",
  "campaignId": 21,
  "bookingType": "DISPLAY"
}
```

**Response** - 201

```
{
    "internalId": 31,
    "name": "apibooking",
    "status": "ACTIVE",
    "lifetimeStatus": "INCOMPLETE",
    "positionId": 2,
    "positionName": "",
    "formatId": 1,
    "formatName": "Halfpage",
    "startDate": "2026-08-03T12:28:35Z",
    "endDate": "2026-08-30T12:28:35Z",
    "creationDate": "2026-08-03T14:05:38Z",
    "lastEditedDate": "2026-08-03T14:05:38Z",
    "deliveryFactors": {
        "unit": "IMPRESSIONS",
        "volume": 10000,
        "pricingType": "CPM",
        "price": 5.0,
        "budget": 3000.0,
        "currency": "EUR",
        "cpcOptimized": false
    },
    "activeDays": [
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY",
        "SUNDAY"
    ],
    "creativeCount": 0,
    "frequencyLimits": [],
    "userFrequencies": [
        {
            "impressionsAmount": 0,
            "expiryInSeconds": 0
        }
    ],
    "pacing": "FRONTLOADED",
    "deliveryMethod": "AUTO",
    "deliveryParameter": null,
    "deliveryMultiples": "FREE",
    "campaignId": 21,
    "comment": "string",
    "priority": {
        "id": 1,
        "name": "paying",
        "index": 0
    },
    "isBookedOnChannel": false,
    "excludePositionIds": [],
    "excludePublicationIds": [],
    "rtbEnabled": true,
    "targetExpressions": {},
    "autoDeliveryLimits": true,
    "bookingType": "DISPLAY",
    "startTime": "08:30:00",
    "endTime": "20:30:00"
}
```

**Response codes**

<table id="bkmrk-status-meaning-201-b" style="border-collapse:collapse;width:100%;height:208.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`201`</td><td style="height:29.8px;">Bookings created successfully. </td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr><td>`422`</td><td>Unprocessable Entity.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Duplicate a booking

```
POST /v1/bookings/{bookingId}/duplicate
```

Creates a duplicate of the booking in the request prepended with *Copy.* State and external key are not copied over.

**Request body**

<table id="bkmrk-parameter-in-require-5" style="border-collapse:collapse;width:100%;height:1613.8px;"><thead><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">**Parameter**</td><td style="width:8.10489%;height:29.8px;">**In**</td><td style="width:10.8462%;height:29.8px;">**Required**</td><td style="width:9.77482%;height:29.8px;">**Type**</td><td style="width:51.8462%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`InternalId`</td><td style="width:8.10489%;height:46.6px;">path</td><td style="width:10.8462%;height:46.6px;">Yes</td><td style="width:9.77482%;height:46.6px;">integer</td><td style="width:51.8462%;height:46.6px;">The booking ID of the booking you want to copy.</td></tr></tbody></table>

**Response** - 200

```
{
    "internalId": 32,
    "name": "Copy: Evnia 27M2N8500/01",
    "status": "PAUSED",
    "lifetimeStatus": "COMPLETED",
    "positionId": 8,
    "positionName": "Home Halfpage",
    "formatId": 1,
    "formatName": "Halfpage",
    "startDate": "2026-07-04T22:00:00Z",
    "endDate": "2026-07-31T21:59:00Z",
    "creationDate": "2026-08-05T15:20:49Z",
    "lastEditedDate": "2026-08-05T15:20:49Z",
    "deliveryFactors": {
        "unit": "IMPRESSIONS",
        "volume": 2500000,
        "pricingType": "CPM",
        "price": 3.0,
        "budget": 5500.0,
        "currency": "EUR",
        "cpcOptimized": true
    },
    "activeDays": [
        "MONDAY",
        "TUESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY",
        "SUNDAY"
    ],
    "creativeCount": 0,
    "frequencyLimits": [],
    "userFrequencies": [
        {
            "impressionsAmount": 10,
            "expiryInSeconds": 86400
        }
    ],
    "pacing": "FRONTLOADED",
    "deliveryMethod": "AUTO",
    "deliveryParameter": null,
    "deliveryMultiples": "FREE",
    "campaignId": 17,
    "comment": null,
    "priority": null,
    "isBookedOnChannel": false,
    "excludePositionIds": [],
    "excludePublicationIds": [],
    "rtbEnabled": false,
    "targetExpressions": {},
    "autoDeliveryLimits": false,
    "bookingType": null,
    "startTime": "00:00:00",
    "endTime": "23:59:59"
}
```

**Response codes**

<table id="bkmrk-status-meaning-200-b-2" style="border-collapse:collapse;width:100%;height:208.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Bookings successfully copied. </td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Retrieve bookings trafficked to creatives

```
GET /v1/creatives/advar/{id}/bookings
```

Retrieves bookings trafficked to a creative on the ID of an advar creative.

<table id="bkmrk-parameter-in-require-6" style="border-collapse:collapse;width:100%;height:76.4px;"><thead><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">**Parameter**</td><td style="width:8.10489%;height:29.8px;">**In**</td><td style="width:10.8462%;height:29.8px;">**Required**</td><td style="width:9.77482%;height:29.8px;">**Type**</td><td style="width:51.8462%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`InternalId`</td><td style="width:8.10489%;height:46.6px;">path</td><td style="width:10.8462%;height:46.6px;">Yes</td><td style="width:9.77482%;height:46.6px;">integer</td><td style="width:51.8462%;height:46.6px;">The creative ID of the creative who's trafficked bookings you want to retrieve.</td></tr></tbody></table>

**Response** - 200

```
[
    {
        "internalId": 32,
        "name": "Copy: Evnia 27M2N8500/01",
        "status": "PAUSED",
        "lifetimeStatus": "COMPLETED",
        "positionId": 8,
        "positionName": "Home Halfpage",
        "formatId": 1,
        "formatName": "Halfpage",
        "startDate": "2026-07-04T22:00:00Z",
        "endDate": "2026-07-31T21:59:00Z",
        "creationDate": "2026-08-05T15:20:49Z",
        "lastEditedDate": "2026-08-05T15:20:49Z",
        "deliveryFactors": {
            "unit": "IMPRESSIONS",
            "volume": 2500000,
            "pricingType": "CPM",
            "price": 3.0,
            "budget": 5500.0,
            "currency": "EUR",
            "cpcOptimized": true
        },
        "activeDays": [
            "MONDAY",
            "TUESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
        ],
        "creativeCount": 0,
        "frequencyLimits": [],
        "userFrequencies": [],
        "pacing": null,
        "deliveryMethod": "AUTO",
        "deliveryParameter": null,
        "deliveryMultiples": "FREE",
        "campaignId": 17,
        "comment": null,
        "priority": null,
        "isBookedOnChannel": false,
        "excludePositionIds": [],
        "excludePublicationIds": [],
        "rtbEnabled": false,
        "targetExpressions": {},
        "autoDeliveryLimits": false,
        "bookingType": null,
        "startTime": "00:00:00",
        "endTime": "23:59:59"
    },
    {
        "internalId": 22,
        "name": "Evnia 27M2N8500/01",
        "status": "ACTIVE",
        "lifetimeStatus": "COMPLETED",
        "positionId": 8,
        "positionName": "Home Halfpage",
        "formatId": 1,
        "formatName": "Halfpage",
        "startDate": "2026-07-04T22:00:00Z",
        "endDate": "2026-07-31T21:59:00Z",
        "creationDate": "2026-07-01T10:14:28Z",
        "lastEditedDate": "2026-07-31T13:36:26Z",
        "deliveryFactors": {
            "unit": "IMPRESSIONS",
            "volume": 2500000,
            "pricingType": "CPM",
            "price": 3.0,
            "budget": 5500.0,
            "currency": "EUR",
            "cpcOptimized": true
        },
        "activeDays": [
            "MONDAY",
            "TUESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
        ],
        "creativeCount": 0,
        "frequencyLimits": [],
        "userFrequencies": [],
        "pacing": null,
        "deliveryMethod": "AUTO",
        "deliveryParameter": null,
        "deliveryMultiples": "FREE",
        "campaignId": 17,
        "comment": null,
        "priority": null,
        "isBookedOnChannel": false,
        "excludePositionIds": [],
        "excludePublicationIds": [],
        "rtbEnabled": false,
        "targetExpressions": {},
        "autoDeliveryLimits": false,
        "bookingType": null,
        "startTime": "00:00:00",
        "endTime": "23:59:59"
    }
]
```

**Response codes**

<table id="bkmrk-status-meaning-200-b-3" style="border-collapse:collapse;width:100%;height:208.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Bookings successfully retrieved. </td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Retrieve creatives trafficked to a booking

```
GET /v1/bookings/{bookingId}/creatives
```

Retrieves all creatives trafficked to a booking by way of Booking ID.

<table id="bkmrk-parameter-in-require-7" style="border-collapse:collapse;width:100%;height:76.4px;"><thead><tr style="height:29.8px;"><td style="width:19.4279%;height:29.8px;">**Parameter**</td><td style="width:8.10489%;height:29.8px;">**In**</td><td style="width:10.8462%;height:29.8px;">**Required**</td><td style="width:9.77482%;height:29.8px;">**Type**</td><td style="width:51.8462%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:46.6px;"><td style="width:19.4279%;height:46.6px;">`InternalId`</td><td style="width:8.10489%;height:46.6px;">path</td><td style="width:10.8462%;height:46.6px;">Yes</td><td style="width:9.77482%;height:46.6px;">integer</td><td style="width:51.8462%;height:46.6px;">The booking ID of the booking who's trafficked creatives you want to retrieve.</td></tr></tbody></table>

**Response** - 200

```
[
    {
        "creativeId": 18,
        "campaignId": 17,
        "creativeName": "27M2N8500/01 Rectangle 1",
        "formatId": 1,
        "advarTemplateName": "Image_FlexBanner.html",
        "sku": null,
        "lastEditedDate": "2026-07-01T10:16:32Z",
        "templateParameters": {
            "<CLICKURL>": "https://www.philips.be/c-p/27M2N8500_01/gamemonitor-qd-oled-gamemonitor",
            "<ALT_TEXT>": "QD OLED-gamemonitor"
        },
        "templateFiles": {
            "2": {
                "fileName": null,
                "filePath": "https://demo-preview.adhese.org/pool/lib/18_2nd_1.png"
            }
        },
        "lastEdited": 1782900992000
    },
    {
        "creativeId": 19,
        "campaignId": 17,
        "creativeName": "27M2N8500/01 Rectangle 2",
        "formatId": 1,
        "advarTemplateName": "Image_FlexBanner.html",
        "sku": null,
        "lastEditedDate": "2026-07-01T10:19:06Z",
        "templateParameters": {
            "<CLICKURL>": "https://www.philips.be/c-p/27M2N8500_01/gamemonitor-qd-oled-gamemonitor",
            "<ALT_TEXT>": "QD OLED-gamemonitor 2"
        },
        "templateFiles": {
            "2": {
                "fileName": null,
                "filePath": "https://demo-preview.adhese.org/pool/lib/19_2nd_1.png"
            }
        },
        "lastEdited": 1782901146000
    },
    {
        "creativeId": 27,
        "campaignId": 17,
        "creativeName": "Apitest advar banner ",
        "formatId": 1,
        "advarTemplateName": "Image_FlexBanner_recu.html",
        "sku": "",
        "lastEditedDate": "2026-08-06T07:35:49Z",
        "templateParameters": {
            "<CLICKURL>": "",
            "<ALT_TEXT>": "",
            "<recu-open_ADHESE_LIB_ID>": "<ADHESE_LIB_ID>"
        },
        "templateFiles": {
            "2": {
                "fileName": null,
                "filePath": "https://demo-preview.adhese.org/pool/lib/27_2nd_1.png"
            }
        },
        "lastEdited": 1786001749000
    }
]
```

**Response codes**

<table id="bkmrk-status-meaning-200-b-4" style="border-collapse:collapse;width:100%;height:208.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Bookings successfully retrieved. </td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

# Media Partners API

## Media Partners

Media partners is the overarching term for an advertiser or debtor. Media partners have media brands associated with them. 

### Create a Media Partner

```
POST /v1/media-partners
```

Creates a media partner (advertiser company, invoicing company, or both, depending on `roles`).

**Request body** — `CreateMediaPartnerRequest`

<table id="bkmrk-field-type-required-"><thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td>Yes</td><td>Display name of the company.</td></tr><tr><td><code>roles</code></td><td>array of enum</td><td>Yes</td><td>Any of <code>ADVERTISER</code>, <code>INVOICE</code></td></tr><tr><td><code>externalKey</code></td><td>string</td><td>No</td><td>Your own external reference key.</td></tr><tr><td><code>subsystemExternalIds</code></td><td>object (string → string)</td><td>No</td><td>External ids per subsystem. Example is a CRM or Advendio ID.</td></tr></tbody></table>

**Create an advertiser company**

```json
{
  "name": "Acme Beverages",
  "roles": ["ADVERTISER"],
  "externalKey": "acme-bev",
  "subsystemExternalIds": {
    "crm": "CRM-10432"
  }
}
```

**Create an invoicing company**

```json
{
  "name": "Acme Beverages Billing BV",
  "roles": ["INVOICE"],
  "externalKey": "acme-bev-billing"
}
```

**Create a company that is both advertiser and invoicing party**

```json
{
  "name": "Acme Beverages",
  "roles": ["ADVERTISER", "INVOICE"]
}
```

**Responses**

<table id="bkmrk-status-meaning-201-m"><thead><tr><th>Status</th><th>Meaning</th></tr></thead><tbody><tr><td><code>201</code></td><td>Media partner created.</td></tr><tr><td><code>400</code></td><td>Invalid input (e.g. empty `name` or unknown role).</td></tr><tr><td><code>401</code> / <code>403</code></td><td>Not authenticated / not allowed.</td></tr><tr><td><code>500</code></td><td>Unexpected failure.</td></tr></tbody></table>

> The `201` response will return a body including the generated `id` and all information known about the media partner.

### List companies

```
GET /v1/media-partners?limit=50&offset=0
```

<table id="bkmrk-parameter-in-require" style="width: 92.619%; height: 178.781px;"><thead><tr style="height: 29.7969px;"><th style="width: 15.6812%; height: 29.7969px;">Parameter</th><th style="width: 7.29635%; height: 29.7969px;">In</th><th style="width: 10.0337%; height: 29.7969px;">Required</th><th style="width: 9.43123%; height: 29.7969px;">Type</th><th style="width: 57.3868%; height: 29.7969px;">Description</th></tr></thead><tbody><tr style="height: 29.7969px;"><td style="width: 15.6812%; height: 29.7969px;"><code>limit</code></td><td style="width: 7.29635%; height: 29.7969px;">query</td><td style="width: 10.0337%; height: 29.7969px;">Yes</td><td style="width: 9.43123%; height: 29.7969px;">integer</td><td style="width: 57.3868%; height: 29.7969px;">Max number of results to return.</td></tr><tr style="height: 29.7969px;"><td style="width: 15.6812%; height: 29.7969px;"><code>offset</code></td><td style="width: 7.29635%; height: 29.7969px;">query</td><td style="width: 10.0337%; height: 29.7969px;">Yes</td><td style="width: 9.43123%; height: 29.7969px;">integer</td><td style="width: 57.3868%; height: 29.7969px;">Number of results to skip.</td></tr><tr style="height: 29.7969px;"><td style="width: 15.6812%; height: 29.7969px;"><code>search</code></td><td style="width: 7.29635%; height: 29.7969px;">query</td><td style="width: 10.0337%; height: 29.7969px;">No</td><td style="width: 9.43123%; height: 29.7969px;">string</td><td style="width: 57.3868%; height: 29.7969px;">URL-encoded, case-insensitive match on name.</td></tr><tr style="height: 29.7969px;"><td style="width: 15.6812%; height: 29.7969px;"><code>roles</code></td><td style="width: 7.29635%; height: 29.7969px;">query</td><td style="width: 10.0337%; height: 29.7969px;">No</td><td style="width: 9.43123%; height: 29.7969px;">array</td><td style="width: 57.3868%; height: 29.7969px;">Filter on the role(s) the media partner has, e.g. `roles=ADVERTISER`.</td></tr><tr style="height: 29.7969px;"><td style="width: 15.6812%; height: 29.7969px;"><code>includeInactive</code></td><td style="width: 7.29635%; height: 29.7969px;">query</td><td style="width: 10.0337%; height: 29.7969px;">No</td><td style="width: 9.43123%; height: 29.7969px;">boolean</td><td style="width: 57.3868%; height: 29.7969px;">Include deactivated media partners.</td></tr></tbody></table>

**Response** — array of `MediaPartner Schema`

```json
[
  {
    "id": 4021,
    "name": "Acme Beverages",
    "roles": ["ADVERTISER"],
    "externalKey": "acme-bev",
    "subsystemExternalIds": { "crm": "CRM-10432" },
    "active": true
  }
]
```

### Get a single media partner

```
GET /v1/media-partners/{mediaPartnerId}
```
<table><thead><tr><th>Parameter</th><th>In</th><th>Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>mediaPartnerId</code></td><td>path</td><td>Yes</td><td>integer</td><td>The id of the media partner you want to fetch.</td></tr></tbody></table>

**Responses**

<table><thead><tr><th>Status</th><th>Meaning</th></tr></thead><tbody><tr><td><code>200</code></td><td>Media partner found.</td></tr><tr><td><code>400</code></td><td> Bad request -Invalid input or parameters.</td></tr><tr><td><code>401</code> / <code>403</code></td><td>Not authenticated / not allowed.</td></tr><tr><td><code>404</code></td><td>Media partner not found.</td></tr><td><code>500</code></td><td>Internal Server Error</td></tr></tbody></table>

### Update media partner

```
PUT /v1/media-partners/{mediaPartnerId}
```
<table><thead><tr><th>Parameter</th><th>In</th><th>Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>mediaPartnerId</code></td><td>path</td><td>Yes</td><td>integer</td><td>The id of the media partner you want to update.</td></tr></tbody></table>

**Request body** — `UpdateMediaPartnerRequest`

<table id><thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td>Yes</td><td>Media partner name.</td></tr><tr><td><code>roles</code></td><td>string</td><td>No</td><td>Media partner role:<code>INVOICE, ADVERTISER, INTERMEDIARY, MEDIA</code>.</td></tr><tr><td><code>subsystemExternalIds</code></td><td>object (string → string)</td><td>No</td><td>External ids per subsystem.</td></tr></tbody></table>

**Response**

```
{
    "id": 1,
    "name": "Philips",
    "roles": [
        "ADVERTISER",
        "INVOICE"
    ],
    "externalKey": null,
    "subsystemExternalIds": {},
    "active": true
}
```

### Deactivate a media partner

```
PATCH /v1/media-partners/{mediaPartnerId}/deactivate
```
<table><thead><tr><th>Parameter</th><th>In</th><th>Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>mediaPartnerId</code></td><td>path</td><td>Yes</td><td>integer</td><td>The id of the media partner you want to deactivate.</td></tr></tbody></table>

Check for deactivation by fetching the media partners and see if the deactivated media partner is removed from the list of media partners.

**Responses**

<table><thead><tr><th>Status</th><th>Meaning</th></tr></thead><tbody><tr><td><code>200</code></td><td>Media partner deactivated.</td></tr><tr><td><code>400</code></td><td> Bad request - Invalid input or parameters.</td></tr><tr><td><code>401</code> / <code>403</code></td><td>Not authenticated / not allowed.</td></tr><tr><td><code>404</code></td><td>Resource not found.</td></tr><td><code>500</code></td><td>Internal Server Error</td></tr></tbody></table>

### Activate a media partner

```
PATCH /v1/media-partners/{mediaPartnerId}/activate
```
<table><thead><tr><th>Parameter</th><th>In</th><th>Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>mediaPartnerId</code></td><td>path</td><td>Yes</td><td>integer</td><td>The id of the media partner you want to (re)activate.</td></tr></tbody></table>

Check for activation by fetching the media partners and see if the reactivated media partner is added to the list of media partners.

**Responses**

<table><thead><tr><th>Status</th><th>Meaning</th></tr></thead><tbody><tr><td><code>200</code></td><td>Media partner activated.</td></tr><tr><td><code>400</code></td><td> Bad request - Invalid input or parameters.</td></tr><tr><td><code>401</code> / <code>403</code></td><td>Not authenticated / not allowed.</td></tr><tr><td><code>404</code></td><td>Resource not found.</td></tr><td><code>500</code></td><td>Internal Server Error</td></tr></tbody></table>

## Create brands

A brand is a **media brand** that belongs to a media partner (typically the advertiser company). A brand can be present in multiple media partners.

### Create a brand

```
POST /v1/media-partners/{mediaPartnerId}/brands
```

<table id="bkmrk-parameter-in-require-2"><thead><tr><th>Parameter</th><th>In</th><th>Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>mediaPartnerId</code></td><td>path</td><td>Yes</td><td>integer</td><td>The media partner (company) the brand belongs to.</td></tr></tbody></table>

**Request body** — `CreateMediaBrandRequest`

<table id><thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td>Yes</td><td>Brand name.</td></tr><tr><td><code>externalKey</code></td><td>string</td><td>No</td><td>Your own external reference key.</td></tr><tr><td><code>subsystemExternalIds</code></td><td>object (string → string)</td><td>No</td><td>External ids per subsystem.</td></tr></tbody></table>

```json
{
  "name": "Acme Cola",
  "externalKey": "acme-cola",
  "subsystemExternalIds": {}
}
```

**Responses**

<table id="bkmrk-status-meaning-201-m-1"><thead><tr><th>Status</th><th>Meaning</th></tr></thead><tbody><tr><td><code>201</code></td><td>Media brand created.</td></tr><tr><td><code>400</code></td><td>Invalid input.</td></tr><tr><td><code>401</code> / <code>403</code></td><td>Not authenticated / not allowed.</td></tr><tr><td><code>404</code></td><td>Media partner not found.</td></tr></tbody></table>

> As with companies, `201` will return a body including the generated `id` and all information known about the brand.

### List a company's brands

```
GET /v1/media-partners/{mediaPartnerId}/brands?limit=50&offset=0
```

<table id="bkmrk-parameter-in-require-3" style="width: 99.6429%;"><thead><tr><th style="width: 18.1818%;">Parameter</th><th style="width: 8.49478%;">In</th><th style="width: 11.6244%;">Required</th><th style="width: 10.8793%;">Type</th><th style="width: 50.8197%;">Description</th></tr></thead><tbody><tr><td style="width: 18.1818%;"><code>mediaPartnerId</code></td><td style="width: 8.49478%;">path</td><td style="width: 11.6244%;">Yes</td><td style="width: 10.8793%;">integer</td><td style="width: 50.8197%;">The media partner.</td></tr><tr><td style="width: 18.1818%;"><code>limit</code></td><td style="width: 8.49478%;">query</td><td style="width: 11.6244%;">Yes</td><td style="width: 10.8793%;">integer</td><td style="width: 50.8197%;">Max number of results.</td></tr><tr><td style="width: 18.1818%;"><code>offset</code></td><td style="width: 8.49478%;">query</td><td style="width: 11.6244%;">Yes</td><td style="width: 10.8793%;">integer</td><td style="width: 50.8197%;">Results to skip.</td></tr><tr><td style="width: 18.1818%;"><code>includeInactive</code></td><td style="width: 8.49478%;">query</td><td style="width: 11.6244%;">No</td><td style="width: 10.8793%;">boolean</td><td style="width: 50.8197%;">Include deactivated brands.</td></tr><tr><td style="width: 18.1818%;"><code>search</code></td><td style="width: 8.49478%;">query</td><td style="width: 11.6244%;">No</td><td style="width: 10.8793%;">string</td><td style="width: 50.8197%;">URL-encoded, case-insensitive match on name.</td></tr></tbody></table>

**Response** — array of `MediaBrand Schema`

```json
[
  {
    "id": 8801,
    "name": "Acme Cola",
    "externalKey": "acme-cola",
    "subsystemExternalIds": {},
    "active": true
  }
]
```

### Get a single brand

```
GET /v1/media-partners/{mediaPartnerId}/brands/{mediaBrandId}
```

<table><thead><tr><th>Parameter</th><th>In</th><th>Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>mediaPartnerId</code></td><td>path</td><td>Yes</td><td >integer</td><td>The media partner.</td></tr><tr><td><code>mediaBrandId</code></td><td>query</td><td >Yes</td><td>integer</td><td>The media brand.</td></tr><tr><td ><code>includeInactive</code></td><td>query</td><td>No</td><td>boolean</td><td >Include deactivated brands.</td></tr><tr><td><code>search</code></td><td>query</td><td>No</td><td>string</td><td>URL-encoded, case-insensitive match on name.</td></tr></tbody></table>

**Response** - Returns a single `MediaBrand Schema`.

```
{
    "id": 1,
    "name": "Evnia",
    "externalKey": "Evnia",
    "subsystemExternalIds": {},
    "active": true
}
```
### Update a brand

```
PUT /v1/media-partners/{mediaPartnerId}/brands/{mediaBrandId}
```

<table><thead><tr><th>Parameter</th><th>In</th><th>Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>mediaPartnerId</code></td><td>path</td><td>Yes</td><td>integer</td><td>The media partner.</td></tr><tr><td><code>mediaBrandId</code></td><td>query</td><td >Yes</td><td>integer</td><td>The media brand.</td></tr><tr><td><code>subsystemExternalIds</code></td><td>object (string → string)</td><td>No</td><td>integer</td><td>External ids per subsystem. Example is a CRM or Advendio ID.</td></tr></tbody></table>

**Response** - Returns the updated brand information.

```
{
    "id": 1,
    "name": "Evnia",
    "externalKey": "Evnia",
    "subsystemExternalIds": {
        "subrandid": "tpvision"
    },
    "active": true
}
```
### Deactivate a brand
```
PATCH /v1/media-partners/{mediaPartnerId}/brands/{mediaBrandId}/deactivate
```
<table><thead><tr><th>Parameter</th><th>In</th><th>Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>mediaPartnerId</code></td><td>path</td><td>Yes</td><td>integer</td><td>The id of the media partner.</td></tr><td><code>mediaBrandId</code></td><td>path</td><td>Yes</td><td>integer</td><td>The id of the brand you want to deactivate</td></tr></tbody></table>

Check for deactivation by fetching the brands and see if it is removed from the list of brands.

**Responses**

<table><thead><tr><th>Status</th><th>Meaning</th></tr></thead><tbody><tr><td><code>200</code></td><td>Media brand deactivated.</td></tr><tr><td><code>400</code></td><td> Bad request - Invalid input or parameters.</td></tr><tr><td><code>401</code> / <code>403</code></td><td>Not authenticated / not allowed.</td></tr><tr><td><code>404</code></td><td>Resource not found.</td></tr><td><code>500</code></td><td>Internal Server Error</td></tr></tbody></table>

### Activate a brand
```
PATCH /v1/media-partners/{mediaPartnerId}/brands/{mediaBrandId}/activate
```
<table><thead><tr><th>Parameter</th><th>In</th><th>Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>mediaPartnerId</code></td><td>path</td><td>Yes</td><td>integer</td><td>The id of the media partner.</td></tr><td><code>mediaBrandId</code></td><td>path</td><td>Yes</td><td>integer</td><td>The id of the brand you want to (re)activate</td></tr></tbody></table>

Check for the brand reactivation by fetching the brands and see if it is added to the list of brands.

**Responses**

<table><thead><tr><th>Status</th><th>Meaning</th></tr></thead><tbody><tr><td><code>200</code></td><td>Media brand activated.</td></tr><tr><td><code>400</code></td><td> Bad request - Invalid input or parameters.</td></tr><tr><td><code>401</code> / <code>403</code></td><td>Not authenticated / not allowed.</td></tr><tr><td><code>404</code></td><td>Resource not found.</td></tr><td><code>500</code></td><td>Internal Server Error</td></tr></tbody></table>

# User Mappings API

## Connect users to media partners

A **user mapping** grants a user access to a company/brand combination. Each mapping entry requires an `advertiserCompanyId` **and** a `brandId`; `invoiceCompanyId` is optional.

### Create a user mapping

```
POST /v1/user-mapping
```

**Request body** — `CreateUserMappingRequest`

<table id="bkmrk-field-type-required--2"><thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>user</code></td><td>string (1–255)</td><td>Yes</td><td>User identifier (e.g. email or username).</td></tr><tr><td><code>mappings</code></td><td>array of `Mapping Schema`</td><td>Yes</td><td>At least one mapping entry.</td></tr></tbody></table>

**Mapping Schema**

<table id="bkmrk-field-type-required--3"><thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>advertiserCompanyId</code></td><td>integer (≥ 1)</td><td>Yes</td><td>The advertiser company to grant access to.</td></tr><tr><td><code>invoiceCompanyId</code></td><td>integer</td><td>No</td><td>Restrict the mapping to a specific invoicing company.</td></tr><tr><td><code>brandId</code></td><td>integer (≥ 1)</td><td>Yes</td><td>The brand to grant access to.</td></tr></tbody></table>

```json
{
  "user": "jane.doe@partner.example",
  "mappings": [
    {
      "advertiserCompanyId": 4021,
      "invoiceCompanyId": 4022,
      "brandId": 8801
    }
  ]
}
```

**Responses**

<table id="bkmrk-status-meaning-201-u"><thead><tr><th>Status</th><th>Meaning</th></tr></thead><tbody><tr><td><code>201</code></td><td>User mapping created.</td></tr><tr><td><code>400</code></td><td>Invalid input (e.g. missing `advertiserCompanyId` or `brandId`).</td></tr><tr><td><code>401</code> / <code>403</code></td><td>Not authenticated / not allowed.</td></tr></tbody></table>

### List users with mappings

```
GET /v1/user-mapping?limit=50&offset=0
```

<table id="bkmrk-parameter-in-require-6"><thead><tr><th>Parameter</th><th>In</th><th>Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>limit</code></td><td>query</td><td>No</td><td>integer</td><td>Max results (≤ 100).</td></tr><tr><td><code>offset</code></td><td>query</td><td>No</td><td>integer</td><td>Results to skip.</td></tr><tr><td><code>search</code></td><td>query</td><td>No</td><td>string</td><td>Loose match on user identifier.</td></tr><tr><td><code>advertiserCompanyId</code></td><td>query</td><td>No</td><td>integer</td><td>Only users mapped to this advertiser company.</td></tr><tr><td><code>invoiceCompanyId</code></td><td>query</td><td>No</td><td>integer</td><td>Only users mapped to this invoice company.</td></tr><tr><td><code>brandId</code></td><td>query</td><td>No</td><td>integer</td><td>Only users mapped to this brand.</td></tr></tbody></table>

The response includes a `Record-Count` header with the total number of matches.

**Response** — array of `UserMapping Schema`

```json
[
  { "user": "jane.doe@partner.example", "mappingCount": 3 }
]
```

### List a single user's mappings

```
GET /v1/user-mapping/{user}
```

<table id="bkmrk-parameter-in-require-7"><thead><tr><th>Parameter</th><th>In</th><th>Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>user</code></td><td>path</td><td>Yes</td><td>string</td><td>The user identifier.</td></tr><tr><td><code>limit</code> / <code>offset</code></td><td>query</td><td>No</td><td>integer</td><td>Pagination.</td></tr><tr><td><code>advertiserCompanyId</code></td><td>query</td><td>No</td><td>integer</td><td>Filter by advertiser company.</td></tr><tr><td><code>invoiceCompanyId</code></td><td>query</td><td>No</td><td>integer</td><td>Filter by invoice company.</td></tr><tr><td><code>brandId</code></td><td>query</td><td>No</td><td>integer</td><td>Filter by brand.</td></tr></tbody></table>

**Response** — array of `Mapping Schema`

```json
[
  {
    "advertiserCompanyId": 4021,
    "invoiceCompanyId": 4022,
    "brandId": 8801
  }
]
```

### Delete a user mapping

```
DELETE /v1/user-mapping
```

**Request body** — `DeleteUserMappingRequest`

<table id="bkmrk-field-type-required--4"><thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>user</code></td><td>string (1–255)</td><td>Yes</td><td>The user identifier.</td></tr><tr><td><code>advertiserCompanyId</code></td><td>integer (≥ 1)</td><td>—</td><td>Advertiser company of the mapping to remove.</td></tr><tr><td><code>invoiceCompanyId</code></td><td>integer</td><td>—</td><td>Invoice company of the mapping to remove.</td></tr><tr><td><code>brandId</code></td><td>integer (≥ 1)</td><td>—</td><td>Brand of the mapping to remove.</td></tr></tbody></table>

```json
{
  "user": "jane.doe@partner.example",
  "advertiserCompanyId": 4021,
  "invoiceCompanyId": 4022,
  "brandId": 8801
}
```

Responds `200` when the mapping is deleted.

# API Manuals

# Advertiser & Invoicing Companies, Brands, and User Mapping

This guide explains how to create **advertiser companies**, **invoicing companies**, and **brands** in Adhese through the Campaign API, and how to **connect (map) users** to those companies and brands.

All endpoints live under the Adhese API and are versioned with a `/v1` prefix. The server base path is `/api`, so a full path looks like `/api/v1/media-partners` and `/v1/user-mapping`.

## Key concepts &amp; terminology

In Adhese, an advertiser company and an invoicing company are **the same underlying entity — a *media partner*** — distinguished by the **roles** assigned to it. A single media partner can hold one or more roles at the same time.

<table id="bkmrk-you-want-to-create%E2%80%A6-"><thead><tr><th>You want to create…</th><th>What it is in the API</th><th>How</th></tr></thead><tbody><tr><td>An **advertiser company**</td><td>A media partner with the `ADVERTISER` role</td><td>`POST /v1/media-partners` with `"roles": ["ADVERTISER"]`</td></tr><tr><td>An **invoicing company**</td><td>A media partner with the `INVOICE` role</td><td>`POST /v1/media-partners` with `"roles": ["INVOICE"]`</td></tr><tr><td>A company that is **both**</td><td>A media partner with both roles</td><td>`POST /v1/media-partners` with `"roles": ["ADVERTISER", "INVOICE"]`</td></tr><tr><td>A **brand**</td><td>A *media brand* that belongs to a media partner</td><td>`POST /v1/media-partners/{mediaPartnerId}/brands`</td></tr><tr><td>A **user ↔ company/brand link**</td><td>A *user mapping*</td><td>`POST /v1/user-mapping`</td></tr></tbody></table>

**Available roles:** `ADVERTISER`, `INVOICE`

> **Note.** The read-only endpoints `GET /v1/advertiser-companies` and `GET /v1/brands` expose the same entities from the campaign-booking perspective (used when creating or editing a campaign). Their `id` values are the media-partner and media-brand ids you create below.

---

## Authentication &amp; headers

Every request is authenticated with a **Bearer JWT** and must carry the Keycloak auth header.

<table id="bkmrk-header-required-valu" style="width: 100%;"><thead><tr><th style="width: 16.926%;">Header</th><th style="width: 26.9357%;">Required</th><th style="width: 20.3814%;">Value</th><th style="width: 35.7569%;">Notes</th></tr></thead><tbody><tr><td style="width: 16.926%;">`Authorization`</td><td style="width: 26.9357%;">Yes</td><td style="width: 20.3814%;">`Bearer <jwt>`</td><td style="width: 35.7569%;">JWT access token.</td></tr><tr><td style="width: 16.926%;">`Use-Keycloak-Auth`</td><td style="width: 26.9357%;">Yes</td><td style="width: 20.3814%;">`true`</td><td style="width: 35.7569%;">Required on all `/v1` endpoints.</td></tr><tr><td style="width: 16.926%;">`Content-Type`</td><td style="width: 26.9357%;">For `POST`/`DELETE` with a body</td><td style="width: 20.3814%;">`application/json`</td><td style="width: 35.7569%;">—</td></tr></tbody></table>

Example request line and headers:

```http
POST /api/v1/media-partners
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Use-Keycloak-Auth: true
Content-Type: application/json
```

{{@315}}

---

{{@316}}

---

{{@317}}

---

## End-to-end walkthrough

Create an advertiser company, an invoicing company, and a brand, then give a user access to them.

**1. Create the advertiser company**

```json
POST /v1/media-partners

{
  "name": "Acme Beverages",
  "roles": ["ADVERTISER"],
  "externalKey": "acme-bev"
}
```

The response will give you its id → assume `4021`.

**2. Create the invoicing company**

```json
POST /v1/media-partners

{
  "name": "Acme Beverages Billing BV",
  "roles": ["INVOICE"],
  "externalKey": "acme-bev-billing"
}
```

The response will give you its id → assume `4022`.

**3. Create a brand under the advertiser company**

```json
POST /v1/media-partners/4021/brands

{
  "name": "Acme Cola",
  "externalKey": "acme-cola"
}
```

The response will give you its id → assume `8801`.

**4. Map the user to the company + brand**

```json
POST /v1/user-mapping

{
  "user": "jane.doe@partner.example",
  "mappings": [
    { "advertiserCompanyId": 4021, "invoiceCompanyId": 4022, "brandId": 8801 }
  ]
}
```

**5. Verify the mapping**

```
GET /v1/user-mapping/jane.doe@partner.example
```

```json
[
  { "advertiserCompanyId": 4021, "invoiceCompanyId": 4022, "brandId": 8801 }
]
```

---

## Error handling

Errors are returned as an [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) `ProblemDetail` object.

```json
{
  "type": "about:blank",
  "title": "Bad Request",
  "status": 400,
  "detail": "roles must not be empty",
  "instance": "/api/v1/media-partners"
}
```

<table id="bkmrk-status-meaning-400-b"><thead><tr><th>Status</th><th>Meaning</th></tr></thead><tbody><tr><td>`400`</td><td>Bad Request — invalid input or parameters.</td></tr><tr><td>`401`</td><td>Unauthorized — authentication required or invalid token.</td></tr><tr><td>`403`</td><td>Forbidden — authenticated but not allowed to access this resource.</td></tr><tr><td>`404`</td><td>Not Found — resource not found.</td></tr><tr><td>`422`</td><td>Unprocessable Entity — the request was understood but could not be processed.</td></tr><tr><td>`500`</td><td>Internal Server Error — unexpected failure.</td></tr></tbody></table>

---

## Schema reference

**CreateMediaPartnerRequest** · **MediaPartner Schema**

```json
{
  "id": 4021,
  "name": "string",
  "roles": ["ADVERTISER", "INVOICE", "INTERMEDIARY", "MEDIA"],
  "externalKey": "string",
  "subsystemExternalIds": { "subsystem": "externalId" },
  "active": true
}
```

**CreateMediaBrandRequest** · **MediaBrand Schema**

```json
{
  "id": 8801,
  "name": "string",
  "externalKey": "string",
  "subsystemExternalIds": { "subsystem": "externalId" },
  "active": true
}
```

**AdvertiserCompany Schema**

```json
{
  "id": 4021,
  "name": "string",
  "active": true,
  "externalId": "string",
  "subsystemExternalIds": { "subsystem": "externalId" }
}
```

**Brand Schema**

```json
{ "id": 8801, "name": "string" }
```

**CreateUserMappingRequest Schema**

```json
{
  "user": "string",
  "mappings": [
    { "advertiserCompanyId": 4021, "invoiceCompanyId": 4022, "brandId": 8801 }
  ]
}
```

**UserMapping Schema**

```json
{ "user": "string", "mappingCount": 3 }
```

# Creative API

### Creatives

The images, banners, video, audio that are displayed as ads.

### List creatives

```
GET /v1/creatives/advar
```

Get a list of advar creatives filtered on at least one parameter.

**Request body**

<table id="bkmrk-parameter-in-require" style="border-collapse:collapse;width:100%;height:287.8px;"><thead><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">**Parameter**</td><td style="width:11.7985%;height:29.8px;">**In**</td><td style="width:9.89401%;height:29.8px;">**Required**</td><td style="width:9.29678%;height:29.8px;">**Type**</td><td style="width:50.7747%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">`creativeId`</td><td style="width:11.7985%;height:29.8px;">path</td><td style="width:9.89401%;height:29.8px;">Yes</td><td style="width:9.29678%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">The creatives ID.</td></tr><tr style="height:46.6px;"><td style="width:18.236%;height:46.6px;">`campaignId`</td><td style="width:11.7985%;height:46.6px;">parameter</td><td style="width:9.89401%;height:46.6px;">No</td><td style="width:9.29678%;height:46.6px;">integer</td><td style="width:50.7747%;height:46.6px;">Campaign ID of the campaign whose advar creatives you want to list.</td></tr><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">`creativeId`</td><td style="width:11.7985%;height:29.8px;">parameter</td><td style="width:9.89401%;height:29.8px;">No</td><td style="width:9.29678%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">Comma separated list of creative ids you want to list.</td></tr><tr style="height:46.6px;"><td style="width:18.236%;height:46.6px;">`bookingId`</td><td style="width:11.7985%;height:46.6px;">parameter</td><td style="width:9.89401%;height:46.6px;">No</td><td style="width:9.29678%;height:46.6px;">integer</td><td style="width:50.7747%;height:46.6px;">Comma separated list of booking ids you want to list creatives for.</td></tr><tr style="height:46.6px;"><td style="width:18.236%;height:46.6px;">`search`</td><td style="width:11.7985%;height:46.6px;">parameter</td><td style="width:9.89401%;height:46.6px;">No</td><td style="width:9.29678%;height:46.6px;">string</td><td style="width:50.7747%;height:46.6px;">An url-encoded search string to apply to the list of creatives (ignoring case, on creative name).</td></tr><tr style="height:28.8px;"><td style="width:18.236%;height:28.8px;">`limit`</td><td style="width:11.7985%;height:28.8px;">parameter</td><td style="width:9.89401%;height:28.8px;">No</td><td style="width:9.29678%;height:28.8px;">integer</td><td style="width:50.7747%;height:28.8px;">Pagination property to limit the number of returned targets.</td></tr><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">`offset`</td><td style="width:11.7985%;height:29.8px;">parameter</td><td style="width:9.89401%;height:29.8px;">No</td><td style="width:9.29678%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">Pagination property to offset the returned targets.</td></tr></tbody></table>

**Response** - 200

```
[
    {
        "creativeId": 18,
        "campaignId": 17,
        "creativeName": "27M2N8500/01 Rectangle 1",
        "formatId": 1,
        "advarTemplateName": "Image_FlexBanner.html",
        "sku": null,
        "lastEditedDate": "2026-07-01T10:16:32Z",
        "templateParameters": {
            "<CLICKURL>": "https://www.philips.be/c-p/27M2N8500_01/gamemonitor-qd-oled-gamemonitor",
            "<ALT_TEXT>": "QD OLED-gamemonitor"
        },
        "templateFiles": {
            "2": {
                "fileName": null,
                "filePath": "https://demo-preview.adhese.org/pool/lib/18_2nd_1.png"
            }
        },
        "lastEdited": 1782900992000
    },
    {
        "creativeId": 19,
        "campaignId": 17,
        "creativeName": "27M2N8500/01 Rectangle 2",
        "formatId": 1,
        "advarTemplateName": "Image_FlexBanner.html",
        "sku": null,
        "lastEditedDate": "2026-07-01T10:19:06Z",
        "templateParameters": {
            "<CLICKURL>": "https://www.philips.be/c-p/27M2N8500_01/gamemonitor-qd-oled-gamemonitor",
            "<ALT_TEXT>": "QD OLED-gamemonitor 2"
        },
        "templateFiles": {
            "2": {
                "fileName": null,
                "filePath": "https://demo-preview.adhese.org/pool/lib/19_2nd_1.png"
            }
        },
        "lastEdited": 1782901146000
    },
    {
        "creativeId": 27,
        "campaignId": 17,
        "creativeName": "Apitest advar banner ",
        "formatId": 1,
        "advarTemplateName": "Image_FlexBanner.html",
        "sku": "",
        "lastEditedDate": "2026-08-10T07:29:49Z",
        "templateParameters": {
            "<CLICKURL>": "",
            "<ALT_TEXT>": ""
        },
        "templateFiles": {
            "2": {
                "fileName": null,
                "filePath": "https://demo-preview.adhese.org/pool/lib/27_2nd_1.png"
            }
        },
        "lastEdited": 1786346989000
    }
]
```

**Response codes**

<table id="bkmrk-status-meaning-201-c" style="border-collapse:collapse;width:100%;height:208.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Creatives found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr><td>`409`</td><td>Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Update an advar creative

```
PUT /v1/creatives/advar/{creativeId}
```

Updates an advar creative by creative ID

**Request body**

<table id="bkmrk-parameter-in-require-1" style="border-collapse:collapse;width:100%;height:59.6px;"><thead><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">**Parameter**</td><td style="width:8.46246%;height:29.8px;">**In**</td><td style="width:10.1311%;height:29.8px;">**Required**</td><td style="width:12.3957%;height:29.8px;">**Type**</td><td style="width:50.7747%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">`creativeId`</td><td style="width:8.46246%;height:29.8px;">path</td><td style="width:10.1311%;height:29.8px;">Yes</td><td style="width:12.3957%;height:29.8px;">integer</td><td style="width:50.7747%;height:29.8px;">The creatives ID.</td></tr></tbody></table>

**Updating an advar creative**

```
{
  "campaignId": 17,
  "creativeName": "Apitest advar banner update",
  "sku": "string",
  "formatId": 1,
  "advarTemplateName": "Image_FlexBanner.html",
  "templateParameters": {},
  "templateFiles": {}
}
```

**Response** - 200

```
{
    "creativeId": 27,
    "campaignId": 17,
    "creativeName": "Apitest advar banner update",
    "formatId": 1,
    "advarTemplateName": "Image_FlexBanner.html",
    "sku": "string",
    "lastEditedDate": "2026-08-10T13:36:10Z",
    "templateParameters": {},
    "templateFiles": {
        "2": {
            "fileName": null,
            "filePath": "https://demo-preview.adhese.org/pool/lib/27_2nd_1.png"
        }
    },
    "lastEdited": 1786368970000
}
```

**Response codes**

<table id="bkmrk-status-meaning-200-c" style="border-collapse:collapse;width:100%;height:208.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`200`</td><td style="height:29.8px;">Creative updated.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>

### Upload a creative file

```
POST /v1/creatives/file
```

Uploads a creative file to temporary storage to use when uploading an advar creative.

**Request body**

<table id="bkmrk-parameter-in-require-2" style="border-collapse:collapse;width:100%;height:304.6px;"><thead><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">**Parameter**</td><td style="width:11.7985%;height:29.8px;">**In**</td><td style="width:9.89401%;height:29.8px;">**Required**</td><td style="width:9.29678%;height:29.8px;">**Type**</td><td style="width:50.7747%;height:29.8px;">**Description**</td></tr></thead><tbody><tr style="height:45.6px;"><td style="width:18.236%;height:45.6px;">`Content-Disposition`</td><td style="width:11.7985%;height:45.6px;">parameter</td><td style="width:9.89401%;height:45.6px;">Yes</td><td style="width:9.29678%;height:45.6px;">string</td><td style="width:50.7747%;height:45.6px;">Contains the file name and is filled in accordingly `attachment; filename=filename.extension`</td></tr><tr style="height:46.6px;"><td style="width:18.236%;height:46.6px;">`formatId`</td><td style="width:11.7985%;height:46.6px;">parameter</td><td style="width:9.89401%;height:46.6px;">Yes</td><td style="width:9.29678%;height:46.6px;">string</td><td style="width:50.7747%;height:46.6px;">The ID of the format that will be associated with the creative.</td></tr><tr style="height:29.8px;"><td style="width:18.236%;height:29.8px;">`key`</td><td style="width:11.7985%;height:29.8px;">parameter</td><td style="width:9.89401%;height:29.8px;">No</td><td style="width:9.29678%;height:29.8px;">string</td><td style="width:50.7747%;height:29.8px;">Creative file index written as ordinal number (e.g. 2nd) with the exception of 1, which has key "main" (but is not used in advar creatives). Default value is `main`</td></tr><tr><td style="width:18.236%;">File contents</td><td style="width:11.7985%;">body</td><td style="width:9.89401%;">Yes</td><td style="width:9.29678%;">binary data</td><td style="width:50.7747%;">File contents as binary data to be uploaded to temporary storage.</td></tr></tbody></table>

**Response** - 201

```
{
  "filePath": "/home/adhese/www/docker.adhese.org/tmp/file_by_user_1_747262096578706399.png"
}
```

**Response codes**

<table id="bkmrk-status-meaning-201-f" style="border-collapse:collapse;width:100%;height:208.6px;"><colgroup><col style="width:14.3133%;"></col><col style="width:85.6847%;"></col></colgroup><thead><tr style="height:29.8px;"><td style="height:29.8px;">**Status**</td><td style="height:29.8px;">**Meaning**</td></tr></thead><tbody><tr style="height:29.8px;"><td style="height:29.8px;">`201`</td><td style="height:29.8px;">File uploaded successfully.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`400`</td><td style="height:29.8px;">Bad request - invalid input or parameters.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`401` / `403`</td><td style="height:29.8px;">Not authenticated / not allowed.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`404`</td><td style="height:29.8px;">Not Found - Resource not found.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`409`</td><td style="height:29.8px;">Conflict.</td></tr><tr style="height:29.8px;"><td style="height:29.8px;">`500`</td><td style="height:29.8px;">Internal Server Error - Unexpected failure.</td></tr></tbody></table>