Errors
The error object of the HR API and the codes that say what went wrong.
On this page
An error is an HTTP status and a JSON object whose code never changes its meaning.
The error object
| Field | Meaning |
|---|---|
code | A stable code for the cause. Act on this. |
message | A sentence to read in your logs. It can change, so do not show it to the people who use your software and do not match on it. |
fields | On a 400, each field that is wrong and why. Absent otherwise. |
requestId | The identifier of this request. Quote it when you ask us for help. |
Every answer, an error or not, carries the header X-RDC-Request-Id with the same value as requestId.
Codes every product shares
| Status | Code | Meaning | Retry |
|---|---|---|---|
400 | invalid_request | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. fields names each one. | No. Fix the request. |
401 | unauthorized | The token is missing, expired or not ours. | After you get a new token. |
403 | forbidden | The token does not give access to this company or operation. | No. |
404 | <thing>_not_found | The record does not exist for this company. | No. |
409 | revision_conflict | expectedRevision is older than the record. | Read the record again, then send a new operation. |
409 | operation_reused | This operationId was sent before with another body. | No. |
422 | A code of the product, such as blocked_by_checks | The request is well formed and a rule of the product refuses it. | No. The code says what to change. |
429 | rate_limited | Too many requests. Retry-After gives the seconds. | Yes, after the pause. |
503 | unavailable | The service cannot answer now. | Yes, with the same operationId. |
Codes of HR
| Status | Code | Meaning |
|---|---|---|
404 | employee_not_found | The person does not exist. |
404 | leave_request_not_found | The leave request does not exist. |
404 | step_not_found | The step is not one of the steps of the onboarding checklist. |
404 | manager_not_found | The manager is not a person of your account. |
404 | department_not_found | The department is not one of the departments of your account. |
404 | workplace_not_found | The workplace is not one of the workplaces of your account. |
404 | onboarding_not_found | The person has no onboarding checklist. Every hire made through the API has one. |
404 | document_not_found | The document does not exist. |
404 | operation_not_found | No change was recorded under this operationId. |
404 | event_not_found | The event does not exist, or it has not been delivered to a subscription yet. |
404 | subscription_not_found | The subscription does not exist in your account. |
422 | not_approver | The person named in actorId is neither the approver of the request nor the HR lead. |
422 | not_allowed | The person named in actorId may not cancel this request, or may not issue documents. Only the person, the approver or the HR lead cancels a request; only the HR lead issues a document. |
422 | own_request | The person named in actorId is the person who made the request. |
422 | not_step_owner | The person named in actorId is neither the owner of the step nor the HR lead. |
422 | external_id_taken | Another person already has this externalId. |
422 | not_started | The first day of work of the person is later than the day of the request. |
422 | employment_ended | The person has a last day, or has left. Their periods of employment do not change any more, and no document is issued after the last day. |
422 | not_after_current | The effectiveFrom is on or before the first day of the period that runs. Earlier periods are not rewritten. |
422 | already_offboarding | The person already has a last day. |
422 | leave_after_last_day | A pending or approved request ends after the last day. Cancel it first. |
422 | before_start | The leave starts before the person's first day of work. |
422 | after_last_day | The leave ends after the person's last day of work. |
422 | leave_overlaps | A pending or approved request of the same person covers some of these days. |
422 | over_balance | The request counts more working days than the balance of annual leave. It is refused when it is made and again when it is approved. |
422 | not_pending | The request was already decided. |
422 | request_closed | The request is rejected or cancelled and does not change any more. |
422 | leave_started | An approved leave is cancelled only before its first day. |
422 | step_blocked | A step that this one waits for is not done. blockedBy of the checklist names it. |
422 | step_done | The step is already done. |
422 | step_not_done | The step is not done, so there is nothing to reopen. |
422 | step_has_dependents | A step that waits for this one is done. Reopen it first. |
422 | name_required | The name is empty, or longer than 120 characters. |
422 | job_required | The job is empty, or longer than 120 characters. |
422 | reason_required | The reason is empty, or longer than 280 characters. |
422 | note_not_valid | The note is empty, or longer than 280 characters. |
422 | kind_not_valid | The kind is not one of the values of the operation. |
422 | date_not_valid | A day is not a real day, or the last day is before the first. |
422 | date_in_the_past | The leave starts before today. Only medical leave is entered for days that are gone, and a hire starts today or later. |
422 | outside_calendar | The days are outside the period the calendar of your account is complete for (getCalendar). |
422 | no_working_days | The days of the request are all weekend days or public holidays, so nothing would be taken. |
422 | not_a_working_day | The startDate is a weekend day or a public holiday. |
422 | salary_not_valid | The grossSalary is not a decimal string greater than zero. |
422 | contract_not_valid | A fixed-term contract has a contractEnd after its first day, and an indefinite one has none. |
422 | no_change | The fields sent are the ones the period already has. |
422 | same_person | The manager is the person themselves. |
The full rule: Developer guide