Skip to content

Response Envelope

All REST APIs return JSON. Clients should read both the HTTP status code and the code field in the response body.

Fields

FieldTypeRequiredDescription
codestringYesBusiness code. Both success and error codes use uppercase underscore format
messagestringYesHuman-readable description for display, logs, and troubleshooting only
requestIdstringYesRequest ID to provide during troubleshooting
dataobjectRequired for success responsesResponse data for successful requests. This field is omitted in error responses

Client Rules

  • Clients must branch on HTTP status and code
  • Clients must not branch on message
  • message may change as wording is refined, but code must remain stable
  • Error responses currently do not include field-level error details

Success Response

json
{
  "code": "SUCCESS",
  "message": "OK.",
  "requestId": "req_001",
  "data": {}
}

Error Response

json
{
  "code": "AUTH_INVALID",
  "message": "Authentication credentials are invalid.",
  "requestId": "req_001"
}

Design Notes

  • Success and error responses keep a unified outer shape
  • Error responses omit data to avoid clients misreading an empty response data
  • COMMAND_ACCEPTED is a success-class business code and must include data
  • The current version does not return field-level error details
Docs buildVersion v1.2.19-20260602-174859-60
Copyright © 2026 WLTE