Skip to main content

Error Handling

All API errors return a consistent JSON format.

Error Response Format​

{
"code": "error.error_type",
"message": "Human-readable error message"
}

Validation errors include field details:

{
"code": "error.validation",
"message": "Validation failed",
"details": [
{ "field": "licensePlate", "message": "License plate is required" }
]
}

HTTP Status Codes​

CodeDescription
200Success
201Created
204No Content (successful delete)
400Bad Request — Invalid parameters
401Unauthorized — Missing or invalid API key
403Forbidden — No access to resource
404Not Found — Resource doesn't exist
429Too Many Requests — Rate limit exceeded
500Internal Server Error

Common Error Codes​

Authentication​

CodeStatusDescription
error.unauthorized401Invalid or missing API key
error.forbidden403No permission to access resource

Validation​

CodeStatusDescription
error.validation400Request validation failed
error.bad_request400Invalid request format

Resources​

CodeStatusDescription
error.not_found404Resource not found
error.card_not_found404Card does not exist
error.project_not_found404Project does not exist

Card Operations​

CodeStatusDescription
error.card_already_active400Card is already activated
error.card_not_active400Card must be active

Rate Limiting​

CodeStatusDescription
error.rate_limit429Rate limit exceeded

Server​

CodeStatusDescription
error.internal_error500Unexpected server error