Quick Start
- Use JSON for request and response bodies with
Content-Type: application/json. - Authenticate as required by the API (e.g. sign, or JWT for Issuing endpoints).
- Handle responses using the numeric
codeandmsgfields.
Request Format
Content Type
- Content-Type:
application/json - Request bodies must be valid JSON. Responses are JSON.
Headers
Some Issuing endpoints may support an
Idempotency-Key header for POST requests. See the endpoint documentation.
Example Request
Response Format
Response Body
All responses use the same structure:- code – Numeric result or error code (e.g. 200 for success).
- msg – Human-readable message (may be localized).
- data – Response payload on success; often
nullon error.
Response Headers
HTTP Status Codes
Error Handling
- Check HTTP status first; treat 4xx and 5xx appropriately.
- Use the numeric code in the body for logic; see Response Codes.
- Log x-request-id when present for support and debugging.
- Retry only on 5xx or 429; fix 4xx requests before retrying.
- Respect Retry-After on 429.