Skip to main content
POST
/
appointments
/
v1
/
ipd
/
admission
Create IPD Admission
curl --request POST \
  --url https://api.eka.care/appointments/v1/ipd/admission \
  --header 'Content-Type: application/json' \
  --header 'auth: <auth>' \
  --data '
{
  "ipid": "IPD-2026-000481",
  "pid": "pid-321",
  "patient": {
    "id": "pat-77",
    "uuid": "9c2d1b6f-0a8e-5d23-8b1a-2c3d4e5f6a7b",
    "poid": "poid-555",
    "formData": [],
    "profile": {
      "personal": {
        "gender": "M",
        "name": "Suresh Kumar"
      }
    }
  },
  "attendee": {
    "id": "att-01",
    "name": "Ramesh Kumar",
    "phone": {
      "c": "+91",
      "n": "9876543210"
    },
    "relation": {
      "id": "rel-son",
      "label": "Son"
    }
  },
  "insurance": {
    "number": "POL-8891",
    "type": "Cashless",
    "payment_type": "Insurance",
    "insurance_provider": "Star Health",
    "pre_approved": true,
    "pre_approved_amount": 50000
  },
  "refer": {
    "id": "ref-01",
    "name": "Dr. Anita Rao"
  },
  "doc": {
    "id": "doctor-oid-456",
    "name": "Dr. Vivek Sharma"
  },
  "docid": "doctor-oid-456",
  "category": {
    "id": "cat-icu",
    "name": "ICU"
  },
  "department": {
    "id": "dept-med",
    "name": "General Medicine"
  },
  "facility": {
    "id": "fac-01",
    "name": "Eka General Hospital"
  },
  "facilityid": "fac-01",
  "bed": "ICU-04",
  "duration": {
    "value": 3,
    "unit": "days"
  },
  "rateplan": {
    "id": "rp-standard",
    "name": "Standard ICU",
    "inclusions": []
  },
  "stage": "AD",
  "status": "BED_ASSIGNED",
  "admission_date": "2026-06-28T09:30:00.000Z",
  "date": "2026-06-28"
}
'
import requests

url = "https://api.eka.care/appointments/v1/ipd/admission"

payload = {
"ipid": "IPD-2026-000481",
"pid": "pid-321",
"patient": {
"id": "pat-77",
"uuid": "9c2d1b6f-0a8e-5d23-8b1a-2c3d4e5f6a7b",
"poid": "poid-555",
"formData": [],
"profile": { "personal": {
"gender": "M",
"name": "Suresh Kumar"
} }
},
"attendee": {
"id": "att-01",
"name": "Ramesh Kumar",
"phone": {
"c": "+91",
"n": "9876543210"
},
"relation": {
"id": "rel-son",
"label": "Son"
}
},
"insurance": {
"number": "POL-8891",
"type": "Cashless",
"payment_type": "Insurance",
"insurance_provider": "Star Health",
"pre_approved": True,
"pre_approved_amount": 50000
},
"refer": {
"id": "ref-01",
"name": "Dr. Anita Rao"
},
"doc": {
"id": "doctor-oid-456",
"name": "Dr. Vivek Sharma"
},
"docid": "doctor-oid-456",
"category": {
"id": "cat-icu",
"name": "ICU"
},
"department": {
"id": "dept-med",
"name": "General Medicine"
},
"facility": {
"id": "fac-01",
"name": "Eka General Hospital"
},
"facilityid": "fac-01",
"bed": "ICU-04",
"duration": {
"value": 3,
"unit": "days"
},
"rateplan": {
"id": "rp-standard",
"name": "Standard ICU",
"inclusions": []
},
"stage": "AD",
"status": "BED_ASSIGNED",
"admission_date": "2026-06-28T09:30:00.000Z",
"date": "2026-06-28"
}
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ipid: 'IPD-2026-000481',
pid: 'pid-321',
patient: {
id: 'pat-77',
uuid: '9c2d1b6f-0a8e-5d23-8b1a-2c3d4e5f6a7b',
poid: 'poid-555',
formData: [],
profile: {personal: {gender: 'M', name: 'Suresh Kumar'}}
},
attendee: {
id: 'att-01',
name: 'Ramesh Kumar',
phone: {c: '+91', n: '9876543210'},
relation: {id: 'rel-son', label: 'Son'}
},
insurance: {
number: 'POL-8891',
type: 'Cashless',
payment_type: 'Insurance',
insurance_provider: 'Star Health',
pre_approved: true,
pre_approved_amount: 50000
},
refer: {id: 'ref-01', name: 'Dr. Anita Rao'},
doc: {id: 'doctor-oid-456', name: 'Dr. Vivek Sharma'},
docid: 'doctor-oid-456',
category: {id: 'cat-icu', name: 'ICU'},
department: {id: 'dept-med', name: 'General Medicine'},
facility: {id: 'fac-01', name: 'Eka General Hospital'},
facilityid: 'fac-01',
bed: 'ICU-04',
duration: {value: 3, unit: 'days'},
rateplan: {id: 'rp-standard', name: 'Standard ICU', inclusions: []},
stage: 'AD',
status: 'BED_ASSIGNED',
admission_date: '2026-06-28T09:30:00.000Z',
date: '2026-06-28'
})
};

