Status codes
Learn about status codes and errors of Proactis APIs
In the event of a problem, the status will contain the error code, while the body of the response will usually contain additional information about the problem that was encountered.
Status codes
| Code | Explanation |
|---|---|
| 200 | Success |
| 201 | Created |
| 202 | Accepted |
| 400 | Bad Request: The server is unable to process the request because of invalid information in the request. |
| 401 | Unauthorized: The supplied OAuth 2.0 token or API-key is missing, incorrect or expired. |
| 403 | Forbidden: You are using an API which your OAuth 2.0 token does not have access to. |
| 404 | Not Found: The requested item could not be found. |
| 405 | Method Not Allowed: You are attempting to use an unauthorized method. |
| 429 | Too Many Requests: You have made too many requests in a given amount of time; please retry later. |
| 500 | Internal Server Error: There is a problem with our server. Please try again later. |
| 503 | Service Unavailable: The Proactis API is temporarily offline for maintenance. Please try again later. |
In general, if the status returned is in the 200 range, it indicates that the request was fulfilled successfully and that no error was encountered.
Return codes in the 400 range typically indicate that there was an issue with the request that was sent. Among other things, this could mean that you did not authenticate correctly, that you are requesting an action that you do not have authorization for, that the object you are requesting does not exist, or that your request is malformed.
If you receive a status in the 500 range, this generally indicates a server-side problem. This means that we are having an issue on our end and cannot fulfill your request currently.
400 and 500 level error responses will include a JSON or XML object in their body, which can include the following attributes:
| Name | Type | Description |
|---|---|---|
| status | string | A short identifier corresponding to the HTTP status code returned. For example, the status for a response returning a 404 status code would be NOT_FOUND. |
| message | string | A message providing additional information about the error, including details to help resolve it when possible. |
| details | string | Optionally, some endpoints may include details about the error. |
Example error response
- JSON
- XML
- cXML
{
"status": "NOT_FOUND",
"message": "COSTCENTER with ID \"test\" not found",
"details": []
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error xmlns="http://api.proactis.com/common">
<status>NOT_FOUND</status>
<message>COSTCENTER with ID "test" not found</message>
<details/>
</error>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.011/cXML.dtd">
<cXML payloadID="[email protected]" timestamp="2023-08-01T01:01:41+0000" xml:lang="en">
<Response>
<Status code="404" text="Not Found">No supplier found with id: RandomSupplier</Status>
</Response>
</cXML>
Status codes in asynchronous push responses
When a push operation is created in the API Proactis might return a 201 Created or 202 Accepted code, which implies that the request has been accepted for processing, but the processing has not completed. However, the push API may return a 200 Success code for the push operation successfully created in the Proactis API.