← ads API
AdBookings
Singular: AdBooking — Base URL: https://ads-api.ayoune.app — Access: CRUD
Try it now
beta
Response (live)
Requests are proxied through the consumer-app to *.ayoune.app. Tokens stay in your browser and are forwarded per call.
Example response (recorded) sample
A real, previously recorded GET /:id response of this endpoint — not the live call above. Sensitive fields are masked.
{
"payload": {
"_id": "6a618a00c1db0fd99fd7d0a9",
"status": "draft",
"targetDisplays": [],
"createdBy": "6045f4d25704710012485569",
"createdAt": "2026-07-23T03:26:56.380Z",
"updatedAt": "2026-07-23T03:26:56.380Z"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://ads-api.ayoune.app/adbookings/6a618a00c1db0fd99fd7d0a9",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"relations": [
{
"rel": "aYOUneAdvertisementCampaigns",
"title": "MODEL_AYOUNEADVERTISEMENTCAMPAIGN",
"href": "https://api.ayoune.app/marketing/ayouneadvertisementcampaigns",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "marketing.ayouneadvertisementcampaigns"
},
{
"rel": "AdSlots",
"title": "MODEL_ADSLOT",
"href": "https://api.ayoune.app/ads/adslots",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "ads.adslots"
},
{
"rel": "aYOUneAdvertisementDisplays",
"title": "MODEL_AYOUNEADVERTISEMENTDISPLAY",
"href": "https://api.ayoune.app/su/ayouneadvertisementdisplays",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "su.ayouneadvertisementdisplays"
}
],
"debugId": "6a62dbb1d08337d94871ea8b",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_ADBOOKING",
"href": "https://api.ayoune.app/ads/adbookings/6a618a00c1db0fd99fd7d0a9/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_ADBOOKING",
"href": "https://api.ayoune.app/ads/adbookings/6a618a00c1db0fd99fd7d0a9/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.6.1",
"core": "2026.257.1"
},
"rateLimit": {
"limit": "2500",
"remaining": "2441",
"reset": "1784866928",
"resetDate": "Fri Jul 24 2026"
},
"responseTime": 203.803308,
"code": 200,
"status": "success",
"error": false
}
}
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /adbookings |
List with filters/pagination | ads.adbookings.view |
| GET | /adbookings/:id |
Single record | ads.adbookings.view |
| POST | /adbookings |
Create new record | ads.adbookings.new |
| PUT | /adbookings |
Update record | ads.adbookings.edit |
| DELETE | /adbookings/:id |
Delete record | ads.adbookings.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.ads.adBookings.find().limit(10).exec();
// Single record
const one = await ay.ads.adBookings.findById('OBJECT_ID').exec();
// Create
const created = await ay.ads.adBookings.create({ name: 'Foo' });