---
title: "Discover Link On Confirm"
method: POST
path: "/abdm/v1/care-contexts/discover/link/on-confirm"
---

# Discover Link On Confirm

`POST /abdm/v1/care-contexts/discover/link/on-confirm`

## Request

- Base URL: `https://api.eka.care`
- URL: `https://api.eka.care/abdm/v1/care-contexts/discover/link/on-confirm`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/eka/apis/eka-developer-apis/docs/abdm/v1/care-contexts/discover/link/on-confirm/post.ts> (a function with typed inputs; its response is checked against the schema)

This API is used by HIP to confirm the linking of care contexts after OTP verification.

## Headers

- `X-Pt-Id` string
- `X-Partner-Pt-Id` string
- `X-Hip-Id` string

## Request body

- ModelsLinkOnConfirmHmisConnect
  - `error` ModelsError
    - `code` integer: Error code indicating the type of error
    - `message` string: Detailed error message
  - `patients` ModelsPatient[]: List of patients including reference number, display name, care contexts, and HI type
    - `care_contexts` ModelsCareContext[]: List of care contexts of the patient
      - `display` string: Display name or identifier for the care context
      - `ref_num` string: Unique reference number for the care context
    - `display` string: Display name or identifier for the patient
    - `hi_type` 'OPConsultation' | 'Prescription' | 'DischargeSummary' | 'DiagnosticReport' | 'ImmunizationRecord' | 'HealthDocumentRecord' | 'WellnessRecord': Type of health information (HI)
    - `ref_num` string: patient reference number.
  - `request_id` string, required: Request ID that is received in the webhook call.

## Response `204`

No Content

## Other responses

- `4XX`
- `5XX`

---

[API](https://skmtc.dev/eka/apis/eka-developer-apis.md) - [All operations](https://skmtc.dev/eka/apis/eka-developer-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/eka/apis/eka-developer-apis/revisions/9ea23456f722?raw)
