Skip to content

SunCharts Connect API

Notes

Connect API 1.1.0 2 operations openapi.json ↓

# Create DocumentReference

POST /api/v1/connections/{connection_id}/fhir/DocumentReference

Access End-user access token

Parameters

Name In Type Details
connection_id required path string (uuid)

Request body application/fhir+json · required

Body: object

Responses

201 Created application/fhir+json

Body: object

default Error (neutral code) application/json
Fields Error · 5
Field Type Details
error required string Stable machine code. Known values: `unauthorized`, `forbidden`, `not_found`, `bad_request`, `conflict`, `rate_limited`, `mfa_required`, `mfa_invalid`, `mfa_enrollment_required`, `openemr_link_required`, `openemr_relink_required`, `upstream_error`, `internal`. New codes may be added within v1: treat unknown values like the HTTP status.
connection_id string EHR connection that needs (re)linking (on `openemr_link_required` / `openemr_relink_required`)
link string How to link the connection (on `openemr_link_required` / `openemr_relink_required`)
message string Human-readable detail (do not branch on it; on 409 the text before the first `:` is a sub-code)
retry_after integer Seconds to wait (on `rate_limited`; also sent as `Retry-After`)

Example call

curl -X POST "https://sandbox-api.suncharts.app/api/v1/connections/{connection_id}/fhir/DocumentReference" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @body.json