{"openapi":"3.0.3","info":{"title":"Wayfinder Insights API","description":"\n## Overview\nThe Wayfinder Insights API provides a standard mechanism for capturing information across all Wayfinder-enabled services.\n\nThe Wayfinder programme requires the key events to be submitted to a central Wayfinder reporting and analytics platform to support reporting, service improvement, benefits realisation, and analytical use cases. Data submitted through the API is not limited to records that are visible within Wayfinder. Events and data relating to journeys, activities, or records managed solely within integrated systems may also be submitted where appropriate to support agreed reporting and analytical requirements.\n\nExamples of events from Wayfinder-integrated systems are:\n\n| Service Boundary                                                                   | Example                                                                              |\n|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n|[NHS App](https://www.nhs.uk/nhs-app/)                                              | a user views the appointment summary/ list on the NHS app                        |\nPatient Engagement Portals (PEPs)                                                   | a Wayfinder user has cancelled an appointment in a PEP Wayfinder user interface.             |\n|Patient Engagement Portals (PEPs)                                                   | a secondary care trust has informed a PEP that an appointment has been booked        |\n\n|                                                                                    |                                                                                      |\n|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n\nPatient Engagement Portals (PEPs) are major contributors to the secondary care data used by Wayfinder. We sometimes call these secondary care providers, booking systems or patient portals.\n\nThe set of events required from your service are defined in the 'In Scope' section of each of the schemas detailed on this page.\n\nYou may send multiple events in a single [request](https://www.ibm.com/docs/en/cics-ts/6.1?topic=protocol-http-requests), or single events in multiple requests. The Wayfinder Insights API is [idempotent](https://developer.mozilla.org/en-US/docs/Glossary/Idempotent) so you may safely send the same event multiple times.\n\nIf your service does not offer users the functionality to produce events that are defined by this specification as being within your service boundary, you do not have to send these events to the Wayfinder reporting service. For example, not all PEPs support the cancellation feature and therefore cannot send its related events.\n\nThe APPT entity represents the parent appointment record, with all related appointment events captured as child entities. For example, an appointment (APPT) may have associated events that record user interactions, such as when the appointment has been viewed by a user (APPT-VIEW).\n\n## Who can use this API\nThe Wayfinder Insights API is currently non-functional and exists only to expose the Appointment schema.\n\nIn the future, you authenticate your application by sending a signed JSON Web Token (JWT) to our OAuth 2.0 authorisation server. You provide us with your public key and sign the JWT with your private key. In return, we give you an access token, which you then include with each API request.\n\n## Related APIs\n- [Patient Care Aggregator Reporting API](https://digital.nhs.uk/developer/api-catalogue/patient-care-aggregator-reporting#post-/). Previous version of Wayfinder Insights API.\n- [Patient Care Aggregator - FHIR API](https://digital.nhs.uk/developer/api-catalogue/patient-care-aggregator-fhir). Get an aggregated list of referrals and bookings for a patient from secondary care providers.\n\n- [Patient Care Aggregator Get Appointments API standard](https://digital.nhs.uk/developer/api-catalogue/patient-care-aggregator-get-appointments). As a secondary care provider, provide a list of bookings for a patient to the Patient Care Aggregator.\n\n- [Patient Care Aggregator Record Service API](https://digital.nhs.uk/developer/api-catalogue/patient-care-aggregator-record-service/patient-care-aggregator-record-service-api). As a secondary care provider, let the Patient Care Aggregator know which patients you have bookings for.\n\n## API status\nThe Wayfinder Insights API is [in development](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses), meaning the API is not currently available for integration by external third parties.\n\n## Service level\nThe Wayfinder Insights API is a silver service, meaning it will be operational all year round but only supported during working hours.\n\n## Technology\nThe Wayfinder Insights API is [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#basic-rest).\n\nWe recommend triggering requests to the Wayfinder reporting service as they are written to your logs, but it is also possible to send batches of logged events if that approach makes more sense for your architecture.\n\n## Network access\nThe Wayfinder Insights API is available on the internet and, indirectly, on the [Health and Social Care Network (HSCN)](https://digital.nhs.uk/services/health-and-social-care-network).\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    \nThe Wayfinder Insights API will be [application-restricted with signed JWT authentication]([https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication)), meaning we authenticate and authorise the calling application but we do not authenticate or authorise the end user.        \n\n## Environments and testing\n| Environment       | Base URL                                                                        |\n| ----------------- | ------------------------------------------------------------------------------- |\n| Sandbox           | Not available - in development                                                                  |\n| Integration test  | Not available - in development              |\n| Production        | Not available - in development                  |\n\n## Onboarding\nYou need to get your software approved by us before it can go live with the Wayfinder Insights API. We call this onboarding. The onboarding process can sometimes be quite long, so it's worth planning well ahead.\n\nThe Wayfinder Insights API is in development. This means you will be directly contacted in the next phase by the Wayfinder team if you are one of the private beta clients.\n\n## Errors and actions we require you to take\nThe Wayfinder Insights API is currently non-functional and exists only to expose the Appointment schema.\n\n## Open source\nYou might find the following open source resources useful:\n\n| Resource | Description  | Links |\n|---------------------------------------|-----------------------------------------------------------|--------------------------------------------------------------------------------|\n| Patient Care Aggregator Reporting API | Source code for the API proxy, sandbox and specification.  | [GitHub repo](https://github.com/NHSDigital/patient-care-aggregator-reporting) |                                    \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 for this API. If you think this would be useful, you can [contact us](https://digital.nhs.uk/developer/help-and-support).","version":"v1.0.4"},"servers":[{"url":"/"}],"paths":{"/":{"post":{"summary":"Schema definition only (non-functional)","description":"This endpoint exists only to expose the Appointment schema\n\nPlease ensure to check the scopes detailed in each event.","requestBody":{"description":"JSON array of event(s)","content":{"application/json":{"schema":{"minItems":1,"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/APPT"},{"$ref":"#/components/schemas/APPT-CANC"},{"$ref":"#/components/schemas/APPT-RESCH"},{"$ref":"#/components/schemas/APPT-DNA"},{"$ref":"#/components/schemas/APPT-ATTENDED"},{"$ref":"#/components/schemas/APPT-VIEW"},{"$ref":"#/components/schemas/APPT-LIST-VIEW"},{"$ref":"#/components/schemas/APPT-REQUEST-CANC-STARTED"},{"$ref":"#/components/schemas/APPT-REQUEST-CANC-COMPLETE"},{"$ref":"#/components/schemas/APPT-REQUEST-RESCH-STARTED"},{"$ref":"#/components/schemas/APPT-REQUEST-RESCH-COMPLETE"},{"$ref":"#/components/schemas/APPT-DIRECTIONS-REQUESTED"},{"$ref":"#/components/schemas/APPT-CONTACT-PHONE-SELECTED"}]},"example":[{"EventCode":"APPT","Id":"2bdba648-f2be-f011-8195-7c1e521d9dd1","Timestamp":"2026-07-01T10:30:00.000Z","NHSNumber":"9876543210","ODSCode":"RYK","AppointmentDateTime":"2026-07-03T14:30:00.000Z","MinutesDuration":30,"CreatedDateTime":"2026-07-01T10:30:00.000Z","EncounterClass":"Outpatient","AppointmentType":"Follow-up","CareSetting":"Acute","SpecialityCode":"110","TreatmentFunctionCode":"110","PathwayId":"ABC123DEF456GHI789JK","AppointmentModality":"Face-to-face","IsVisibleInNHSApp":true,"LocationName":"","IsPIFUAppointment":false,"PatientAgeAtAppointment":54,"Description":"Cardiology"},{"EventCode":"APPT","Id":"44d20788-81c4-f011-8195-7c1e521d9dd1","Timestamp":"2026-07-01T11:30:00.000Z","NHSNumber":"9876543210","ODSCode":"RYK","AppointmentDateTime":"2026-07-02T16:00:00.000Z","CreatedDateTime":"2026-07-01T11:30:00.000Z","EncounterClass":"Outpatient","AppointmentType":"New","CareSetting":"Acute","SpecialityCode":null,"AppointmentModality":"Virtual - Video","IsVisibleInNHSApp":true,"LocationName":"Video Consultation","IsPIFUAppointment":null,"PatientAgeAtAppointment":null,"Description":"Cardiology"},{"EventCode":"APPT-VIEW","AppointmentId":"2bdba648-f2be-f011-8195-7c1e521d9dd1","SessionId":"26fc0d75-a64c-4b45-9466-cb8227caf368","Timestamp":"2026-07-01T16:00:00.000Z","EntryPoint":"View upcoming appointment"}]}}},"required":true},"responses":{"204":{"$ref":"#/components/responses/NoContent"}},"deprecated":false}}},"components":{"schemas":{"APPT":{"required":["EventCode","Id","Timestamp","NHSNumber","ODSCode","AppointmentDateTime","CreatedDateTime","EncounterClass","AppointmentType","CareSetting","SpecialityCode","AppointmentModality","IsVisibleInNHSApp","LocationName","IsPIFUAppointment","PatientAgeAtAppointment","Description"],"type":"object","properties":{"EventCode":{"enum":["APPT"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"Id":{"maxLength":100,"type":"string","description":"A unique identifier for the appointment."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"},"NHSNumber":{"pattern":"^[1-9][0-9]{9}$","type":"string","description":"The NHS Number identifies the patient associated with the event. This must be a valid 10-digit number.\n\n **Constraints:** Must be exactly 10 characters"},"ODSCode":{"maxLength":12,"pattern":"^[A-Za-z0-9]{1,12}","type":"string","description":"The ODS (Organisation Data Service) code of the NHS Trust that the appointment belongs to, indicating the organisation responsible for delivering the appointment."},"AppointmentDateTime":{"type":"string","description":"The scheduled date and time for the appointment, indicating when the appointment will occur or has occurred, provided in UTC using ISO 8601 format.\n\n **Examples:**  \n- If the appointment was scheduled on January 2nd 2026 (GMT) to take place at 10:30AM on January 14th 2026 (GMT), the AppointmentDateTime would be: 2026-01-14T10:30:00.000Z\n- If the appointment was scheduled on January 2nd 2026 (GMT) to take place at 10:30AM on June 17th 2026 (BST), the AppointmentDateTime would be: 2026-06-17T09:30:00.000Z\n- If the appointment was scheduled on May 2nd 2026 (BST) to take place at 10:30AM on June 17th 2026 (BST), the AppointmentDateTime would be: 2026-06-17T09:30:00.000Z\n- If the appointment was scheduled on May 2nd 2025 (BST) to take place at 10:30AM on January 14th 2026 (GMT), the AppointmentDateTime would be: 2026-01-14T10:30:00.000Z","format":"date-time"},"MinutesDuration":{"type":"integer","description":"The planned duration of the appointment, expressed in whole minutes.\n\n **Examples:**  \n-  An appointment scheduled from 14:30 to 15:15 would have a duration of 45 minutes.\n- An appointment scheduled from 14:30 to 15:15 with a 15 minute break would have a duration of 30 minutes.\n- An appointment scheduled from 14:30 to 15:00 but actually started at 14:35 and ended at 14:55 would still hold a duration value of 30 minutes even though the appointment was 20 minutes."},"CreatedDateTime":{"type":"string","description":"The date and time when the appointment record was originally created in the source system, provided in UTC using ISO 8601 format. This field value should never change, even if the appointment is updated at a later date.\n\n **Examples:**  \n- If the appointment was created at 10:30 AM on January 14th 2026 (GMT), the CreatedDateTime would be: 2026-01-14T10:30:00.000Z \n- If the appointment was created at 10:30AM on June 17th 2026 (BST), the CreatedDateTime would be: 2026-06-17T09:30:00.000Z\n- If the appointment was created at 10:30AM on January 14th 2026 (GMT), but then was updated at 11:30AM on the same day, the CreatedDateTime would still be: 2026-01-14T10:30:00.000Z, not 2026-01-14T11:30:00.000Z","format":"date-time"},"EncounterClass":{"enum":["Outpatient","Inpatient","Day case"],"type":"string","description":"The type of healthcare setting in which the appointment takes place, categorising whether the patient is treated as an outpatient, inpatient, or day case."},"AppointmentType":{"enum":["New","Follow-up"],"type":"string","description":"Indicates whether the appointment is for a new consultation or a follow-up appointment."},"CareSetting":{"enum":["Acute","Mental Health","Community","Specialist"],"type":"string","description":"The high-level care setting responsible for delivering the appointment, categorising the type of service providing care."},"SpecialityCode":{"pattern":"^([1-9][0-9]{2})$","type":"string","description":"The nationally recognised clinical specialty code identifying the specialty responsible for the appointment.\n\n**Notes:**  \n- We accept NULL values by exception if your system does not support this field.\n- Use of NULL values should be minimised and will be monitored.\n- Free text values are not permitted.\n\n**Constraints:** Must be a 3 digit code found in the [Main Specialty Code NHS Data Dictionary](https://www.datadictionary.nhs.uk/attributes/main_specialty_code.html) or NULL if unknown","nullable":true},"TreatmentFunctionCode":{"pattern":"^([1-9][0-9]{2})$","type":"string","description":"The NHS Treatment Function Code (TFC) associated with the appointment. This represents the clinical specialty or service under which the patient is treated. \n\n**Notes:**  \n- Free text values are not permitted.\n\n**Constraints:** Must be a 3 digit code found in the [TFC NHS Data Dictionary](https://www.datadictionary.nhs.uk/attributes/treatment_function_code.html)"},"PathwayId":{"pattern":"^[A-Za-z0-9]{20}$","type":"string","description":"The identifier of the care pathway associated with the appointment.\n\n**Constraints:** Must be exactly 20 characters"},"AppointmentModality":{"enum":["Face-to-face","Virtual - Video","Virtual - Telephone","Home Visit","Other","Unknown"],"type":"string","description":"The method by which the appointment is delivered. This identifies how the patient interacts with the service (e.g. face-to-face, video, telephone, or home visit).\n\n**Notes:**  \n- 'Other' should be used when the appointment modality is known but does not fall into any of the predefined categories (e.g. mobile health units or other non-standard delivery methods).\n- 'Unknown' should be used when the appointment modality cannot be determined by the source system (e.g. booking details or e-RS referrals where modality has not yet been assigned).\n- Use of 'Other' and 'Unknown' values should be minimised and will be monitored."},"IsVisibleInNHSApp":{"type":"boolean","description":"Indicates whether the appointment is visible to the patient in the NHS App."},"LocationName":{"type":"string","description":"The patient friendly summary location of the appointment, displayed in the NHS App on the appointment summary/list page.\n\n**Notes:**  \n- This field is used to support data quality assurance (DQA) and must align with the location naming standards provided by the DQA team during PEP Wayfinder onboarding training.\n- If the appointment is not visible in the NHS App, the PEP is still expected to send a location."},"IsPIFUAppointment":{"type":"boolean","description":"Indicates whether the appointment is a Patient-Initiated Follow-Up (PIFU), where the patient initiates the follow-up using the PIFU feature. This is a mandatory field if the PEP can provide that information or if the appointment is booked but not via PIFU.\n\n**Notes:**  \n- We accept NULL values by exception if your system does not support this field.\n- Use of NULL values should be minimised and will be monitored.","nullable":true},"PatientAgeAtAppointment":{"type":"integer","description":"The age of the patient, in whole years, at the time of the appointment.\n\n**Notes:**  \n- We accept NULL values by exception if your system does not support this field or patient age is unknown or invalid.\n- Use of NULL values should be minimised and will be monitored. \n\n**Constraints:** Min: 13 Max: 150","nullable":true},"Description":{"maxLength":50,"type":"string","description":"A short, patient-friendly description of the purpose of the appointment, as displayed to patients in the appointment summary/list page.\n\n**Notes:**  \n- This field is used to support data quality assurance (DQA) and must align with the description naming standards provided by the DQA team during PEP Wayfinder onboarding training.\n- If the appointment is not visible in the NHS App, the PEP is still expected to send a description."}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* The outpatient/inpatient/day case appointment entity to which all other appointment events will be linked via AppointmentId.\n* This includes appointments visible within the NHS App as well as those not available for patients in the app.\n* This event should be sent when an appointment is created or when changes are made to the defined fields of an existing appointment. \n#### Notes:\n* All optional fields should be provided if the PEP has the information."},"APPT-CANC":{"required":["EventCode","AppointmentId","Timestamp","Reason"],"type":"object","properties":{"EventCode":{"enum":["APPT-CANC"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"},"Reason":{"enum":["Patient Cancelled","Clinical Decision","Administrative","Provider Cancelled","System Cleanup","Other","Unknown"],"type":"string","description":"The reason for cancellation of an appointment, recorded using a defined set of standard values.\n\n**Notes:**  \n- The following descriptions explain the interpretation of the allowed reasons for the cancellation of an appointment:\n  - **Patient Cancelled**: Patient actively cancelled or declined the appointment, includes phone, portal, NHS App, in‑person. This applies whether the cancellation was carried out by the patient directly or by a provider or system on the patient's behalf.\n  - **Clinical Decision**: Appointment cancelled because it was no longer clinically required. This includes: avoided follow‑up, outcome achieved elsewhere.\n  - **Administrative**: Cancelled due to booking error or administrative correction. Examples: wrong clinic, wrong patient, duplicate booking identified manually.\n  - **Provider Cancelled**: Cancelled by the provider due to service availability. Examples: staff unavailable, clinic cancelled, capacity or venue issue.\n  - **System Cleanup**: Automatically cancelled by system logic. Examples: de‑duplication, pathway reconciliation, automated expiry rules. \n  - **Other**: Used when the appointment cancellation does not fit standard categories, but the reason or context is known and recognised. \n  - **Unknown**: Used when the reason for the appointment cancellation is not available, not recorded, or cannot be determined. \n- Use of 'Other' and 'Unknown' values should be minimised and will be monitored."}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* The appointment cancellation outcome event linked to an existing outpatient, inpatient, or day case appointment via AppointmentId. This event should be sent when an appointment status has been recorded as cancelled. \n#### Notes:\n* This event is sourced from PEPs rather than user activity."},"APPT-RESCH":{"required":["EventCode","AppointmentId","Timestamp","Reason"],"type":"object","properties":{"EventCode":{"enum":["APPT-RESCH"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"},"Reason":{"enum":["Patient Request","Clinical Decision","Administrative","Provider Request","System Cleanup","Other","Unknown"],"type":"string","description":"The reason for reschedule of an appointment, recorded using a defined set of standard values.\n\n**Notes:**  \n- The following descriptions explain the interpretation of the allowed reasons for the rescheduling of an appointment:\n  - **Patient Request**: The appointment was rescheduled because the patient requested a change, includes phone, portal, NHS App, in‑person. This applies whether the change was carried out by the patient directly or by a provider or system on the patient's behalf.\n  - **Clinical Decision**: Appointment timing changed for clinical reasons. Examples: review required earlier/later, pathway optimisation, follow‑up deferred or expedited.\n  - **Administrative**: The appointment was rescheduled to correct an administrative or booking issue. Examples: wrong clinic, wrong slot length, wrong metadata.\n  - **Provider Request**: Provider changed appointment due to service availability. Examples: staff availability, clinic moved, capacity change.\n  - **System Cleanup**: The appointment was rescheduled automatically due to system or data‑management logic. Examples: de‑duplication, pathway reconciliation, auto‑migration to a new slot.\n  - **Other**: Used when the rescheduling the appointment does not fit standard categories, but the reason or context is known and recognised.\n  - **Unknown**: Used when the reason for rescheduling the appointment is not available, not recorded, or cannot be determined.\n- Use of 'Other' and 'Unknown' values should be minimised and will be monitored."}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* The appointment reschedule outcome event linked to an existing outpatient, inpatient, or day case appointment via AppointmentId. This event should be sent when an appointment status has been recorded as rescheduled.\n#### Notes:\n* This event is sourced from PEPs rather than user activity."},"APPT-DNA":{"required":["EventCode","AppointmentId","Timestamp"],"type":"object","properties":{"EventCode":{"enum":["APPT-DNA"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* The appointment DNA outcome event linked to an existing outpatient, inpatient, or day case appointment via AppointmentId. This event should be sent when an appointment status has been recorded as Did Not Attend (DNA).\n#### Notes:\n* This event is sourced from PEPs rather than user activity."},"APPT-ATTENDED":{"required":["EventCode","AppointmentId","Timestamp"],"type":"object","properties":{"EventCode":{"enum":["APPT-ATTENDED"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* The appointment attended outcome event linked to an existing outpatient, inpatient, or day case appointment via AppointmentId. This event should be sent when an appointment status has been recorded as Attended.\n#### Notes:\n* This event is sourced from PEPs rather than user activity."},"APPT-VIEW":{"required":["EventCode","AppointmentId","SessionId","Timestamp","EntryPoint"],"type":"object","properties":{"EventCode":{"enum":["APPT-VIEW"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"SessionId":{"maxLength":100,"type":"string","description":"The unique identifier for the session during which this event occurred."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"},"EntryPoint":{"enum":["View upcoming appointment","View past appointment","Ask to reschedule appointment","Reschedule appointment","Ask to cancel appointment","Cancel appointment","View appointment - Document","View appointment - Questionnaire","View appointment - Notification"],"type":"string","description":"Captures the entry point (screen) from where the user clicked the deeplink/link to view an appointment."}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* This event should be sent when a user views the appointment details page.\n* This event should be sent:\n  * When a user clicks a deeplink to an appointment in the NHS App, resulting in a jump-off to the PEP Wayfinder UI to view the appointment details.\n  * When a user views the appointment from other journeys from the PEP Wayfinder UI that lead to the appointment screen (e.g. rescheduling or cancellation flows).\n* Send an event every time an appointment is viewed, including: first view, page refresh/reload, back-and-forth navigation, multiple views within a session.\n#### Notes:\n* 'User' refers to patients using your service.\n#### UI Trigger condition:\n* Capture event when a user views appointment details inside PEP Wayfinder UI after clicking a deeplink/link in the NHS App or PEP Wayfinder UI. This includes navigating to this screen through PEP Wayfinder UI, e.g., questionnaires, reschedule/cancellation requests.\n\n *Please refer to the MIv3 UI Trigger Annex for a list of all UI trigger scenarios: [MIv3 UI Trigger Annex - APPT.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-annex---appt.pptx>)*"},"APPT-LIST-VIEW":{"required":["EventCode","AppointmentId","SessionId","Timestamp"],"type":"object","properties":{"EventCode":{"enum":["APPT-LIST-VIEW"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"SessionId":{"maxLength":100,"type":"string","description":"The unique identifier for the session during which this event occurred."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"}},"additionalProperties":false,"description":"#### In scope for:\n* NHS App\n#### Description:\n* This event should be sent whenever the appointment summary/list screen is displayed within the NHS App.\n* For each appointment visible on the screen, a separate event should be generated.\n* In cases where the appointment list is paginated, events should be sent for every appointment shown on the screen each time a new page of appointments is displayed.\n#### Notes:\n* This event applies to all outpatient, inpatient, and day case appointments.\n* 'User' refers to patients using your service.\n#### UI Trigger condition:\n* Capture event when a user clicks the 'Hospital and specialist appointments' button on the 'Upcoming and past appointments' screen.\n* In cases where the appointment list is paginated, this event should be captured when a user clicks on 'Next' or 'Previous' buttons to navigate the screens.\n\n *Please refer to the MIv3 UI Trigger Annex for a list of all UI trigger scenarios: [MIv3 UI Trigger Annex - APPT.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-annex---appt.pptx>)*"},"APPT-REQUEST-CANC-STARTED":{"required":["EventCode","AppointmentId","SessionId","Timestamp","RequestType","InteractionTrigger"],"type":"object","properties":{"EventCode":{"enum":["APPT-REQUEST-CANC-STARTED"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"SessionId":{"maxLength":100,"type":"string","description":"The unique identifier for the session during which this event occurred."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"},"RequestType":{"enum":["Request","Direct"],"type":"string","description":"Indicates whether a cancellation is processed as a request for later processing (request) or immediately (direct)."},"InteractionTrigger":{"enum":["Ask to cancel appointment","Cancel appointment","Start"],"type":"string","description":"Identifies the specific button that the user selected to initiate the cancellation journey."}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* This event is relevant for PEPs using the cancellation feature.\n* This event should be sent whenever a user starts a cancellation request (request journey) or starts cancelling an appointment (direct journey) regardless of whether the request has been completed or not.\n#### Notes:\n* 'User' refers to patients using your service.\n* Event should be sent every time the journey is initiated, e.g., multiple starts are valid, retries/abandoned attempts.\n#### UI Trigger condition:\n* Request journey: Capture event when a user clicks the 'Ask to cancel appointment' button on the 'View upcoming appointment' screen as well as when a user selects the 'start' button on the 'Ask to cancel your appointment' screen.\n* Direct journey: Capture event when a user selects the 'Cancel appointment' button on the 'View upcoming appointment' screen as well as when a user selects the 'start' button on the 'Cancel your appointment' screen.\n\n *Please refer to the MIv3 UI Trigger Annex for a list of all UI trigger scenarios: [MIv3 UI Trigger Annex - APPT.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-annex---appt.pptx>)*"},"APPT-REQUEST-CANC-COMPLETE":{"required":["EventCode","AppointmentId","SessionId","Timestamp","RequestType","Reason"],"type":"object","properties":{"EventCode":{"enum":["APPT-REQUEST-CANC-COMPLETE"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"SessionId":{"maxLength":100,"type":"string","description":"The unique identifier for the session during which this event occurred."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"},"RequestType":{"enum":["Request","Direct"],"type":"string","description":"Indicates whether a cancellation is processed as a request for later processing (request) or immediately (direct)."},"Reason":{"type":"string","description":"Indicates the reason selected by the user when requesting to cancel/cancelling the appointment, based on the options presented in the UI.\n\n**Notes:**  \n- For Mental Health appointments we accept a NULL value.\n- For other Care Settings, the actual value should be sent.","nullable":true}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* This event is relevant for PEPs using the cancellation feature.\n* This event should be sent whenever a user completes a cancellation request (request journey) or a user cancels an appointment (direct journey) and it is accepted by the system. The event shouldn't be sent when the user starts but does not complete the journey.\n* This event applies to cancellation actions initiated by users via the PEP Wayfinder UI only (not admin/system workflows).\n#### Notes:\n* 'User' refers to patients using your service.\n#### UI Trigger condition:\n* Request journey: Capture event when a user clicks the 'Request cancellation' button on the 'Review request' screen, redirecting them to the 'Your request to cancel has been submitted' screen.\n* Direct journey: Capture event when a user clicks the 'Cancel my appointment' button on the 'Review your details' screen, redirecting them to the 'Your appointment has been cancelled' screen.\n\n *Please refer to the MIv3 UI Trigger Annex for a list of all UI trigger scenarios: [MIv3 UI Trigger Annex - APPT.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-annex---appt.pptx>)*"},"APPT-REQUEST-RESCH-STARTED":{"required":["EventCode","AppointmentId","SessionId","Timestamp","RequestType","InteractionTrigger"],"type":"object","properties":{"EventCode":{"enum":["APPT-REQUEST-RESCH-STARTED"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"SessionId":{"maxLength":100,"type":"string","description":"The unique identifier for the session during which this event occurred."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"},"RequestType":{"enum":["Request","Direct"],"type":"string","description":"Indicates whether a reschedule is processed as a request for later processing (request) or immediately (direct)."},"InteractionTrigger":{"enum":["Ask to reschedule appointment","Reschedule appointment","Start"],"type":"string","description":"Identifies the specific button that the user selected to initiate the reschedule journey."}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* This event is relevant for PEPs using rescheduling feature.\n* This event should be sent whenever a user starts a rescheduling request (request journey) or starts rescheduling an appointment (direct journey) regardless of whether the request has been completed or not.\n#### Notes:\n* 'User' refers to patients using your service.\n* Event should be sent every time the journey is initiated, e.g., multiple starts are valid, retries/abandoned attempts.\n#### UI Trigger condition:\n* Request journey: Capture event when a user clicks the 'Ask to reschedule appointment' button on the 'View upcoming appointment' screen as well as when a user selects the 'start' button on the 'Ask to reschedule your appointment' screen.\n* Direct journey: Capture event when a user clicks the 'Reschedule appointment' button on the 'View upcoming appointment' screen as well as when a user selects the 'start' button on the 'Reschedule your appointment' screen.\n\n *Please refer to the MIv3 UI Trigger Annex for a list of all UI trigger scenarios: [MIv3 UI Trigger Annex - APPT.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-annex---appt.pptx>)*"},"APPT-REQUEST-RESCH-COMPLETE":{"required":["EventCode","AppointmentId","SessionId","Timestamp","RequestType","Reason"],"type":"object","properties":{"EventCode":{"enum":["APPT-REQUEST-RESCH-COMPLETE"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"SessionId":{"maxLength":100,"type":"string","description":"The unique identifier for the session during which this event occurred."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"},"RequestType":{"enum":["Request","Direct"],"type":"string","description":"Indicates whether a reschedule is processed as a request for later processing (request) or immediately (direct)."},"Reason":{"type":"string","description":"Indicates the reason selected by the user when rescheduling the appointment, based on the options presented in the UI.\n\n**Notes:**  \n- For Mental Health appointments we accept a NULL value.\n- For other Care Settings, the actual value should be sent.","nullable":true}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* This event is relevant for PEPs using the cancellation feature.\n* This event should be sent whenever a user completes a rescheduling request (request journey) or a user reschedules an appointment (direct journey) and it is accepted by the system. The event shouldn't be sent when the user starts but does not complete the journey.\n* This event applies to rescheduling actions initiated by users via the PEP Wayfinder UI only (not admin/system workflows).\n#### Notes:\n* 'User' refers to patients using your service.\n#### UI Trigger condition:\n* Request journey: Capture event when a user clicks the 'Request new appointment' button on the 'Review your request' screen.\n* Direct journey: Capture event when a user clicks the 'Reschedule my appointment' button on the 'Review Reschedule' screen, redirecting them to the 'Your appointment has been rescheduled' screen.\n\n *Please refer to the MIv3 UI Trigger Annex for a list of all UI trigger scenarios: [MIv3 UI Trigger Annex - APPT.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-annex---appt.pptx>)*"},"APPT-DIRECTIONS-REQUESTED":{"required":["EventCode","AppointmentId","SessionId","Timestamp"],"type":"object","properties":{"EventCode":{"enum":["APPT-DIRECTIONS-REQUESTED"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"SessionId":{"maxLength":100,"type":"string","description":"The unique identifier for the session during which this event occurred."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* This event should be sent when a user views directions for an upcoming appointment.\n#### Notes:\n* 'User' refers to patients using your service.\n#### UI Trigger condition:\n* Capture event when a user clicks the 'Maps and Directions' button e.g., on the appointment details screen, and this interaction opens the user's navigation application (e.g., Google Maps).\n* This event should not be captured if it opens a new screen within the app or displays the map within the same screen.\n\n *Please refer to the MIv3 UI Trigger Annex for a list of all UI trigger scenarios: [MIv3 UI Trigger Annex - APPT.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-annex---appt.pptx>)*"},"APPT-CONTACT-PHONE-SELECTED":{"required":["EventCode","AppointmentId","SessionId","Timestamp","EntryPoint"],"type":"object","properties":{"EventCode":{"enum":["APPT-CONTACT-PHONE-SELECTED"],"type":"string","description":"The code that identifies the type of event being recorded, using a defined set of standard values. This enables consistent classification, processing, and analysis of appointment-related events across systems."},"AppointmentId":{"maxLength":100,"type":"string","description":"The unique identifier for the appointment to which the event relates to."},"SessionId":{"maxLength":100,"type":"string","description":"The unique identifier for the session during which this event occurred."},"Timestamp":{"type":"string","description":"A timestamp to millisecond precision when the event occurred provided in UTC using ISO 8601 format. The timestamp should not change in the case of the event being resent.\n\n **Examples:**  \n- If the event occurred at 10:30AM on January 14th 2026 (GMT), the Timestamp would be: 2026-01-14T10:30:00.000Z\n- If the event occurred at 10:30AM on June 17th 2026 (BST), the Timestamp would be: 2026-06-17T09:30:00.000Z","format":"date-time"},"EntryPoint":{"enum":["View upcoming appointment","View past appointment","Ask to reschedule appointment - Start","Ask to reschedule appointment - New appointment date and time","Ask to reschedule appointment - Rescheduling reason","Ask to reschedule appointment - Review submission","Ask to reschedule appointment - Submitted","Reschedule appointment - Start","Reschedule appointment - New appointment date and time","Reschedule appointment - Rescheduling reason","Reschedule appointment - Review submission","Reschedule appointment - Submitted","Ask to cancel appointment - Start","Ask to cancel appointment - Cancellation reason","Ask to cancel appointment - Review cancellation","Ask to cancel appointment - Submitted","Cancel appointment - Start","Cancel appointment - Cancellation reason","Cancel appointment - Review cancellation","Cancel appointment - Submitted"],"type":"string","description":"Captures the entry point (screen) from which the user selected the option to contact the booking team."}},"additionalProperties":false,"description":"#### In scope for:\n* PEPs\n#### Description:\n* This event should be sent when a user clicks on the phone number to get help/contact the booking team.\n#### Notes:\n* 'User' refers to patients using your service.\n#### UI Trigger condition:\n* Capture event when a user clicks the telephone number displayed at the bottom following 'Contact the booking team on [phone number]', e.g., on the appointment details screen.\n\n *Please refer to the MIv3 UI Trigger Annex for a list of all UI trigger scenarios: [MIv3 UI Trigger Annex - APPT.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-annex---appt.pptx>)*"}},"responses":{"NoContent":{"description":"No Content"}}},"security":[{"ApiKeyAuth":[]}]}