Overview
ZKScore API returns structured error responses to help you understand and handle issues effectively.Error Response Format
All errors follow this structure:Common Error Codes
Identity Errors (ZKS-001-xxx)
ZKS-001-001: Identity not foundZKS-001-002: Identity not activatedZKS-001-003: Invalid ZKS ID format
Authentication Errors (ZKS-002-xxx)
ZKS-002-001: Invalid API keyZKS-002-002: API key expiredZKS-002-003: Insufficient permissions
Rate Limit Errors (ZKS-003-xxx)
ZKS-003-001: Rate limit exceededZKS-003-002: Quota exceeded
Score Errors (ZKS-004-xxx)
ZKS-004-001: Score not foundZKS-004-002: Score calculation failed
HTTP Status Codes
| Status | Description | Action |
|---|---|---|
| 400 | Bad Request | Check request parameters |
| 401 | Unauthorized | Verify API key |
| 403 | Forbidden | Check permissions |
| 404 | Not Found | Verify resource exists |
| 429 | Too Many Requests | Implement backoff |
| 500 | Internal Server Error | Retry request |
Error Handling Examples
Best Practices
- Always Check Status Codes: Verify response status before processing
- Implement Retry Logic: Handle temporary failures gracefully
- Log Error Details: Include request IDs for debugging
- Handle Rate Limits: Implement exponential backoff
- Validate Inputs: Prevent errors before making requests