Errors
Standard error responses from the Factory OS API.
The API uses conventional HTTP status codes. Error bodies follow a consistent shape.
Error shape
{
"statusCode": 400,
"message": "quantityTarget must be a positive integer",
"error": "Bad Request"
}Validation errors (from class-validator) return an array of messages:
{
"statusCode": 400,
"message": [
"productId should not be empty",
"quantityTarget must be >= 1"
],
"error": "Bad Request"
}Status codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
204 | No content (success, empty body) |
400 | Validation error or malformed request |
401 | Missing or invalid bearer token |
403 | Authenticated but not authorized for this resource |
404 | Resource not found or not visible to your org |
409 | Conflict (e.g., duplicate slug) |
429 | Rate limit exceeded — see Retry-After |
500 | Unexpected server error (tracked, retry later) |
Idempotency
Mutation endpoints are not yet idempotent. If a POST fails with a 5xx or network error, inspect the resource before retrying to avoid duplicates.
Idempotency key support is on the roadmap.