Zum Inhalt springen
OpenALaCarte

Vouchers

Issue, redeem and void operator vouchers. Write endpoints need a company key. Auth: Authorization: Bearer oac_live_<key>. A company key covers every property it owns; a venue key covers its venue. Lists are cursor-paginated.

GET/api/v1/vouchers

List vouchers (code, face value, status, expiry).

Query: status, limit, cursor

POST/api/v1/vouchers

Issue a voucher. Returns the redeemable code. Requires the gift-cards plan feature; scope it to one restaurant with restaurantId, or omit for company-wide.

Requires the write scope.

cURL
curl -X POST https://openalacarte.com/api/v1/vouchers \
  -H "Authorization: Bearer oac_live_<company-key>" -H "Content-Type: application/json" \
  -d '{"faceValueCents":2500,"title":"Birthday gift","currency":"GBP"}'
# → 201 { "id":"clo…", "code":"A4KP-7T2M", "faceValueCents":2500, "status":"ACTIVE" }
POST/api/v1/vouchers/redeem

Redeem by code at the point of service. Single-use and race-safe — a concurrent second redeem gets 409.

Requires the write scope.

cURL
curl -X POST https://openalacarte.com/api/v1/vouchers/redeem \
  -H "Authorization: Bearer oac_live_<company-key>" -H "Content-Type: application/json" \
  -d '{"code":"A4KP-7T2M"}'
# → 200 redeemed · 409 already redeemed / voided / expired · 404 unknown code
POST/api/v1/vouchers/{id}/void

Cancel an unredeemed voucher (reason required, min 3 chars). 409 if it is already redeemed or voided.

Requires the write scope.