fetch('https://api.eka.care/appointments/v1/ipd/admission', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eka.care/appointments/v1/ipd/admission",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ipid' => 'IPD-2026-000481',
'pid' => 'pid-321',
'patient' => [
'id' => 'pat-77',
'uuid' => '9c2d1b6f-0a8e-5d23-8b1a-2c3d4e5f6a7b',
'poid' => 'poid-555',
'formData' => [

],
'profile' => [
'personal' => [
'gender' => 'M',
'name' => 'Suresh Kumar'
]
]
],
'attendee' => [
'id' => 'att-01',
'name' => 'Ramesh Kumar',
'phone' => [
'c' => '+91',
'n' => '9876543210'
],
'relation' => [
'id' => 'rel-son',
'label' => 'Son'
]
],
'insurance' => [
'number' => 'POL-8891',
'type' => 'Cashless',
'payment_type' => 'Insurance',
'insurance_provider' => 'Star Health',
'pre_approved' => true,
'pre_approved_amount' => 50000
],
'refer' => [
'id' => 'ref-01',
'name' => 'Dr. Anita Rao'
],
'doc' => [
'id' => 'doctor-oid-456',
'name' => 'Dr. Vivek Sharma'
],
'docid' => 'doctor-oid-456',
'category' => [
'id' => 'cat-icu',
'name' => 'ICU'
],
'department' => [
'id' => 'dept-med',
'name' => 'General Medicine'
],
'facility' => [
'id' => 'fac-01',
'name' => 'Eka General Hospital'
],
'facilityid' => 'fac-01',
'bed' => 'ICU-04',
'duration' => [
'value' => 3,
'unit' => 'days'
],
'rateplan' => [
'id' => 'rp-standard',
'name' => 'Standard ICU',
'inclusions' => [

]
],
'stage' => 'AD',
'status' => 'BED_ASSIGNED',
'admission_date' => '2026-06-28T09:30:00.000Z',
'date' => '2026-06-28'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"auth: <auth>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.eka.care/appointments/v1/ipd/admission"

payload := strings.NewReader("{\n \"ipid\": \"IPD-2026-000481\",\n \"pid\": \"pid-321\",\n \"patient\": {\n \"id\": \"pat-77\",\n \"uuid\": \"9c2d1b6f-0a8e-5d23-8b1a-2c3d4e5f6a7b\",\n \"poid\": \"poid-555\",\n \"formData\": [],\n \"profile\": {\n \"personal\": {\n \"gender\": \"M\",\n \"name\": \"Suresh Kumar\"\n }\n }\n },\n \"attendee\": {\n \"id\": \"att-01\",\n \"name\": \"Ramesh Kumar\",\n \"phone\": {\n \"c\": \"+91\",\n \"n\": \"9876543210\"\n },\n \"relation\": {\n \"id\": \"rel-son\",\n \"label\": \"Son\"\n }\n },\n \"insurance\": {\n \"number\": \"POL-8891\",\n \"type\": \"Cashless\",\n \"payment_type\": \"Insurance\",\n \"insurance_provider\": \"Star Health\",\n \"pre_approved\": true,\n \"pre_approved_amount\": 50000\n },\n \"refer\": {\n \"id\": \"ref-01\",\n \"name\": \"Dr. Anita Rao\"\n },\n \"doc\": {\n \"id\": \"doctor-oid-456\",\n \"name\": \"Dr. Vivek Sharma\"\n },\n \"docid\": \"doctor-oid-456\",\n \"category\": {\n \"id\": \"cat-icu\",\n \"name\": \"ICU\"\n },\n \"department\": {\n \"id\": \"dept-med\",\n \"name\": \"General Medicine\"\n },\n \"facility\": {\n \"id\": \"fac-01\",\n \"name\": \"Eka General Hospital\"\n },\n \"facilityid\": \"fac-01\",\n \"bed\": \"ICU-04\",\n \"duration\": {\n \"value\": 3,\n \"unit\": \"days\"\n },\n \"rateplan\": {\n \"id\": \"rp-standard\",\n \"name\": \"Standard ICU\",\n \"inclusions\": []\n },\n \"stage\": \"AD\",\n \"status\": \"BED_ASSIGNED\",\n \"admission_date\": \"2026-06-28T09:30:00.000Z\",\n \"date\": \"2026-06-28\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("auth", "<auth>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.eka.care/appointments/v1/ipd/admission")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"ipid\": \"IPD-2026-000481\",\n \"pid\": \"pid-321\",\n \"patient\": {\n \"id\": \"pat-77\",\n \"uuid\": \"9c2d1b6f-0a8e-5d23-8b1a-2c3d4e5f6a7b\",\n \"poid\": \"poid-555\",\n \"formData\": [],\n \"profile\": {\n \"personal\": {\n \"gender\": \"M\",\n \"name\": \"Suresh Kumar\"\n }\n }\n },\n \"attendee\": {\n \"id\": \"att-01\",\n \"name\": \"Ramesh Kumar\",\n \"phone\": {\n \"c\": \"+91\",\n \"n\": \"9876543210\"\n },\n \"relation\": {\n \"id\": \"rel-son\",\n \"label\": \"Son\"\n }\n },\n \"insurance\": {\n \"number\": \"POL-8891\",\n \"type\": \"Cashless\",\n \"payment_type\": \"Insurance\",\n \"insurance_provider\": \"Star Health\",\n \"pre_approved\": true,\n \"pre_approved_amount\": 50000\n },\n \"refer\": {\n \"id\": \"ref-01\",\n \"name\": \"Dr. Anita Rao\"\n },\n \"doc\": {\n \"id\": \"doctor-oid-456\",\n \"name\": \"Dr. Vivek Sharma\"\n },\n \"docid\": \"doctor-oid-456\",\n \"category\": {\n \"id\": \"cat-icu\",\n \"name\": \"ICU\"\n },\n \"department\": {\n \"id\": \"dept-med\",\n \"name\": \"General Medicine\"\n },\n \"facility\": {\n \"id\": \"fac-01\",\n \"name\": \"Eka General Hospital\"\n },\n \"facilityid\": \"fac-01\",\n \"bed\": \"ICU-04\",\n \"duration\": {\n \"value\": 3,\n \"unit\": \"days\"\n },\n \"rateplan\": {\n \"id\": \"rp-standard\",\n \"name\": \"Standard ICU\",\n \"inclusions\": []\n },\n \"stage\": \"AD\",\n \"status\": \"BED_ASSIGNED\",\n \"admission_date\": \"2026-06-28T09:30:00.000Z\",\n \"date\": \"2026-06-28\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.eka.care/appointments/v1/ipd/admission")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ipid\": \"IPD-2026-000481\",\n \"pid\": \"pid-321\",\n \"patient\": {\n \"id\": \"pat-77\",\n \"uuid\": \"9c2d1b6f-0a8e-5d23-8b1a-2c3d4e5f6a7b\",\n \"poid\": \"poid-555\",\n \"formData\": [],\n \"profile\": {\n \"personal\": {\n \"gender\": \"M\",\n \"name\": \"Suresh Kumar\"\n }\n }\n },\n \"attendee\": {\n \"id\": \"att-01\",\n \"name\": \"Ramesh Kumar\",\n \"phone\": {\n \"c\": \"+91\",\n \"n\": \"9876543210\"\n },\n \"relation\": {\n \"id\": \"rel-son\",\n \"label\": \"Son\"\n }\n },\n \"insurance\": {\n \"number\": \"POL-8891\",\n \"type\": \"Cashless\",\n \"payment_type\": \"Insurance\",\n \"insurance_provider\": \"Star Health\",\n \"pre_approved\": true,\n \"pre_approved_amount\": 50000\n },\n \"refer\": {\n \"id\": \"ref-01\",\n \"name\": \"Dr. Anita Rao\"\n },\n \"doc\": {\n \"id\": \"doctor-oid-456\",\n \"name\": \"Dr. Vivek Sharma\"\n },\n \"docid\": \"doctor-oid-456\",\n \"category\": {\n \"id\": \"cat-icu\",\n \"name\": \"ICU\"\n },\n \"department\": {\n \"id\": \"dept-med\",\n \"name\": \"General Medicine\"\n },\n \"facility\": {\n \"id\": \"fac-01\",\n \"name\": \"Eka General Hospital\"\n },\n \"facilityid\": \"fac-01\",\n \"bed\": \"ICU-04\",\n \"duration\": {\n \"value\": 3,\n \"unit\": \"days\"\n },\n \"rateplan\": {\n \"id\": \"rp-standard\",\n \"name\": \"Standard ICU\",\n \"inclusions\": []\n },\n \"stage\": \"AD\",\n \"status\": \"BED_ASSIGNED\",\n \"admission_date\": \"2026-06-28T09:30:00.000Z\",\n \"date\": \"2026-06-28\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "adm-3f9c2b18-7e44-4a51",
  "bid": "123456",
  "admission_date": "2026-06-28T09:30:00.000Z",
  "ipid": "IPD-2026-000481",
  "attendee": {
    "id": "att-01",
    "name": "Ramesh Kumar",
    "phone": {
      "c": "+91",
      "n": "9876543210"
    },
    "relation": {
      "id": "rel-son",
      "label": "Son"
    }
  },
  "patient": {
    "id": "pat-77",
    "uuid": "9c2d1b6f-0a8e-5d23-8b1a-2c3d4e5f6a7b",
    "poid": "poid-555",
    "formData": [],
    "profile": {
      "personal": {
        "gender": "M",
        "name": "Suresh Kumar"
      }
    }
  },
  "insurance": {
    "number": "POL-8891",
    "type": "Cashless",
    "payment_type": "Insurance",
    "insurance_provider": "Star Health",
    "pre_approved": true,
    "pre_approved_amount": 50000
  },
  "refer": {
    "id": "ref-01",
    "name": "Dr. Anita Rao"
  },
  "doc": {
    "id": "doctor-oid-456",
    "name": "Dr. Vivek Sharma"
  },
  "stage": "AD",
  "status": "BED_ASSIGNED",
  "duration": {
    "value": 3,
    "unit": "days"
  },
  "bed": "ICU-04",
  "rateplan": {
    "id": "rp-standard",
    "name": "Standard ICU",
    "inclusions": []
  },
  "docid": "doctor-oid-456",
  "category": {
    "id": "cat-icu",
    "name": "ICU"
  },
  "date": "2026-06-28",
  "department": {
    "id": "dept-med",
    "name": "General Medicine"
  },
  "pid": "pid-321",
  "created_at": "2026-06-28T09:30:00.000Z",
  "updated_at": "2026-06-28T09:30:00.000Z",
  "facility": {
    "id": "fac-01",
    "name": "Eka General Hospital"
  },
  "facilityid": "fac-01",
  "totalbilled": 0,
  "totalpaid": 0,
  "actor_oid": "operator-oid-789"
}
{
"message": "body/ipid must NOT have fewer than 1 characters"
}
{
"message": "unauthenticated"
}

