Error codes
An error always returns an HTTP status and a JSON body:
{ "error": "Readable message", "code": "internal_error" }error describes the problem; code is only present on some errors and does not
change from one version to the next.
| Status | Meaning | What to do |
|---|---|---|
400 |
Invalid body, empty required field, or a company_id that is not made of 32 hexadecimal characters. |
Correct the request. |
401 |
company_id missing, or header value different from the one in the body. |
Check the Authorization header. |
402 |
Not enough credits to start the journey. The candidate has not been contacted. | Top up the company’s credits, then try again. |
409 |
The job offer is already linked to another company (ats_offer_owned_by_another_org). |
Check the job offer ID and the calling company. |
422 |
No session created in a batch: all candidates were rejected. | Read the returned reasons and correct the data. |
500 |
Internal error (code: internal_error), with no details. |
Try again later. An assignment can be replayed with no risk of duplicates. |
Rejection reasons in a batch
Section titled “Rejection reasons in a batch”In a batch, each rejected candidate appears in failed with their reason (reason)
and, when there is one, a readable detail (detail):
| Reason | Meaning |
|---|---|
INVALID_DATA |
Impossible phone number, missing e-mail address or unreadable call date. |
DUPLICATE_PHONE_IN_BATCH |
The same number appears twice in the batch. |
DUPLICATE_ACTIVE_SESSION |
The candidate already has an active session for this assessment. |
INSUFFICIENT_CREDITS |
The company no longer has enough credits. |

