Aotearoa Immunisation Register (AIR) FHIR Implementation Guide (API-V2)
2.0.0 - release
New Zealand
Aotearoa Immunisation Register (AIR) FHIR Implementation Guide (API-V2) - Local Development build (v2.0.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
The Aotearoa Immunisation Register (AIR) FHIR R4 API (ImmSoT).
API versioning:
Core immunisation event resource. All interactions operate on FHIR Immunization resources conforming to the AIRImmunization profile.
| Code | Verb | URL | Documentation |
|---|---|---|---|
| create | **POST** `[base]/Immunization` Creates a new immunisation event. Performs validation checks before persisting. **Required scope:** `system/Immunization.c` **Request headers:** - `UserID` (optional) – end-user identifier for audit - `FacilityID` (optional) – facility where vaccination took place - `SourceSystemID` (optional) – source system identifier (HIP Integration Application list) - `X-Correlation-ID` (optional) – correlation UUID for tracing - `x-api-key` (required) – API Gateway key - `Api-Version` (optional, default=1) – API version selector (1 or 2) **Responses:** - `201 Created` – immunisation record created; Location and ETag headers returned - `422 Unprocessable Entity` – validation failed (OperationOutcome) - `403 Forbidden` – insufficient scope - `429 Too Many Requests` – rate limit exceeded - `500 Internal Server Error` | ||
| read | **GET** `[base]/Immunization/{ID}` Reads a single immunisation event by its ImmSoT logical ID. Returns the enriched Immunization bundle including Patient, Organization, Practitioner and Location resources when available. **Required scope:** `system/Immunization.r` **Responses:** - `200 OK` – Immunization resource (OrchestrationImmunizationBundle) - `400 Bad Request` - `403 Forbidden` - `404 Not Found` - `429 Too Many Requests` - `500 Internal Server Error` | ||
| update | **PUT** `[base]/Immunization/{ID}` Updates an existing immunisation event. Performs validation and optimistic concurrency check via the `If-Match` header (required, must contain the current versionId ETag). **Required scope:** `system/Immunization.u` or `air-admin/Immunization.u` **Request headers (additional to standard):** - `If-Match` (required) – current versionId ETag, e.g. `"3"` To suppress data-quality re-evaluation for a known-good update, include in the request body `meta.extension` the `dqIgnore: true` flag (see UpdateDQIgnore example). **Responses:** - `200 OK` – updated Immunization resource; data-quality results in meta - `400 Bad Request` - `401 Unauthorized` - `403 Forbidden` - `422 Unprocessable Entity` – validation failure - `500 Internal Server Error` | ||
| history-instance | **GET** `[base]/Immunization/{ID}/_history` Returns all versions of an immunisation event as a FHIR history Bundle (type=history). Each bundle entry is a full Immunization resource snapshot at that version, including data-quality metadata in `meta.extension`. **Required scope:** `system/Immunization.r` or `air-admin/Immunization.r` **Responses:** - `200 OK` – Bundle (type=history) - `400 Bad Request` - `403 Forbidden` - `429 Too Many Requests` - `500 Internal Server Error` | ||
| search-type | **POST** `[base]/Immunization/_search` Searches for immunisation events. Supports two search modes: **Standard NHI search** – requires `patient` parameter (NHI number or full Patient reference). Optional filters: `target-disease`, `status-reason:not-in`, `status:not-in`. Include enriched related resources via `_include`. **Data-quality admin search** – requires `_query=data-quality`, `_lastUpdated` (range or exact), `_offset`, `_count`. Restricted to `air-admin/Immunization.s` scope. The request body should be `application/x-www-form-urlencoded` (not JSON). Both query parameters and form-body parameters are supported. **Required scope:** `system/Immunization.s` or `air-admin/Immunization.s` **Responses:** - `200 OK` – Bundle (type=searchset); total=0 when no records found - `400 Bad Request` - `401 Unauthorized` - `403 Forbidden` - `429 Too Many Requests` - `500 Internal Server Error` |
| Name | Definition | Documentation |
|---|---|---|
| upsert | https://standards.digital.health.nz/fhir/air/OperationDefinition/immunization-upsert | POST Performs an upsert using a deterministic matching algorithm (NHI + occurrence date + vaccine code + indication):
Required scope: Responses: |
| bulk-update | https://standards.digital.health.nz/fhir/air/OperationDefinition/immunization-bulk-update | POST Atomic bulk create/upsert of immunisation events. Request body is a FHIR Parameters resource ( Each parameter entry has name
The entire operation is atomic: if any event fails, the whole request is rejected. Required scope: Responses: |
| match | https://standards.digital.health.nz/fhir/air/OperationDefinition/immunization-match | POST Manually matches an immunisation event to a planned event in the consumer's vaccination schedule. Request body: FHIR Parameters with Required scope: Responses: |
| unmatch | https://standards.digital.health.nz/fhir/air/OperationDefinition/immunization-unmatch | POST Manually unmatches an immunisation event from a planned event. Request body: same structure as Required scope: Responses: |
| Name | Type | Documentation |
|---|---|---|
| patient | reference | Definition: http://hl7.org/fhir/SearchParameter/Immunization-patient NHI number of the patient, or a full Patient reference URL.
When a full URL is provided it is matched against |
| target-disease | token | Definition: http://hl7.org/fhir/SearchParameter/Immunization-target-disease Filter by vaccine-preventable disease (system|code). Comma-separated for multiple values. E.g. |
| status-reason:not-in | token | Definition: http://hl7.org/fhir/SearchParameter/Immunization-StatusReason Exclude immunisation events with the specified status reason codes. Accepted formats (comma-separated):
|
| status:not-in | token | Definition: http://hl7.org/fhir/SearchParameter/Immunization-Status Exclude immunisation events with the specified status codes. Allowed values: |
| status | token | Definition: http://hl7.org/fhir/SearchParameter/Immunization-status Used in data-quality search only. Include only events with the given status(es). Defaults to all statuses if omitted. Allowed values: |
| _query | special | Definition: https://standards.digital.health.nz/fhir/air/SearchParameter/Immunization-data-quality Set to |
| _lastUpdated | date | Definition: http://hl7.org/fhir/SearchParameter/Resource-lastUpdated Used in data-quality search. Supports |
| _offset | number | Definition: http://hl7.org/fhir/SearchParameter/Resource-offset Used in data-quality search. Number of records to skip. Default: 0. |
| _count | number | Definition: http://hl7.org/fhir/SearchParameter/Resource-count Used in data-quality search. Maximum records to return (1–100). Default: 100. |
| _includeMigratedData | string | Definition: https://standards.digital.health.nz/fhir/air/SearchParameter/Immunization-includeMigratedData Used in data-quality search only. Set to |
| _dqStatus | token | Definition: https://standards.digital.health.nz/fhir/air/SearchParameter/Immunization-dqStatus Used in data-quality search only. Filter by data quality status. Allowed values: |
| _include | string | Definition: http://hl7.org/fhir/SearchParameter/Resource-include Include related resources in the response. Supported values: |
| Name |
|---|
| * |
| Immunization:patient |
| Immunization:performer |
| Immunization:location |
ImmSoT consumer (patient) resource. Stores NHI-linked consumer state, sub-status, and schedule information.
| Code | Verb | URL | Documentation |
|---|---|---|---|
| read | **GET** `[base]/Patient/{NHI}` Reads the current state of an ImmSoT consumer (returned as a FHIR Patient conforming to AIRPatient). When the optional `origin-nhi-version` request header is supplied, the API compares it against the stored NHI version: - Same version → return cached data - Different version → sync with NHI, update ImmSoT, return fresh data **Required scope:** `system/Patient.r` **Responses:** `200 OK`, `400`, `403`, `404`, `429`, `500` |
| Name | Definition | Documentation |
|---|---|---|
| update-state | https://standards.digital.health.nz/fhir/air/OperationDefinition/update-patient-state | POST Updates a consumer's state and/or sub-status. Uses optimistic locking: the At least one of Request body: FHIR Parameters with Required scope: Responses: |
| reassign-schedules | https://standards.digital.health.nz/fhir/air/OperationDefinition/reassign-patient-schedules | POST Reassigns a consumer's immunisation schedules. Cancels existing schedules (including manual matches and MQ records) and creates new ones based on the supplied onboarding date. The schedule repair service is then run to regenerate matches against the new plan. Note: Any manual match linked to a cancelled planned event is also unmatched. Request body: FHIR Parameters with Required scope: Responses: |
| patient-history | https://standards.digital.health.nz/fhir/air/OperationDefinition/patient-history | GET Returns all versions of an ImmSoT consumer as a FHIR history Bundle. Each entry is a full Patient snapshot including modification audit metadata ( Required scope: Responses: |
Read a consumer's immunisation plan (schedule). Each CarePlan represents a single Antigen Group Vaccination (AGV) schedule and links planned ImmunizationRecommendation events and administered Immunization resources.
| Code | Verb | URL | Documentation |
|---|---|---|---|
| search-type | **GET** `[base]/CarePlan/$view?nhi={NHI}` Returns the consumer's full immunisation plan as a Bundle containing CarePlan, Immunization, and ImmunizationRecommendation resources. **Required scope:** `system/CarePlan.s` **Responses:** `200 OK` (CarePlanBundle), `400`, `403`, `429`, `500` |
| Name | Type | Documentation |
|---|---|---|
| nhi | token | Definition: https://standards.digital.health.nz/fhir/air/SearchParameter/CarePlan-nhi NHI identifier of the patient/consumer whose immunisation plan to retrieve. Required. |
| Name | Definitions |
|---|---|
process-message |
http://hl7.org/fhir/OperationDefinition/MessageHeader-process-message |
| Name | Definitions |
|---|---|
sender |
https://standards.digital.health.nz/fhir/MessageDefinition/UpdateImmunisationRequestMessageDefinition |
sender |
https://standards.digital.health.nz/fhir/MessageDefinition/UpdateImmunisationResponseMessageDefinition |