Standard error envelope
The code field mirrors the HTTP status. The error object contains the API Partner-facing message. The details field is nullable. For Full API Integration and other idempotent writes, branch on error.details.code (for example CONSENT_GRANT_REQUIRED, FLOW_ENDPOINT_MISMATCH, or QUESTIONNAIRE_VALIDATION_FAILED). Human-readable messages may change.
{
"code": 403,
"data": null,
"error": {
"message": "Missing required scope(s): write:orders",
"details": null,
"path": "/v1/orders",
"timestamp": "2026-03-10T10:00:00.000Z",
"request_id": "req_1234567890"
}
}Active Full API Integration idempotency is the exception: HTTP 202 returns the stable identifier in data.code. It is a success envelope, so read Retry-After, wait, and retry the exact same request.
{
"code": 202,
"data": {
"status": "in_progress",
"code": "IDEMPOTENCY_IN_PROGRESS",
"retry_after_seconds": 7
},
"error": null
}When an appointment form is not ready yet, use PHYSICIAN_ORDER_PENDING from the error details to keep monitoring the appointment and retry form retrieval only when the response permits it.