Error Response Format
All Zochil API errors follow a consistent structure to help you handle them programmatically:HTTP Status Codes
The API uses standard HTTP status codes to indicate the success or failure of requests:| Status Code | Description |
|---|---|
200 | OK - Request succeeded |
201 | Created - Resource created successfully |
204 | No Content - Request succeeded, no response body |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Authentication required |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource not found |
409 | Conflict - Resource conflict (e.g., duplicate email) |
422 | Unprocessable Entity - Validation errors |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server error |
503 | Service Unavailable - Temporary service outage |
Common Error Codes
Authentication Errors
Validation Errors
Resource Errors
Business Logic Errors
Error Handling Best Practices
1. Always Check the Response Status
2. Handle Different Error Types
3. Implement Retry Logic
4. User-Friendly Error Messages
Rate Limiting
The API implements rate limiting to ensure fair usage:- Standard endpoints: 100 requests per minute
- Authentication endpoints: 10 requests per minute
- Upload endpoints: 10 requests per minute

