Coupons

By issuing coupons you can allow ticket buyers to receive a discount on their transaction by applying a randomly generated or custom-defined code to their cart.

Endpoints

The Coupon Object

Attributes

One of
Only one of the following types
couponType
Required
string
couponSeries
couponSeriesId
Required
string

The ID of the coupon series.

Optional Attributes

Collapse all
__v
Optional
integer
Was this section helpful?
YesNo
Example
{
"couponType": "couponSeries",
"couponSeriesId": "string",
"_id": "string",
"code": "string",
"sellerId": "string",
"customer": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"__v": 1
}

Create a Coupon

Payload

One of
Only one of the following types
couponType
Required
string
couponSeries
couponSeriesId
Required
string

The ID of the coupon series.

Optional Attributes

Collapse all
Responses
201
Created
400
Bad Request
401
Unauthorized

Was this section helpful?

YesNo
post
/api/coupon
{
"couponType": "couponSeries",
"couponSeriesId": "string",
"code": "string",
"sellerId": "string",
"customer": "string"
}
Response
application/json
{
"couponType": "couponSeries",
"couponSeriesId": "string",
"_id": "string",
"code": "string",
"sellerId": "string",
"customer": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"__v": 1
}

Get a Coupon

Query

No supported query parameters
Responses
200
OK
400
Bad Request
401
Unauthorized
404
Not Found

Was this section helpful?

YesNo
get
/api/coupon/{id}
Response
application/json
{
"couponType": "couponSeries",
"couponSeriesId": "string",
"_id": "string",
"code": "string",
"sellerId": "string",
"customer": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"__v": 1
}

Update a Coupon

Payload

One of
Only one of the following types
couponType
Required
string
couponSeries
couponSeriesId
Required
string

The ID of the coupon series.

Optional Attributes

Collapse all
__v
Optional
integer
Responses
200
OK
400
Bad Request
401
Unauthorized
404
Not Found

Was this section helpful?

YesNo
put
/api/coupon/{id}
{
"couponType": "couponSeries",
"couponSeriesId": "string",
"_id": "string",
"code": "string",
"sellerId": "string",
"customer": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"__v": 1
}
Response
application/json
{
"couponType": "couponSeries",
"couponSeriesId": "string",
"_id": "string",
"code": "string",
"sellerId": "string",
"customer": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"__v": 1
}

Get all Coupons

Query

top
Optional
integer

A limit on the number of objects to be returned. Can range between 1 and 1000.

skip
Optional
integer

The number of objects to skip for the requested result

name
Optional
string

Filter coupons by name

code
Optional
string

Filter coupons by code

eventId
Optional
string

Filter coupons by eventId

couponSeriesId
Optional
string

Filter coupons by couponSeriesId

active
Optional
boolean

Filter coupons by active

Responses
200
OK
400
Bad Request
401
Unauthorized

Was this section helpful?

YesNo
get
/api/coupon/rich
Response
application/json
{
"rows": [
{
"couponType": "couponSeries",
"couponSeriesId": "string",
"_id": "string",
"code": "string",
"sellerId": "string",
"customer": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z",
"__v": 1
}
],
"total": 1
}
PUBLIC

Get Coupon or Voucher by code

This endpoint provides information on both coupons and vouchers. To receive a coupon, you need to pass an eventId, even if the coupon can be used across all events. If there is a coupon and a voucher with the same code, and you pass an eventId, the coupon will be preferred. Without passing an eventId, only vouchers will be considered.

Query

sellerId
Required
string

The ID of the seller

eventId
Optional
string

The ID of the event to check the coupon/voucher against.

Responses
200
OK
400
Bad Request
401
Unauthorized
404
Not Found

Was this section helpful?

YesNo
get
/api/coupon/{code}/info
Response
application/json
{
"message": "notYetValid",
"coupon": {
"code": "string",
"couponId": "string",
"name": "string",
"canBeCombined": true,
"discountType": "fix",
"discountValue": 10.5,
"discountMaxValue": 10.5,
"allowAllTickets": true,
"allowedTickets": [
"string"
],
"allowAllEvents": true,
"limitMaxTicketsInCart": true,
"maxTicketsInCart": 10.5,
"maxTickets": 10.5,
"revealAllowedTickets": true
},
"voucher": {
"_id": "string",
"code": "string",
"balance": 10.5
},
"type": "voucher"
}

