openapi: 3.0.0 info: description: "\n
\n
\n
\n
\n \n \"\"\n \n
\n
\n
\n
\n

This API forms part of the  Booking and Referral Standard (BaRS).
This API specification should be used in conjunction with the BaRS implementation guide for your use case.

\n
\n
\n
\n
\n\n## Overview\n\n![BaRS FHIR API end-to-end process](https://raw.githubusercontent.com/NHSDigital/booking-and-referral-fhir-api/master/specification/images/BaRS-FHIR-API.svg)\n\nUse this API to send booking and referral information between NHS service providers.\n\nYou can:\n * get a specific booking\n * get bookings for a patient\n * process a message, either a booking or a referral\n * get message definition\n * get capability statement\n * get a specific referral\n * get referrals for a patient\n * get slots\n\nThe following describes the end-to-end process:\n1. Send a request from your sender application to this API, along with a service identifier header.\n2. This API redirects the request to the service associated with the service identifier header.\n3. The target backend handles the request and sends a response back to this API.\n4. This API returns the response to your sender application.\n5. In some [Applications](https://simplifier.net/guide/nhsbookingandreferralstandard/home/design/bars-applications) the target may send a follow up request to indicate the outcome of a request.\n\n
\n
\n
\n
\n \n \"\"\n \n
\n
\n
\n
\n

For a non-technical overview of how to build software that deals with referrals and bookings, see Building healthcare software - referrals and bookings.

\n
\n
\n
\n
\n\n## Who can use this API\nThis API can only be used for the Booking and Referral Standard where there is a legal basis to do so. Make sure you have a valid use case before you go too far with your development. We'll ask you to demonstrate this as part of the digital onboarding process before your software goes live.\n\n## Related APIs\nThe following APIs are related to this API:\n * This API replaces the [NHS Booking - FHIR API](https://digital.nhs.uk/developer/api-catalogue/nhs-booking-fhir)\n\n## API status and roadmap\nThis version of the API is in [Production](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses), meaning:\n * it is available for testing in the integration environment\n * it has availability in production \n * it is NOT subject to breaking changes\n\nTo see our roadmap, or to suggest, comment or vote on features for this API, see our [interactive product backlog](https://nhs-digital-api-management.featureupvote.com/?order=popular&filter=allexceptdone&tag=booking-and-referral&deleted=0#controls).\nIf you have any other queries, please [contact us](https://digital.nhs.uk/developer/help-and-support).\n\n## Service level\nThis API is a platinum service, meaning it is operational and supported 24 x 7 x 365.\n\nFor more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).\n\n## Technology\nThis API is [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#basic-rest) and uses HTTP POST to submit data.\n\nIt conforms to 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 (v4.0.1)](https://hl7.org/fhir/r4/).\n\nIt includes:\n * country-specific FHIR extensions, which are built against [FHIR UK Core](https://digital.nhs.uk/services/fhir-uk-core), specifically [fhir.r4.ukcore.stu1 0.5.1](https://simplifier.net/packages/fhir.r4.ukcore.stu1/0.5.1)\n * BaRS-specific FHIR extensions and ammendments, documented in the [BaRS FHIR project](https://simplifier.net/NHSBookingandReferrals)\n\n## Network access\nThis API is available on the internet and also indirectly via HSCN.\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\nThis API is [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis),\nmeaning we authenticate the calling application but not the end user.\n\nTo use this access mode, use the following security pattern:\n* [application-restricted RESTful API - signed JWT authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication)\n\nFor more details, see [BaRS Core - Security and authorisation](https://simplifier.net/guide/nhsbookingandreferralstandard/home/design/bars-core#Security-and-authorisation).\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\nExample errors specific to each API are shown in the endpoints section, under Response. See the BaRS Core [Error Handling section](https://simplifier.net/guide/nhsbookingandreferralstandard/home/design/bars-core#core-ErrorHandling) for further information on error handling within the BaRS Standard.\n\n\n## Environments and testing\n| Environment | Base URL |\n| ----------------- | ---------------------------------------------------------------------- |\n| Sandbox | `https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4` | \n| Integration test | `https://int.api.service.nhs.uk/booking-and-referral/FHIR/R4` |\n| Production | `https://api.service.nhs.uk/booking-and-referral/FHIR/R4` |\n\nOur [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing) is for early developer testing and covers a limited number of scenarios with predefined responses. Please not this environment is stateless.\n\nOur [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing) is for formal integration testing.\n\nFor more details see [integration testing with our RESTful APIs](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing-with-our-restful-apis).\n\n## Onboarding\nYou need to get your software approved by us before it can go live with this API. We call this onboarding. The onboarding process can sometimes be quite long, so it`s worth planning well ahead.\n\nAs part of this process, you need to demonstrate that you can manage risks and that your software conforms technically with the requirements for this API.\n\nInformation on this page might impact the design of your software. For details, see [Onboarding support information](https://digital.nhs.uk/developer/api-catalogue/booking-and-referral-fhir/onboarding-support-information).\n\nTo understand how our online digital onboarding process works, see [digital onboarding](https://digital.nhs.uk/developer/guides-and-documentation/digital-onboarding).\n\n
\n
\n
\n
\n \n \"\"\n \n
\n
\n
\n

To get started, sign in or create a developer account, then select 'product onboarding'.

