API Response
HTTP Status Code Vs Platform Status Code
The AccelerationCloud API does not use standard HTTP response codes.
We want to simplify developers' response handling logic, and response model and totally differentiate the response code from the network and platform. In standard HTTP Code, codes in the 2xx response is successful, a 4xx means that there was an error with the data provided (like an invalid routing number). These errors can sometimes be handled programmatically by your application when we provide an error reason. A 5xx error means we encountered an error in our software, which we will work to fix immediately.
AccelerationCloud platform will handle all the 4xx and 5xx error codes. In this case, we will respond 2xx in the HTTP status code and provide the unified error model to developers.
API Result Model
Sample Response
HTTP/1.1 200 OK
{
"code": 600,
"errorMessage": "Request method 'GET' not supported",
"error": null,
"data": null
}
API Example
FIELD | DESCRIPTION | EXAMPLE |
---|---|---|
code | Status of API Call Response | 200 |
data | Data response from the specific API endpoint | {"name":"Alex"} |
error | Detailed information from the error message | {"name":"Id invalid"} |
errorMessage | The API call failed to respond | "Id invalid" |
Successful Request Codes
The Acceleration Cloud API returns HTTP response codes to clarify the status of each API request.
Successful codes
STATUS CODE | REQUEST TYPE |
---|---|
200 | Successful GET or PATCH or POST or DELETE request |
201 | Successful create a new resource |
Unsuccessful Request Codes
A failed request to the Acceleration Cloud API will result in one of the following status codes. Please review the "errorMessage" field in the error response for additional information about a particular failed request.
Unsuccessful Codes
STATUS CODE | TITLE | REASON | TROUBLESHOOTING |
---|---|---|---|
400 | Bad Request | authentication failed | Check the bearer token you used |
401 | Unauthorized | authentication header missing | Missing bearer token when calling API |
402 | Parameter Invalid | invalid request parameter | Check parameter value or type |
403 | Forbidden | User lacks required permission(s) | Check that the user has API permission and Application Permissions or has authorized the required OAuth scope required for the particular URL. |
404 | Not Found | Incorrect URL or ID | Check that the ID is correct and the user has permission to access it. |
405 | Method Not Allowed | Unsupported HTTP method | Generally, only GET, POST, PATCH, and DELETE are supported. |
409 | Conflict | Action would result in an invalid data state | Check that the "type" field matches that of the URL. |
410 | Gone | The resource was available but has expired | Try making another request to the Jobs API |
415 | Unsupported Media Type | Invalid Content-Type header | Attach "Content-Type" header "application/vnd.api+json". |
429 | Too Many Requests | The request rate limit has been exceeded | Check the "X-RateLimit-Retry-After" header for the number of seconds until the next request can be made. |
500 | Internal Server Error | An unexpected error occurred | Please contact Support if you see this. |
505 | Internal Server Error | Integrity violation | Please contact Support if you see this. |
506 | Internal Server Error | Visibility violation | Please contact Support if you see this. |
Updated about 1 year ago