{"openapi":"3.0.3","info":{"title":"GP Registrations Management Information API","description":"## Overview\nUse this API to send real-time GP registrations metrics to NHS for service monitoring of patient EHR transfers between GP Practices.\n\nThis API replaces the weekly submission of GP2GP information sent to us via a MESH mailbox, as required by [GP2GP V2.2b](https://gpitbjss.atlassian.net/wiki/spaces/DCSDCS/pages/1391134336/GP2GP).\n\nYou can send us Management Information for registrations regardless of the transfer protocol used (GP2GP or GP Connect).\n\nUsing the API, you can send us information about the following:\n\n* when a requesting practice completes a registration\n* the compatibility of that registration with an electronic transfer\n* when the requesting practice requests an EHR\n* when the sending practice sends an EHR\n* when the requesting practice received attachments/documents\n* when the requesting practice is ready for the user to integrate the transfer\n* when the requesting practice has integrated the EHR received\n* when an error, or negative acknowledgement occurs\n* degrades\n\nYou cannot:\n\n* read any management information data submitted to us\n\n## Who can use this API\nThis API can only be used where there is a legal basis to do so. Make sure you have a valid use case before you go too far with your development.\nYou must do this before you can go live (see ‘Onboarding’ below).\n\n## Related APIs\nUse [GP2GP - HL7 API](https://digital.nhs.uk/developer/api-catalogue/gp2gp) to learn more the GP2GP protocol.\n\nUse the following to learn more about the GP Connect protocol:\n* [GP Connect Access Document - FHIR API](https://digital.nhs.uk/developer/api-catalogue/gp-connect-access-document-fhir)\n* [GP Connect Access Record: HTML - FHIR API](https://digital.nhs.uk/developer/api-catalogue/gp-connect-access-record-html-fhir)\n* [GP Connect Access Record: Structured - FHIR API](https://digital.nhs.uk/developer/api-catalogue/gp-connect-access-record-structured-fhir)\n* [GP Connect Send Document - FHIR API](https://digital.nhs.uk/developer/api-catalogue/gp-connect-send-document-fhir)\n\n## API status and roadmap\nThis API is [in production, beta](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).\n\nTo see our roadmap, or to suggest, comment or vote on features for this API, see our [interactive product backlog](https://nhs-digital-api-management.featureupvote.com/suggestions/199324/gp-registrations-management-information-api).\n\nIf you have any other queries, please [contact us](https://digital.nhs.uk/developer/help-and-support).\n\n## Service level\nThis API is a silver service, meaning it is operational 24 hours a day, 365 days a year but only supported during business hours (8am to 6pm), Monday to Friday excluding bank holidays.\n\nFor more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).\n\n## Technology\nThis API uses HTTP POST to submit data.\n\n## Network access\nThis 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#internet-only-apis).\n\n## Security and authorisation\n\nThis API is [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis),\nmeaning we authenticate the calling application but not the end user.\nTo use this access mode, use the following security pattern:\n* [Application-restricted RESTful APIs - API key authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-api-key-authentication)\n\n## Environments and testing\n\n| Environment       | Base URL                                                               |\n| ----------------- | ---------------------------------------------------------------------- |\n| Integration test  | `https://int.api.service.nhs.uk/gp-registrations-mi/`                  |\n| Production        | `https://api.service.nhs.uk/gp-registrations-mi/`                      |\n\n\n### Integration testing\nOur [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing):\n* is for formal integration testing or early developer testing\n* includes authorisation\n\n## Onboarding\nYou need to get your software approved by us before it can go live with this API. We call this onboarding. The onboarding process can sometimes be quite long, so it’s worth planning well ahead.\n\nAs part of this process, you need to demonstrate your technical conformance to the requirements for this API.\n\nTo understand how our online digital onboarding process works, see [digital onboarding](https://digital.nhs.uk/developer/guides-and-documentation/digital-onboarding).\n\n<div class=\"nhsd-m-emphasis-box nhsd-m-emphasis-box--emphasis nhsd-!t-margin-bottom-6\" aria-label=\"Highlighted Information\">\n    <div class=\"nhsd-a-box nhsd-a-box--border-blue\">\n        <div class=\"nhsd-m-emphasis-box__image-box\">\n            <figure class=\"nhsd-a-image\">\n                <picture class=\"nhsd-a-image__picture\">\n                    <img src=\"http://digital.nhs.uk/binaries/content/gallery/icons/play-circle.svg?colour=231f20\" alt=\"\" style=\"object-fit:fill\">\n                </picture>\n            </figure>\n        </div>\n        <div class=\"nhsd-m-emphasis-box__content-box\">\n            <div data-uipath=\"website.contentblock.emphasis.content\" class=\"nhsd-t-word-break\"><p class=\"nhsd-t-body\">To get started, sign in or create a <a href=\"https://onboarding.prod.api.platform.nhs.uk/\">developer account</a>, then select 'product onboarding'.</p></div>            \n        </div>\n    </div>\n</div>\n\n## Errors\nWe use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:\n\n* 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action\n* 400 to 499 if it failed because of a client error by your application\n* 500 to 599 if it failed because of an error on our server\n\nErrors specific to each API are shown in the Endpoints section, under Response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.\n","contact":{"email":"gp-registrations-data@nhs.net"},"license":{"name":"MIT"},"version":"0.0.1"},"servers":[{"url":"https://int.api.service.nhs.uk/gp-registrations-mi","description":"Integration Environment"},{"url":"https://api.service.nhs.uk/gp-registrations-mi","description":"Production Environment"}],"paths":{"/document-responses":{"post":{"tags":["Registration"],"summary":"Submit Document Responses","description":"This event records the addition of an attachment to the patient record.\n\n**Submitted by:** Requesting practice\n\n**When to send:** As each document is processed and saved into the clinical system.\n\nFor HL7 v3 EHRs, this will be when the attachments are decoded from the message fragments.\n\nFor FHIR EHRs, this will be when the attachment transfer is complete.\n\n**Notes:** If a technical error or negative acknowledgment occurs, an Error event must be submitted, including the response code if applicable.\n\n### Request Body example:\n```json\n{\n  \"conversationId\": \"4345-986959-4930-684038\",\n  \"registrationEventDateTime\": \"2020-02-08T08:30:25Z\",\n  \"reportingSystemSupplier\": \"SUPPLIER_ODS_CODE\",\n  \"reportingPracticeOdsCode\": \"ABC1234\",\n  \"requestingPracticeOdsCode\": \"ABC1234\",\n  \"sendingPracticeOdsCode\": \"XYZ4567\",\n  \"payload\": {\n    \"attachment\": {\n      \"clinicalType\": \"SCANNED_DOCUMENT\",\n      \"mimeType\": \"application/pdf\",\n      \"sizeBytes\": 3084322\n    },\n    \"documentMigration\": {\n      \"successful\": false,\n      \"reason\": \"Large file size\"\n    }\n  }\n}\n```\n","operationId":"document-responses","requestBody":{"description":"The request body required for the Document Responses event.\n","content":{"application/json":{"schema":{"type":"object","allOf":[{"required":["conversationId","registrationEventDateTime","reportingSystemSupplier","reportingPracticeOdsCode","requestingPracticeOdsCode","sendingPracticeOdsCode"],"type":"object","properties":{"conversationId":{"type":"string","description":"A uniqueID that is used throughout the registration including during the GP2GP or GP Connect transfer. This should be generated at the point of registration.","example":"A1234BC5-6789-123D-EFGH-I45678910JK1"},"registrationEventDateTime":{"type":"string","description":"The ISO 8601 Date time in UTC that this event occurred.","format":"date-time","example":"2020-02-08 08:30:27+00:00"},"reportingPracticeOdsCode":{"type":"string","description":"The ODS code of the practice generating this event. This could be the sending or requesting practice depending on who is submiting this event.","example":"A12345"},"reportingSystemSupplier":{"type":"string","description":"The system supplier who generated the event. The ODS code assigned to you as a supplier by NHSD.","example":"supplierOdsCode"},"requestingPracticeOdsCode":{"type":"string","description":"The ODS code of the requesting practice.","example":"A12345"},"sendingPracticeOdsCode":{"type":"string","description":"The ODS code of the sending practice.","example":"X12345"}}},{"required":["payload"],"type":"object","properties":{"payload":{"required":["attachment","documentMigration"],"type":"object","properties":{"attachment":{"required":["clinicalType","mimeType","sizeBytes"],"type":"object","properties":{"MimeType":{"type":"string","description":"The original mime type of the attachment this placeholder is for. \n\nExamples:\n - audio/mpeg\n - image/jpeg\n - application/pdf\n","example":"audio/mpeg"},"clinicalType":{"enum":["SCANNED_DOCUMENT","ORIGINAL_TEXT_DOCUMENT","OCR_TEXT_DOCUMENT","IMAGE","AUDIO_DICTATION","OTHER_AUDIO","OTHER_DIGITAL_SIGNAL","EDI_MESSAGE","NOT_AVAILABLE","OTHER"],"type":"string","description":"The text value corresponding to the value used in EhrAttachmentCode in the code element of ExternalDocument as defined in the MIM.","example":"SCANNED_DOCUMENT"},"sizeBytes":{"type":"integer","description":"The size in bytes of the attachment.","example":3084322}},"description":"This describes the attributes of the document."},"documentMigration":{"required":["successful"],"type":"object","properties":{"reason":{"type":"string","description":"If the addition of the attachment to the patient records fails, then this field must be populated with an error code and/or description."},"successful":{"type":"boolean","description":"Whether the migration or transfer of the document was successful.","example":false}}}},"description":"An object that contains the detailed payload of the event."}}}]}}},"required":true},"responses":{"200":{"description":"OK. Expected response to a valid request","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","example":"1234-1234-1234-1234"}},"example":{"eventId":"1234-1234-1234-1234"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"reportingPracticeOdsCode must not be empty"}},"message":{"type":"string","example":"Failed to validate fields"},"status":{"type":"string","example":"BAD_REQUEST"}},"example":{"errors":["reportingPracticeOdsCode must not be empty"],"message":"Failed to validate fields","status":"BAD_REQUEST"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}},"message":{"type":"string","example":"Something went wrong"},"status":{"type":"string","example":"INTERNAL_SERVER_ERROR"}},"example":{"errors":["Internal Server Error"],"message":"Something went wrong","status":"INTERNAL_SERVER_ERROR"}}}}}},"deprecated":false,"security":[{"app-level0":[]}]}},"/ehr-degrades":{"post":{"tags":["Registration"],"summary":"Submit EHR Degrades","description":"This event gathers information about the degraded data within an EHR once it has been received.\n\nThe following information **MUST NOT** be sent:\n  - conversationID\n  - registrationEventDateTime\n  - reportingPracticeODSCode\n  - requestingPracticeODSCode\n  - sendingPracticeODSCode\n\n**Submitted by:** Requesting practice\n\n**When to send:** When the degrades for the EHR have been identified.\n\n**Notes:** Submit Errors events **MUST NOT** be sent in relation to degrades.\n\n**No information that relates the degrade to a particular transfer may be sent.**\n\n### Request Body example:\n```json\n{\n  \"reportingSystemSupplier\": \"SUPPLIER_ODS_CODE\",\n  \"payload\": {\n    \"degrades\": [\n      {\n        \"type\": \"RECORD_ENTRY\",\n        \"reason\": \"CODE\",\n        \"coding\": [\n          {\n            \"code\": \"1676331000000110\",\n            \"system\": \"http://snomed.info/sct\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n","operationId":"ehr-degrades","requestBody":{"description":"The request body required for the EHR Degrades event.\n","content":{"application/json":{"schema":{"type":"object","allOf":[{"required":["reportingSystemSupplier","payload"],"type":"object","properties":{"payload":{"required":["degrades"],"type":"object","properties":{"degrades":{"type":"array","items":{"required":["type","reason","coding"],"properties":{"coding":{"type":"array","items":{"required":["code","system"],"properties":{"code":{"type":"string","description":"The designated code for this particular degrade.","example":1676331000000110},"system":{"type":"string","description":"The system in which this degrade occurred.","example":"http://snomed.info/sct"}}},"description":"Add the original code(s) that has degraded and the coding system the original code is from."},"reason":{"enum":["CODE","NUMERIC_VALUE","DRUG_NAME","OTHER"],"type":"string","description":"The reason for the degrade.  \n\n **CODE** - code cannot be mapped  \n **NUMERIC_VALUE** - numerical value has been degraded to text  \n **DRUG_NAME** - drug name has been made textual  \n **OTHER** - any other reason  \n","example":"CODE"},"type":{"enum":["MEDICATION","NON_DRUG_ALLERGY","DRUG_ALLERGY","REFERRAL","PLAN","REQUEST","RECORD_ENTRY","OTHER"],"type":"string","description":"The type/category of this degrade. As per the degraded entry terms in NPFIT-PC-BLD-0132.03 GP2GP Supplementary Specification on Structured Degrade Handling.pdf.","example":"RECORD_ENTRY"}}},"description":"A list that contains information about the degrades that were in the EHR.\n\nAn individual entry must be added for each degrade. \n"}},"description":"An object that contains the detailed payload of the event."},"reportingSystemSupplier":{"type":"string","description":"The system supplier who generated the event. The ODS code assigned to you as a supplier by NHSD.","example":"SupplierOdsCode"}}}]}}},"required":true},"responses":{"200":{"description":"OK. Expected response to a valid request","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","example":"1234-1234-1234-1234"}},"example":{"eventId":"1234-1234-1234-1234"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"reportingPracticeOdsCode must not be empty"}},"message":{"type":"string","example":"Failed to validate fields"},"status":{"type":"string","example":"BAD_REQUEST"}},"example":{"errors":["reportingPracticeOdsCode must not be empty"],"message":"Failed to validate fields","status":"BAD_REQUEST"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}},"message":{"type":"string","example":"Something went wrong"},"status":{"type":"string","example":"INTERNAL_SERVER_ERROR"}},"example":{"errors":["Internal Server Error"],"message":"Something went wrong","status":"INTERNAL_SERVER_ERROR"}}}}}},"deprecated":false,"security":[{"app-level0":[]}]}},"/ehr-integrations":{"post":{"tags":["Registration"],"summary":"Submit EHR Integrations","description":"This event gathers information about the success or failure of the integration of the record into the requesting practice clinical system.\n\n**Submitted by:** Requesting practice\n\n**When to send:** When the EHR has been integrated by the user at the requesting practice.\n\nFor HL7 v3 EHRs, this will be when the attachments are decoded from the message fragments.\n\nFor FHIR EHRs, this will be when the attachment transfer is complete.\n\n**Notes:** If a technical error or negative acknowledgment occurs, an Error event must be submitted, including the response code if applicable.\n\n### Request Body example:\n```json\n{\n  \"conversationId\": \"4345-986959-4930-684038\",\n  \"registrationEventDateTime\": \"2020-02-08T08:30:25Z\",\n  \"reportingSystemSupplier\": \"SUPPLIER_ODS_CODE\",\n  \"reportingPracticeOdsCode\": \"ABC1234\",\n  \"requestingPracticeOdsCode\": \"ABC1234\",\n  \"sendingPracticeOdsCode\": \"XYZ4567\",\n  \"payload\": {\n    \"integration\": {\n      \"outcome\": \"INTEGRATED\"\n    }\n  }\n}\n```\n","operationId":"ehr-integrations","requestBody":{"description":"The request body required for the EHR Integrations event.\n","content":{"application/json":{"schema":{"type":"object","allOf":[{"required":["conversationId","registrationEventDateTime","reportingSystemSupplier","reportingPracticeOdsCode","requestingPracticeOdsCode","sendingPracticeOdsCode"],"type":"object","properties":{"conversationId":{"type":"string","description":"A uniqueID that is used throughout the registration including during the GP2GP or GP Connect transfer. This should be generated at the point of registration.","example":"A1234BC5-6789-123D-EFGH-I45678910JK1"},"registrationEventDateTime":{"type":"string","description":"The ISO 8601 Date time in UTC that this event occurred.","format":"date-time","example":"2020-02-08 08:30:27+00:00"},"reportingPracticeOdsCode":{"type":"string","description":"The ODS code of the practice generating this event. This could be the sending or requesting practice depending on who is submiting this event.","example":"A12345"},"reportingSystemSupplier":{"type":"string","description":"The system supplier who generated the event. The ODS code assigned to you as a supplier by NHSD.","example":"supplierOdsCode"},"requestingPracticeOdsCode":{"type":"string","description":"The ODS code of the requesting practice.","example":"A12345"},"sendingPracticeOdsCode":{"type":"string","description":"The ODS code of the sending practice.","example":"X12345"}}},{"required":["payload"],"type":"object","properties":{"payload":{"required":["integration"],"type":"object","properties":{"integration":{"required":["outcome"],"type":"object","properties":{"outcome":{"enum":["INTEGRATED","INTEGRATED_AND_SUPPRESSED","SUPPRESSED_AND_REACTIVATED","FILED_AS_ATTACHMENT","REJECTED","INTERNAL_TRANSFER","FAILED_TO_INTEGRATE"],"type":"string","description":"The outcome of this integration. \n\n **INTEGRATED** - Integrate incoming record for non-returning patients OR merge incoming record with existing record for returning patients  \n **INTEGRATED_AND_SUPPRESSED** - Integrate incoming record and suppress existing record, only use this status for returning patients  \n **SUPPRESSED_AND_REACTIVATED** - Integrate and suppress incoming record and reactivate old record, only use this status for returning patients  \n **FILED_AS_ATTACHMENT** - For GP2GP 1.1a only  \n **REJECTED** - Reject record  \n **INTERNAL_TRANSFER** - When the EHR transfer between the practices is internal within a single system and will not use GP2GP or GP Connect  \n **FAILED_TO_INTEGRATE** - Use this if the EHR failed to integrate. If there is an error at this point an Error event must be sent\n","example":"INTEGRATED"}}}},"description":"An object that contains the detailed payload of the event."}}}]}}},"required":true},"responses":{"200":{"description":"OK. Expected response to a valid request","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","example":"1234-1234-1234-1234"}},"example":{"eventId":"1234-1234-1234-1234"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"reportingPracticeOdsCode must not be empty"}},"message":{"type":"string","example":"Failed to validate fields"},"status":{"type":"string","example":"BAD_REQUEST"}},"example":{"errors":["reportingPracticeOdsCode must not be empty"],"message":"Failed to validate fields","status":"BAD_REQUEST"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}},"message":{"type":"string","example":"Something went wrong"},"status":{"type":"string","example":"INTERNAL_SERVER_ERROR"}},"example":{"errors":["Internal Server Error"],"message":"Something went wrong","status":"INTERNAL_SERVER_ERROR"}}}}}},"deprecated":false,"security":[{"app-level0":[]}]}},"/ehr-requests":{"post":{"tags":["Registration"],"summary":"Submit EHR Requests","description":"This event logs when the EHR request has been sent to the sending practice.\n\n**Submitted by:** Requesting practice\n\n**When to send:** When the EHR request has been sent to the sending practice.\n\n**Notes:** If a technical error or negative acknowledgment occurs, an Error event must be submitted, including the response code if applicable.\n\n### Request Body example:\n```json\n{\n  \"conversationId\": \"4345-986959-4930-684038\",\n  \"registrationEventDateTime\": \"2020-02-08T08:30:25Z\",\n  \"reportingSystemSupplier\": \"SUPPLIER_ODS_CODE\",\n  \"reportingPracticeOdsCode\": \"ABC1234\",\n  \"requestingPracticeOdsCode\": \"ABC1234\",\n  \"sendingPracticeOdsCode\": \"XYZ4567\"\n}\n```\n","operationId":"ehr-requests","requestBody":{"description":"The request body required for the EHR Requests event.\n","content":{"application/json":{"schema":{"type":"object","allOf":[{"required":["conversationId","registrationEventDateTime","reportingSystemSupplier","reportingPracticeOdsCode","requestingPracticeOdsCode","sendingPracticeOdsCode"],"type":"object","properties":{"conversationId":{"type":"string","description":"A uniqueID that is used throughout the registration including during the GP2GP or GP Connect transfer. This should be generated at the point of registration.","example":"A1234BC5-6789-123D-EFGH-I45678910JK1"},"registrationEventDateTime":{"type":"string","description":"The ISO 8601 Date time in UTC that this event occurred.","format":"date-time","example":"2020-02-08 08:30:27+00:00"},"reportingPracticeOdsCode":{"type":"string","description":"The ODS code of the practice generating this event. This could be the sending or requesting practice depending on who is submiting this event.","example":"A12345"},"reportingSystemSupplier":{"type":"string","description":"The system supplier who generated the event. The ODS code assigned to you as a supplier by NHSD.","example":"supplierOdsCode"},"requestingPracticeOdsCode":{"type":"string","description":"The ODS code of the requesting practice.","example":"A12345"},"sendingPracticeOdsCode":{"type":"string","description":"The ODS code of the sending practice.","example":"X12345"}}}]}}},"required":true},"responses":{"200":{"description":"OK. Expected response to a valid request","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","example":"1234-1234-1234-1234"}},"example":{"eventId":"1234-1234-1234-1234"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"reportingPracticeOdsCode must not be empty"}},"message":{"type":"string","example":"Failed to validate fields"},"status":{"type":"string","example":"BAD_REQUEST"}},"example":{"errors":["reportingPracticeOdsCode must not be empty"],"message":"Failed to validate fields","status":"BAD_REQUEST"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}},"message":{"type":"string","example":"Something went wrong"},"status":{"type":"string","example":"INTERNAL_SERVER_ERROR"}},"example":{"errors":["Internal Server Error"],"message":"Something went wrong","status":"INTERNAL_SERVER_ERROR"}}}}}},"deprecated":false,"security":[{"app-level0":[]}]}},"/ehr-responses":{"post":{"tags":["Registration"],"summary":"Submit EHR Responses","description":"This event logs when a response to the EHR request has been sent. It contains details of the EHR and attachment placeholders.\n\n**Submitted by:** Sending practice\n\n**When to send:** When the EHR response has been sent by the sending practice.\n\n**Notes:** If a technical error or negative acknowledgment occurs, an Error event must be submitted, including the response code if applicable.\n\n### Request Body example:\n```json\n{\n  \"conversationId\": \"4345-986959-4930-684038\",\n  \"registrationEventDateTime\": \"2020-02-08T08:30:25Z\",\n  \"reportingSystemSupplier\": \"SUPPLIER_ODS_CODE\",\n  \"reportingPracticeOdsCode\": \"ABC1234\",\n  \"requestingPracticeOdsCode\": \"ABC1234\",\n  \"sendingPracticeOdsCode\": \"XYZ4567\",\n  \"payload\": {\n    \"ehr\": {\n      \"ehrStructuredSizeBytes\": 4096,\n      \"placeholders\": [\n        {\n          \"generatedBy\": \"PRE_EXISTING\",\n          \"clinicalType\": \"SCANNED_DOCUMENT\",\n          \"reason\": \"FILE_NOT_FOUND\",\n          \"originalMimeType\": \"application/pdf\"\n        },\n        {\n          \"generatedBy\": \"SENDER\",\n          \"clinicalType\": \"AUDIO_DICTATION\",\n          \"reason\": \"FILE_DELETED\",\n          \"originalMimeType\": \"audio/mpeg\"\n        }\n      ]\n    }\n  }\n}\n```\n","operationId":"ehr-responses","requestBody":{"description":"The request body required for the EHR Responses event.\n","content":{"application/json":{"schema":{"type":"object","allOf":[{"required":["conversationId","registrationEventDateTime","reportingSystemSupplier","reportingPracticeOdsCode","requestingPracticeOdsCode","sendingPracticeOdsCode"],"type":"object","properties":{"conversationId":{"type":"string","description":"A uniqueID that is used throughout the registration including during the GP2GP or GP Connect transfer. This should be generated at the point of registration.","example":"A1234BC5-6789-123D-EFGH-I45678910JK1"},"registrationEventDateTime":{"type":"string","description":"The ISO 8601 Date time in UTC that this event occurred.","format":"date-time","example":"2020-02-08 08:30:27+00:00"},"reportingPracticeOdsCode":{"type":"string","description":"The ODS code of the practice generating this event. This could be the sending or requesting practice depending on who is submiting this event.","example":"A12345"},"reportingSystemSupplier":{"type":"string","description":"The system supplier who generated the event. The ODS code assigned to you as a supplier by NHSD.","example":"supplierOdsCode"},"requestingPracticeOdsCode":{"type":"string","description":"The ODS code of the requesting practice.","example":"A12345"},"sendingPracticeOdsCode":{"type":"string","description":"The ODS code of the sending practice.","example":"X12345"}}},{"required":["payload"],"type":"object","properties":{"payload":{"required":["ehr"],"type":"object","properties":{"ehr":{"properties":{"ehrStructuredSizeBytes":{"type":"integer","description":"The total size in bytes of structured part of the GP2GP message (attachments are NOT to be included).","example":4956},"placeholders":{"type":"array","items":{"required":["clinicalType","generatedBy","reason","originalMimeType"],"properties":{"clinicalType":{"enum":["SCANNED_DOCUMENT","ORIGINAL_TEXT_DOCUMENT","OCR_TEXT_DOCUMENT","IMAGE","AUDIO_DICTATION","OTHER_AUDIO","OTHER_DIGITAL_SIGNAL","EDI_MESSAGE","NOT_AVAILABLE","OTHER"],"type":"string","description":"The text value corresponding to the value used in EhrAttachmentCode in the code element of ExternalDocument as defined in the MIM.","example":"SCANNED_DOCUMENT"},"generatedBy":{"enum":["SENDER","PRE_EXISTING"],"type":"string","description":"Whether the sending practice generated the placeholder, or it already existed in the EHR.","example":"SENDER"},"originalMimeType":{"type":"string","description":"The original mime type of the attachment this placeholder is for. \n\nExamples:\n - audio/mpeg\n - image/jpeg\n - application/pdf\n","example":"audio/mpeg"},"reason":{"enum":["FILE_TYPE_UNSUPPORTED","FILE_DELETED","FILE_NOT_FOUND","FILE_LOCKED","UNABLE_TO_DETERMINE_PROBLEM"],"type":"string","description":"The reason the placeholder was generated. These codes should match the values described in [NPFIT-PC-BLD-0099.04 GP2GP Handling Missing Attachments.pdf](https://gpitbjss.atlassian.net/wiki/download/attachments/12665978882/NPFIT-PC-BLD-0099.04%20GP2GP%20Handling%20Missing%20Attachments.pdf?version=1&modificationDate=1703173853072&cacheVersion=1&api=v2)\nwhich is found on [GP2GP v6.0.0](https://gpitbjss.atlassian.net/wiki/spaces/DCSDCS/pages/12665978882/GP2GP+v6.0.0).\n","example":"FILE_TYPE_UNSUPPORTED"}}},"description":"Required when placeholders are present. \n\nA list that contains information about the attachments that were in the record but not contained in the electronic transfer or were unable to be ingested into the requesting system.\n\nAn individual entry must be added for each placeholder in the transfer.\n"}}}},"description":"An object that contains the detailed payload of the event."}}}]}}},"required":true},"responses":{"200":{"description":"OK. Expected response to a valid request","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","example":"1234-1234-1234-1234"}},"example":{"eventId":"1234-1234-1234-1234"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"reportingPracticeOdsCode must not be empty"}},"message":{"type":"string","example":"Failed to validate fields"},"status":{"type":"string","example":"BAD_REQUEST"}},"example":{"errors":["reportingPracticeOdsCode must not be empty"],"message":"Failed to validate fields","status":"BAD_REQUEST"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}},"message":{"type":"string","example":"Something went wrong"},"status":{"type":"string","example":"INTERNAL_SERVER_ERROR"}},"example":{"errors":["Internal Server Error"],"message":"Something went wrong","status":"INTERNAL_SERVER_ERROR"}}}}}},"deprecated":false,"security":[{"app-level0":[]}]}},"/errors":{"post":{"tags":["Registration"],"summary":"Submit Errors","description":"This event gathers information about all errors and events that trigger the sending of a negative acknowledgement that occur during a registration. The error codes referenced should match the values described in \n[NPFIT-PC-BLD-0083.08 GP2GP Response Codes.pdf](https://gpitbjss.atlassian.net/wiki/download/attachments/12665978882/NPFIT-PC-BLD-0083.08%20GP2GP%20Response%20Codes.pdf?version=1&modificationDate=1703173853480&cacheVersion=1&api=v2)\nwhich is found on [GP2GP v6.0.0](https://gpitbjss.atlassian.net/wiki/spaces/DCSDCS/pages/12665978882/GP2GP+v6.0.0).\n\nThis is used to understand errors and prioritise their resolution to support the successful transfer of patient EHRs.\n\n**Submitted by:** Requesting practice or Sending practice, whichever encounters the issue\n\n**When to send:** When an issue occurs that prevents the successful processing of the patient EHR (or a component of the EHR) then this endpoint should be called.\n\n**Notes:** All negative acknowledgement defined in the specification must be reported as errors. However, this endpoint is not limited to negative acknowledgements.\n\n  Anytime a technical error occurs that prevents the transfers from starting or completing, this must be reported using this endpoint.\n\n  Error events **MUST NOT** be submitted for failures or errors relating to Degrades.\n\n### Request Body example:\n```json\n{\n  \"conversationId\": \"4345-986959-4930-684038\",\n  \"registrationEventDateTime\": \"2020-02-08T08:30:26Z\",\n  \"reportingSystemSupplier\": \"SUPPLIER_ODS_CODE\",\n  \"reportingPracticeOdsCode\": \"ABC1234\",\n  \"requestingPracticeOdsCode\": \"ABC1234\",\n  \"sendingPracticeOdsCode\": \"XYZ4567\",\n  \"payload\": {\n    \"error\": {\n      \"errorCode\": \"99\",\n      \"errorDescription\": \"unexpected error\",\n      \"failurePoint\": \"EHR_RESPONSE\"\n    }\n  }\n}\n```\n","operationId":"errors","requestBody":{"description":"The request body required for the Errors event.\n","content":{"application/json":{"schema":{"type":"object","allOf":[{"required":["conversationId","registrationEventDateTime","reportingSystemSupplier","reportingPracticeOdsCode","requestingPracticeOdsCode"],"type":"object","properties":{"conversationId":{"type":"string","description":"A uniqueID that is used throughout the registration including during the GP2GP or GP Connect transfer. This should be generated at the point of registration.","example":"A1234BC5-6789-123D-EFGH-I45678910JK1"},"registrationEventDateTime":{"type":"string","description":"The ISO 8601 Date time in UTC that this event occurred.","format":"date-time","example":"2020-02-08 08:30:27+00:00"},"reportingPracticeOdsCode":{"type":"string","description":"The ODS code of the practice generating this event. This could be the sending or requesting practice depending on who is submiting this event.","example":"A12345"},"reportingSystemSupplier":{"type":"string","description":"The system supplier who generated the event. The ODS code assigned to you as a supplier by NHSD.","example":"supplierOdsCode"},"requestingPracticeOdsCode":{"type":"string","description":"The ODS code of the requesting practice.","example":"A12345"},"sendingPracticeOdsCode":{"type":"string","description":"The ODS code of the sending practice. This is optional as there may not be a previous practice.","example":"X54321"}}},{"required":["payload"],"type":"object","properties":{"payload":{"required":["error"],"type":"object","properties":{"error":{"required":["errorCode","errorDescription","failurePoint"],"type":"object","properties":{"errorCode":{"type":"string","description":"The code associated with the error. All negative acknowledgements should have this populated with the acknowledgement response code.\n\nOther errors should have a code assigned that is understood by the reporting system supplier.\n\nThis field should only contain letters, numbers and underscores and be no longer than 50 charachers in length.\n","example":"FD34"},"errorDescription":{"type":"string","description":"Human readable description of the error","example":"unexpected error"},"failurePoint":{"enum":["PATIENT_TRACE","ENDPOINT_LOOKUP","PATIENT_GENERAL_UPDATE","EHR_REQUESTED","EHR_RESPONSE","EHR_READY_TO_INTEGRATE","EHR_INTEGRATION","OTHER"],"type":"string","description":"**PATIENT_TRACE** - currently PDS update  \n**ENDPOINT_LOOKUP** - i.e. SDS  \n**PATIENT_GENERAL_UPDATE** - currently PDS update  \n**EHR_REQUESTED** - errors with requesting the EHR  \n**EHR_RESPONSE** -  errors with generating and sending the EHR  \n**EHR_READY_TO_INTEGRATE** - errors in making EHR available to integrate  \n**EHR_INTEGRATION** - errors on integration  \n**OTHER** - errors at any other point not specified above\n"},"otherFailurePoint":{"type":"string","description":"Complete if \"OTHER\" selected and the failure point is known. A description of the workflow failure location."}}}},"description":"An object that contains the detailed payload of the event."}}}]}}},"required":true},"responses":{"200":{"description":"OK. Expected response to a valid request","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","example":"1234-1234-1234-1234"}},"example":{"eventId":"1234-1234-1234-1234"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"reportingPracticeOdsCode must not be empty"}},"message":{"type":"string","example":"Failed to validate fields"},"status":{"type":"string","example":"BAD_REQUEST"}},"example":{"errors":["reportingPracticeOdsCode must not be empty"],"message":"Failed to validate fields","status":"BAD_REQUEST"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}},"message":{"type":"string","example":"Something went wrong"},"status":{"type":"string","example":"INTERNAL_SERVER_ERROR"}},"example":{"errors":["Internal Server Error"],"message":"Something went wrong","status":"INTERNAL_SERVER_ERROR"}}}}}},"deprecated":false,"security":[{"app-level0":[]}]}},"/ready-to-integrate-statuses":{"post":{"tags":["Registration"],"summary":"Submit Ready to Integrate Statuses","description":"This event logs when the EHR has been received and is awaiting the user in the receiving practice to integrate or reject.\n\n**Submitted by:** Requesting practice\n\n**When to send:** When the EHR has been received and has been make available for the user in the receiving practice to integrate or reject.\n\n**Notes:** If a technical error or negative acknowledgment occurs, an Error event must be submitted, including the response code if applicable.\n\n### Request Body example:\n```json\n{\n  \"conversationId\": \"4345-986959-4930-684038\",\n  \"registrationEventDateTime\": \"2020-02-08T08:30:25Z\",\n  \"reportingSystemSupplier\": \"SUPPLIER_ODS_CODE\",\n  \"reportingPracticeOdsCode\": \"ABC1234\",\n  \"requestingPracticeOdsCode\": \"ABC1234\",\n  \"sendingPracticeOdsCode\": \"XYZ4567\"\n}\n```\n","operationId":"/ready-to-integrate-statuses","requestBody":{"description":"The request body required for the Ready to Integrate Statuses event.\n","content":{"application/json":{"schema":{"type":"object","allOf":[{"required":["conversationId","registrationEventDateTime","reportingSystemSupplier","reportingPracticeOdsCode","requestingPracticeOdsCode","sendingPracticeOdsCode"],"type":"object","properties":{"conversationId":{"type":"string","description":"A uniqueID that is used throughout the registration including during the GP2GP or GP Connect transfer. This should be generated at the point of registration.","example":"A1234BC5-6789-123D-EFGH-I45678910JK1"},"registrationEventDateTime":{"type":"string","description":"The ISO 8601 Date time in UTC that this event occurred.","format":"date-time","example":"2020-02-08 08:30:27+00:00"},"reportingPracticeOdsCode":{"type":"string","description":"The ODS code of the practice generating this event. This could be the sending or requesting practice depending on who is submiting this event.","example":"A12345"},"reportingSystemSupplier":{"type":"string","description":"The system supplier who generated the event. The ODS code assigned to you as a supplier by NHSD.","example":"supplierOdsCode"},"requestingPracticeOdsCode":{"type":"string","description":"The ODS code of the requesting practice.","example":"A12345"},"sendingPracticeOdsCode":{"type":"string","description":"The ODS code of the sending practice.","example":"X12345"}}}]}}},"required":true},"responses":{"200":{"description":"OK. Expected response to a valid request","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","example":"1234-1234-1234-1234"}},"example":{"eventId":"1234-1234-1234-1234"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"reportingPracticeOdsCode must not be empty"}},"message":{"type":"string","example":"Failed to validate fields"},"status":{"type":"string","example":"BAD_REQUEST"}},"example":{"errors":["reportingPracticeOdsCode must not be empty"],"message":"Failed to validate fields","status":"BAD_REQUEST"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}},"message":{"type":"string","example":"Something went wrong"},"status":{"type":"string","example":"INTERNAL_SERVER_ERROR"}},"example":{"errors":["Internal Server Error"],"message":"Something went wrong","status":"INTERNAL_SERVER_ERROR"}}}}}},"deprecated":false,"security":[{"app-level0":[]}]}},"/registrations":{"post":{"tags":["Registration"],"summary":"Submit Registrations event","description":"This event captures the details of the registration before the electronic transfer is initiated.\n\nIt includes information about the:\n- sending practice\n- status of the PDS trace\n- type of registration\n- GPLinks information\n\n**Submitted by:** Requesting practice\n\n**When to send:** When the user completes the registration. This event should be submitted for every regular patient registration.\n\nIncluding, but not limited to, the following scenarios:\n\n- The patient is new to the practice\n- The patient is returning to the practice,\n- The patient is already registered as a non-regular patient type (e.g. temporary, private etc) and is changing to a regular patient status (e.g. from temporary to regular patient)\n- Registrations that will not trigger an electronic transfer of the EHR (e.g. the patient does not have a previous practice, or the previous practice is in Scotland)\n- Registrations when a PDS trace is not performed\n\n**Notes:** If a technical error or negative acknowledgment occurs, an Error event must be submitted, including the response code if applicable.\n\n### Request Body example:\n```json\n{\n  \"conversationId\": \"4345-986959-4930-684038\",\n  \"registrationEventDateTime\": \"2020-02-08T08:30:25Z\",\n  \"reportingSystemSupplier\": \"SUPPLIER_ODS_CODE\",\n  \"reportingPracticeOdsCode\": \"ABC1234\",\n  \"requestingPracticeOdsCode\": \"ABC1234\",\n  \"sendingPracticeOdsCode\": \"XYZ4567\",\n  \"payload\": {\n    \"registration\": {\n      \"type\": \"NEW_GP_REGISTRATION\",\n      \"returningPatient\": false,\n      \"multifactorAuthenticationPresent\": true\n    },\n    \"demographicTraceStatus\": {\n      \"matched\": false,\n      \"reason\": \"no PDS trace results returned\",\n      \"multifactorAuthenticationPresent\": true\n    },\n    \"gpLinks\": {\n      \"gpLinksComplete\": true\n    }\n  }\n}\n```\n","operationId":"registrations","requestBody":{"description":"The request body required for the Registrations event.\n","content":{"application/json":{"schema":{"type":"object","allOf":[{"required":["conversationId","registrationEventDateTime","reportingSystemSupplier","reportingPracticeOdsCode","requestingPracticeOdsCode"],"type":"object","properties":{"conversationId":{"type":"string","description":"A uniqueID that is used throughout the registration including during the GP2GP or GP Connect transfer. This should be generated at the point of registration.","example":"A1234BC5-6789-123D-EFGH-I45678910JK1"},"registrationEventDateTime":{"type":"string","description":"The ISO 8601 Date time in UTC that this event occurred.","format":"date-time","example":"2020-02-08 08:30:27+00:00"},"reportingPracticeOdsCode":{"type":"string","description":"The ODS code of the practice generating this event. This could be the sending or requesting practice depending on who is submiting this event.","example":"A12345"},"reportingSystemSupplier":{"type":"string","description":"The system supplier who generated the event. The ODS code assigned to you as a supplier by NHSD.","example":"supplierOdsCode"},"requestingPracticeOdsCode":{"type":"string","description":"The ODS code of the requesting practice.","example":"A12345"},"sendingPracticeOdsCode":{"type":"string","description":"The ODS code of the sending practice. This is optional as there may not be a previous practice.","example":"X54321"}}},{"required":["payload"],"type":"object","properties":{"payload":{"required":["registration","demographicTraceStatus","gpLinks"],"type":"object","properties":{"demographicTraceStatus":{"required":["matched","multifactorAuthenticationPresent"],"type":"object","properties":{"matched":{"type":"boolean","description":"**true** - a match was selected by the user  \n**false** - a match was **not** selected by the user or a PDS trace was not performed, and a new patient record was created\n","example":true},"multifactorAuthenticationPresent":{"type":"boolean","description":"**true** - a smartcard or other multifactor authentication method was present during the PDS trace  \n**false** - a smartcard or other multifactor authentication method was not present during the PDS trace\n","example":true},"reason":{"type":"string","description":"Required if matched = false\n\n**Examples**  \n**No PDS trace results returned** - if no results were returned from the PDS trace  \n**Matches returned, not selected** - if one or more result were returned from the PDS trace, but the user did not select a match  \n**No PDS trace** - if no PDS trace was performed.\n\nIf a technical error or negative acknowledgment occurs during the PDS trace an Error event must be submitted, including the response code if applicable.\n","example":"No PDS trace results returned"}}},"gpLinks":{"required":["gpLinksComplete"],"type":"object","properties":{"gpLinksComplete":{"type":"boolean","description":"**true** - If the required GP Links information has been completed for this registration  \n**false** - If the required GP Links information has not been completed for this registration\n","example":true}}},"registration":{"required":["type","returningPatient","multifactorAuthenticationPresent"],"type":"object","properties":{"multifactorAuthenticationPresent":{"type":"boolean","description":"**true** - a smartcard or other multifactor authentication method was present during registration  \n**false** - a smartcard or other multifactor authentication method was not present during registration\n","example":true},"returningPatient":{"type":"boolean","description":"**true** - the patient is in the local list for previously Regular registered patients, but is not currently registered as a Regular patient  \n**false** - the patient is not in the local list for previously Regular registered patients\n","example":true},"type":{"enum":["CHANGE_PATIENT_TYPE","NEW_GP_REGISTRATION"],"type":"string","description":"The type of registration.\n\n**CHANGE_PATIENT_TYPE** - if the registration is for a patient that is already registered at the practice as a non-regular patient type (e.g. temporary, private) and is changing to a 'Regular' patient type  \n**NEW_GP_REGISTRATION** - if the registration is for a new or returning patient registrations where the patient is not currently registered as a non-regular patient (e.g. temporary, private etc)  \n","example":"NEW_GP_REGISTRATION"}}}},"description":"An object that contains the detailed payload of the event."}}}]}}},"required":true},"responses":{"200":{"description":"OK. Expected response to a valid request","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","example":"1234-1234-1234-1234"}},"example":{"eventId":"1234-1234-1234-1234"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"reportingPracticeOdsCode must not be empty"}},"message":{"type":"string","example":"Failed to validate fields"},"status":{"type":"string","example":"BAD_REQUEST"}},"example":{"errors":["reportingPracticeOdsCode must not be empty"],"message":"Failed to validate fields","status":"BAD_REQUEST"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}},"message":{"type":"string","example":"Something went wrong"},"status":{"type":"string","example":"INTERNAL_SERVER_ERROR"}},"example":{"errors":["Internal Server Error"],"message":"Something went wrong","status":"INTERNAL_SERVER_ERROR"}}}}}},"deprecated":false,"security":[{"app-level0":[]}]}},"/transfer-compatibility-statuses":{"post":{"tags":["Registration"],"summary":"Submit Transfer Compatibility Statuses","description":"This event captures whether or not the registration is compatible with an electronic transfer of the patient’s record.\nThis event should be submitted for all registrations where a sending (previous) practice ODS code is present.\n\n**Submitted by:** Requesting practice\n\n**When to send:** When it is determined that an electronic transfer will or will not be triggered.\n\n**Notes:** If a technical error or negative acknowledgment occurs, an Error event must be submitted, including the response code if applicable.\n\n### Request Body example:\n```json\n{\n  \"conversationId\": \"4345-986959-4930-684038\",\n  \"registrationEventDateTime\": \"2020-02-08T08:30:25Z\",\n  \"reportingSystemSupplier\": \"SUPPLIER_ODS_CODE\",\n  \"reportingPracticeOdsCode\": \"ABC1234\",\n  \"requestingPracticeOdsCode\": \"ABC1234\",\n  \"sendingPracticeOdsCode\": \"XYZ4567\",\n  \"payload\": {\n    \"transferCompatibilityStatus\": {\n      \"internalTransfer\": false,\n      \"transferCompatible\": false,\n      \"reason\": \"Previous practice not eligible for transfer\"\n    }\n  }\n}\n```\n","operationId":"transfer-compatibility-statuses","requestBody":{"description":"The request body required for the Transfer Compatability Statuses event.\n","content":{"application/json":{"schema":{"type":"object","allOf":[{"required":["conversationId","registrationEventDateTime","reportingSystemSupplier","reportingPracticeOdsCode","requestingPracticeOdsCode","sendingPracticeOdsCode"],"type":"object","properties":{"conversationId":{"type":"string","description":"A uniqueID that is used throughout the registration including during the GP2GP or GP Connect transfer. This should be generated at the point of registration.","example":"A1234BC5-6789-123D-EFGH-I45678910JK1"},"registrationEventDateTime":{"type":"string","description":"The ISO 8601 Date time in UTC that this event occurred.","format":"date-time","example":"2020-02-08 08:30:27+00:00"},"reportingPracticeOdsCode":{"type":"string","description":"The ODS code of the practice generating this event. This could be the sending or requesting practice depending on who is submiting this event.","example":"A12345"},"reportingSystemSupplier":{"type":"string","description":"The system supplier who generated the event. The ODS code assigned to you as a supplier by NHSD.","example":"supplierOdsCode"},"requestingPracticeOdsCode":{"type":"string","description":"The ODS code of the requesting practice.","example":"A12345"},"sendingPracticeOdsCode":{"type":"string","description":"The ODS code of the sending practice.","example":"X12345"}}},{"required":["payload"],"type":"object","properties":{"payload":{"required":["transferCompatibilityStatus"],"type":"object","properties":{"transferCompatibilityStatus":{"required":["internalTransfer","transferCompatible"],"type":"object","properties":{"internalTransfer":{"type":"boolean","description":"**true**  - if EHR transfer is internal within a single system and will not use GP2GP or GP Connect  \n**false**\n","example":false},"reason":{"type":"string","description":"Required if transferCompatible = false  \n\n**Examples**  \n- Previous practice is not eligible for electronic transfer\n- Sending practice is the same as requesting practice\n","example":"Previous practice is not eligible for electronic transfer"},"transferCompatible":{"type":"boolean","description":"**true** - if the registration **will initiate** electronic transfer of the record (either internally, or via GP2GP or GP Connect)  \n**false** - if the registration **will not initiate** an electronic transfer (either interally, GP2GP or GP Connect)\n","example":false}},"description":"Information about the type of transfer and whether or not an electronic transfer will be triggered.\n"}},"description":"An object that contains the detailed payload of the event."}}}]}}},"required":true},"responses":{"200":{"description":"OK. Expected response to a valid request","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","example":"1234-1234-1234-1234"}},"example":{"eventId":"1234-1234-1234-1234"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string","example":"reportingPracticeOdsCode must not be empty"}},"message":{"type":"string","example":"Failed to validate fields"},"status":{"type":"string","example":"BAD_REQUEST"}},"example":{"errors":["reportingPracticeOdsCode must not be empty"],"message":"Failed to validate fields","status":"BAD_REQUEST"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"required":["status","message","errors"],"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}},"message":{"type":"string","example":"Something went wrong"},"status":{"type":"string","example":"INTERNAL_SERVER_ERROR"}},"example":{"errors":["Internal Server Error"],"message":"Something went wrong","status":"INTERNAL_SERVER_ERROR"}}}}}},"deprecated":false,"security":[{"app-level0":[]}]}}},"components":{"securitySchemes":{"app-level0":{"$ref":"https://proxygen.prod.api.platform.nhs.uk/components/securitySchemes/app-level0"}}},"tags":[{"name":"Registration","description":"Endpoints to submit events for all stages of the patient registration."}],"x-spec-publication":{"operation-order":[{"group":"Registration","operations":[{"method":"POST","path":"/registrations"},{"method":"POST","path":"/transfer-compatibility-statuses"},{"method":"POST","path":"/ehr-requests"},{"method":"POST","path":"/ehr-responses"},{"method":"POST","path":"/document-responses"},{"method":"POST","path":"/ready-to-integrate-statuses"},{"method":"POST","path":"/ehr-degrades"},{"method":"POST","path":"/ehr-integrations"},{"method":"POST","path":"/errors"}]}],"try-this-api":{"disabled":true}}}