A list of status codes returned by this API and what they mean.
The Contractors Cloud API follows the standards that are outlined in section 10 of RFC 2616. You should always rely on the returned status code to determine if a request was successful or not rather than checking the response payload. The following status codes are supported by this API:
Supported status codes
Code | Description |
---|---|
200 OK | Your request went through. Everything is fine. |
201 Created | Your request went through and a resource has been created. Everything is fine. |
204 No Content | Your request went through, the server just has nothing to return back to you. Everything is fine. |
400 Bad Request | The server could not understand your request due to invalid syntax. You probably need to fix your payload. |
401 Unauthorized | You must be authenticated to get what you are requesting. |
403 Forbidden | You do not have the appropriate privileges to request the response. |
404 Not Found | The server cannot find what you are requesting. |
405 Method Not Allowed | The request you are performing cannot be processed by the server or has not been implemented yet. |
422 Unprocessable Entity | Your request payload is syntactically correct but contains invalid data. |
429 Too Many Requests | You have sent too many requests in a given amount of time. Slow the f down. |
500 Internal Server Error | Any 500 level status codes represent a server error. That's on us. |
503 Service Unavailable | The API is currently down for maintenance or upgrades. Unless otherwise noted, downtime usually lasts anywhere from a few seconds to a few minutes. |
Common response codes
š 422 Unprocessable Entity
A 422 response status code is probably the most common error code you will experience. This typically occurs when you attempt to create or update a resource with invalid data. For example, if you try to create a Project without providing a "company_id" field, your request will fail with a 422. Verify that your request payload contains all required fields to create or update the resource. Additionally, a 422 response will have an array of errors for you to inspect that will tell you exactly what needs to be fixed in your payload.
Rate limiting
Currently, you are allowed a maximum of 300 API requests per minute. This limit may change without notice. Performing more API requests than this limit will result in a 429 response status code being returned. If you or your integration requires increased limits, please contact us.