OpenAPI returns JSON data by default. A few stream-returning interfaces (such as media download, tiles) will be explicitly documented in the interface specification and will return binary streams directly.Response Envelope#
Normal responses are uniformly in the three-part structure of code / data / message. Where code is the business status code (0 indicates success, non-zero indicates failure), data is the business data returned by the interface, and message is the error description on failure. The wording may change with versions. Please use code as the basis for judgment and do not parse message.Relationship Between HTTP Status Code and Business code#
As long as the request is normally processed by the server, the HTTP status code is usually 200, and the business success or failure is indicated by code in the body:HTTP 200 + code = 0 → Success
HTTP 200 + code != 0 → Business failure, handle according to error code
HTTP 401 → Authentication Token missing / invalid / expired
HTTP 403 → Authentication passed but the current user has no permission for the resource
HTTP 400 → Request parameter error
HTTP 5xx → Server-side exception, exponential backoff retry is recommended
Parsing Recommendations#
The caller first makes a general judgment by the HTTP status code, then reads code in the body to obtain the business result. For the complete definition of error codes, see Error Codes. Modified at 2026-06-15 14:32:10