Promo Codes
Promo code CRUD — discount for ticket classes, org/event scoped, write needs confirm via MCP
List promo codes for an event — paginated, filterable by codeName substring and isActive. Requires organizer_api_token read, org or event scoped. Excludes soft-deleted rows.
Organizer API token — Authorization: Bearer evtx_live_… (Org/Event scoped, read/write).
aaff0556-85b5-4ac4-a484-486c7f319c0850Example: 500Example: 0Filter by codeName substring (case-insensitive)
SUMMERtruePaginated promo codes
10500Unauthorized
Forbidden
Event not found
GET /v2/events/{eventId}/promo-codes HTTP/1.1
Host: api.eventx.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
{
"id": "b2e7c3a1-4f5e-4b2a-9c1d-1234567890ab",
"eventId": "aaff0556-85b5-4ac4-a484-486c7f319c08",
"codeName": "SUMMER2026",
"remarks": "Early bird",
"discountType": "subtractByPercentage",
"discount": "100.00",
"discountRate": "20.00",
"quota": 100,
"isActive": true,
"isAppliedToAllTicketClasses": true,
"ticketClassIds": [
"550e8400-e29b-41d4-a716-446655440011"
],
"startDate": "2026-03-01T00:00:00.000Z",
"endDate": "2026-04-01T00:00:00.000Z",
"timezone": "Asia/Hong_Kong",
"createdAt": "2026-01-15T02:00:00.000Z",
"updatedAt": "2026-01-15T02:00:00.000Z"
}
],
"total": 10,
"limit": 50,
"offset": 0
}Create promo code — event-create allowed for event-scoped token (token.eventId must match). Validates discount range, price, and ticketClass ownership. Requires write.
Organizer API token — Authorization: Bearer evtx_live_… (Org/Event scoped, read/write).
aaff0556-85b5-4ac4-a484-486c7f319c08Create promo code — requires organizer_api_token write, org or event scoped (event-create allowed). Validates discount range and ticket class scope.
Unique per event, required
SUMMER2026Early birdDiscount type, required
subtractByPercentagePossible values: Fixed amount string; required for subtractByFixedAmount/chargeByFixedAmount
50.00Percentage 0-100 string; for subtractByPercentage
20.00Max redemptions; null = unlimited
100Active flag, defaults to true
trueIf true, ticketClassIds is ignored
trueTicket class IDs when isAppliedToAllTicketClasses=false
["550e8400-e29b-41d4-a716-446655440011"]ISO start, required
2026-03-01T00:00:00.000ZISO end, null = no expiry
2026-04-01T00:00:00.000ZIANA timezone, required
Asia/Hong_KongCreated
Promo code row — scoped by organizer_api_token (Org or Event, not user). Discount affects ticket pricing; PATCH is human-confirmed via MCP.
Promo code ID, UUID
b2e7c3a1-4f5e-4b2a-9c1d-1234567890abEvent ID
aaff0556-85b5-4ac4-a484-486c7f319c08Human-readable code name, unique per event
SUMMER2026Internal remarks
Early birdsubtractByPercentage | subtractByFixedAmount | chargeByFixedAmount
subtractByPercentageFixed amount string, for subtractByFixedAmount/chargeByFixedAmount
100.00Percentage string 0-100, for subtractByPercentage
20.00Max redemptions, null = unlimited
100Whether code is currently active
trueIf true, applies to all ticket classes; otherwise ticketClassIds lists scope
trueTicket class IDs this code applies to (empty when isAppliedToAllTicketClasses=true)
["550e8400-e29b-41d4-a716-446655440011"]Start time ISO
2026-03-01T00:00:00.000ZEnd time ISO, null = no expiry
2026-04-01T00:00:00.000ZIANA timezone for start/end display
Asia/Hong_Kong2026-01-15T02:00:00.000Z2026-01-15T02:00:00.000ZValidation error
Unauthorized
Forbidden
Event or ticket class not found
POST /v2/events/{eventId}/promo-codes HTTP/1.1
Host: api.eventx.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 237
{
"codeName": "SUMMER2026",
"discountType": "subtractByPercentage",
"discountRate": "20.00",
"quota": 100,
"isAppliedToAllTicketClasses": true,
"startDate": "2026-03-01T00:00:00.000Z",
"endDate": "2026-04-01T00:00:00.000Z",
"timezone": "Asia/Hong_Kong"
}{
"id": "b2e7c3a1-4f5e-4b2a-9c1d-1234567890ab",
"eventId": "aaff0556-85b5-4ac4-a484-486c7f319c08",
"codeName": "SUMMER2026",
"remarks": "Early bird",
"discountType": "subtractByPercentage",
"discount": "100.00",
"discountRate": "20.00",
"quota": 100,
"isActive": true,
"isAppliedToAllTicketClasses": true,
"ticketClassIds": [
"550e8400-e29b-41d4-a716-446655440011"
],
"startDate": "2026-03-01T00:00:00.000Z",
"endDate": "2026-04-01T00:00:00.000Z",
"timezone": "Asia/Hong_Kong",
"createdAt": "2026-01-15T02:00:00.000Z",
"updatedAt": "2026-01-15T02:00:00.000Z"
}Get single promo code by ID, scoped to event. Requires read.
Organizer API token — Authorization: Bearer evtx_live_… (Org/Event scoped, read/write).
aaff0556-85b5-4ac4-a484-486c7f319c08b2e7c3a1-4f5e-4b2a-9c1d-1234567890abPromo code
Promo code row — scoped by organizer_api_token (Org or Event, not user). Discount affects ticket pricing; PATCH is human-confirmed via MCP.
Promo code ID, UUID
b2e7c3a1-4f5e-4b2a-9c1d-1234567890abEvent ID
aaff0556-85b5-4ac4-a484-486c7f319c08Human-readable code name, unique per event
SUMMER2026Internal remarks
Early birdsubtractByPercentage | subtractByFixedAmount | chargeByFixedAmount
subtractByPercentageFixed amount string, for subtractByFixedAmount/chargeByFixedAmount
100.00Percentage string 0-100, for subtractByPercentage
20.00Max redemptions, null = unlimited
100Whether code is currently active
trueIf true, applies to all ticket classes; otherwise ticketClassIds lists scope
trueTicket class IDs this code applies to (empty when isAppliedToAllTicketClasses=true)
["550e8400-e29b-41d4-a716-446655440011"]Start time ISO
2026-03-01T00:00:00.000ZEnd time ISO, null = no expiry
2026-04-01T00:00:00.000ZIANA timezone for start/end display
Asia/Hong_Kong2026-01-15T02:00:00.000Z2026-01-15T02:00:00.000ZUnauthorized
Forbidden
Not found
GET /v2/events/{eventId}/promo-codes/{promoCodeId} HTTP/1.1
Host: api.eventx.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "b2e7c3a1-4f5e-4b2a-9c1d-1234567890ab",
"eventId": "aaff0556-85b5-4ac4-a484-486c7f319c08",
"codeName": "SUMMER2026",
"remarks": "Early bird",
"discountType": "subtractByPercentage",
"discount": "100.00",
"discountRate": "20.00",
"quota": 100,
"isActive": true,
"isAppliedToAllTicketClasses": true,
"ticketClassIds": [
"550e8400-e29b-41d4-a716-446655440011"
],
"startDate": "2026-03-01T00:00:00.000Z",
"endDate": "2026-04-01T00:00:00.000Z",
"timezone": "Asia/Hong_Kong",
"createdAt": "2026-01-15T02:00:00.000Z",
"updatedAt": "2026-01-15T02:00:00.000Z"
}Soft delete — sets deletedAt, keeps assignment rows. Requires write.
Organizer API token — Authorization: Bearer evtx_live_… (Org/Event scoped, read/write).
aaff0556-85b5-4ac4-a484-486c7f319c08b2e7c3a1-4f5e-4b2a-9c1d-1234567890abDeleted
No content
Unauthorized
Forbidden
Not found
DELETE /v2/events/{eventId}/promo-codes/{promoCodeId} HTTP/1.1
Host: api.eventx.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Partial update — at least one field. codeName rename checks duplicate per event. Validates discount/price/ticket scope. Requires write and human confirmation when via MCP (confirm:true). Best-effort duplicate race.
Organizer API token — Authorization: Bearer evtx_live_… (Org/Event scoped, read/write).
aaff0556-85b5-4ac4-a484-486c7f319c08b2e7c3a1-4f5e-4b2a-9c1d-1234567890abPartial update — at least one field required. codeName rename checks duplicate. Requires human confirmation via MCP confirm:true.
SUMMER2026-V2Updated remarkssubtractByFixedAmountPossible values: 50.0015.00200falsefalse["550e8400-e29b-41d4-a716-446655440011"]2026-03-02T00:00:00.000Z2026-04-01T00:00:00.000ZAsia/Hong_KongUpdated
Promo code row — scoped by organizer_api_token (Org or Event, not user). Discount affects ticket pricing; PATCH is human-confirmed via MCP.
Promo code ID, UUID
b2e7c3a1-4f5e-4b2a-9c1d-1234567890abEvent ID
aaff0556-85b5-4ac4-a484-486c7f319c08Human-readable code name, unique per event
SUMMER2026Internal remarks
Early birdsubtractByPercentage | subtractByFixedAmount | chargeByFixedAmount
subtractByPercentageFixed amount string, for subtractByFixedAmount/chargeByFixedAmount
100.00Percentage string 0-100, for subtractByPercentage
20.00Max redemptions, null = unlimited
100Whether code is currently active
trueIf true, applies to all ticket classes; otherwise ticketClassIds lists scope
trueTicket class IDs this code applies to (empty when isAppliedToAllTicketClasses=true)
["550e8400-e29b-41d4-a716-446655440011"]Start time ISO
2026-03-01T00:00:00.000ZEnd time ISO, null = no expiry
2026-04-01T00:00:00.000ZIANA timezone for start/end display
Asia/Hong_Kong2026-01-15T02:00:00.000Z2026-01-15T02:00:00.000ZValidation
Unauthorized
Forbidden
Not found
PATCH /v2/events/{eventId}/promo-codes/{promoCodeId} HTTP/1.1
Host: api.eventx.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 364
{
"codeName": "SUMMER2026-V2",
"remarks": "Updated remarks",
"discountType": "subtractByFixedAmount",
"discount": "50.00",
"discountRate": "15.00",
"quota": 200,
"isActive": false,
"isAppliedToAllTicketClasses": false,
"ticketClassIds": [
"550e8400-e29b-41d4-a716-446655440011"
],
"startDate": "2026-03-02T00:00:00.000Z",
"endDate": "2026-04-01T00:00:00.000Z",
"timezone": "Asia/Hong_Kong"
}{
"id": "b2e7c3a1-4f5e-4b2a-9c1d-1234567890ab",
"eventId": "aaff0556-85b5-4ac4-a484-486c7f319c08",
"codeName": "SUMMER2026",
"remarks": "Early bird",
"discountType": "subtractByPercentage",
"discount": "100.00",
"discountRate": "20.00",
"quota": 100,
"isActive": true,
"isAppliedToAllTicketClasses": true,
"ticketClassIds": [
"550e8400-e29b-41d4-a716-446655440011"
],
"startDate": "2026-03-01T00:00:00.000Z",
"endDate": "2026-04-01T00:00:00.000Z",
"timezone": "Asia/Hong_Kong",
"createdAt": "2026-01-15T02:00:00.000Z",
"updatedAt": "2026-01-15T02:00:00.000Z"
}Last updated