aYOUne
← ads API

AdBookings

Singular: AdBooking — Base URL: https://ads-api.ayoune.app — Access: CRUD — Machine-readable spec (JSON · YAML)

play_circle Try it now beta

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": "6aa21fce0319cb93b5289a65",
    "status": "draft",
    "targetDisplays": [],
    "createdBy": "6045f4d25704710012485569",
    "shares": [],
    "createdAt": "2026-09-10T03:11:10.863Z",
    "updatedAt": "2026-09-10T03:11:10.863Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://ads-api.ayoune.app/adbookings/6aa21fce0319cb93b5289a65",
        "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"
      },
      {
        "rel": "AdStrategyTemplates",
        "title": "MODEL_ADSTRATEGYTEMPLATE",
        "href": "https://api.ayoune.app/ads/adstrategytemplates",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "ads.adstrategytemplates"
      },
      {
        "rel": "AdStrategyTemplates",
        "title": "MODEL_ADSTRATEGYTEMPLATE",
        "href": "https://api.ayoune.app/ads/adstrategytemplates",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "ads.adstrategytemplates"
      }
    ],
    "debugId": "6aa370e2dde790fa6ce3b9d6",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_ADBOOKING",
        "href": "https://api.ayoune.app/ads/adbookings/6aa21fce0319cb93b5289a65/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_ADBOOKING",
        "href": "https://api.ayoune.app/ads/adbookings/6aa21fce0319cb93b5289a65",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.13.2",
      "core": "2026.335.0"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2444",
      "reset": "1789099737",
      "resetDate": "Fri Sep 11 2026"
    },
    "responseTime": 198.813673,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

MethodPathDescriptionRight
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' });

See also