ChartVoyant Developers
Markdown

Core Guides

Rate limits & error codes

Every ChartVoyant surface enforces two simultaneous token-bucket windows — a per-second burst and a sustained window — and returns structured, PHI-free error payloads with a correlation ID.

Rate limit budgets across all surfaces

Surface & ScopeBurstSustained / CapWhen Exceeded
REST API & Practice MCP — per cvk_ key150 req / sec3,600 req / minHTTP 429 + Retry-After
REST API & Practice MCP — per practice total400 req / sec12,000 req / minHTTP 429 + Retry-After
Self-serve sandbox key — per key38 req / sec900 req / min · 5,000 req / dayHTTP 429 + Retry-After
FHIR R4 — per SMART token300 req / sec9,000 req / minHTTP 429 + Retry-After
FHIR R4 — per practice total600 req / sec18,000 req / minHTTP 429 + Retry-After
SMART Write — per app per practice—30 writes / min (500 / day full-access)HTTP 429 + Retry-After: 60
Patient MCP — per cvpk_ key20 req / sec300 req / min · 5,000 req / hrHTTP 429 + Retry-After
HL7 v2 Interface — per interfaceId20 msg / sec600 msg / min (max 2 MiB/msg)HTTP 200 with generic MSA|AE (ERR 207)
Public Practice Status — per caller IP5 req / sec20 req / minHTTP 429

Need a higher limit or a migration window? Email info@chartvoyant.com with your key prefix or app ID, traffic pattern, and peak rate. Higher limits carry no fee.

Handling 429 & exponential backoff

Always inspect Retry-After (integer seconds) on 429 responses and add small random jitter before retrying. For 5xx transient errors, retry idempotent reads with exponential backoff and log the correlationId.

Error payload formats

ChartVoyant REST API (application/json)

{
  "error": {
    "code": "forbidden",
    "message": "This API key is read-only; POST is not permitted",
    "correlationId": "01J8ZCSYNTHETIC0001"
  }
}

FHIR R4 & SMART Write (application/fhir+json)

{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "forbidden",
      "diagnostics": "Requested resource is outside the granted SMART scope."
    }
  ]
}

Searchable API error codes

ChartVoyant uses stable string identifiers in error.code rather than opaque numeric codes. When escalating to support, share the code and correlationId — never patient data.

CodeHTTPMeaningRecommended Client Action
bad_request400Malformed JSON, invalid UUID/date format (use YYYY-MM-DD), missing required field, or out-of-order workflow step.Inspect error.message, fix request payload, and do not retry unchanged.
validation_failed400Domain validation failed (field-level constraints, incomplete attestation, invalid NPI/code).Inspect error.fields or error.details and fix the invalid fields.
unauthorized401Missing, unknown, expired, or revoked credential, or wrong secret. Details are intentionally uniform.Verify Authorization: Bearer header, check key expiry, or re-run OAuth authorization.
forbidden403Valid credential, but action is not permitted (read_only key attempting write, out-of-scope route, or suspended office).Request appropriate scope/access level or use an allowed route; do not retry blindly.
ai_addon_disabled403The optional AI assistant add-on is not enabled for the office.Practice administrator must enable the add-on first.
module_disabled403An optional office module (such as GLP-1) is not enabled for this tenant.Practice administrator can enable the module under Admin → Modules.
not_found404Record does not exist in the key's bound practice (records at another practice also return 404, never 403).Verify the UUID belongs to the authenticated tenant.
method_not_allowed405HTTP method not supported on this route (for example GET or DELETE on /api/v1/mcp).Use the documented HTTP verb.
conflict409Concurrent version modification, duplicate unique identifier, or an asynchronous export/job already running.Re-read current resource state before retrying; never blindly re-POST non-idempotent writes.
rate_limited429Per-second burst, per-minute sustained, or daily cap exceeded.Sleep for Retry-After seconds plus jitter, and reduce concurrency.
internal500Unexpected server error (generic message to prevent PHI leakage).Retry idempotent requests with backoff; report persistent failures with correlationId.
service_unavailable503Upstream dependency or kill-switch (such as paused sandbox issuance) is unavailable.Honor Retry-After if present or check status.chartvoyant.com.