The Coupon Series Object

The Coupon Series feature allows for the generation of multiple coupon codes with a single configuration. This is beneficial for creating promotions where each coupon code shares identical settings or restrictions, all managed with a single coupon series.

Attributes

name
Required
string

The Name for the coupon. Visible to public.

_id
Required
string

The ID of the coupon series.

sellerId
Required
string

The ID of the seller.

Optional Attributes

Collapse all
Was this section helpful?
YesNo
Example
{
"name": "string",
"singleUsage": true,
"active": true,
"maxUsage": 1,
"maxUsagePerEvent": 10.5,
"maxTickets": 10.5,
"canBeCombined": true,
"discountType": "fix",
"discountValue": 10.5,
"discountMaxValue": 10.5,
"allowAllEvents": true,
"allowedEvents": [
"string"
],
"allowAllTickets": true,
"allowedTickets": [
"string"
],
"taggingEnabled": true,
"tags": [
"string"
],
"validFrom": "2030-01-23T23:00:00.123Z",
"validUntil": "2030-01-23T23:00:00.123Z",
"limitMaxTicketsInCart": true,
"maxTicketsInCart": 10.5,
"note": "string",
"revealAllowedTickets": true,
"unlocks": [
{
"target": "underShop",
"eventId": "string",
"underShopId": "string"
}
],
"_id": "string",
"sellerId": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}

Create coupon series

Payload

name
Required
string

The Name for the coupon. Visible to public.

sellerId
Required
string

The ID of the seller.

Optional Attributes

Collapse all
Responses
200
OK
400
Bad Request
401
Unauthorized

Was this section helpful?

YesNo
post
/api/coupon/series
{
"name": "string",
"singleUsage": true,
"active": true,
"maxUsage": 1,
"maxUsagePerEvent": 10.5,
"maxTickets": 10.5,
"canBeCombined": true,
"discountType": "fix",
"discountValue": 10.5,
"discountMaxValue": 10.5,
"allowAllEvents": true,
"allowedEvents": [
"string"
],
"allowAllTickets": true,
"allowedTickets": [
"string"
],
"taggingEnabled": true,
"tags": [
"string"
],
"validFrom": "2030-01-23T23:00:00.123Z",
"validUntil": "2030-01-23T23:00:00.123Z",
"limitMaxTicketsInCart": true,
"maxTicketsInCart": 10.5,
"note": "string",
"revealAllowedTickets": true,
"unlocks": [
{
"target": "underShop",
"eventId": "string",
"underShopId": "string"
}
],
"sellerId": "string"
}
Response
application/json
{
"name": "string",
"singleUsage": true,
"active": true,
"maxUsage": 1,
"maxUsagePerEvent": 10.5,
"maxTickets": 10.5,
"canBeCombined": true,
"discountType": "fix",
"discountValue": 10.5,
"discountMaxValue": 10.5,
"allowAllEvents": true,
"allowedEvents": [
"string"
],
"allowAllTickets": true,
"allowedTickets": [
"string"
],
"taggingEnabled": true,
"tags": [
"string"
],
"validFrom": "2030-01-23T23:00:00.123Z",
"validUntil": "2030-01-23T23:00:00.123Z",
"limitMaxTicketsInCart": true,
"maxTicketsInCart": 10.5,
"note": "string",
"revealAllowedTickets": true,
"unlocks": [
{
"target": "underShop",
"eventId": "string",
"underShopId": "string"
}
],
"_id": "string",
"sellerId": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}

Get all coupon series

Query

top
Optional
integer

A limit on the number of objects to be returned. Can range between 1 and 1000.

skip
Optional
integer

The number of objects to skip for the requested result

name
Optional
string

Filter coupon series by name

Responses
200
OK
400
Bad Request
401
Unauthorized

Was this section helpful?