\n
\n
\n
\n" version: 1.0.0 title: and Referral Booking STU3 API termsOfService: https://developer.nhs.uk/apis/uec-appointments contact: email: uec.appointmentbooking@nhs.net url: https://developer.nhs.uk/apis/uec-appointments name: NHS Digital license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html servers: - url: https://sandbox.api.service.nhs.uk/booking-and-referral/FHIR/R4 description: Sandbox Server - url: https://int.api.service.nhs.uk/booking-and-referral/FHIR/R4 description: Production - url: https://api.service.nhs.uk/booking-and-referral/FHIR/R4 description: Integration Server security: - OAuth_Token: [] tags: - name: STU3 paths: /STU3/CodeSystem/{codeSystemType}: get: $ref: components/stu3/schemas/endpoints/a004-retrieve-reference-data.yaml tags: - STU3 /STU3/ReferralRequest/$ers.fetchworklist: post: $ref: components/stu3/schemas/endpoints/a008-retrieve-worklist.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}: get: $ref: components/stu3/schemas/endpoints/a005-retrieve-referral-request.yaml tags: - STU3 /STU3/Task: get: $ref: components/stu3/schemas/endpoints/a029-available-actions-for-user-list.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}/_history/{version}: get: $ref: components/stu3/schemas/endpoints/a005-retrieve-referral-request-versioned.yaml tags: - STU3 /STU3/Binary/{attachmentLogicalID}: get: $ref: components/stu3/schemas/endpoints/a006-retrieve-attachment.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}/$ers.generateCRI: post: $ref: components/stu3/schemas/endpoints/a007-retrieve-clinical-information.yaml tags: - STU3 /STU3/HealthcareService/$ers.searchHealthcareServicesForPatient: post: $ref: components/stu3/schemas/endpoints/a010-patient-service-search.yaml tags: - STU3 /STU3/ReferralRequest/$ers.createReferral: post: $ref: components/stu3/schemas/endpoints/a011-create-referral.yaml tags: - STU3 /STU3/ReferralRequest/$ers.createReferralAndSendForTriage: post: $ref: components/stu3/schemas/endpoints/a021-create-referral-request-and-send-for-triage.yaml tags: - STU3 /STU3/Slot: get: $ref: components/stu3/schemas/endpoints/a015-retrieve-appointment-slots.yaml tags: - STU3 /STU3/Appointment: post: $ref: components/stu3/schemas/endpoints/a016-book-or-defer-appointment.yaml tags: - STU3 /STU3/Binary: post: $ref: components/stu3/schemas/endpoints/a020-upload-file-to-document-store.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}/$ers.maintainReferralLetter: post: $ref: components/stu3/schemas/endpoints/a012-maintain-referral-letter.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}/$ers.acceptReferral: post: $ref: components/stu3/schemas/endpoints/a013-accept-referral.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}/$ers.rejectReferral: post: $ref: components/stu3/schemas/endpoints/a014-reject-referral.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}/$ers.generatePatientLetter: post: $ref: components/stu3/schemas/endpoints/a019-generate-patient-letter.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}/$ers.cancelAppointmentActionLater: post: $ref: components/stu3/schemas/endpoints/a022-cancel-appointment-action-later.yaml tags: - STU3 /STU3/CommunicationRequest/$ers.fetchworklist: post: $ref: components/stu3/schemas/endpoints/a023-retrieve-a&g-worklist.yaml tags: - STU3 /STU3/CommunicationRequest/{ubrn}: get: $ref: components/stu3/schemas/endpoints/a024-retrieve-advice-and-guidance.yaml tags: - STU3 /STU3/CommunicationRequest/{ubrn}/_history/{version}: get: $ref: components/stu3/schemas/endpoints/a024-retrieve-advice-and-guidance-versioned.yaml tags: - STU3 /STU3/Communication: get: $ref: components/stu3/schemas/endpoints/a025-retrieve-advice-and-guidance-conversation.yaml tags: - STU3 /STU3/CommunicationRequest/{ubrn}/$ers.sendCommunicationToRequester: post: $ref: components/stu3/schemas/endpoints/a026-send-a&g-response.yaml tags: - STU3 /STU3/ReferralRequest/$ers.createFromCommunicationRequestActionLater: post: $ref: components/stu3/schemas/endpoints/a027-convert-a&g-to-referral.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}/$ers.recordReviewOutcome: post: $ref: components/stu3/schemas/endpoints/a028-record-triage-outcome.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}/$ers.changeShortlist: post: $ref: components/stu3/schemas/endpoints/a031-change-shortlist.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}/$ers.changeShortlistAndSendForTriage: post: $ref: components/stu3/schemas/endpoints/a032-change-shortlist-and-send-for-triage.yaml tags: - STU3 /STU3/Appointment/{id}: put: $ref: components/stu3/schemas/endpoints/a034-update-appointment.yaml tags: - STU3 get: $ref: components/stu3/schemas/endpoints/a038-retrieve-appointment.yaml tags: - STU3 /STU3/Appointment/{id}/_history/{version}: get: $ref: components/stu3/schemas/endpoints/a038-retrieve-appointment-versioned.yaml tags: - STU3 /STU3/ReferralRequest/{ubrn}/$ers.cancelReferral: post: $ref: components/stu3/schemas/endpoints/a036-cancel-referral.yaml tags: - STU3 /STU3/CommunicationRequest/{ubrn}/$ers.generateCRI: post: $ref: components/stu3/schemas/endpoints/a043-retrieve-advice-and-guidance-overview-pdf.yaml tags: - STU3 /STU3/CommunicationRequest/$ers.createAdviceAndGuidance: post: $ref: components/stu3/schemas/endpoints/a044-create-advice-and-guidance-request.yaml tags: - STU3 components: securitySchemes: OAuth_Token: type: http scheme: bearer