ABDM API — Documents

Beta

Last updated: 26 August 2026

Browse Documentation

Document endpoints are POST and authenticated (Authorization: Bearer <idToken>). Each creates a FHIR Composition and pushes it to ABDM. Each returns a CompositionRes object (a composition FHIR resource). All use "patientNeeds" — at least one of abhaAddress (string) or patientId (number); omitting both yields 400 VALIDATION_ERROR.

The five document endpoints share these error codes (plus each endpoint's own extras):

INVALID_DOCTOR_GCP_FHIR_ID (400) · PATIENT_NOT_FOUND (404) · ENCOUNTER_NOT_FOUND (404) · ABDM_GATEWAY_ERROR (502) · LINK_TOKEN_MISSING (502)


/discharge_summary — POST (auth)

Creates a DischargeSummary composition and pushes it to ABDM.

Request fields

NameTypeRequiredDescription
doctorDetailsarrayYesArray of { doctorName, doctorGcpId }, min 1.
textstringYesSummary content (HTML allowed).
statusstringYese.g. "final" or "draft".
datestringYesISO date.
compositionIdstringNoOptional composition id.
abhaAddressstring—*Patient's ABHA address.
patientIdnumber—*Nice HMS patient id.

* At least one of abhaAddress / patientId is required.

Example request

{
  "abhaAddress": "savitribilagi@sbx",
  "text": "<div>Cough with APD</div><div>cough</div><div>BP 140/80 PR 87/min RR 20/min</div>",
  "doctorDetails": [
    { "doctorName": "Dr Umesh Bilagi", "doctorGcpId": "cf4a6ab1-3f32-4b92-adc5-89489da6ca14" }
  ],
  "status": "final",
  "date": "2023-05-08T19:21:23.918Z"
}

Example response

{
  "composition": {
    "id": "e721069a-cc8c-4e5e-a437-b4cfcaee11a4",
    "resourceType": "Composition",
    "status": "final",
    "title": "DischargeSummary",
    "date": "2023-05-08T19:21:23.918Z",
    "subject": { "reference": "Patient/9b4ec056-991d-4237-b1fd-a65770349610" }
  }
}

Error codes

  • Shared document codes + shared auth codes.

/diagnostic_report — POST (auth)

Creates a DiagnosticReport composition and pushes it to ABDM.

Request fields

NameTypeRequiredDescription
performerarrayYesArray of { doctorName, doctorGcpId }, min 1. The performer is who signs the report.
testNamestringYesNon-empty, e.g. "CT Abdomen".
categorystringYes"Hematology" | "Biochemistry" | "Microbiology" | "Radiology" | "Others".
textstringYesNon-empty report content (HTML allowed).
statusstringYese.g. "final" or "draft".
requesterobjectNo{ doctorName, doctorGcpId }. If omitted, the requester is assumed to be the patient.
conclusionstringNoe.g. "Normal Study".
compositionIdstringNoOptional.
datestringNoISO date; defaults to the request timestamp when omitted.
abhaAddressstring—*Patient's ABHA address.
patientIdnumber—*Nice HMS patient id.

* At least one of abhaAddress / patientId is required.

Example request

{
  "abhaAddress": "savitribilagi@sbx",
  "performer": [
    { "doctorName": "Dr Umesh Bilagi", "doctorGcpId": "cf4a6ab1-3f32-4b92-adc5-89489da6ca14" }
  ],
  "testName": "CT Abdomen",
  "category": "Radiology",
  "text": "<div>Ultrasound Report ...</div>",
  "status": "final",
  "conclusion": "Normal Study"
}

Example response

Returns a CompositionRes object.

Error codes

  • INVALID_DOCTOR_GCP_FHIR_ID (400) — validates performer and requester.
  • PATIENT_NOT_FOUND (404) · ENCOUNTER_NOT_FOUND (404)
  • ABDM_GATEWAY_ERROR (502) · LINK_TOKEN_MISSING (502)
  • shared codes

/op_consultation — POST (auth)

Creates an OP Consultation composition and pushes it to ABDM.

Request fields

NameTypeRequiredDescription
doctorDetailsarrayYesArray of { doctorName, doctorGcpId }, min 1.
datestringYesISO date of the consultation.
statusstringYesCurrent status of the consultation.
chiefComplaintsstringNoPrimary complaints reported by the patient.
medicalHistorystringNoPatient's past medical history.
physicalExaminationstringNoFindings from the physical examination.
medicinesarrayNoArray of { drug, frequency, instruction, duration, route }.
opdProcedureobjectNo{ procedureName, procedureDescription, date? }.
followUpobjectNo{ startDate, endDate?, comment }.
compositionIdstringNoOptional.
abhaAddressstring—*Patient's ABHA address.
patientIdnumber—*Nice HMS patient id.

* At least one of abhaAddress / patientId is required.

Example request

{
  "abhaAddress": "savitribilagi@sbx",
  "doctorDetails": [
    { "doctorName": "Dr Umesh Bilagi", "doctorGcpId": "cf4a6ab1-3f32-4b92-adc5-89489da6ca14" }
  ],
  "date": "2023-05-08T19:21:23.918Z",
  "status": "final",
  "chiefComplaints": "Cough and fever",
  "medicines": [
    { "drug": "Paracetamol", "frequency": "BD", "instruction": "After food", "duration": "5 days", "route": "Oral" }
  ]
}

Example response

Returns a CompositionRes object.

Error codes

  • INVALID_DOCTOR_GCP_FHIR_ID (400)
  • PATIENT_NOT_FOUND (404) · ENCOUNTER_NOT_FOUND (404)
  • ABDM_GATEWAY_ERROR (502) · LINK_TOKEN_MISSING (502)
  • shared codes

/procedure_ot_notes — POST (auth)

Creates a procedure / OT-notes composition and pushes it to ABDM.

Request fields

NameTypeRequiredDescription
doctorDetailsarrayYesArray of { doctorName, doctorGcpId }, min 1.
datestringYesISO date of the procedure.
statusstringYesCurrent status of the procedure.
opdProcedureobjectNo{ procedureName, procedureDescription, date? }.
followUpobjectNo{ startDate, endDate?, comment }.
compositionIdstringNoOptional.
abhaAddressstring—*Patient's ABHA address.
patientIdnumber—*Nice HMS patient id.

* At least one of abhaAddress / patientId is required.

Example request

{
  "abhaAddress": "savitribilagi@sbx",
  "doctorDetails": [
    { "doctorName": "Dr Umesh Bilagi", "doctorGcpId": "cf4a6ab1-3f32-4b92-adc5-89489da6ca14" }
  ],
  "date": "2023-05-08T19:21:23.918Z",
  "status": "final",
  "opdProcedure": {
    "procedureName": "Appendectomy",
    "procedureDescription": "Laparoscopic appendectomy"
  }
}

Example response

Returns a CompositionRes object.

Error codes

  • INVALID_DOCTOR_GCP_FHIR_ID (400)
  • PATIENT_NOT_FOUND (404) · ENCOUNTER_NOT_FOUND (404)
  • ABDM_GATEWAY_ERROR (502) · LINK_TOKEN_MISSING (502)
  • shared codes

/health_document — POST (multipart/form-data, auth)

Uploads scanned health document images and creates a HealthDocumentRecord composition. Payload size should be under 2 MB.

Request fields (form fields)

NameTypeRequiredDescription
doctorDetailsstringYesJSON string, e.g. "[{\"doctorName\":\"Dr Umesh\",\"doctorGcpId\":\"...\"}]".
textstringYesTitle, e.g. "Prescription" or "Lab report".
statusstringYese.g. "final" or "draft".
datestringNoISO date.
compositionIdstringNoOptional.
abhaAddressstring—*Patient's ABHA address.
patientIdnumber—*Nice HMS patient id.

* At least one of abhaAddress / patientId is required.

Files

NameRequiredDescription
page1YesImage (JPEG), ≤ 2 MB.
page2NoOptional image.
page3NoOptional image.
page4NoOptional image.

Example response

Returns a CompositionRes object.

Error codes

  • INVALID_REQUEST_METHOD (400) — non-POST method.
  • DOCTOR_DETAILS_REQUIRED (400) — doctorDetails form field missing.
  • VALIDATION_ERROR (400) — invalid form fields.
  • INVALID_DOCTOR_GCP_FHIR_ID (400)
  • PATIENT_NOT_FOUND (404) · ENCOUNTER_NOT_FOUND (404)
  • ABDM_GATEWAY_ERROR (502) · LINK_TOKEN_MISSING (502)
  • shared codes
Was this page helpful?
Index
NICE HMS. 1st Gate Nehru Stadium, City Hubballi, District Dhrawad, State Karnataka, 580020
INDIA, Phone : +919611560555 email admin@nicehms.com, GST 29AEYPB4702Q1ZS
facebook
twitter
linkedin
youtube
RSS