Errors
The Licentric API uses standard HTTP status codes and returns a consistent error response format for all error conditions.
Error Response Format
All error responses follow the same structure with a human-readable message, a machine-readable error code, and the HTTP status.
Error Response
{
"error": "Human-readable description of the error",
"code": "ERROR_CODE",
"status": 400
}Example Errors
Validation Error
400Invalid request body
json
{
"error": "productId is required",
"code": "VALIDATION_ERROR",
"status": 400
}Authentication Error
401Missing or invalid credentials
json
{
"error": "Invalid or expired API key",
"code": "UNAUTHORIZED",
"status": 401
}Conflict Error
409Invalid state transition
json
{
"error": "Cannot suspend a revoked license",
"code": "CONFLICT",
"status": 409
}HTTP Status Codes
| Status | Title | Description |
|---|---|---|
| 400 | Bad Request | The request body failed validation. Check the error message for details on which fields are invalid. |
| 401 | Unauthorized | Missing or invalid authentication credentials. Verify your API key or license key. |
| 403 | Forbidden | The authenticated key lacks the required scopes for this operation. |
| 404 | Not Found | The requested resource does not exist or has been soft-deleted. |
| 409 | Conflict | Invalid state transition. For example, attempting to suspend an already-revoked license. |
| 422 | Unprocessable Entity | The request is syntactically valid but violates a business rule, such as exceeding machine limits. |
| 429 | Too Many Requests | Rate limit exceeded. Check the Retry-After header for when to retry. |
| 500 | Internal Server Error | An unexpected error occurred. If this persists, contact support. |