Response Format
All API responses follow a standard JSON envelope.
Success Response
json
{
"version": "2.0.0",
"timestamp": 1711929600000,
"success": true,
"code": "2000",
"message": "Success",
"data": { ... }
}| Field | Type | Description |
|---|---|---|
version | string | API version (currently "2.0.0") |
timestamp | number | Unix timestamp in milliseconds |
success | boolean | true for successful requests |
code | string | Result code ("2000" for success, "2001" for created) |
message | string | Human-readable message |
data | object/array/null | Response payload |
Error Response
json
{
"version": "2.0.0",
"timestamp": 1711929600000,
"success": false,
"code": "AUTH.INVALID_CREDENTIALS",
"message": "Invalid credentials",
"data": null
}When success is false, the code field contains a dot-separated error code (see Error Codes).
Common Success Codes
| Code | HTTP Status | Meaning |
|---|---|---|
2000 | 200 | Success |
2001 | 201 | Created |
2002 | 202 | Accepted (async processing) |
2000 | 200 | Success (including mutation/delete operations that return no data) |
Paginated Response
Endpoints that return collections wrap the result list in a data object with pagination metadata:
json
{
"version": "2.0.0",
"timestamp": 1711929600000,
"success": true,
"code": "2000",
"message": "SUCCESS",
"data": {
"content": [ ... ],
"page": {
"size": 20,
"number": 0,
"totalElements": 47,
"totalPages": 3
}
}
}For details on pagination parameters and behavior, see Pagination.
Validation Error Response
When request validation fails, the data field may contain a map of field-level errors:
json
{
"version": "2.0.0",
"timestamp": 1711929600000,
"success": false,
"code": "VALIDATION.INVALID_PARAMETER",
"message": "Invalid request parameters",
"data": {
"email": ["must not be blank"],
"password": ["size must be between 8 and 128"]
}
}Notes
- The
messagefield is localized based on theAccept-Languageheader. - The
timestampfield uses Unix epoch milliseconds (not seconds). - The
datafield isnullfor error responses and for mutation/delete operations that return no payload. - All delete and mutation endpoints that previously returned HTTP 204 now return HTTP 200 OK with
{"success":true, "data":null}. There is no HTTP 204 response in the current API. - All responses include
Content-Type: application/json;charset=UTF-8.