SeamlessHR employs standard HTTP response codes to signify the success or failure of an API request.
Success Status Codes (2xx)
Code | Name | Description |
---|---|---|
200 | OK | The request was successful. |
201 | Created | The resource was successfully created. Confirms a success when creating a new employee, time off request, etc. |
204 | Updated | The request was successful with no content |
Client Error Status Codes (4xx)
Code | Name | Description |
---|---|---|
400 | Bad Request | The request was invalid or could not be understood by the server. Resubmitting the request will likely result in the same error. |
401 | Unauthorized | This can be a result of a missing API key, incorrect key name, or invalid key value etc |
403 | Forbidden | The application is attempting to perform an action it does not have privileges to access. Verify your API key belongs to an enabled user with the required permissions. |
404 | Not Found | The resource was not found with the given identifier. Either the URL given is not a valid API or the ID of the object specified in the request is invalid. |
406 | Not Acceptable | The request contains references to non-existent fields. |
409 | Conflict | The request attempts to create a duplicate. For employees, duplicate emails are not allowed. For lists, duplicate values are not allowed. |
429 | Limit Exceeded | The account has reached its employee limit. No additional employees could be added. |
Server Error Status Codes (5xx)
Code | Name | Description |
---|---|---|
500 | Internal Error | The server encountered an error while processing your request and failed. Retrying may be appropriate. |
502 | Gateway Error | The load balancer or web server had trouble connecting to the server. Please try the request again. |
503 | Unavailable | This endpoint is currently unavailable. Retrying may be appropriate. Commonly, this is due to rate limiting, and a "Retry-After" header may be available. |