Skip to content

SunCharts EHR API

Immunizations

EHR API as of 26.11.11.41 7 operations openapi.json ↓

# immunizationPerformers

GET /api/v1/immunizations/performers

Staff only; active local owner/clinician/nurse names and IDs, at most 500 with truncated flag. Actual performer must be explicitly selected, not inferred from recorder.

Access OAuth 2.0 access tokenclinical.read

Responses

200 Success application/json
Fields object · 4
Field Type Details
items required array of object items ≤ 500
display required string
id required string (uuid)
truncated required boolean
Example response placeholder values
{
  "items": [
    {
      "display": "string",
      "id": "00000000-0000-4000-8000-000000000000"
    }
  ],
  "truncated": true
}
400 Invalid/unsupported content or context
401 Authentication required
403 Scope or role denied
404 Record not found in authenticated tenant/patient
409 Version, request identity or immutable-state conflict
500 Atomic write/audit failed

Example call

curl "$EHR_URL/api/v1/immunizations/performers" -H "Authorization: Bearer $ACCESS_TOKEN"

# listImmunizations

GET /api/v1/patients/{patient}/immunizations

Staff only. Patient-scoped UUID keyset pages with explicit next_cursor; an empty list does not establish vaccination status.

Access OAuth 2.0 access tokenclinical.read

Parameters

Name In Type Details
patient required path string (uuid)
_after query string (uuid)
_count query integer
status query string

Responses

200 Success application/json
Fields ImmunizationPage · 32
Field Type Details
items required array of ImmunizationRecord items ≤ 100
content required object or object or object Exactly one occurrence timestamp/date/nonempty historical description. Administered requires timestamp, active authorized local performer, dose, route and site. Not-given requires reason and excludes dose/lot/performer. Secondary reports require report_origin; primary reports omit it. No future occurrence or occurrence before patient birth. Record type cannot change; status changes only through native entered-in-error action.
primary_source required boolean
record_type required string one of administered, historical, not_given
status required string one of completed, not_done, entered_in_error
vaccine_name required string length 1–200
dose ImmunizationDose or null
expiration_date string or null
lot_number string length ≤ 100
manufacturer string length ≤ 200
not_done_reason string length ≤ 1000
notes string length ≤ 10000
occurred_at string or null
occurred_on string or null
occurrence_text string or null length ≤ 200
performer_id string or null
report_origin string length ≤ 200
route string length ≤ 100
site string length ≤ 100
vaccine_code FhirWriteCoding or null
visit_id string or null
created_at required string (date-time)
created_by required string (uuid)
id required string (uuid)
patient_id required string (uuid)
updated_at required string (date-time)
updated_by required string (uuid)
version required integer value ≥ 1
performer_snapshot object or null
display string
id string (uuid)
next_cursor required string or null
Example response placeholder values
{
  "items": [
    {
      "content": {
        "occurred_at": "string",
        "occurred_on": null,
        "occurrence_text": null
      },
      "created_at": "2026-01-15T15:30:00Z",
      "created_by": "00000000-0000-4000-8000-000000000000",
      "id": "00000000-0000-4000-8000-000000000000",
      "patient_id": "00000000-0000-4000-8000-000000000000",
      "updated_at": "2026-01-15T15:30:00Z",
      "updated_by": "00000000-0000-4000-8000-000000000000",
      "version": 1
    }
  ],
  "next_cursor": "00000000-0000-4000-8000-000000000000"
}
400 Invalid/unsupported content or context
401 Authentication required
403 Scope or role denied
404 Record not found in authenticated tenant/patient
409 Version, request identity or immutable-state conflict
500 Atomic write/audit failed

Example call

curl "$EHR_URL/api/v1/patients/{patient}/immunizations" -H "Authorization: Bearer $ACCESS_TOKEN"

# createImmunization

POST /api/v1/patients/{patient}/immunizations

Owner, clinician or nurse and clinical.write; medical assistants have read access only. Exactly matched request UUID replays are actor/content-bound. Every mutation/revision/audit commits atomically; no vaccine administration, registry exchange or clinical decision support is performed by saving.

Access OAuth 2.0 access tokenclinical.write

Parameters

Name In Type Details
patient required path string (uuid)

