code field to handle Main API errors. The documented error shape follows RFC 7807 Problem Details with Spotzee-specific fields. Clients must also handle responses that omit optional fields or use application/json during the conventions rollout.
Use the HTTP status as a fallback when a response has no recognised string
code. Include X-Request-Id when reporting a failed request.Error body shape
Content-Type: application/problem+json.
Per-field errors
Whencode is validation_failed, the errors array lists every offending field:
Status codes
Code catalogue
Thecode field is stable and documented. Add new codes to your switch statement only when you need to handle them differently. The catalogue is additive.
Retry guidance
- Reads (
GET): use bounded retries with backoff on5xxand429. HonourRetry-Afterwhen present. - Mutations (
POST/PATCH): check idempotency availability and limits before retrying. A timed-out request may have taken effect. Resolve validation or permission errors before retrying;idempotency_in_progressexplicitly permits a delayed retry.
Reporting bugs
Always include therequest_id (in the response body or the X-Request-Id header) when reporting an error. It lets us trace your specific request end-to-end.
Next steps
Idempotency
Make retries safe.
Rate limits
Avoid
429 with self-throttling.