Aotearoa Immunisation Register (AIR) FHIR Implementation Guide (API-V1)
1.27.0 - release
New Zealand
Aotearoa Immunisation Register (AIR) FHIR Implementation Guide (API-V1) - Local Development build (v1.27.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
| Official URL: https://standards.digital.health.nz/fhir/air/CapabilityStatement/AIRCapabilityStatement | Version: 1.27.0 | |||||
| Active as of 2025-06-01 | Computable Name: AIRCapabilityStatement | |||||
|
||||||
The Aotearoa Immunisation Register (AIR) FHIR R4 API (ImmSoT).
API versioning:
Defines the capabilities of the AIR ImmSoT FHIR server so that clients can discover supported interactions, search parameters, and custom operations.
Raw OpenAPI-Swagger Definition file | Download
json, application/fhir+jsonNote to Implementers: FHIR Capabilities
Any FHIR capability may be 'allowed' by the system unless explicitly marked as 'SHALL NOT'. A few items are marked as MAY in the Implementation Guide to highlight their potential relevance to the use case.
serverAIR ImmSoT FHIR R4 server.
All requests require:
API version selection is controlled by the Api-Version header (values: 1 or 2, default: 1).
OAuthOAuth2 client credentials flow. Obtain a bearer token from the token endpoint then include it as Authorization: Bearer <token>.
transactioninteraction.| Conformance | Operation | Documentation |
|---|---|---|
| SHALL | $process-message | POST Processes an incoming FHIR message Bundle (type=message) to acknowledge a previously sent immunisation update notification. Updates an existing acknowledgement record from status Request body: FHIR Bundle containing a MessageHeader with Required scope: Responses: |
The summary table lists the resources that are part of this configuration, and for each resource it lists:
_include_revinclude| Resource Type | Profile | R | S | U | C | H-I | Searches | _include | _revinclude | Operations |
|---|---|---|---|---|---|---|---|---|---|---|
| Immunization | https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization | y | y | y | y | y | patient, target-disease, status-reason:not-in, status:not-in, status, _query, _lastUpdated, _offset, _count, _includeMigratedData, _dqStatus, _include | *, Immunization:patient, Immunization:performer, Immunization:location | $upsert, $bulk-update, $match, $unmatch | |
| Patient | https://standards.digital.health.nz/fhir/air/StructureDefinition/air-patient | y | $update-state, $reassign-schedules, $patient-history | |||||||
| CarePlan | https://standards.digital.health.nz/fhir/air/StructureDefinition/air-careplan | y | nhi |
createPOST [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 auditFacilityID (optional) – facility where vaccination took placeSourceSystemID (optional) – source system identifier (HIP Integration Application list)X-Correlation-ID (optional) – correlation UUID for tracingx-api-key (required) – API Gateway keyApi-Version (optional, default=1) – API version selector (1 or 2)Responses:
201 Created – immunisation record created; Location and ETag headers returned422 Unprocessable Entity – validation failed (OperationOutcome)403 Forbidden – insufficient scope429 Too Many Requests – rate limit exceeded500 Internal Server ErrorreadGET [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 Request403 Forbidden404 Not Found429 Too Many Requests500 Internal Server ErrorupdatePUT [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 meta400 Bad Request401 Unauthorized403 Forbidden422 Unprocessable Entity – validation failure500 Internal Server Errorhistory-instanceGET [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 Request403 Forbidden429 Too Many Requests500 Internal Server Errorsearch-typePOST [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 found400 Bad Request401 Unauthorized403 Forbidden429 Too Many Requests500 Internal Server ErrorCore immunisation event resource. All interactions operate on FHIR Immunization resources conforming to the AIRImmunization profile.
| Conformance | Parameter | Type | Documentation |
|---|---|---|---|
| SHALL | patient | reference | NHI number of the patient, or a full Patient reference URL.
When a full URL is provided it is matched against |
| SHALL | target-disease | token | Filter by vaccine-preventable disease (system|code). Comma-separated for multiple values. E.g. |
| SHALL | status-reason:not-in | token | Exclude immunisation events with the specified status reason codes. Accepted formats (comma-separated):
|
| SHALL | status:not-in | token | Exclude immunisation events with the specified status codes. Allowed values: |
| SHALL | status | token | Used in data-quality search only. Include only events with the given status(es). Defaults to all statuses if omitted. Allowed values: |
| SHALL | _query | special | Set to |
| SHALL | _lastUpdated | date | Used in data-quality search. Supports |
| SHALL | _offset | number | Used in data-quality search. Number of records to skip. Default: 0. |
| SHALL | _count | number | Used in data-quality search. Maximum records to return (1–100). Default: 100. |
| SHALL | _includeMigratedData | string | Used in data-quality search only. Set to |
| SHALL | _dqStatus | token | Used in data-quality search only. Filter by data quality status. Allowed values: |
| SHALL | _include | string | Include related resources in the response. Supported values: |
| Conformance | Parameters | Types |
|---|---|---|
| patient | reference | |
| patient(+target-disease+status-reason:not-in+status:not-in+_include) | reference(+token+token+token+string) | |
| _query+_lastUpdated+_offset+_count(+_includeMigratedData+_dqStatus+status) | special+date+number+number(+string+token+token) |
| Conformance | Operation | Documentation |
|---|---|---|
| SHALL | $upsert | POST Performs an upsert using a deterministic matching algorithm (NHI + occurrence date + vaccine code + indication):
Required scope: Responses: |
| SHALL | $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: |
| SHALL | $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: |
| SHALL | $unmatch | POST Manually unmatches an immunisation event from a planned event. Request body: same structure as Required scope: Responses: |
readGET [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:
Required scope: system/Patient.r
Responses: 200 OK, 400, 403, 404, 429, 500
ImmSoT consumer (patient) resource. Stores NHI-linked consumer state, sub-status, and schedule information.
| Conformance | Operation | Documentation |
|---|---|---|
| SHALL | $update-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: |
| SHALL | $reassign-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: |
| SHALL | $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: |
search-typeGET [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
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.
| Conformance | Parameter | Type | Documentation |
|---|---|---|---|
| SHALL | nhi | token | NHI identifier of the patient/consumer whose immunisation plan to retrieve. Required. |
| Mode | Definition |
|---|---|
| sender | https://standards.digital.health.nz/fhir/MessageDefinition/UpdateImmunisationRequestMessageDefinition |
| sender | https://standards.digital.health.nz/fhir/MessageDefinition/UpdateImmunisationResponseMessageDefinition |
AIR supports HL7 FHIR messaging for immunisation update notifications sent to enrolled consumers and providers.