ConceptsRequests and responses
Concepts
Requests and responses
The envelope, request ids, money, phones and consent.
Pilotv1
JSON in, JSON out, except for the few uploads and downloads listed under Files. Field names are camelCase.
The envelope
Every answer
{
"data": {},
"requestId": "3f1c8a2e-...",
"success": true
}Every response has a server-made requestId, also sent as the x-request-id header. Quote it to support. The owner sees recent requests in Settings, Developers, without paths, bodies or customer data.
Conventions
| Topic | Rule |
|---|---|
| Money | Integer minor units with an explicit currency per program or card (1250 is 12.50 BDT). Another currency is 422 CURRENCY_MISMATCH, never converted. Revisit's own billing is in poisha. |
| Phones | Never returned. You see maskedPhone (•••• 4821) and memberCode. You may send a phone to enroll or look up a customer, by the whole number only. |
| Consent | Enrolling or syncing a customer never turns on marketing and never undoes an opt-out. |
| Your ids | externalCustomerId, sourceEventId and reversalId (up to 128 characters) and a hold's reference are yours, and outlive retries. |
| Time | ISO 8601 date-times. |
| Caching | Every answer carries Cache-Control: no-store. |