Skip to main content

Errors

All error responses use a consistent JSON structure.

Error Response Format

{
"error": {
"code": "not_found",
"message": "Product with ID a1b2c3d4-... was not found"
}
}
FieldTypeDescription
error.codestringMachine-readable error code
error.messagestringHuman-readable description of the error

HTTP Status Codes

StatusNameDescription
200OKThe request succeeded. Response body contains the result.
201CreatedA resource was successfully created. Response body contains the new resource.
204No ContentThe request succeeded with no response body (used for DELETE).
400Bad RequestThe request body or parameters are invalid. Check error.message for details.
401UnauthorizedThe API key is missing, invalid, or expired.
404Not FoundThe requested resource does not exist.
500Internal Server ErrorAn unexpected server error occurred. Contact support if this persists.

Common Error Codes

CodeHTTP StatusDescription
unauthorized401API key missing or invalid
not_found404Resource does not exist
validation_error400Request body failed validation
invalid_parameter400A query parameter has an invalid value
internal_error500Unexpected server error

Example: Validation Error

When you send a POST /v1/products with a missing required field:

{
"error": {
"code": "validation_error",
"message": "Field 'name' is required"
}
}

Example: Not Found

When you request a product that does not exist:

{
"error": {
"code": "not_found",
"message": "Product with ID a1b2c3d4-e5f6-7890-abcd-ef1234567890 was not found"
}
}