Errors & Conventions
Error format
Errors use a consistent envelope with a stable machine code. Always log the request_id — RYNT support can trace it instantly.
{ "error": { "code": "unmapped_vehicle", "message": "…", "request_id": "req_…" } }| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_request | Bad or missing fields |
| 401 | unauthorized | Missing / invalid / revoked key |
| 403 | forbidden | Key lacks the scope, or not your resource |
| 404 | not_found | Resource doesn't exist |
| 409 | conflict / double_booking | Duplicate in-flight, or overlaps a booking |
| 422 | unmapped_vehicle | Unknown ref — map it first |
| 429 | rate_limited | Too many requests — see retry_after |
Pagination
List endpoints are cursor-paginated. Pass limit (max 200) and follow pagination.next_cursor until it's null. Cursors are stable under inserts — no skipped or repeated rows.
GET /vehicles?limit=50
GET /vehicles?limit=50&cursor=<next_cursor>
Idempotency
Send an Idempotency-Key header on any write. A retry with the same key replays the original response (header X-Idempotent-Replay: true) instead of doing the work twice; a concurrent duplicate returns 409.
POST /vehicles/CAR-1/blocks
Idempotency-Key: 9f1c-abc-123
Rate limits
Requests are limited per API key. Every response carries RateLimit-Limit and RateLimit-Remaining headers; a 429 includes retry_after (seconds). Back off and retry.
Timestamps & money
All timestamps are ISO-8601 UTC (they end in Z). Every monetary value ships with its currency. Never assume a currency from a country.
Updated about 2 hours ago
