Developers
ReferencePromo codes

Update a promo code

Update a promo code. Only the fields you send are changed.

PATCH
/promocodes/{id}

Update a promo code. Only the fields you send are changed.

Authorization

http
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

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.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/promocodes/string" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
{  "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"}