Headers

auth
string
required

Body

application/json

The IPD admission to create.

ipid
string
required

Patient IPD case number.

Minimum string length: 1
pid
string
required
Minimum string length: 1
patient
object
required
attendee
object
required
refer
object
required

Referring doctor (id + name).

doc
object
required

The responsible doctor (id + name).

docid
string
required
category
object
required
department
object
required
facility
object
required
facilityid
string
required
bed
string
required
duration
object
required
rateplan
object
required
insurance
object
procedures
object[]
notes
string
custom_attributes
object

Map of custom attribute keys to arrays of string values.

stage
enum<string>

Coarse lifecycle stage; defaults to the active inpatient stage (AD).

Available options:
IN,
AD,
DC
status
enum<string>

Granular lifecycle status; defaults to BED_ASSIGNED.

Available options:
ADMISSION_RECOMMENDED,
ADMISSION_ON_HOLD,
ADMISSION_CONFIRMED,
ADMISSION_CANCELLED,
BED_ASSIGNED,
UNDER_CARE,
NOT_RECEIVED,
FIT_FOR_DISCHARGE,
DISCHARGE_INITIATED,
REFERRAL_INITIATED,
LAMA_IN_PROGRESS,
DAMA_IN_PROGRESS,
DEATH_BEING_RECORDED,
PATIENT_MISSING,
DISCHARGED,
LAMA_COMPLETED,
DAMA_COMPLETED,
REFERRED,
DECEASED,
ABSCONDED
admission_date
string

