HTTP response codes
Possible HTTP response codes
The following response codes can be expected from the API and should be handled by consumers.
- 200 OK - A successful call. Will be returned for both GET, POST, PUT and DELETE
- 400 Bad Request See details below
- 401 Unauthorized - Missing Bearer token header or failed authentication
- 403 Forbidden See details below
- 404 Not Found - The endpoint does not exist.
- 422 Unprocessable Entity - Missing required data or malformed data in the input. For example wrong format for filter_str.
- 429 Too Many Requests - Request rate limit hit.
- 500 Internal Error - Something went wrong on our end. Please contact Next support if this happens.
- 503 Service Unavailable - The service is temporarily unavailable and will respond with a Retry-After: <delay-seconds> HTTP header, which should be used for doing retries in the integration. See more info here
Details about error response codes and messages
Endpoint | HTTP Code | Error message | Reason | Fix |
---|---|---|---|---|
POST /voucher/row/ | 400 | The value '4010' in the field 'accountno' does not match a valid record in the Account endpoint. | There is no account with account number 4010 in Next Project | Add an account with the missing account number using endpoint POST /account/ |
All | 403 | access_denied | API was called during server maintenance, release of new Next Project version. Please see https://next-tech.readme.io/docs/planned-downtime | Try again later. Ignore these errors, and configure your integration to not call Next Project API during this time. |
All | 403 | access_denied | Access token has become invalid. | Log in to Next Project Client with the Next Project user that was supplied during setup. Create a new one time key. Use one time key to generate a new access token: https://next-tech.readme.io/docs/generate-an-access-token |
All | 403 | Access denied to module. | API was called during release of new Next Project version. Please see https://next-tech.readme.io/docs/planned-downtime | Try again later. |
PUT /workorderrow/{workorderrow_id} | 400 | Not allowed to edit or delete invoiced rows | The record that is trying to be changed has been included on an invoice that has already been sent to a customer. Change is not allowed. | Report back to user that caused the change if necessary. Otherwise, do nothing. If the record you want to edit has the invoiceid field set, it will not be possible to change the record. |
All | 422 | { "detail": { "loc": [ "filter_str" ], "msg": "Not a valid filter for ProjectGET Schema", "type": "format" } } | The request is wrong, and cannot be processed. "loc" signifies where request is wrong. filter_str means that the filter is the issue. | Please refer to the documentation for the endpoint you have called to double check that the field types you have provided are correct: https://next-tech.readme.io/reference/get_project_project**project_id**get That you use the correct syntax for filtering: https://next-tech.readme.io/docs/filtering, and that you use the correct format for data: https://next-tech.readme.io/docs/formats-and-encoding |
422 examples
In the case of HTTP 422 Unprocessable Entity the body of the response will contain a structured error object in JSON format as in the examples below.
Example 1 - filter string is not valid JSON
{
"detail": {
"loc": [
"filter_str"
],
"msg": "Failed to decode json",
"type": "format"
}
}
Example 2 - field name in the filter is not valid. Please consult the schema for ProjectGet to see what fields are available.
{
"detail": {
"loc": [
"filter_str"
],
"msg": "Invalid filter fields for ProjectGET: {'non existing field'}",
"type": "format"
}
}
Updated 28 days ago