Skip to content

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": { ... }
}
FieldTypeDescription
versionstringAPI version (currently "2.0.0")
timestampnumberUnix timestamp in milliseconds
successbooleantrue for successful requests
codestringResult code ("2000" for success, "2001" for created)
messagestringHuman-readable message
dataobject/array/nullResponse 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

CodeHTTP StatusMeaning
2000200Success
2001201Created
2002202Accepted (async processing)
2000200Success (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 message field is localized based on the Accept-Language header.
  • The timestamp field uses Unix epoch milliseconds (not seconds).
  • The data field is null for 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.

SlaunchX Internal Documentation