ISO-8601 date-time; defaults to the server now.

date
string

ISO-8601 date-time; defaults to the server now.

Response

Created — the newly created IPD admission.

id
string

Server-generated admission document id.

bid
string

Business id the admission belongs to.

admission_date
string

Admission date-time as an ISO-8601 string.

discharge_date
string

Discharge date-time as an ISO-8601 string. Present once discharged.

ipid
string

Patient IPD case number.

attendee
object
patient
object
insurance
object
procedures
object[]
refer
object
doc
object

The responsible doctor (id + name).

notes
string
stage
enum<string>

Coarse lifecycle stage of the admission.

Available options:
IN,
AD,
DC
status
enum<string>

Granular lifecycle status within the current stage.

Available options:
ADMISSION_RECOMMENDED,
ADMISSION_ON_HOLD,
ADMISSION_CONFIRMED,
ADMISSION_CANCELLED,
BED_ASSIGNED,
UNDER_CARE,
NOT_RECEIVED,
FIT_FOR_DISCHARGE,
DISCHARGE_INITIATED,
REFERRAL_INITIATED,
LAMA_IN_PROGRESS,
DAMA_IN_PROGRESS,
DEATH_BEING_RECORDED,
PATIENT_MISSING,
DISCHARGED,
LAMA_COMPLETED,
DAMA_COMPLETED,
REFERRED,
DECEASED,
ABSCONDED
duration
object
bed
string
rateplan
object
docid
string
category
object
date
string
department
object
pid
string
created_at
string

Creation date-time as an ISO-8601 string.

updated_at
string

Last-update date-time as an ISO-8601 string.

facility
object
facilityid
string
totalbilled
number

Total amount billed for the admission.

totalpaid
number

Total amount paid against the admission.

totalbilled_updated_at
string
totalpaid_updated_at
string
custom_attributes
object

Map of custom attribute keys to arrays of string values.

clearances_summary
object

Denormalized discharge-clearance state.

archived
boolean
actor_oid
string

oid of the actor that created/last acted on the admission.