Appearance
API Response Guide
Response Structure
Our standardized response ensures consistent API communication:
json
{
"status": 200,
"message": "Operation successful",
"timestamp": "2024-11-21T12:34:56Z",
"data": { ... }
}Response Properties
| Property | Type | Description | Example |
|---|---|---|---|
status | number | HTTP/Custom response status code | 200, 403 |
message | string | Additional information on response status | "Operation successful" |
timestamp | datetime | Response generation time | "2024-11-20T12:34:56Z" |
data | any | Requested resource/result | { "user": { ... } } |
Status Code Classifications
Standard HTTP Status Codes
| Category | Range | Meaning | Common Codes |
|---|---|---|---|
| Success | 2xx | Request processed successfully | 200 |
| Client Errors | 4xx | Client-side issues | 400, 401, 403, 404, 22 |
| Server Errors | 5xx | Server-side problems | 500, 503 |
Custom Error Codes
Authentication & Authorization
| Code | Description |
|---|---|
| 10 | Unauthorized access |
| 21 | Missing session token |
| 413 | Invalid session token |
User & Account Errors
| Code | Description |
|---|---|
| 12 | Reserved username |
| 13 | Username duplicate |
| 1001 | Invalid account settings |
| 1002 | Unsupported currency |
System & Infrastructure Errors
| Code | Description |
|---|---|
| 800 | Cache error |
| 900 | Upstream service failure |
| 910 | Downstream service issue |
| 960 | Decoding error |
| 1000 | Retry-able general error |
Troubleshooting and Reporting
- Check Status Code
- Do not assume success. Always check the status code.
- Use the
statusfield for error handling. - Ping the system status page. Outlined at Check Status.
- Use Timestamp for Debugging
- Log response timestamps - used for tracing the request lifecycle.
- Report any discrepancies to the support team.