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
| Status | Meaning |
|---|---|
| 200 | OK |
| 201 | Created |
| 202 | Accepted (async job started) |
| 400 | Bad request — body present |
| 401 | Unauthorized — empty body |
| 403 | Forbidden — empty body |
| 404 | Not found |
| 409 | Conflict |
| 413 | Payload too large |
| 415 | Unsupported media type |
| 429 | Rate limited — honour Retry-After when present |
| 500 | Internal error |
| 503 | Service unavailable |
Platform code values
| Code | Typical status | Retry |
|---|---|---|
VALIDATION_ERROR | 400 | No |
NOT_FOUND | 404 | No |
PAYLOAD_TOO_LARGE | 413 | No |
CONFLICT | 409 | No |
RATE_LIMITED | 429 | Yes, after Retry-After |
SERVICE_UNAVAILABLE | 503 | Yes, exponential backoff |
INTERNAL_ERROR | 500 | Yes, 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:
| Code | Typical status | Meaning |
|---|---|---|
MISSING_FILENAME | 400 | The multipart file part has no filename |
FILE_TOO_LARGE | 400 | The file is over the 200 MB upload limit |
UNSUPPORTED_FILE_TYPE | 400 | The bytes are not a PDF, JPEG, PNG or TIFF |
PDF_UNREADABLE | 400 | The PDF structure cannot be read |
PDF_NO_PAGES | 400 | The PDF has no pages |
PDF_PASSWORD_PROTECTED | 400 | The PDF needs a password to open |
PDF_TEXT_TRANSCODED | 400 | The PDF was sent as text, which replaced its binary bytes |
PDF_CONTENT_UNDECODABLE | 400 | A content stream of the PDF is damaged and cannot be decoded |
PDF_DAMAGED | 400 | The 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:
| Code | Typical status | Where |
|---|---|---|
BATCH_TOO_LARGE | 400 | Onboarding / offboarding, over 100 items |
DUPLICATE_IN_BATCH | 400 | extRef or uid repeated inside one batch |
INVALID_SUBMISSION | 400 | Booking submit, not exactly one of file/extraction |
MISSING_CHART_OF_ACCOUNTS | 400 | Booking submit, no effective chart of accounts |
WORKSPACE_NOT_LINKED | 409 | Booking submit, workspace not provisioned |
FILE_TOO_LARGE | 413 | Booking submit, over the 200 MB upload limit |
See Docmind OpenAPI and Docbooks OpenAPI.