RobinReturn
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.

StatusMeaning
400Malformed request (bad JSON, missing body)
401Missing, malformed, unknown or revoked API key
403The key lacks the scope the route requires
404Not found — or a case belonging to another company (never revealed)
409The Idempotency-Key was already used
429Rate 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.

codeMeaning
VALIDATIONA field was invalid for case creation
INVALID_FILE_KEYinvoiceFileKey is not under your company's prefix
FILE_NOT_FOUNDNo uploaded object found at invoiceFileKey (did the PUT succeed?)
NON_ENGLAND_WALESDebtor company is registered in Scotland or Northern Ireland (not yet supported)
NOT_YET_DUEThe due date is not in the past
STATUTE_BARREDThe due date is more than six years ago (Limitation Act 1980)
INVOICE_DATE_AFTER_DUEThe invoice date is after its due date
DUPLICATEA 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.

On this page