Request body application/json · required

Fields CreateImmunization · 22
Field Type Details
content required object or object or object Exactly one occurrence timestamp/date/nonempty historical description. Administered requires timestamp, active authorized local performer, dose, route and site. Not-given requires reason and excludes dose/lot/performer. Secondary reports require report_origin; primary reports omit it. No future occurrence or occurrence before patient birth. Record type cannot change; status changes only through native entered-in-error action.
primary_source required boolean
record_type required string one of administered, historical, not_given
status required string one of completed, not_done, entered_in_error
vaccine_name required string length 1–200
dose ImmunizationDose or null
expiration_date string or null
lot_number string length ≤ 100
manufacturer string length ≤ 200
not_done_reason string length ≤ 1000
notes string length ≤ 10000
occurred_at string or null
occurred_on string or null
occurrence_text string or null length ≤ 200
performer_id string or null
report_origin string length ≤ 200
route string length ≤ 100
site string length ≤ 100
vaccine_code FhirWriteCoding or null
visit_id string or null
reason required string length 1–1000
request_id required string (uuid)
Example request body placeholder values
{
  "content": {
    "occurred_at": "string",
    "occurred_on": null,
    "occurrence_text": null
  },
  "reason": "string",
  "request_id": "00000000-0000-4000-8000-000000000000"
}

Responses

200 Success application/json

Headers: ETag

Fields ImmunizationRecord · 30
Field Type Details
content required object or object or object Exactly one occurrence timestamp/date/nonempty historical description. Administered requires timestamp, active authorized local performer, dose, route and site. Not-given requires reason and excludes dose/lot/performer. Secondary reports require report_origin; primary reports omit it. No future occurrence or occurrence before patient birth. Record type cannot change; status changes only through native entered-in-error action.
primary_source required boolean
record_type required string one of administered, historical, not_given
status required string one of completed, not_done, entered_in_error
vaccine_name required string length 1–200
dose ImmunizationDose or null
expiration_date string or null
lot_number string length ≤ 100
manufacturer string length ≤ 200
not_done_reason string length ≤ 1000
notes string length ≤ 10000
occurred_at string or null
occurred_on string or null
occurrence_text string or null length ≤ 200
performer_id string or null
report_origin string length ≤ 200
route string length ≤ 100
site string length ≤ 100
vaccine_code FhirWriteCoding or null
visit_id string or null
created_at required string (date-time)
created_by required string (uuid)
id required string (uuid)
patient_id required string (uuid)
updated_at required string (date-time)
updated_by required string (uuid)
version required integer value ≥ 1
performer_snapshot object or null
display string
id string (uuid)
Example response placeholder values
{
  "content": {
    "occurred_at": "string",
    "occurred_on": null,
    "occurrence_text": null
  },
  "created_at": "2026-01-15T15:30:00Z",
  "created_by": "00000000-0000-4000-8000-000000000000",
  "id": "00000000-0000-4000-8000-000000000000",
  "patient_id": "00000000-0000-4000-8000-000000000000",
  "updated_at": "2026-01-15T15:30:00Z",
  "updated_by": "00000000-0000-4000-8000-000000000000",
  "version": 1
}
400 Invalid/unsupported content or context
401 Authentication required
403 Scope or role denied
404 Record not found in authenticated tenant/patient
409 Version, request identity or immutable-state conflict
422 JSON shape, typed date/timestamp or unsupported field deserialization rejected before the native write boundary
500 Atomic write/audit failed

Example call

curl -X POST "$EHR_URL/api/v1/patients/{patient}/immunizations" -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" -d @body.json

# readImmunization

GET /api/v1/patients/{patient}/immunizations/{id}

Staff, tenant/patient scoped; includes historical performer snapshot.

Access OAuth 2.0 access tokenclinical.read

Parameters

Name In Type Details
patient required path string (uuid)
id required path string (uuid)

Responses

200 Success application/json

Headers: ETag