YesNo
get
/api/coupon/series
Response
application/json
[
{
"name": "string",
"singleUsage": true,
"active": true,
"maxUsage": 1,
"maxUsagePerEvent": 10.5,
"maxTickets": 10.5,
"canBeCombined": true,
"discountType": "fix",
"discountValue": 10.5,
"discountMaxValue": 10.5,
"allowAllEvents": true,
"allowedEvents": [
"string"
],
"allowAllTickets": true,
"allowedTickets": [
"string"
],
"taggingEnabled": true,
"tags": [
"string"
],
"validFrom": "2030-01-23T23:00:00.123Z",
"validUntil": "2030-01-23T23:00:00.123Z",
"limitMaxTicketsInCart": true,
"maxTicketsInCart": 10.5,
"note": "string",
"revealAllowedTickets": true,
"unlocks": [
{
"target": "underShop",
"eventId": "string",
"underShopId": "string"
}
],
"_id": "string",
"sellerId": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}
]

Get a coupon series

Query

No supported query parameters
Responses
200
OK
400
Bad Request
401
Unauthorized
404
Not Found

Was this section helpful?

YesNo
get
/api/coupon/series/{id}
Response
application/json
{
"name": "string",
"singleUsage": true,
"active": true,
"maxUsage": 1,
"maxUsagePerEvent": 10.5,
"maxTickets": 10.5,
"canBeCombined": true,
"discountType": "fix",
"discountValue": 10.5,
"discountMaxValue": 10.5,
"allowAllEvents": true,
"allowedEvents": [
"string"
],
"allowAllTickets": true,
"allowedTickets": [
"string"
],
"taggingEnabled": true,
"tags": [
"string"
],
"validFrom": "2030-01-23T23:00:00.123Z",
"validUntil": "2030-01-23T23:00:00.123Z",
"limitMaxTicketsInCart": true,
"maxTicketsInCart": 10.5,
"note": "string",
"revealAllowedTickets": true,
"unlocks": [
{
"target": "underShop",
"eventId": "string",
"underShopId": "string"
}
],
"_id": "string",
"sellerId": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}

Update coupon series

Payload

name
Required
string

The Name for the coupon. Visible to public.

_id
Required
string

The ID of the coupon series.

sellerId
Required
string

The ID of the seller.

Optional Attributes

Collapse all
Responses
200
OK
400
Bad Request
401
Unauthorized

Was this section helpful?

YesNo
put
/api/coupon/series/{id}
{
"name": "string",
"singleUsage": true,
"active": true,
"maxUsage": 1,
"maxUsagePerEvent": 10.5,
"maxTickets": 10.5,
"canBeCombined": true,
"discountType": "fix",
"discountValue": 10.5,
"discountMaxValue": 10.5,
"allowAllEvents": true,
"allowedEvents": [
"string"
],
"allowAllTickets": true,
"allowedTickets": [
"string"
],
"taggingEnabled": true,
"tags": [
"string"
],
"validFrom": "2030-01-23T23:00:00.123Z",
"validUntil": "2030-01-23T23:00:00.123Z",
"limitMaxTicketsInCart": true,
"maxTicketsInCart": 10.5,
"note": "string",
"revealAllowedTickets": true,
"unlocks": [
{
"target": "underShop",
"eventId": "string",
"underShopId": "string"
}
],
"_id": "string",
"sellerId": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}
Response
application/json
{
"name": "string",
"singleUsage": true,
"active": true,
"maxUsage": 1,
"maxUsagePerEvent": 10.5,
"maxTickets": 10.5,
"canBeCombined": true,
"discountType": "fix",
"discountValue": 10.5,
"discountMaxValue": 10.5,
"allowAllEvents": true,
"allowedEvents": [
"string"
],
"allowAllTickets": true,
"allowedTickets": [
"string"
],
"taggingEnabled": true,
"tags": [
"string"
],
"validFrom": "2030-01-23T23:00:00.123Z",
"validUntil": "2030-01-23T23:00:00.123Z",
"limitMaxTicketsInCart": true,
"maxTicketsInCart": 10.5,
"note": "string",
"revealAllowedTickets": true,
"unlocks": [
{
"target": "underShop",
"eventId": "string",
"underShopId": "string"
}
],
"_id": "string",
"sellerId": "string",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}