Skip to main content

Errors

Partner APIs share a flat error body:

{
"code": "VALIDATION_ERROR",
"message": "uid must match ^CHE\\d{9}$"
}

Branch on code. Log both code and message.

401 and 403 have no JSON body. Refresh the token on 401; do not parse the response.

HTTP status codes​

StatusMeaning
200OK
201Created
202Accepted (async job started)
400Bad request — body present
401Unauthorized — empty body
403Forbidden — empty body
404Not found
409Conflict
413Payload too large
415Unsupported media type
429Rate limited — honour Retry-After when present
500Internal error
503Service unavailable

Platform code values​

CodeTypical statusRetry
VALIDATION_ERROR400No
NOT_FOUND404No
PAYLOAD_TOO_LARGE413No
CONFLICT409No
RATE_LIMITED429Yes, after Retry-After
SERVICE_UNAVAILABLE503Yes, exponential backoff
INTERNAL_ERROR500Yes, exponential backoff

Product codes​

Docmind checks every upload's bytes, not its declared content type or file extension, and refuses a file it cannot process:

CodeTypical statusMeaning
MISSING_FILENAME400The multipart file part has no filename
FILE_TOO_LARGE400The file is over the 200 MB upload limit
UNSUPPORTED_FILE_TYPE400The bytes are not a PDF, JPEG, PNG or TIFF
PDF_UNREADABLE400The PDF structure cannot be read
PDF_NO_PAGES400The PDF has no pages
PDF_PASSWORD_PROTECTED400The PDF needs a password to open
PDF_TEXT_TRANSCODED400The PDF was sent as text, which replaced its binary bytes
PDF_CONTENT_UNDECODABLE400A content stream of the PDF is damaged and cannot be decoded
PDF_DAMAGED400The PDF is structurally damaged (only where this check is enabled)

The message names what is wrong with the file. Sending the same bytes again gets the same answer: fix the file first, for example by removing its password or reducing its size. For PDF_TEXT_TRANSCODED, send the original file as binary, without converting it to text.

Docbooks adds:

CodeTypical statusWhere
BATCH_TOO_LARGE400Onboarding / offboarding, over 100 items
DUPLICATE_IN_BATCH400extRef or uid repeated inside one batch
INVALID_SUBMISSION400Booking submit, not exactly one of file/extraction
MISSING_CHART_OF_ACCOUNTS400Booking submit, no effective chart of accounts
WORKSPACE_NOT_LINKED409Booking submit, workspace not provisioned
FILE_TOO_LARGE413Booking submit, over the 200 MB upload limit

See Docmind OpenAPI and Docbooks OpenAPI.