Fields ImmunizationRecord · 30
Field Type Details
content required object or object or object Exactly one occurrence timestamp/date/nonempty historical description. Administered requires timestamp, active authorized local performer, dose, route and site. Not-given requires reason and excludes dose/lot/performer. Secondary reports require report_origin; primary reports omit it. No future occurrence or occurrence before patient birth. Record type cannot change; status changes only through native entered-in-error action.
primary_source required boolean
record_type required string one of administered, historical, not_given
status required string one of completed, not_done, entered_in_error
vaccine_name required string length 1–200
dose ImmunizationDose or null
expiration_date string or null
lot_number string length ≤ 100
manufacturer string length ≤ 200
not_done_reason string length ≤ 1000
notes string length ≤ 10000
occurred_at string or null
occurred_on string or null
occurrence_text string or null length ≤ 200
performer_id string or null
report_origin string length ≤ 200
route string length ≤ 100
site string length ≤ 100
vaccine_code FhirWriteCoding or null
visit_id string or null
created_at required string (date-time)
created_by required string (uuid)
id required string (uuid)
patient_id required string (uuid)
updated_at required string (date-time)
updated_by required string (uuid)
version required integer value ≥ 1
performer_snapshot object or null
display string
id string (uuid)
Example response placeholder values
{
  "content": {
    "occurred_at": "string",
    "occurred_on": null,
    "occurrence_text": null
  },
  "created_at": "2026-01-15T15:30:00Z",
  "created_by": "00000000-0000-4000-8000-000000000000",
  "id": "00000000-0000-4000-8000-000000000000",
  "patient_id": "00000000-0000-4000-8000-000000000000",
  "updated_at": "2026-01-15T15:30:00Z",
  "updated_by": "00000000-0000-4000-8000-000000000000",
  "version": 1
}
400 Invalid/unsupported content or context
401 Authentication required
403 Scope or role denied
404 Record not found in authenticated tenant/patient
409 Version, request identity or immutable-state conflict
500 Atomic write/audit failed

Example call

curl "$EHR_URL/api/v1/patients/{patient}/immunizations/{id}" -H "Authorization: Bearer $ACCESS_TOKEN"

# correctImmunization

PUT /api/v1/patients/{patient}/immunizations/{id}

Owner, clinician or nurse and clinical.write; medical assistants have read access only. Exactly matched request UUID replays are actor/content-bound. Every mutation/revision/audit commits atomically; no vaccine administration, registry exchange or clinical decision support is performed by saving. Record type/status are unchanged; previous content remains in revisions. Previously recorded performer snapshots survive subsequent staff disablement.

Access OAuth 2.0 access tokenclinical.write

Parameters

Name In Type Details
patient required path string (uuid)
id required path string (uuid)
If-Match required header string Quoted current version; FHIR also accepts W/"n".

Request body application/json · required

Fields CorrectImmunization · 22
Field Type Details
content required object or object or object Exactly one occurrence timestamp/date/nonempty historical description. Administered requires timestamp, active authorized local performer, dose, route and site. Not-given requires reason and excludes dose/lot/performer. Secondary reports require report_origin; primary reports omit it. No future occurrence or occurrence before patient birth. Record type cannot change; status changes only through native entered-in-error action.
primary_source required boolean
record_type required string one of administered, historical, not_given
status required string one of completed, not_done, entered_in_error
vaccine_name required string length 1–200
dose ImmunizationDose or null
expiration_date string or null
lot_number string length ≤ 100
manufacturer string length ≤ 200
not_done_reason string length ≤ 1000
notes string length ≤ 10000
occurred_at string or null
occurred_on string or null
occurrence_text string or null length ≤ 200
performer_id string or null
report_origin string length ≤ 200
route string length ≤ 100
site string length ≤ 100
vaccine_code FhirWriteCoding or null
visit_id string or null
reason required string length 1–1000
request_id required string (uuid)
Example request body placeholder values
{
  "content": {
    "occurred_at": "string",
    "occurred_on": null,
    "occurrence_text": null
  },
  "reason": "string",
  "request_id": "00000000-0000-4000-8000-000000000000"
}

Responses

200 Success application/json

Headers: ETag

