A description of error objects and status codes

Plutto uses standard HTTP response codes to indicate the success or failure of an API request.

As a rule of thumb, Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error in the provided information (e.g., a required parameter was omitted, a validation error has occurred, etc.). Codes in the 5xx range indicate an error with Plutto servers.

Some 4xx errors will include a brief explanation of the error in the response body.

The error object has the following keys:

{
    "error": {
        "type": "invalid_request_error",
        "code": "resource_not_found",
        "message": "The requested resource cannot be found. This item does not exist or has been previously removed.",
        "detail": "Couldn't find Validation resource",
        "param": null,
        "request_id": null,
        "docs_url": "https://plutto.readme.io"
    }
}

Error types

Error CodeHTTP CodeError TypeMessage
bad_request400invalid_request_errorThe request was unacceptable, often due to missing a required parameter.
unprocessable_entity422invalid_request_errorYour request was understood, but we were not able to process it. Please fix it before repeating
unauthorized401authentication_errorNo valid API key provided.
resource_not_found404invalid_request_errorThe requested resource cannot be found. This item does not exist or has been previously removed.
internal_server_error500api_errorSomething went wrong by our side. We're probably already looking into it.
service_unavailable503service_unavailable_errorThe server is currently unavailable. Please try again later.

📘

External sources unavailable

When an external data source is down (Registro Empresas y Sociedades for example), and the request fail to process due that data source, Plutto API will respond with a 503 (service_unavailable_error).