Response Format
All responses are JSON with a standard envelope.
Success Response
{
"success": true,
"data": { ... }
}
Paginated Response
{
"success": true,
"data": [ ... ],
"meta": {
"page": 1,
"per_page": 20,
"total": 347,
"total_pages": 18
}
}
Created Response (201)
{
"success": true,
"data": {
"product_id": 58,
"name": "New Product",
"price": 29.99
}
}
No Content Response (204)
DELETE requests return 204 No Content with an empty body on success.
Error Response
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Product not found",
"status": 404
}
}
HTTP Status Codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created (POST success) |
204 | No Content (DELETE success) |
400 | Bad Request — invalid syntax or parameters |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — insufficient permissions or IP blocked |
404 | Not Found |
409 | Conflict — e.g. duplicate email |
422 | Validation Error — missing required fields |
429 | Rate Limited — too many requests |
500 | Internal Server Error |