Errors and limits
Errors use the same envelope, with a stable machine-readable error.code and, for validation failures, one entry per field in error.details. Show people your own message; log the metadata.correlationId — WRAPA support can trace a request with it.
HTTP/1.1 400 Bad Request
{
"success": false,
"data": null,
"message": "One or more fields are invalid.",
"error": {
"code": "VALIDATION_ERROR",
"details": [{ "field": "incidentDate", "message": "Must not be in the future." }]
},
"metadata": { "correlationId": "018f7c69-77a2-7d0a-9f19-5855e6f2a999" }
}Status codes
400invalid input ·401missing or revoked key ·403the key lacks the scope, or the organisation doesn’t match ·404not found (or not yours)409the record changed state (for example, cover already ended) ·422a business rule refused it429too many requests — wait for theRetry-Afterseconds ·5xxretry with backoff (and the sameIdempotency-Key)
Idempotency
Send Idempotency-Key: <uuid> on creates. Repeating a request with the same key returns the first result instead of doing the work again; use a new key only for a genuinely new request.