Errors
Every error is JSON with an `error` code. The codes, what causes them, and which ones mean you should stop retrying.
{ "error": "<code>", "message": "<what went wrong, in words>" }Some codes carry extra fields, which exist so the mismatch diagnoses itself: allowed on
category_not_found, detail on validation_failed, pending_tasks on case_not_ready, max on
limit_too_large.
Codes
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | Neither api-key nor x-api-key was sent. |
| 401 | invalid_api_key | The key matches no organisation, including a key from the wrong environment. |
| 400 | missing_reference | POST /applications without a reference. |
| 400 | bad_case_id | The reference contains characters other than letters, digits, dot, underscore or hyphen. |
| 400 | no_applicants | POST /applications with no applicants, which would create an application that can never have tasks. |
| 400 | validation_failed | One or more fields failed validation. detail lists each one, keyed by applicant index. |
| 400 | category_not_found | The category is not configured for your organisation. allowed lists the ones that are. |
| 400 | missing_name | A reverse added applicant without a name. |
| 400 | empty_collateral | A collateral request with nothing usable in the body. |
| 400 | limit_too_large | A page larger than the maximum was requested. |
| 400 | case_not_closed | Reopen was called on an application that is neither rejected nor completed. |
| 404 | not_found | No application with that reference in your organisation. |
| 404 | user_not_found | The assignee was not found, or is not active. |
| 409 | reference_exists | An application with that reference already exists in your organisation. |
| 409 | case_rejected | The application was rejected and is read only. Reopen it first. |
| 409 | case_closed | The application is complete and is read only. Reopen it first. |
| 409 | already_rejected | The application is already rejected. The response carries the original reason and rejected_at. |
| 409 | case_not_ready | Reports were requested before every task was complete. pending_tasks says what is outstanding. |
| 502 | report_generation_failed | The report pipeline did not accept the run. |
| 500 | An unhandled error on our side. Safe to retry. |
What to retry
| Verdict | Which responses |
|---|---|
| Retry | 500, 502 and network failures. An application create is identified by your reference, so a retry after a timeout either succeeds or returns 409 reference_exists, which tells you the first attempt landed. |
| Do not retry | Any other 4xx. The request will fail the same way until something changes. 401 means the key or the environment is wrong, and the rest name the field at fault. |
Still stuck
Email support@ablecredit.com with the reference, the environment and the status code. Those three make a request traceable end to end on our side.