Skip to content

Advertising API

The Advertising API manages ad campaigns that play a playlist on the screens of a target group, and advertising tickets: branded cards that appear between the ticket groups of a rail menu in a ticketing storefront. Campaigns belong to an organization; advertising tickets belong to a workspace.

Resources

Resource What it is
Campaign A booking that plays a playlist on the screens of a target group, on a date range and a schedule.
Advertising ticket An ad card (image, coupon, article or text) with titles in Malay, English and Chinese, shown in rail menus.
Rail menu assignment The link between an advertising ticket and a rail menu (see the Catalogue API).

Authentication and permissions

Send an access token. See Authentication.

Action Permission
List, get, create, update or delete campaigns Access token for the organization in X-Organization-ID
Check whether a campaign is playing now Public: no token needed (called by screens)
List, create, update or delete advertising tickets, and assign them to rail menus workspace:advertising:manage in the workspace

Campaign routes read the scope from headers:

Header Required Meaning
X-Organization-ID yes ID of the organization that owns the campaigns. Must be the organization of your token.
X-Workspace-ID no ID of a workspace. When sent, lists, updates and deletes are limited to that workspace's campaigns, and new campaigns belong to it.
X-User-ID no Your user ID, recorded as the campaign's creator.

Base path

Both resources are served by CoreAPI:

https://<API_HOST>/api/v1/campaigns/…                       campaigns (organization in X-Organization-ID)
https://<API_HOST>/api/advertisingTickets/{workspaceId}/…   advertising tickets

Capabilities

  • Campaigns: create, list, get, update and delete, with reach (screens and spaces) per target group
  • Campaign schedule rules (daily, weekly, monthly, annual or specific dates, with time windows) and objectives (reach, traffic, leads, sales)
  • Live campaigns play on their target group's screens automatically and move to completed after their end date
  • Advertising tickets in four ad types, in Malay, English and Chinese
  • Assign advertising tickets to rail menus, and remove them
  • Link a campaign to advertising tickets (planned)
  • Impression and click tracking (planned)

Object model

Campaign

Field Type Required Description
id string (UUID) read-only Campaign ID.
organizationId string read-only Organization that owns the campaign, from X-Organization-ID.
workspaceId string read-only Workspace of the campaign, from X-Workspace-ID, or null.
name string yes Campaign name.
description string no Free text.
status string no draft (default), scheduled, live, paused, completed or archived. See States.
targetGroupId string (UUID) for live Target group whose screens play the campaign. A campaign without one doesn't play.
playlistId string (UUID) for live Playlist the screens play.
startDate, endDate string (ISO 8601) no First and last day the campaign may play, for example 2026-06-01T00:00:00Z. The campaign plays through the whole end date. A bare date (2026-06-01) is rejected.
scheduleRule string (JSON) no When in each day it plays, as a JSON string. Default: every day, all day. See below.
source string no house (default) or advertiser.
advertiser, agency string no Who booked the campaign.
objective string no reach (default), traffic, leads or sales.
deliveryMode string no house_normal (default), house_high, advertiser_guaranteed or advertiser_programmatic.
actionExperience string (JSON) no The call to action for traffic, leads or sales (destination, QR code, form or offer), as a JSON string. Its shape depends on objective; reach has none.
createdBy string read-only User ID from X-User-ID.
createdAt, updatedAt string (ISO 8601) read-only When the campaign was created and last changed.
targetGroupName, playlistName string read-only Names of the target group and playlist.
screenCount, spaceCount integer read-only Screens and spaces in the target group.
readyScreens integer read-only Screens seen online in the last 5 minutes.
landscapeCount, portraitCount integer read-only Screens by orientation.
inWindowNow boolean read-only true when the campaign is live and inside its schedule right now.

