{"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":"https://dev.api.service.nhs.uk/wayfinder-insights-api/","description":"Development"}],"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.","parameters":[{"name":"X-Correlation-ID","in":"header","description":"A GUID passed from the root initiator for each request made to the API. All systems are required to store the value as part of standard logging to provide traceability by unique ID in the event of debug/forensic etc. Data needs to be retained for 90 days.","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","format":"uuid"}},{"name":"client-id","in":"header","description":"Client id issued by the Wayfinder team.","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}}],"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-REVOKED"},{"$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","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":{"200":{"$ref":"#/components/responses/ValidRequest"},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/UnauthorizedError"}},"deprecated":false}}},"components":{"schemas":{"APPT":{"required":["EventCode","Id","Timestamp","NHSNumber","ODSCode","AppointmentDateTime","CreatedDateTime","EncounterClass","AppointmentType","CareSetting","SpecialityCode","AppointmentModality","IsVisibleInNHSApp","LocationName","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.\n\n **Notes:** \n- This field is required but may be submitted as null where an NHS Number is not available (e.g. a visitor who has not been assigned an NHS Number).\n- When populated, the value must be a valid 10-digit number.\n\n **Constraints:** Must be exactly 10 characters","nullable":true},"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 created 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 created 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 created 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 created 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 PEP 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.\n\n **Notes:**  \n- The following descriptions explain the interpretation of the allowed values for EncounterClass:\n  - **Outpatient**: A patient who attends for care without being admitted to hospital.\n  - **Inpatient**: A patient who is admitted to hospital and stays at least one night.\n  - **Day case**: A patient who is admitted for planned treatment or care and discharged on the same day."},"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.\n\n **Notes:**  \n- The following descriptions explain the interpretation of the allowed values for CareSetting:\n  - **Acute**: Hospital-based care for physical health conditions, including emergency, inpatient, day-case and outpatient care.\n  - **Mental Health**: Care primarily for mental health conditions, learning disabilities, autism or related needs, whether delivered in hospital or the community.\n  - **Community**: Care delivered by community health services in people's homes, care homes, community hospitals, clinics, schools or other community locations.\n  - **Specialist**: Care delivered by a designated specialist service for a particular condition, treatment, body system or patient group."},"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.\n\n *Please refer to the MIv3 UI - Trigger and Reference Annex for an example of this field: [MIv3 UI - Trigger and Reference Annex.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-and-reference-annex.pptx>)*"},"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.\n\n**Notes:**  \n- For trusts that support PIFU: \n  - Record **True** where the appointment is known to have been booked through the PIFU pathway.\n  - Record **False** where the appointment is known to have been booked outside of the PIFU pathway. \n  - The field is optional and does not need to be submitted where it cannot be determined whether the appointment was booked through the PIFU pathway.\n- For trusts that do not support PIFU, the field should be recorded as **False** by default."},"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 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 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.\n\n *Please refer to the MIv3 UI - Trigger and Reference Annex for an example of this field: [MIv3 UI - Trigger and Reference Annex.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-and-reference-annex.pptx>)*"}},"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* For the first 3 to 6 months following MIv3 go-live, this event should also be sent alongside any related child event (e.g. APPT-VIEW, APPT-CANC, APPT-RESCH).\n  - This is intended to capture appointments that were created before PEP began sending MIv3 events and would otherwise only appear through child events. After the transition period, child events should be submitted independently and the APPT event should only be sent when the appointment is created or updated. \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","Hospital","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**: The appointment was cancelled by, or on behalf of, the patient. This includes cancellations made via telephone, patient portal, NHS App, in person, or any other patient-initiated channel.\n  - **Hospital**: The appointment was cancelled by the provider organisation for any reason. This includes clinical decisions, service availability issues, administrative corrections, booking errors, system-driven cancellations, and other provider-initiated actions.\n  - **Unknown**: Used when the reason for the appointment cancellation is not available, not recorded, or cannot be determined.\n- Use of '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."},"NewAppointmentId":{"maxLength":100,"type":"string","description":"The identifier of the new appointment that replaces the original appointment following a reschedule."},"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","Hospital","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**: The appointment was rescheduled because the patient requested a change. This includes requests made via telephone, patient portal, NHS App, in person, or any other patient-initiated channel. This applies whether the change was carried out by the patient directly or by a provider or system on the patient's behalf.\n  - **Hospital**: The appointment was rescheduled by the provider organisation for any reason. This includes clinical decisions, service availability issues, administrative corrections, booking errors, system-driven rescheduling, and other provider-initiated changes.\n  - **Unknown**: Used when the reason for the appointment reschedule is not available, not recorded, or cannot be determined.\n- Use of '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.\n- MIv3 facilitates three rescheduling patterns:\n  1. Reschedule by updating the existing appointment (APPT-RESCH is not sent)\n  2. Reschedule by cancelling and rebooking (APPT-RESCH is not sent)\n  3. Explicit reschedule functionality (APPT-RESCH is sent)\n#### Rescheduling Guidelines:\n* Different PEPs may implement appointment rescheduling in different ways, and all three approaches shown below are considered valid:\n  - <u>Scenario 1: Reschedule by Updating the Existing Appointment</u>\n    - The appointment record (APPT) is retained and its date/time (AppointmentDateTime) is updated.\n    - Example Flow:\n      1. Appointment exists with AppointmentDateTime = 20/08/2026 11:00.\n      2. Admin/User reschedules the appointment to 01/09/2026 08:00.\n      3. PEP updates the existing appointment (APPT).\n      4. APPT-RESCH event is NOT sent.\n      5. The appointment subsequently receives outcome events such as: APPT-ATTENDED, APPT-DNA, APPT-CANC.\n  - <u>Scenario 2: Reschedule by Cancelling and Rebooking</u>\n    - The original appointment (APPT) is cancelled (APPT-CANC) and a new appointment is created (new APPT).\n    - Example Flow:\n      1. Appointment 123 exists with AppointmentDateTime = 20/08/2026 11:00.\n      2. Admin/User reschedules the appointment to 01/09/2026 08:00.\n      3. APPT-CANC is sent for appointment 123.\n      4. A new APPT event is sent for appointment 456 with AppointmentDateTime = 01/09/2026 08:00.\n      5. Appointment 456 subsequently receives outcome events such as: APPT-ATTENDED, APPT-DNA, APPT-CANC.\n  - <u>Scenario 3: Explicit Reschedule Functionality</u>\n    - Rescheduling creates a successor appointment (new APPT) and explicitly records the relationship between the old and new appointments (if possible).\n    - Example Flow:\n      1. Appointment 123 exists with AppointmentDateTime = 20/08/2026 11:00.\n      2. Admin/User reschedules the appointment to 01/09/2026 08:00.\n      3. APPT-RESCH is sent for appointment 123.\n      4. The event identifies a replacement appointment (e.g. NewAppointmentId = 456).\n      5. A new APPT event is sent for appointment 456 with AppointmentDateTime = 01/09/2026 08:00.\n      6. Appointment 456 subsequently receives outcome events such as: APPT-ATTENDED, APPT-DNA, APPT-CANC, and potentially another APPT-RESCH."},"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-REVOKED":{"required":["EventCode","AppointmentId","Timestamp"],"type":"object","properties":{"EventCode":{"enum":["APPT-REVOKED"],"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* This event should be sent when an appointment has been revoked by an NHS Trust, e.g. it has been deleted from the source system and is no longer considered a valid appointment record.\n#### Notes:\n* APPT-REVOKED must not be used for appointments that remain in the PEP system but are no longer visible to patients in the NHS App (e.g. hidden appointments). Appointment visibility should be represented using the IsVisibleInNHSApp field on the APPT event."},"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  * When a user views the appointment in a PEP Native App.\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 NHS App/PEP Wayfinder UI and PEP Native App.\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, e.g., questionnaires, reschedule/cancellation requests.\n* Capture event when a user views an appointment details through a PEP Native App.\n\n *Please refer to the MIv3 UI - Trigger and Reference Annex for a list of all UI trigger scenarios: [MIv3 UI - Trigger and Reference Annex.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-and-reference-annex.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 NHS App/PEP Wayfinder UI and PEP Native App.\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 and Reference Annex for a list of all UI trigger scenarios: [MIv3 UI - Trigger and Reference Annex.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-and-reference-annex.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  * This includes starting the cancellation process through a PEP Native App.\n#### Notes:\n* 'User' refers to patients using NHS App/PEP Wayfinder UI and PEP Native App.\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* This event should also be captured when a user initiates either a request cancellation journey or a direct cancellation journey through a PEP Native App, regardless of the screen names, navigation flow, or UI design used by the provider.\n\n *Please refer to the MIv3 UI - Trigger and Reference Annex for a list of all UI trigger scenarios: [MIv3 UI - Trigger and Reference Annex.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-and-reference-annex.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 includes completing the cancellation process through a PEP Native App.\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 NHS App/PEP Wayfinder UI and PEP Native App.\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* This event should also be captured when a user completes either a request cancellation journey or a direct cancellation journey through a PEP Native App, regardless of the screen names, navigation flow, or UI design used by the provider.\n\n *Please refer to the MIv3 UI - Trigger and Reference Annex for a list of all UI trigger scenarios: [MIv3 UI - Trigger and Reference Annex.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-and-reference-annex.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  * This includes starting the rescheduling process through a PEP Native App.\n#### Notes:\n* 'User' refers to patients using NHS App/PEP Wayfinder UI and PEP Native App.\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* This event should also be captured when a user initiates either a request reschedule journey or a direct rescheduling journey through a PEP Native App, regardless of the screen names, navigation flow, or UI design used by the provider.\n\n *Please refer to the MIv3 UI - Trigger and Reference Annex for a list of all UI trigger scenarios: [MIv3 UI - Trigger and Reference Annex.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-and-reference-annex.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 rescheduling 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 includes completing the rescheduling process through a PEP Native App.\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 NHS App/PEP Wayfinder UI and PEP Native App.\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* This event should also be captured when a user completes either a request reschedule journey or a direct reschedule journey through a PEP Native App, regardless of the screen names, navigation flow, or UI design used by the provider.\n\n *Please refer to the MIv3 UI - Trigger and Reference Annex for a list of all UI trigger scenarios: [MIv3 UI - Trigger and Reference Annex.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-and-reference-annex.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 NHS App/PEP Wayfinder UI.\n* We do not expect to receive this event from PEP Native App.\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 and Reference Annex for a list of all UI trigger scenarios: [MIv3 UI - Trigger and Reference Annex.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-and-reference-annex.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 link with phone number to get help/contact the booking team.\n#### Notes:\n* 'User' refers to patients using NHS App/PEP Wayfinder UI.\n* We do not expect to receive this event from PEP Native App.\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 and Reference Annex for a list of all UI trigger scenarios: [MIv3 UI - Trigger and Reference Annex.pptx](<https://digital.nhs.uk/binaries/content/assets/website-assets/developer/wayfinder-insights-api/miv3-ui-trigger-and-reference-annex.pptx>)*"}},"responses":{"ValidRequest":{"description":"OK","headers":{"X-Correlation-ID":{"name":"","in":"header","description":"GUID echoed back when provided in the request.","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","format":"uuid","example":"af652e7c-0581-4ccb-bbc2-fa5509e0929d"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"}}}}}},"InvalidRequest":{"description":"**Invalid request** validation failed. If the request contains any invalid events, the entire request will be returned invalid and no events will have been accepted. The index of the first error will be returned in the response.","headers":{"X-Correlation-ID":{"name":"","in":"header","description":"GUID echoed back when provided in the request.","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","format":"uuid","example":"af652e7c-0581-4ccb-bbc2-fa5509e0929d"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"validation error for {event-name} event at index [{index}]: {validation-error}"}}}}}},"UnauthorizedError":{"description":"**Unauthorised** Access token is missing or invalid","headers":{"X-Correlation-ID":{"name":"","in":"header","description":"GUID echoed back when provided in the request.","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","format":"uuid","example":"af652e7c-0581-4ccb-bbc2-fa5509e0929d"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string","example":"Access Token expired"},"detail":{"type":"object","properties":{"errorcode":{"type":"string","example":"keymanagement.service.access_token_expired"}}}}}}}}}}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","description":"This endpoint exists only to expose the Appointment schema.","name":"apikey","in":"header"}}},"security":[{"ApiKeyAuth":[]}]}