Fields ImmunizationRecord · 30
Field Type Details
content required object or object or object Exactly one occurrence timestamp/date/nonempty historical description. Administered requires timestamp, active authorized local performer, dose, route and site. Not-given requires reason and excludes dose/lot/performer. Secondary reports require report_origin; primary reports omit it. No future occurrence or occurrence before patient birth. Record type cannot change; status changes only through native entered-in-error action.
primary_source required boolean
record_type required string one of administered, historical, not_given
status required string one of completed, not_done, entered_in_error
vaccine_name required string length 1–200
dose ImmunizationDose or null
expiration_date string or null
lot_number string length ≤ 100
manufacturer string length ≤ 200
not_done_reason string length ≤ 1000
notes string length ≤ 10000
occurred_at string or null
occurred_on string or null
occurrence_text string or null length ≤ 200
performer_id string or null
report_origin string length ≤ 200
route string length ≤ 100
site string length ≤ 100
vaccine_code FhirWriteCoding or null
visit_id string or null
created_at required string (date-time)
created_by required string (uuid)
id required string (uuid)
patient_id required string (uuid)
updated_at required string (date-time)
updated_by required string (uuid)
version required integer value ≥ 1
performer_snapshot object or null
display string
id string (uuid)
Example response placeholder values
{
  "content": {
    "occurred_at": "string",
    "occurred_on": null,
    "occurrence_text": null
  },
  "created_at": "2026-01-15T15:30:00Z",
  "created_by": "00000000-0000-4000-8000-000000000000",
  "id": "00000000-0000-4000-8000-000000000000",
  "patient_id": "00000000-0000-4000-8000-000000000000",
  "updated_at": "2026-01-15T15:30:00Z",
  "updated_by": "00000000-0000-4000-8000-000000000000",
  "version": 1
}
400 Invalid/unsupported content or context
401 Authentication required
403 Scope or role denied
404 Record not found in authenticated tenant/patient
409 Version, request identity or immutable-state conflict
422 JSON shape, typed date/timestamp or unsupported field deserialization rejected before the native write boundary
428 Current If-Match required
500 Atomic write/audit failed

Example call

curl -X PUT "$EHR_URL/api/v1/patients/{patient}/immunizations/{id}" -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" -d @body.json

# immunizationEnteredInError

POST /api/v1/patients/{patient}/immunizations/{id}/entered-in-error

Owner, clinician or nurse and clinical.write; medical assistants have read access only. Exactly matched request UUID replays are actor/content-bound. Every mutation/revision/audit commits atomically; no vaccine administration, registry exchange or clinical decision support is performed by saving. Terminal error marking; record cannot be reopened or deleted.

Access OAuth 2.0 access tokenclinical.write

Parameters

Name In Type Details
patient required path string (uuid)
id required path string (uuid)
If-Match required header string Quoted current version; FHIR also accepts W/"n".

Request body application/json · required

Fields ImmunizationError · 2
Field Type Details
reason required string length 1–1000
request_id required string (uuid)
Example request body placeholder values
{
  "reason": "string",
  "request_id": "00000000-0000-4000-8000-000000000000"
}

Responses

200 Success application/json

Headers: ETag

Fields ImmunizationRecord · 30
Field Type Details
content required object or object or object Exactly one occurrence timestamp/date/nonempty historical description. Administered requires timestamp, active authorized local performer, dose, route and site. Not-given requires reason and excludes dose/lot/performer. Secondary reports require report_origin; primary reports omit it. No future occurrence or occurrence before patient birth. Record type cannot change; status changes only through native entered-in-error action.
primary_source required boolean
record_type required string one of administered, historical, not_given
status required string one of completed, not_done, entered_in_error
vaccine_name required string length 1–200
dose ImmunizationDose or null
expiration_date string or null
lot_number string length ≤ 100
manufacturer string length ≤ 200
not_done_reason string length ≤ 1000
notes string length ≤ 10000
occurred_at string or null
occurred_on string or null
occurrence_text string or null length ≤ 200
performer_id string or null
report_origin string length ≤ 200
route string length ≤ 100
site string length ≤ 100
vaccine_code FhirWriteCoding or null
visit_id string or null
created_at required string (date-time)
created_by required string (uuid)
id required string (uuid)
patient_id required string (uuid)
updated_at required string (date-time)
updated_by required string (uuid)
version required integer value ≥ 1
performer_snapshot object or null
display string
id string (uuid)
Example response placeholder values
{
  "content": {
    "occurred_at": "string",
    "occurred_on": null,
    "occurrence_text": null
  },
  "created_at": "2026-01-15T15:30:00Z",
  "created_by": "00000000-0000-4000-8000-000000000000",
  "id": "00000000-0000-4000-8000-000000000000",
  "patient_id": "00000000-0000-4000-8000-000000000000",
  "updated_at": "2026-01-15T15:30:00Z",
  "updated_by": "00000000-0000-4000-8000-000000000000",
  "version": 1
}
400 Invalid/unsupported content or context
401 Authentication required
403 Scope or role denied
404 Record not found in authenticated tenant/patient
409 Version, request identity or immutable-state conflict
422 JSON shape, typed date/timestamp or unsupported field deserialization rejected before the native write boundary
428 Current If-Match required
500 Atomic write/audit failed

