Server-side APIEndpointsPatients

Update patient details

Edit a patient's name, contact, address and patient-form answers.

PUT /v1/patients/:patientId/basic-details

A full replace of the patient's demographic record. Use it to keep Medos in step with your own CRM or EMR — a corrected surname, a new address, an updated intake form.

Not OTP-gated: you are addressing a patient record by its id, which you can only have obtained through a gated lookup or a booking you made.

This is a PUT, not a PATCH

Fields you omit are cleared, not preserved. Read the patient first — from search-by-phone — then send the merged record back.

Path parameters

NameTypeRequiredDescription
patientIdnumberYesThe patient record.

Body

FieldTypeRequiredDescription
firstNamestringYesMust not be blank.
middleNamestringNo
lastNamestringNo
emailstringNo
countryCodestringNoDial code with the +.
phoneNumberstringNo
dobstringNoYYYY-MM-DD.
agenumberNoAn alternative to dob when the patient does not know their date of birth.
genderstringNoMALE, FEMALE, OTHER.
bloodGroupstringNoThe clinic's blood-group codes.
patientAddressobjectNoaddressLine1, addressLine2, completeAddress, city, state, country, zipcode, landmark, countryCode, phoneNumber. Send the address's own id to edit it in place.
patientFormValuesobjectNoAnswers to the clinic's patient form, keyed by field id.

Try it

PUT/v1/patients/:patientId/basic-details

Path

Body

Request
PUT /v1/patients//basic-details
{}
to https://api.medos.one
Use a dedicated test key, and put your browser's address on its allowlist

A Developer API key authenticates on its own, so it only works from the addresses registered against it — and this page calls from your browser, not your servers. Unless your own public address is on the list you get a 403 naming it, which is the allowlist doing its job. Your browser may also reach us over IPv6 even when your server does not, so the address in the error is often not the one you expected. The key here is kept in memory only and never written to storage, but create a test key for it and deactivate that key when you are done.

Request

curl -sX PUT "https://api.medos.one/v1/patients/774/basic-details" \
  -H "x-api-key: $MEDOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Asha",
    "lastName": "Nair-Menon",
    "email": "asha@example.com",
    "countryCode": "+91",
    "phoneNumber": "9876543210",
    "dob": "1991-04-02",
    "gender": "FEMALE",
    "patientAddress": {
      "addressLine1": "12 Residency Road",
      "city": "Bengaluru",
      "state": "Karnataka",
      "country": "India",
      "zipcode": "560025"
    },
    "patientFormValues": { "occupation": "Architect" }
  }'

Response

The updated record:

{
  "id": 774,
  "firstName": "Asha",
  "lastName": "Nair-Menon",
  "email": "asha@example.com",
  "countryCode": "+91",
  "phoneNumber": "9876543210",
  "dob": "1991-04-02",
  "age": 35,
  "gender": "FEMALE",
  "bloodGroup": null,
  "patientAddress": {
    "id": 991,
    "addressLine1": "12 Residency Road",
    "city": "Bengaluru",
    "state": "Karnataka",
    "country": "India",
    "zipcode": "560025"
  },
  "patientFormValues": { "occupation": "Architect" }
}

Common failures

StatusCause
400firstName blank or missing.
400A patientFormValues entry that fails the clinic's form validation — a required field left empty, or a value outside an allowed set.
404No patient with that id in your workspace.

Creating a patient is a different call

There is no create route on this surface. A new patient comes into existence through the find-or-create patientPayload on any booking route — see book-appointment.

On this page