The whole partner API contract, endpoints, request and response shapes, errors and the webhook payload, is published as an OpenAPI 3.1 document:
It describes the same contract as these pages. Where the two differ, these pages are right and the document is a bug: tell your contact at ByRecord.
Using it
Browse it. Load it into any OpenAPI viewer (Swagger UI, Redoc, Stoplight) or import it into Postman or Insomnia as a collection. Set the programmeHost server variable to your programme's host, and the bearer token to your sandbox key.
Generate a client. Any OpenAPI 3.1 generator works. For example, with openapi-typescript for TypeScript types:
or a full client in another language with OpenAPI Generator:
Mock it. Run a mock server from it to build against before you have a sandbox key:
What it describes
| Part | |
|---|---|
paths | The five quote endpoints and the sandbox's webhook echo receiver |
webhooks | The event body and its four headers, with every event type in one schema |
components.securitySchemes | The API key, as Authorization: Bearer or X-Api-Key |
components.parameters | Idempotency-Key on every POST |
Two things an OpenAPI document cannot say well, so read them here:
- Exactly one of
linesordocumentonPOST /quotes. The schema allows either; the API refuses both and neither with400. customernames an account or a new one.accountId, ornamewith the rest;contactalways.