Example call

curl -X POST "$EHR_URL/api/v1/patients/{patient}/immunizations/{id}/entered-in-error" -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" -d @body.json

# immunizationRevisions

GET /api/v1/patients/{patient}/immunizations/{id}/revisions

Staff; up to 100 immutable attributed revision snapshots with truncated flag.

Access OAuth 2.0 access tokenclinical.read

Parameters

Name In Type Details
patient required path string (uuid)
id required path string (uuid)

Responses

200 Success application/json
Fields object · 39
Field Type Details
items required array of ImmunizationRevision items ≤ 100
actor_id required string (uuid)
author_label required string or null Current tenant staff directory label, not a historical identity snapshot; immutable actor_id remains authoritative.
created_at required string (date-time)
immunization_id required string (uuid)
reason required string
snapshot required ImmunizationRecord
content required object or object or object Exactly one occurrence timestamp/date/nonempty historical description. Administered requires timestamp, active authorized local performer, dose, route and site. Not-given requires reason and excludes dose/lot/performer. Secondary reports require report_origin; primary reports omit it. No future occurrence or occurrence before patient birth. Record type cannot change; status changes only through native entered-in-error action.
primary_source required boolean
record_type required string one of administered, historical, not_given
status required string one of completed, not_done, entered_in_error
vaccine_name required string length 1–200
dose ImmunizationDose or null
expiration_date string or null
lot_number string length ≤ 100
manufacturer string length ≤ 200
not_done_reason string length ≤ 1000
notes string length ≤ 10000
occurred_at string or null
occurred_on string or null
occurrence_text string or null length ≤ 200
performer_id string or null
report_origin string length ≤ 200
route string length ≤ 100
site string length ≤ 100
vaccine_code FhirWriteCoding or null
visit_id string or null
created_at required string (date-time)
created_by required string (uuid)
id required string (uuid)
patient_id required string (uuid)
updated_at required string (date-time)
updated_by required string (uuid)
version required integer value ≥ 1
performer_snapshot object or null
display string
id string (uuid)
version required integer value ≥ 1
truncated required boolean
Example response placeholder values
{
  "items": [
    {
      "actor_id": "00000000-0000-4000-8000-000000000000",
      "author_label": "string",
      "created_at": "2026-01-15T15:30:00Z",
      "immunization_id": "00000000-0000-4000-8000-000000000000",
      "reason": "string",
      "snapshot": {
        "content": {
          "occurred_at": null,
          "occurred_on": null,
          "occurrence_text": null
        },
        "created_at": "2026-01-15T15:30:00Z",
        "created_by": "00000000-0000-4000-8000-000000000000",
        "id": "00000000-0000-4000-8000-000000000000",
        "patient_id": "00000000-0000-4000-8000-000000000000",
        "updated_at": "2026-01-15T15:30:00Z",
        "updated_by": "00000000-0000-4000-8000-000000000000",
        "version": 1
      },
      "version": 1
    }
  ],
  "truncated": true
}
400 Invalid/unsupported content or context
401 Authentication required
403 Scope or role denied
404 Record not found in authenticated tenant/patient
409 Version, request identity or immutable-state conflict
500 Atomic write/audit failed

Example call

curl "$EHR_URL/api/v1/patients/{patient}/immunizations/{id}/revisions" -H "Authorization: Bearer $ACCESS_TOKEN"