Pro
This reference is open to everyone. Calls need an API key, and keys come with Pro at no extra charge.
Compare plans →
Getting started
Retrying safely
Networks fail, and tools retry. Send an Idempotency-Key with every write, and a retried request gets the first answer back instead of selling twice.
curl
curl -X POST https://api.cocoscout.com/v1/checkouts \ -H "Authorization: Bearer cs_live_…" \ -H "Idempotency-Key: 5c1e9a2b-…" \ -d '{ "show_id": 4812, "tickets": [{ "ticket_type_id": 912, "quantity": 2 }] }'
- Use a new random value (a UUID) for each new action, and the same value when retrying it.
- A key is remembered for a day. A replayed answer carries
Idempotent-Replayed: true. - The same key with a different request is refused with
422 idempotency_key_reused.