scheduleRule fields: type (Daily, Weekly, Monthly, Annual or Specific dates), days (weekday names such as Monday, for Weekly), occurrence (First day, Last day or Day 14, for Monthly), monthDay (MM-DD, for Annual), dates (YYYY-MM-DD list, for Specific dates), and windows: one or more of All day, Morning · 06:00–10:00, Lunch · 11:00–14:00, Afternoon · 14:00–17:00 and Evening · 17:00–22:00. Times are evaluated in the platform time zone (UTC+7).

{
  "id": "5d0c7a3e-1b2f-4c8d-9e0a-6f1b2c3d4e5f",
  "organizationId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "workspaceId": "3f6a1d2e-8b4c-4e7f-9a1b-2c3d4e5f6a7b",
  "name": "Summer sale 2026",
  "description": "Lobby screens, mornings",
  "targetGroupId": "9e8d7c6b-5a4f-4e3d-2c1b-0a9f8e7d6c5b",
  "status": "live",
  "startDate": "2026-06-01T00:00:00Z",
  "endDate": "2026-08-31T00:00:00Z",
  "createdAt": "2026-05-20T03:12:44Z",
  "updatedAt": "2026-05-28T08:01:10Z",
  "source": "advertiser",
  "advertiser": "Example Drinks",
  "agency": "Example Media",
  "objective": "traffic",
  "playlistId": "4c3b2a19-0f8e-4d7c-b6a5-948372615041",
  "deliveryMode": "advertiser_guaranteed",
  "scheduleRule": "{\"type\":\"Daily\",\"windows\":[\"Morning · 06:00–10:00\"]}",
  "actionExperience": "{\"destinationUrl\":\"https://example.com/summer\"}",
  "targetGroupName": "Lobby screens",
  "playlistName": "Summer sale loop",
  "screenCount": 12,
  "spaceCount": 3,
  "readyScreens": 11,
  "landscapeCount": 10,
  "portraitCount": 2,
  "inWindowNow": true
}

Advertising ticket

Field Type Required Description
advertisementId integer read-only Advertising ticket ID. Send it as advertisingTicketId to update, delete or assign.
advertisementType string yes Ad type, see the table below.
advertiser string yes Advertiser name, 1–255 characters.
color string no Card colour, for example #FF5733.
placement integer yes Position in the rail menu, from 1.
titleBm, titleEn, titleCn string yes Title in Malay, English and Chinese, 1–255 characters each.
headerBm, headerEn, headerCn string yes Header in each language, 1–255 characters each.
descBm, descEn, descCn string yes Body text in each language.
actionButton string no Button label, for example Buy now.
redirectUrl string no Where the button leads.
imageUrl string no Image of the card.
activeStartDate, activeEndDate string no First and last day the card is shown, YYYY-MM-DD.
isActive boolean no true (default) to show the card.
createdAt, updatedAt string read-only When the card was created and last changed.
advertisementType What it shows
brandImage A full-bleed image with an optional button.
coupon A discount coupon with a validity window.
editorial An article-style card with header and body text.
typographic A text-only card, no image.
{
  "advertisementId": 42,
  "advertisementType": "brandImage",
  "advertiser": "Example Drinks",
  "color": "#FF5733",
  "titleBm": "Jualan musim panas",
  "titleEn": "Summer sale",
  "titleCn": "夏季促销",
  "headerBm": "Diskaun 20%",
  "headerEn": "20% off",
  "headerCn": "八折优惠",
  "descBm": "Untuk semua minuman.",
  "descEn": "On all drinks.",
  "descCn": "所有饮品适用。",
  "actionButton": "Buy now",
  "redirectUrl": "https://example.com/offer",
  "imageUrl": "https://cdn.example.com/ads/summer.jpg",
  "isActive": true,
  "placement": 2,
  "activeStartDate": "2026-06-01",
  "activeEndDate": "2026-08-31",
  "createdAt": "2026-05-20T11:12:44+07:00",
  "updatedAt": "2026-05-20T11:12:44+07:00"
}

