API Reference
API Reference

Request Errors

Routific uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error based on the information provided in the request (for example a required parameter missing from the request). Codes in the 5xx range indicate an error with Routific's servers, these tend to be rare.

Some 4xx errors can be handled programmatically based on the error type and message returned in the body of the response.

HTTP Status CodeDescription
200 - OKEverything worked as expected.
400 - Bad RequestThe request validation failed, most likely due to a missing mandatory parameter
401 - UnauthorizedAPI key is either invalid or missing from the request
403 - ForbiddenAPI key doesn't have the required permissions to perform the request
404 - Not FoundRequested endpoint or resource doesn't exist
50X - Server ErrorsSomething went wrong inside Routific's servers

Optimization Errors

Some optimization requests submitted to Routific may fail due to some internal error. When this happens the status field in the optimization response is set to failed along with a brief message describing the cause for failure in the error field.

{
    "actionUuid": "52fa21311a8-e99d-4c62-b178-11c9b18f350a",
    "actionName": "OptimizeDate",
    "error": "an error reason for failed status",
    "status": "failed",
    .....
}