API and webhooks for developers
The Retiva public API for your developer or agency. Keys with narrow permissions, signed webhooks, safe retries for writes and OpenAPI documentation.
A developer or agency connects Retiva to your system through the Retiva public API. That system can be a till, a booking system or an app. This article says where to start. The API documentation describes every operation.
What the API offers
- The API reads data. It returns stores, products, orders, vouchers and tickets, coupon offers, customers with their marketing consents, and loyalty members and cards. A voucher can be looked up by code, with its redemption history.
- The API writes data. It issues a voucher or ticket, redeems a voucher, checks in a ticket, reverses a redemption and claims a coupon for a customer.
- The API sends webhooks. A webhook is a notification of an event, for example a paid order, a redeemed voucher, a checked-in ticket, a stamp or a claimed coupon.
Getting started
- A business owner or admin creates a key. In the dashboard they open Settings, choose API keys and give the key only the permissions it needs. You can read more about keys in API keys.
- Your developer sends the key in the header of every request, for example
Authorization: Bearer rk_live_…. - The API address is
https://app.retiva.io/api/v1. TheGET /merequest returns the business the key belongs to and the key’s permissions.
A key works for one business, so the system only sees that business’s data. Hand the key to your developer through a password manager, not by email.
What to tell your developer
- Every webhook is signed. The
X-Retiva-Signatureheader holds an HMAC-SHA256 signature of the body. The system should check the signature before it acts. - Retiva retries webhooks. When the system does not answer, Retiva sends the notification
again. The
X-Retiva-Deliveryheader keeps the same value on a retry, so the system can skip the repeat. - A write can be retried safely. Every write can carry an
Idempotency-Keyheader. A retried request with the same key does not issue a second voucher. - The API has a rate limit. Over the limit, the API answers
429with aRetry-Afterheader. - Amounts are in the currency’s smallest unit. For example,
5000is £50.00.
If you have no developer, the Retiva apps for Zapier, Make and n8n offer the same events and actions.