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 also uses domain codes such as INVALID_FILE. Docbooks uses BATCH_TOO_LARGE and DUPLICATE_IN_BATCH. See Docmind OpenAPI and Docbooks OpenAPI.