Skip to Content
Developers
API referencePromo codes

Create a promo code

Create a promo code.

POST
/promocodes

Create a promo code.

Authorization

http
headerAuthorizationBearer <token>

Request Body

application/json
  1. body

Create (POST) or update (PATCH) a promo code. Give either percent_off or amount_off (integer cents). events and ticket_types limit where the code applies; leave them empty for every event.

code*string
Lengthlength <= 255
percent_off?|
Range0 <= value <= 100
amount_off?|
Range0 <= value
usage_limit?|
Range1 <= value
is_active?boolean
valid_from?|
Formatdate-time
valid_until?|
Formatdate-time
events?array<>
ticket_types?array<>

Response Body

PromocodeResource

application/json
  1. response
id*string
object*string
code*string
type*string
percent_off*number|null
amount_off*integer|null
currency*|
Value in"eur"null
usage_limit*integer|null
times_used*integer
is_active*boolean
is_valid*boolean
valid_from*string|null
valid_until*string|null
events*array<string>
ticket_types*array<string>
created_at*string|null
updated_at*string|null
Example Request
curl -X POST 'https://api.tixxy.nl/v1/promocodes' \  -H 'Content-Type: application/json' \  -d '{  "code": "string"}'
Example Response
{  "id": "string",  "object": "promocode",  "code": "string",  "type": "string",  "percent_off": 0,  "amount_off": 0,  "currency": "eur",  "usage_limit": 0,  "times_used": 0,  "is_active": true,  "is_valid": true,  "valid_from": "string",  "valid_until": "string",  "events": [    "string"  ],  "ticket_types": [    "string"  ],  "created_at": "string",  "updated_at": "string"}