Partner API
Errors
The RobinReturn Partner API error model, HTTP statuses, and the per-case rejection codes returned when creating cases.
Error model
All errors return { "error": "<message>" } with the relevant HTTP status. RobinReturn never
returns a raw stack trace or internal detail.
| Status | Meaning |
|---|---|
400 | Malformed request (bad JSON, missing body) |
401 | Missing, malformed, unknown or revoked API key |
403 | The key lacks the scope the route requires |
404 | Not found — or a case belonging to another company (never revealed) |
409 | The Idempotency-Key was already used |
429 | Rate limit exceeded — see Retry-After |
Per-case rejection codes
POST /api/v1/cases returns a rejected[] array; each entry has a code and a message. These
are per case — the request as a whole can still be 201 if other cases were created.
code | Meaning |
|---|---|
VALIDATION | A field was invalid for case creation |
INVALID_FILE_KEY | invoiceFileKey is not under your company's prefix |
FILE_NOT_FOUND | No uploaded object found at invoiceFileKey (did the PUT succeed?) |
NON_ENGLAND_WALES | Debtor company is registered in Scotland or Northern Ireland (not yet supported) |
NOT_YET_DUE | The due date is not in the past |
STATUTE_BARRED | The due date is more than six years ago (Limitation Act 1980) |
INVOICE_DATE_AFTER_DUE | The invoice date is after its due date |
DUPLICATE | A case is already chasing this invoice (the existing reference is in message) |
Handle rejections per case: fix the offending fields and re-send just those — the duplicate guard makes re-sending safe.