{"openapi":"3.0.3","info":{"title":"Child Health - R4 API","description":"## Overview\nUse this API to retrieve child health data in FHIR R4 format.\n\nThe API: \n- provides access to child health data using FHIR R4.\n- supports search and retrieval operations\n- is built on top of the Patient Data Manager (PDM) FHIR API\n\n\n## Who can use this API\nThis API can be used by developers building services that support health and social care.\n\nYou must have a valid use case before developing against this API.\n\n## Related APIs\n- [Patient Data Manager FHIR API](https://digital.nhs.uk/developer/api-catalogue/patient-data-manager-fhir-api \"Patient Data Manager FHIR API\") Underlying API used to store and manage patient data, including child health records.\n- [Multicast Notification Service API](https://digital.nhs.uk/developer/api-catalogue/multicast-notification-service \"Multicast Notification Service API\") - Use this API to subscribe to notifications when child health messages are available.\n\n## API status and roadmap\nThis API is currently in [Alpha](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses) and is subject to change. \n\n## Service level\nThis API is a bronze service, meaning it is operational and supported only during business hours (8am to 6pm), Monday to Friday excluding bank holidays.\n\n## Technology\nThis API is:\n  - [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#basic-rest).\n  - uses the [FHIR](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#fhir) global standard for health care data exchange, specifically to [FHIR R4](https://hl7.org/fhir/R4/).\n\n## Network access\nThis API is available on the internet.\n\nAccess is controlled and requires appropriate authorisation.\n\nFor more details see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis).\n\n## Security and authorisation\n\n### User-restricted access\nThis API uses user-restricted access. This means:\n- an end user must be present\n- the end user must be authenticated and authorised\n\n#### Patient access mode\nUse this access mode when the end user is a patient.\n\n[Review all patient access modes](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#patient-access-mode)\n\nAll endpoints that support this access mode require:\n- a high level of identity verification\n- strong authentication credentials\n\nThese combine to form a [Vector of Trust](https://nhsconnect.github.io/nhslogin/vectors-of-trust/).\n\nSupported vectors of trust are:\n- `P9.Cp.Cd`\n- `P9.Cp.Ck`\n- `P9.Cm`\n\nThe API also allows delegated access, for example:\n- a parent accessing a child’s data\n\n## Environments and testing\n\n| Environment       | Base URL                                                             |\n| ----------------- | -------------------------------------------------------------------- |\n| Integration test  | `https://int.api.service.nhs.uk/child-health/FHIR/R4`               |\n| Production        | `https://api.service.nhs.uk/child-health/FHIR/R4`                   |\n\n## Errors\nWe use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:\n\n* 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action\n* 400 to 499 if it failed because of a client error by your application\n* 500 to 599 if it failed because of an error on our server\n\nErrors specific to each API are shown in the Endpoints section, under Response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.\n\n## Open source\nYou might find the following [open source](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#open-source) resources useful:\n\n| Resource                  | Description                                                          | Links                                                                       |\n|---------------------------|----------------------------------------------------------------------|-----------------------------------------------------------------------------|\n| FHIR libraries and SDKs   | Various open source libraries for integrating with FHIR APIs.        | [FHIR libraries and SDKs](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) |\n\nWe currently don't have any open source client libraries or sample code and the source code for the backend is not currently in the open. If you think this would be useful, [contact us](https://digital.nhs.uk/developer/help-and-support).\n\n## Contact us\nFor help connecting to our APIs see [Help and support building healthcare software](https://digital.nhs.uk/developer/help-and-support).\n","version":"1.0.0"},"servers":[{"url":"https://internal-dev-sandbox.api.service.nhs.uk/child-health/FHIR/R4","description":"Internal Development Sandbox environment"},{"url":"https://sandbox.api.service.nhs.uk/child-health/FHIR/R4","description":"Sandbox environment"},{"url":"https://int.api.service.nhs.uk/child-health/FHIR/R4","description":"Integration environment"},{"url":"https://api.service.nhs.uk/child-health/FHIR/R4","description":"Production environment"}],"paths":{"/{resource}":{"get":{"tags":["Resources"],"summary":"Search the underlying FHIR server using GET","description":"Use this endpoint to retrieve resources for a specific patient by supplying query parameters in the request URL.\n\nYou must include the `patient:identifier` query parameter to ensure that only resources associated with an individual patient are returned.\n\nThe `patient:identifier` must correspond to a patient that the calling application is authorised to access. This may be:\n\n- the authenticated user (for patient-facing applications), or\n- a patient the system is permitted to access on their behalf\n\nThis endpoint returns only child health observation resources **created via this API**. It does not return:\n\n- observations created outside of this API\n- observations sourced from other systems or services\n\nThe supported observation types are:\n\n- Birth weight (`http://snomed.info/sct%|364589006`)\n- Birth time (`http://snomed.info/sct%|397836004`)\n- Gestational age (`http://snomed.info/sct%|412726003`)\n\nSearch results are powered by the underlying Patient Data Manager FHIR API, which uses an *eventually consistent* model. This means there may be a short delay between creating or updating a resource and it appearing in search results.\n\nFor guidance on constructing FHIR search requests, refer to the Patient Data Manager API documentation.\n","operationId":"get-resources-pdm","parameters":[{"$ref":"#/components/parameters/Code"},{"$ref":"#/components/parameters/PatientIdentifier"},{"$ref":"#/components/parameters/OtherFHIRSearchParameters"},{"$ref":"#/components/parameters/ResourceType"},{"$ref":"#/components/parameters/XCorrelationID"},{"$ref":"#/components/parameters/XRequestID"}],"responses":{"200":{"description":"Successful Response, returns a bundle of FHIR resources","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/BundleSearchSet"}}}},"400":{"description":"Request is missing or contains invalid values.\n","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"},"examples":{"missing_query_parameter":{"summary":"Missing mandatory query parameter","value":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invalid","details":{"text":"Missing mandatory query parameter: patient:identifier"}}]}}}}}},"401":{"description":"Unauthorised. Credentials are missing or invalid.\n","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string","example":"Invalid access token"},"detail":{"type":"object","properties":{"errorcode":{"type":"string","example":"oauth.v2.InvalidAccessToken"}}}}}}},"example":{"fault":{"faultstring":"Invalid access token","detail":{"errorcode":"oauth.v2.InvalidAccessToken"}}}}}},"403":{"description":"Forbidden. Returned when the authenticated client does not have sufficient permissions to access the requested resource.\n","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"},"example":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"exception","details":{"text":"Insufficient permissions to access this resource"}}]}}}},"500":{"description":"Internal server error. Returned on unexpected server-side failures.","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"},"example":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"exception","details":{"text":"An unexpected error occurred"}}]}}}}},"deprecated":false,"security":[{"nhs-login-p9":[]}]}}},"components":{"schemas":{"BundleSearchSet":{"title":"Bundle SearchSet","required":["resourceType","type"],"type":"object","properties":{"resourceType":{"title":"Resource Type","type":"string","description":"Concrete FHIR resource types","default":"Bundle"},"type":{"title":"Type","type":"string","description":"Indicates the purpose of this bundle - how it is intended to be used","default":"searchset"},"link":{"title":"Link","type":"array","items":{"required":["relation","url"],"type":"object","properties":{"relation":{"type":"string","description":"See http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1"},"url":{"type":"string","description":"Reference details for the link","format":"url"}}},"description":"Links related to this bundle"},"entry":{"title":"Entry","type":"array","items":{"type":"object","properties":{"search":{"title":"Search","type":"object","properties":{"mode":{"enum":["match","include"],"type":"string","description":"Why this is in the result set"},"score":{"type":"string","description":"Search ranking (between 0 and 1)"}},"description":"Search related information"},"resource":{"$ref":"#/components/schemas/Resource"},"response":{"title":"Response","type":"object","properties":{"etag":{"title":"ETag","type":"string","description":"The etag for the current version of the resource"}},"description":"Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history"}}},"description":"An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only)."}},"example":{"resourceType":"Bundle","type":"searchset","entry":[{"resource":{"resourceType":"Observation","id":"594c0bd9-c371-385a-896d-060340f5d6fc","meta":{"versionId":"1","lastUpdated":"2026-03-18T11:15:17.511857Z"},"status":"final","code":{"coding":[{"system":"http://snomed.info/sct","code":"397836004","display":"Birth time"}]},"subject":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9736826694"}},"effectiveDateTime":"2026-03-18T11:01:00Z","valueDateTime":"2026-03-18T11:15:00Z"},"search":{"mode":"match"}},{"resource":{"resourceType":"Observation","id":"7a50f975-ccd4-3cdf-8804-b89cb9b66c39","meta":{"versionId":"1","lastUpdated":"2026-03-18T11:14:41.512706Z"},"status":"final","code":{"coding":[{"system":"http://snomed.info/sct","code":"364589006","display":"Birth weight"}]},"subject":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9736826694"}},"effectiveDateTime":"2026-03-18T11:01:00Z","valueQuantity":{"value":3.1,"unit":"kg","system":"http://unitsofmeasure.org","code":"wk"}},"search":{"mode":"match"}},{"resource":{"resourceType":"Observation","id":"bd9379e9-db91-31b9-9023-c6a0a6bd306b","meta":{"versionId":"1","lastUpdated":"2026-03-18T11:10:04.017217Z"},"status":"final","code":{"coding":[{"system":"http://snomed.info/sct","code":"412726003","display":"Gestation age"}]},"subject":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9736826694"}},"effectiveDateTime":"2026-03-18T11:01:00Z"},"search":{"mode":"match"}}]}},"Code":{"type":"string","example":"http://snomed.info/sct|364589006"},"OperationOutcome":{"type":"object","properties":{"resourceType":{"enum":["OperationOutcome"],"type":"string","example":"OperationOutcome"},"issue":{"type":"array","items":{"type":"object","properties":{"severity":{"enum":["fatal","error","warning","information","success"],"type":"string","example":"error"},"code":{"enum":["exception","informational","invalid","invariant"],"type":"string","example":"exception"},"details":{"type":"object","properties":{"text":{"type":"string","example":"An unexpected error occurred"}}}}},"example":[{"severity":"error","code":"exception","details":{"text":"An unexpected error occurred"}}]}},"description":"FHIR OperationOutcome resource.","example":{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invalid","details":{"text":"Invalid request. Check path and query parameters."}}]}},"PatientIdentifier":{"pattern":"^https:\\/\\/fhir\\.nhs\\.uk\\/Id\\/nhs-number\\|(\\d+)$","type":"string","example":"https://fhir.nhs.uk/Id/nhs-number|9000000017"},"Resource":{"title":"Resource","required":["resourceType"],"type":"object","properties":{"resourceType":{"type":"string","description":"Concrete FHIR resource types. Please note that the Patient Data Manager store may add fields to the 'meta' object. These are internal fields and are subject to change. Do not build any logic based on these fields.\n"}},"additionalProperties":true,"description":"A resource in the bundle","example":{"resourceType":"Observation","id":"594c0bd9-c371-385a-896d-060340f5d6fc","meta":{"versionId":"1","lastUpdated":"2026-03-18T11:15:17.511857Z"},"status":"final","code":{"coding":[{"system":"http://snomed.info/sct","code":"397836004","display":"Birth time"}]},"subject":{"identifier":{"system":"https://fhir.nhs.uk/Id/nhs-number","value":"9736826694"}},"effectiveDateTime":"2026-03-18T11:01:00Z","valueDateTime":"2026-03-18T11:15:00Z"}},"XCorrelationID":{"type":"string","example":"11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"},"XRequestID":{"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","type":"string","example":"60E0B220-8136-4CA5-AE46-1D97EF59D068"}},"parameters":{"Code":{"name":"code","in":"query","description":"A FHIR search parameter for filtering by code","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/Code"},"examples":{"none":{"summary":"None","value":""},"SNOMED_CODES_BIRTH_WEIGHT":{"summary":"Birth weight","value":"http://snomed.info/sct|364589006"},"SNOMED_CODES_BIRTH_TIME":{"summary":"Birth time","value":"http://snomed.info/sct|397836004"},"SNOMED_CODES_GESTATIONAL_AGE":{"summary":"Gestational age","value":"http://snomed.info/sct|412726003"}}},"PatientIdentifier":{"name":"patient:identifier","in":"query","description":"A patient identifier in the format \"https://fhir.nhs.uk/Id/nhs-number|{nhsNumber}\"","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/PatientIdentifier"},"examples":{"valid_1":{"summary":"Valid #1","value":"https://fhir.nhs.uk/Id/nhs-number|9000000017"},"valid_2":{"summary":"Valid #2","value":"https://fhir.nhs.uk/Id/nhs-number|9999999999"},"invalid":{"summary":"Unknown","value":"https://fhir.nhs.uk/Id/nhs-number|9000000001"}}},"OtherFHIRSearchParameters":{"name":"(other-fhir-search-parameters)","in":"query","description":"Other FHIR search parameters can be found in the [FHIR search documentation](https://hl7.org/fhir/R4/search.html#all)","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}},"ResourceType":{"name":"resource","in":"path","description":"A FHIR resource type to search for (e.g. Observation)","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"},"examples":{"valid_1":{"summary":"Valid #1","value":"Observation"},"invalid":{"summary":"None","value":""}}},"XCorrelationID":{"name":"X-Correlation-ID","in":"header","description":"An optional ID which you can use to track transactions across multiple systems, and we use to de-duplicate repeated requests and to trace the request if you contact our helpdesk.\n\nIf you re-send a failed request please re-send this ID in the header.\n\nIt can take any value, but we recommend avoiding `.` characters.\n\nMirrored back in a response header.\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/XCorrelationID"}},"XRequestID":{"name":"X-Request-ID","in":"header","description":"A globally unique identifier (GUID) for the request, which can be used to trace the request if you contact our helpdesk.\n\nMust be a universally unique identifier (UUID) (ideally version 4).\n\nMirrored back in a response header.\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"$ref":"#/components/schemas/XRequestID"}}},"securitySchemes":{"nhs-login-p9":{"$ref":"https://proxygen.prod.api.platform.nhs.uk/components/securitySchemes/nhs-login-p9"}}},"tags":[{"name":"Resources","description":"FHIR R4 resource retrieval."}]}