Skip to main content
POST
/
mr
/
api
/
v1
/
cases
Create Case
curl --request POST \
  --url https://api.eka.care/mr/api/v1/cases \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Pt-Id: <x-pt-id>' \
  --data '{
  "id": "CASE_ID",
  "display_name": "Leg Injury",
  "hi_type": "OPConsultation",
  "occurred_at": 1678886400,
  "type": "OP",
  "partner_meta": {
    "facility_id": "GH",
    "uhid": "UHID_1234"
  }
}'
{
  "id": "case_12345"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Pt-Id
string
required

Patient ID

Body

application/json
id
string
required

Unique identifier for the case.

Example:

"CASE_ID"

display_name
string
required

Human-readable name for the case

Example:

"Leg Injury"

occurred_at
integer
required

Timestamp when the event occurred (Unix timestamp)

Example:

1678886400

hi_type
enum<string>

Type of case

Available options:
OPConsultation,
Prescription,
DischargeSummary,
DiagnosticReport,
ImmunizationRecord,
HealthDocumentRecord,
WellnessRecord
Example:

"OPConsultation"

type
string

Type of the case

Example:

"OP"

partner_meta
object

metadata attached to the case.

Example:
{ "facility_id": "GH", "uhid": "UHID_1234" }

Response

Case created successfully

id
string

Unique identifier for the newly created case

Example:

"case_12345"