Campaign List Endpoint
Returns the running campaigns your partner account is allowed to show, newest first.
- Endpoint:
/api/v1/campaigns - Method:
GETorPOST
Headers
| Header | Value | Required | Description |
|---|---|---|---|
Partner-Access-Token | Base64 String | Yes | Your encrypted AES-256 time-sensitive token. |
Content-Type | application/json | Yes | |
Accept | application/json | Yes | |
X-Currency | e.g. THB | Optional | Currency for all money fields. Defaults to THB. |
Accept-Language | e.g. en | Optional | Language for translated campaign content. |
Payload Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | Integer | Optional | Page number. Minimum 1. Defaults to 1. |
limit | Integer | Optional | Records per page. Between 1 and 100. Defaults to 10. |
Sample Payload
{
"page": 1,
"limit": 10
}
Sample Response
{
"result": 1,
"message": "success",
"data": {
"meta": {
"current_page": 1,
"last_page": 3,
"per_page": 10,
"total": 24
},
"campaigns": [
{
"id": 41,
"name": "Songkran Hotel Sale",
"slug": "songkran-hotel-sale",
"status": "running",
"promotion_type": "coupon",
"start_at": "2026-04-01T00:00:00.000000Z",
"end_at": "2026-04-30T23:59:59.000000Z",
"coupon_expiry": "2026-05-31T23:59:59.000000Z",
"description": "Save on hotel stays across Thailand.",
"term_and_conditions": "<p>One coupon per booking.</p>",
"images": [
"https://api.dev.onlynx.co.th/storage/campaigns/songkran-banner.jpg"
],
"applicable_for": "Valid for <strong>Hotel</strong> in <strong>Thailand</strong>"
}
]
}
}
Field Reference
| Field | Type | Description |
|---|---|---|
id | Integer | Campaign ID. |
name | String | Campaign title. |
slug | String | Use this in the Campaign Detail endpoint. |
status | String | Always running for listed campaigns. |
promotion_type | String | promo_code or coupon. voucher campaigns are never listed. |
start_at / end_at | DateTime | null | Campaign timeline in UTC. null means open ended. |
coupon_expiry | DateTime | null | Latest moment a coupon from this campaign can be used. |
description | String | null | Plain or HTML description. |
term_and_conditions | String | null | HTML terms. Render as HTML. |
images | Array | Full image URLs. May be empty. |
applicable_for | String | Human readable restriction summary. Contains <strong> tags. |
Notes
- A campaign appears only when it still has coupon codes left for the requesting partner. Campaigns whose coupons are all claimed or fully redeemed drop out of the list automatically.
- Sign up and birthday campaigns are excluded — their coupons are delivered to the user by email.
- This endpoint does not require a user token. Prices in the campaign payload are informational; the actual amounts live on each coupon in the Campaign Detail response.