Overview
Plutto employs standard HTTP response codes to communicate API request outcomes. The framework organizes responses into three categories: 2xx codes indicate success, 4xx codes signal issues with submitted information, and 5xx codes represent server-side problems.
Error Response Structure
The API returns error information in a standardized JSON format:
{
"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"
}
}
Complete Status Codes Reference
| Error Code | HTTP Status | Error Type | Description |
|---|---|---|---|
bad_request | 400 | invalid_request_error | The request was unacceptable, often due to missing a required parameter. |
unauthorized | 401 | authentication_error | No valid API key provided. |
resource_not_found | 404 | invalid_request_error | The requested resource cannot be found. This item does not exist or has been previously removed. |
unprocessable_entity | 422 | invalid_request_error | Your request was understood, but we were not able to process it. Please fix it before repeating. |
internal_server_error | 500 | api_error | Something went wrong by our side. We're probably already looking into it. |
service_unavailable | 503 | service_unavailable_error | The server is currently unavailable. Please try again later. |
Special Cases
External Data Source Failures
When third-party data sources become unavailable (such as Registro Empresas y Sociedades), the API responds with a 503 service unavailability error if the request cannot be processed due to that dependency.
