Skip to content

Preview a promo code

post/api/book/{slug}/promo-codes/validate

A preview, so a booking page can confirm a code and show its discount before the guest fills in their details. Never creates or charges anything: POST /api/book/{slug}/appointments checks the same code again under the same rules, and only that answer is ever charged. A "valid" preview can still be refused at checkout, for example a once-per-customer code the guest has already used, since this route has no customer to check yet.

Rate limited on the tighter guest write budget, 30 requests a minute: a code is a short, guessable string, and this is the one endpoint that tests a guess without booking anything.

Path Parameters

slug*string

The organization's public booking slug, i.e. the {slug} in /{slug}. Only orgs with status active resolve; anything else is a 404.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/book/string/promo-codes/validate" \  -H "Content-Type: application/json" \  -d '{    "code": "string",    "serviceIds": [      "a486dd3f-c8ab-4226-b78c-e435f821cb91"    ]  }'
{  "discountCents": 0}