In a rail menu's storefront response the card appears among the ticket groups with type advertisement, without placement, the dates and the timestamps.

Lists

Neither list is paginated: each returns all items.

  • List campaigns returns a bare JSON array of campaign objects, newest first (createdAt descending). It is an empty array when there are none.
  • List advertising tickets returns the ticketing envelope with the cards in result.advertisingTickets, ordered by placement ascending.
curl "https://<API_HOST>/api/v1/campaigns" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "X-Organization-ID: <ORGANIZATION_ID>"
[
  {
    "id": "5d0c7a3e-1b2f-4c8d-9e0a-6f1b2c3d4e5f",
    "organizationId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "name": "Summer sale 2026",
    "status": "live",
    "startDate": "2026-06-01T00:00:00Z",
    "endDate": "2026-08-31T00:00:00Z",
    "targetGroupName": "Lobby screens",
    "playlistName": "Summer sale loop",
    "screenCount": 12,
    "inWindowNow": true
  }
]
curl "https://<API_HOST>/api/advertisingTickets/<WORKSPACE_ID>" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
{
  "respCode": 2000,
  "respDesc": "Success",
  "result": {
    "advertisingTickets": [
      {
        "advertisementId": 42,
        "advertisementType": "brandImage",
        "advertiser": "Example Drinks",
        "titleEn": "Summer sale",
        "isActive": true,
        "placement": 2,
        "activeStartDate": "2026-06-01",
        "activeEndDate": "2026-08-31"
      }
    ]
  }
}

The objects are shortened here; each item has every field of its object above.

States

Campaign status Meaning
draft Being prepared; doesn't play.
scheduled Ready but not started; doesn't play.
live Plays on the target group's screens while today is between startDate and endDate and now is inside scheduleRule. The platform changes it to completed the day after endDate.
paused Stopped for now; screens stop it within a few seconds. Set live again to resume.
completed Ended.
archived Kept for the record.

You change status with Update a campaign. Only live → completed happens on its own.

Errors

Campaign routes answer { "error": "…" }. Sign-in and scope errors from the platform add "success": false:

Status When it happens What to do
400 The body isn't valid JSON, or a date isn't a full ISO 8601 time. Fix the body using error.
401 No valid access token. Sign in again.
403 X-Organization-ID or X-Workspace-ID isn't yours. Send your own organization and workspace.
404 No campaign with that ID in your organization (and workspace, if sent). Check the ID and headers.
500 The campaign couldn't be saved, for example because of an unknown status. Check the values against the field table.

Advertising ticket routes answer in the ticketing format: a success has respCode 2000 and the data in result. Errors are { "error": "…" }; auth errors are { "message": "…" }.

{ "error": "Validation failed", "details": "Key: 'CreateAdvertisingTicketRequest.TitleEn' Error:Field validation for 'TitleEn' failed on the 'required' tag" }
Status When it happens What to do
400 The body is invalid or a required field is missing (details says which). Fix the body.
401 No valid access token. Sign in again.
403 Your role lacks workspace:advertising:manage in the workspace. Ask an admin for the permission.
500 The advertising ticket or rail menu doesn't exist in this workspace, or the change couldn't be saved. Check the IDs; error says which.

Campaign error bodies:

400
{ "error": "Invalid request: <reason>" }
401
{ "success": false, "error": "Unauthorized - sign in required" }
403
{ "success": false, "error": "Forbidden - the organization or workspace is not yours" }
404, get
{ "error": "Campaign not found" }
404, update and delete
{ "error": "Not found or permission denied" }
500, for example on create
{ "error": "Could not create campaign" }

Advertising ticket error bodies:

401
{ "message": "Unauthorized - No token provided" }
403
{ "message": "Forbidden - Insufficient permissions" }
500
{ "error": "Failed to create advertising ticket: <reason>" }

A 400 for an unreadable body is { "error": "Invalid request body" }; for a missing field it is the Validation failed body above.

Endpoints