action ndhm_post_v0_5_links_link_on_init { label: "Response to patient's care context link request" description: "Result of patient care-context link request from HIP end. This happens in context of previous discovery of patient found at HIP end, therefore the link requests ought to be in reference to the patient reference and care-context references previously returned by the HIP. The correlation of discovery and link request is maintained through the transactionId. HIP should have\n 1. **Validated transactionId in the request to check whether there was a discovery done previously, and the link request corresponds to returned patient care care context references**\n 2. **Before returning the response, HIP should have sent an authentication request to the patient(eg: OTP verification)**\n 3. **HIP should communicate the mode of authentication of a successful request**\n 4. **HIP subsequently should expect the token passed via /link/confirm against the link.referenceNumber passed in this call**\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \nThe error section in the body, represents the potential errors that may have occurred. Possible reasons:\n 1. **Patient reference number is invalid**\n 2. **Care context reference numbers are invalid**\n" provider: ndhm method: POST path: "/v0.5/links/link/on-init" encoding: json input: { type: "object" properties: { Authorization: { type: "string" } error: { type: "object" required: ["code", "message"] properties: { code: { type: "integer" enum: [1000, 10001] } message: { type: "string" } } } link: { type: "object" required: ["authenticationType", "referenceNumber"] properties: { authenticationType: { type: "string" enum: ["DIRECT", "MEDIATED"] } meta: { type: "object" required: ["communicationMedium"] properties: { communicationExpiry: { type: "string" } communicationHint: { type: "string" } communicationMedium: { type: "string" enum: ["MOBILE", "EMAIL"] } } } referenceNumber: { type: "string" } } } requestId: { type: "string" format: "uuid" description: "a nonce, unique for each HTTP request" } resp: { type: "object" required: ["requestId"] properties: { requestId: { type: "string" format: "uuid" description: "the requestId that was passed" } } } timestamp: { type: "string" format: "date-time" description: "Date time format in UTC, includes miliseconds YYYY-MM-DDThh:mm:ss.vZ" } transactionId: { type: "string" format: "uuid" } } required: ["Authorization", "requestId", "resp", "timestamp", "transactionId"] additionalProperties: false } output: { type: "object" additionalProperties: true } }