Standard Response Formats
{
"data": {
// Response payload
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"version": "1.0",
"correlationId": "uuid"
}
}
{
"error": {
"code": "ERROR_CODE",
"message": "Human readable message",
"details": {},
"timestamp": "2024-01-15T10:30:00Z",
"correlationId": "uuid"
}
}
{
"data": [],
"pagination": {
"page": 1,
"pageSize": 20,
"totalPages": 5,
"totalItems": 100,
"hasNext": true,
"hasPrevious": false
}
}
Code |
Usage |
200 |
Successful GET, PUT, PATCH |
201 |
Successful POST (resource created) |
204 |
Successful DELETE |
400 |
Bad Request (validation errors) |
401 |
Unauthorized (authentication required) |
403 |
Forbidden (insufficient permissions) |
404 |
Not Found |
409 |
Conflict (duplicate resource) |
422 |
Unprocessable Entity (business rule violation) |
500 |
Internal Server Error |
503 |
Service Unavailable |
Rate Limit Headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1609459200
X-RateLimit-Window: 3600
-
Authenticated Users: 1000 requests/hour
-
Anonymous Users: 100 requests/hour
-
Payment Endpoints: 10 requests/minute
-
Admin Endpoints: 500 requests/hour