Skip to main content

Common Response Envelope

Every route returns:

{
"status": "success"
}

Field format and behavior:

FieldJSON typeFormatPresence rules
statusstringsuccess or errorAlways present
dataobject/nullRoute-specific dataPresent only for some successful responses
codeinteger/nullError codeTypically 1 on status=error; usually omitted on success
messagestring/nullDiagnostic messageUsually present on status=error; usually omitted on success

Parsing recommendation:

  • Always parse by status first.
  • Treat data as route-specific and optional.
  • Do not rely on message text for business logic; use code and route context.