Skip to content

API reference

Booking

Jadwal praktik, slot, cuti/libur, dan booking pasien (modul booking).

OpenAPI 3.1 · version 1.1.0 · 127 operations · 30 webhook events

Base URLhttps://api.medivana.cloud/api/v1

Endpoint descriptions come from the OpenAPI specification and are written in Indonesian.

Daftar booking

Default hari ini di cabang aktif. Pakai date atau rentang from/to. status boleh dipisah koma.

Scopes
appointments:readappointments:writeencounters:read(any one of)
RBAC permissions
appointment.manage · appointment.read · encounter.read · queue.manage
Module
booking

Parameters

Parameters GET /booking/appointments
NameInTypeDescription
X-Branch-IDheaderstring (uuid)Cabang aktif (opsional). Nilai di luar cabang klien diabaikan.
datequerystring (date)
fromquerystring (date)
toquerystring (date)
patient_idquerystring (uuid)
practitioner_idquerystring (uuid)
unit_idquerystring (uuid)
branch_idquerystring (uuid)
statusquerystringbooked, checked_in, cancelled, no_show, done (pisah koma)

Code examples

Code example language
curl -X GET "https://api.medivana.cloud/api/v1/booking/appointments" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN"
const res = await fetch("https://api.medivana.cloud/api/v1/booking/appointments", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.get(
    "https://api.medivana.cloud/api/v1/booking/appointments",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

200Booking (urut waktu mulai)application/json

{
  "items": [
    {
      "id": "3f0c2a10-5b7e-4c1d-9a2e-00000001a001",
      "code": "BK-7KQ2MZ",
      "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000000b1",
      "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000c0001",
      "unit_name": "Poli Umum",
      "patient_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000a0001",
      "patient_name": "Pasien Contoh",
      "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
      "practitioner_name": "dr. Rina Contoh",
      "start_at": "2026-11-02T08:15:00+07:00",
      "end_at": "2026-11-02T08:30:00+07:00",
      "status": "booked",
      "source": "admin",
      "payer_kind": "umum",
      "complaint": "Demam 3 hari",
      "version": 1
    }
  ]
}
Schema 200
Schema 200
NameTypeDescription
itemsrequiredarray<object>
items[].idstring (uuid)
items[].codestring
items[].branch_idstring (uuid)
items[].unit_idstring (uuid)
items[].unit_namestring
items[].patient_idstring (uuid) | null
items[].patient_namestring
items[].patient_phone_maskedstring | null
items[].patient_sexstring | null
items[].patient_birth_datestring (date) | null
items[].is_new_patientboolean
items[].practitioner_idstring (uuid)
items[].practitioner_namestring
items[].schedule_idstring (uuid) | null
items[].service_idstring (uuid) | null
items[].start_atstring (date-time)
items[].end_atstring (date-time)
items[].statusbooked | checked_in | cancelled | no_show | done
items[].sourceportal | whatsapp | admin | bpjs
items[].payer_kindumum | bpjs | insurance | company
items[].payer_idstring (uuid) | null
items[].complaintstring | null
items[].encounter_idstring (uuid) | null
items[].checked_in_atstring (date-time) | null
items[].cancelled_atstring (date-time) | null
items[].cancel_reasonstring | null
items[].reminder_sent_atstring (date-time) | null
items[].created_atstring (date-time)
items[].versioninteger
Errors
  • 400bad-requestParameter atau format permintaan tidak valid
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya
POST/booking/appointmentsLink to this operation: Buat booking

Buat booking

Isi patient_id (pasien terdaftar) atau patient (pasien baru; identitas disimpan terenkripsi dan pasien didaftarkan saat check-in). start_at harus tepat pada grid slot jadwal (GET /booking/slots): di luar jadwal, tidak sejajar slot, atau sudah lewat → 422; slot terisi, kuota penuh, atau cuti/libur → 409. notify: true mengirim konfirmasi WhatsApp bila nomor diketahui. Menerbitkan event appointment.booked.

Scopes
appointments:write
RBAC permissions
appointment.manage
Module
booking

Parameters

Parameters POST /booking/appointments
NameInTypeDescription
X-Branch-IDheaderstring (uuid)Cabang aktif (opsional). Nilai di luar cabang klien diabaikan.

Request body application/json

Request body POST /booking/appointments
NameTypeDescription
patient_idstring (uuid) | null
patientobject | null
patient.namestring
patient.phonestring
patient.nikstring
patient.birth_datestring (date)
patient.sexmale | female
practitioner_idrequiredstring (uuid)
unit_idstring (uuid) | null
service_idstring (uuid) | null
start_atrequiredstring (date-time)
sourceadmin | whatsapp | bpjs
payer_kindumum | bpjs | insurance | company
payer_idstring (uuid) | null
complaintstring | null
notifyboolean
{
  "patient_id": null,
  "patient": {
    "name": "Pasien Baru Contoh",
    "phone": "0812-0000-0003",
    "birth_date": "1999-09-09",
    "sex": "female"
  },
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
  "start_at": "2026-11-02T08:15:00+07:00",
  "source": "admin",
  "payer_kind": "umum",
  "complaint": "Demam 3 hari",
  "notify": false
}

Code examples

Code example language
curl -X POST "https://api.medivana.cloud/api/v1/booking/appointments" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"patient_id":null,"patient":{"name":"Pasien Baru Contoh","phone":"0812-0000-0003","birth_date":"1999-09-09","sex":"female"},"practitioner_id":"3f0c2a10-5b7e-4c1d-9a2e-0000000d0001","start_at":"2026-11-02T08:15:00+07:00","source":"admin","payer_kind":"umum","complaint":"Demam 3 hari","notify":false}'
const res = await fetch("https://api.medivana.cloud/api/v1/booking/appointments", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    patient_id: null,
    patient: {
      name: "Pasien Baru Contoh",
      phone: "0812-0000-0003",
      birth_date: "1999-09-09",
      sex: "female",
    },
    practitioner_id: "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
    start_at: "2026-11-02T08:15:00+07:00",
    source: "admin",
    payer_kind: "umum",
    complaint: "Demam 3 hari",
    notify: false,
  }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.post(
    "https://api.medivana.cloud/api/v1/booking/appointments",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    json={
        "patient_id": None,
        "patient": {
            "name": "Pasien Baru Contoh",
            "phone": "0812-0000-0003",
            "birth_date": "1999-09-09",
            "sex": "female",
        },
        "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
        "start_at": "2026-11-02T08:15:00+07:00",
        "source": "admin",
        "payer_kind": "umum",
        "complaint": "Demam 3 hari",
        "notify": False,
    },
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

201Booking dibuatapplication/json

{
  "id": "3f0c2a10-5b7e-4c1d-9a2e-00000001a001",
  "code": "BK-7KQ2MZ",
  "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000000b1",
  "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000c0001",
  "unit_name": "Poli Umum",
  "patient_id": null,
  "patient_name": "Pasien Baru Contoh",
  "patient_phone_masked": "62812****0003",
  "patient_sex": "female",
  "patient_birth_date": "1999-09-09",
  "is_new_patient": true,
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
  "practitioner_name": "dr. Rina Contoh",
  "schedule_id": "3f0c2a10-5b7e-4c1d-9a2e-00000001a101",
  "service_id": null,
  "start_at": "2026-11-02T08:15:00+07:00",
  "end_at": "2026-11-02T08:30:00+07:00",
  "status": "booked",
  "source": "admin",
  "payer_kind": "umum",
  "payer_id": null,
  "complaint": "Demam 3 hari",
  "encounter_id": null,
  "checked_in_at": null,
  "cancelled_at": null,
  "cancel_reason": null,
  "reminder_sent_at": null,
  "created_at": "2026-10-30T14:02:00+07:00",
  "version": 1
}
Schema 201
Schema 201
NameTypeDescription
idstring (uuid)
codestring
branch_idstring (uuid)
unit_idstring (uuid)
unit_namestring
patient_idstring (uuid) | null
patient_namestring
patient_phone_maskedstring | null
patient_sexstring | null
patient_birth_datestring (date) | null
is_new_patientboolean
practitioner_idstring (uuid)
practitioner_namestring
schedule_idstring (uuid) | null
service_idstring (uuid) | null
start_atstring (date-time)
end_atstring (date-time)
statusbooked | checked_in | cancelled | no_show | done
sourceportal | whatsapp | admin | bpjs
payer_kindumum | bpjs | insurance | company
payer_idstring (uuid) | null
complaintstring | null
encounter_idstring (uuid) | null
checked_in_atstring (date-time) | null
cancelled_atstring (date-time) | null
cancel_reasonstring | null
reminder_sent_atstring (date-time) | null
created_atstring (date-time)
versioninteger
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 409conflictKonflik data atau status tidak mengizinkan aksi
  • 422validationValidasi gagal; rincian per field di errors
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya
GET/booking/appointments/{id}Link to this operation: Detail booking

Detail booking

encounter_id terisi setelah check-in.

Scopes
appointments:readappointments:writeencounters:read(any one of)
RBAC permissions
appointment.manage · appointment.read · encounter.read · queue.manage
Module
booking

Parameters

Parameters GET /booking/appointments/{id}
NameInTypeDescription
idrequiredpathstring (uuid)

Code examples

Code example language
curl -X GET "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN"
const res = await fetch("https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.get(
    "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

200Bookingapplication/json

{
  "id": "3f0c2a10-5b7e-4c1d-9a2e-00000001a001",
  "code": "BK-7KQ2MZ",
  "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000000b1",
  "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000c0001",
  "unit_name": "Poli Umum",
  "patient_id": null,
  "patient_name": "Pasien Baru Contoh",
  "patient_phone_masked": "62812****0003",
  "patient_sex": "female",
  "patient_birth_date": "1999-09-09",
  "is_new_patient": true,
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
  "practitioner_name": "dr. Rina Contoh",
  "schedule_id": "3f0c2a10-5b7e-4c1d-9a2e-00000001a101",
  "service_id": null,
  "start_at": "2026-11-02T08:15:00+07:00",
  "end_at": "2026-11-02T08:30:00+07:00",
  "status": "booked",
  "source": "admin",
  "payer_kind": "umum",
  "payer_id": null,
  "complaint": "Demam 3 hari",
  "encounter_id": null,
  "checked_in_at": null,
  "cancelled_at": null,
  "cancel_reason": null,
  "reminder_sent_at": null,
  "created_at": "2026-10-30T14:02:00+07:00",
  "version": 1
}
Schema 200
Schema 200
NameTypeDescription
idstring (uuid)
codestring
branch_idstring (uuid)
unit_idstring (uuid)
unit_namestring
patient_idstring (uuid) | null
patient_namestring
patient_phone_maskedstring | null
patient_sexstring | null
patient_birth_datestring (date) | null
is_new_patientboolean
practitioner_idstring (uuid)
practitioner_namestring
schedule_idstring (uuid) | null
service_idstring (uuid) | null
start_atstring (date-time)
end_atstring (date-time)
statusbooked | checked_in | cancelled | no_show | done
sourceportal | whatsapp | admin | bpjs
payer_kindumum | bpjs | insurance | company
payer_idstring (uuid) | null
complaintstring | null
encounter_idstring (uuid) | null
checked_in_atstring (date-time) | null
cancelled_atstring (date-time) | null
cancel_reasonstring | null
reminder_sent_atstring (date-time) | null
created_atstring (date-time)
versioninteger
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 404not-foundData tidak ada, milik organisasi lain, atau di luar cakupan cabang klien
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya
PATCH/booking/appointments/{id}Link to this operation: Ubah data booking

Ubah data booking

Hanya untuk status booked. Untuk mengganti waktu/dokter pakai reschedule.

Scopes
appointments:write
RBAC permissions
appointment.manage
Module
booking

Parameters

Parameters PATCH /booking/appointments/{id}
NameInTypeDescription
idrequiredpathstring (uuid)
If-MatchheaderstringVersi dari ETag (mis. "3"). Bila tidak cocok → 412 stale.

Request body application/json

Request body PATCH /booking/appointments/{id}
NameTypeDescription
patient_idstring (uuid) | nullHubungkan ke pasien terdaftar
complaintstring | null
payer_kindumum | bpjs | insurance | company
payer_idstring (uuid) | null
service_idstring (uuid) | null
{
  "patient_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000a0001",
  "complaint": "Demam 3 hari, batuk"
}

Code examples

Code example language
curl -X PATCH "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"patient_id":"3f0c2a10-5b7e-4c1d-9a2e-0000000a0001","complaint":"Demam 3 hari, batuk"}'
const res = await fetch("https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    patient_id: "3f0c2a10-5b7e-4c1d-9a2e-0000000a0001",
    complaint: "Demam 3 hari, batuk",
  }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.patch(
    "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    json={
        "patient_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000a0001",
        "complaint": "Demam 3 hari, batuk",
    },
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

200Bookingapplication/json

{
  "id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "code": "string",
  "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_name": "string",
  "patient_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "patient_name": "string",
  "patient_phone_masked": "string",
  "patient_sex": "string",
  "patient_birth_date": "2026-11-02",
  "is_new_patient": true,
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "practitioner_name": "string",
  "schedule_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "service_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "start_at": "2026-11-02T08:00:00+07:00",
  "end_at": "2026-11-02T08:00:00+07:00",
  "status": "booked",
  "source": "portal",
  "payer_kind": "umum",
  "payer_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "complaint": "string",
  "encounter_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "checked_in_at": "2026-11-02T08:00:00+07:00",
  "cancelled_at": "2026-11-02T08:00:00+07:00",
  "cancel_reason": "string",
  "reminder_sent_at": "2026-11-02T08:00:00+07:00",
  "created_at": "2026-11-02T08:00:00+07:00",
  "version": 0
}
Schema 200
Schema 200
NameTypeDescription
idstring (uuid)
codestring
branch_idstring (uuid)
unit_idstring (uuid)
unit_namestring
patient_idstring (uuid) | null
patient_namestring
patient_phone_maskedstring | null
patient_sexstring | null
patient_birth_datestring (date) | null
is_new_patientboolean
practitioner_idstring (uuid)
practitioner_namestring
schedule_idstring (uuid) | null
service_idstring (uuid) | null
start_atstring (date-time)
end_atstring (date-time)
statusbooked | checked_in | cancelled | no_show | done
sourceportal | whatsapp | admin | bpjs
payer_kindumum | bpjs | insurance | company
payer_idstring (uuid) | null
complaintstring | null
encounter_idstring (uuid) | null
checked_in_atstring (date-time) | null
cancelled_atstring (date-time) | null
cancel_reasonstring | null
reminder_sent_atstring (date-time) | null
created_atstring (date-time)
versioninteger
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 404not-foundData tidak ada, milik organisasi lain, atau di luar cakupan cabang klien
  • 409conflictKonflik data atau status tidak mengizinkan aksi
  • 412staleIf-Match tidak cocok dengan versi terbaru
  • 422validationValidasi gagal; rincian per field di errors
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya
POST/booking/appointments/{id}/cancelLink to this operation: Batalkan booking

Batalkan booking

Menerbitkan event appointment.cancelled; notify mengirim pemberitahuan WhatsApp ke pasien.

Scopes
appointments:write
RBAC permissions
appointment.manage
Module
booking

Parameters

Parameters POST /booking/appointments/{id}/cancel
NameInTypeDescription
idrequiredpathstring (uuid)

Request body application/json

Request body POST /booking/appointments/{id}/cancel
NameTypeDescription
reasonrequiredstring
notifyboolean
{
  "reason": "Pasien berhalangan",
  "notify": false
}

Code examples

Code example language
curl -X POST "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/cancel" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Pasien berhalangan","notify":false}'
const res = await fetch("https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/cancel", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    reason: "Pasien berhalangan",
    notify: false,
  }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.post(
    "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/cancel",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    json={
        "reason": "Pasien berhalangan",
        "notify": False,
    },
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

200Booking dibatalkanapplication/json

{
  "id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "code": "string",
  "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_name": "string",
  "patient_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "patient_name": "string",
  "patient_phone_masked": "string",
  "patient_sex": "string",
  "patient_birth_date": "2026-11-02",
  "is_new_patient": true,
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "practitioner_name": "string",
  "schedule_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "service_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "start_at": "2026-11-02T08:00:00+07:00",
  "end_at": "2026-11-02T08:00:00+07:00",
  "status": "booked",
  "source": "portal",
  "payer_kind": "umum",
  "payer_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "complaint": "string",
  "encounter_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "checked_in_at": "2026-11-02T08:00:00+07:00",
  "cancelled_at": "2026-11-02T08:00:00+07:00",
  "cancel_reason": "string",
  "reminder_sent_at": "2026-11-02T08:00:00+07:00",
  "created_at": "2026-11-02T08:00:00+07:00",
  "version": 0
}
Schema 200
Schema 200
NameTypeDescription
idstring (uuid)
codestring
branch_idstring (uuid)
unit_idstring (uuid)
unit_namestring
patient_idstring (uuid) | null
patient_namestring
patient_phone_maskedstring | null
patient_sexstring | null
patient_birth_datestring (date) | null
is_new_patientboolean
practitioner_idstring (uuid)
practitioner_namestring
schedule_idstring (uuid) | null
service_idstring (uuid) | null
start_atstring (date-time)
end_atstring (date-time)
statusbooked | checked_in | cancelled | no_show | done
sourceportal | whatsapp | admin | bpjs
payer_kindumum | bpjs | insurance | company
payer_idstring (uuid) | null
complaintstring | null
encounter_idstring (uuid) | null
checked_in_atstring (date-time) | null
cancelled_atstring (date-time) | null
cancel_reasonstring | null
reminder_sent_atstring (date-time) | null
created_atstring (date-time)
versioninteger
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 404not-foundData tidak ada, milik organisasi lain, atau di luar cakupan cabang klien
  • 409conflictKonflik data atau status tidak mengizinkan aksi
  • 422validationValidasi gagal; rincian per field di errors
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya
POST/booking/appointments/{id}/check-inLink to this operation: Check-in pasien pada hari booking

Check-in pasien pada hari booking

Hanya status booked pada tanggal booking (selain itu 409). Pasien baru wajib didaftarkan dulu (POST /patients) lalu dikirim patient_id (422 bila kosong). Menerbitkan event appointment.checked_in; kunjungan dan nomor antrean dibuat otomatis (encounter_id).

Scopes
appointments:write
RBAC permissions
appointment.manage · queue.manage
Module
booking

Parameters

Parameters POST /booking/appointments/{id}/check-in
NameInTypeDescription
idrequiredpathstring (uuid)

Request body application/json

Request body POST /booking/appointments/{id}/check-in
NameTypeDescription
patient_idstring (uuid) | null
payer_kindumum | bpjs | insurance | company
payer_idstring (uuid) | null
{
  "patient_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000a0001",
  "payer_kind": "bpjs",
  "payer_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000f0002"
}

Code examples

Code example language
curl -X POST "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/check-in" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"patient_id":"3f0c2a10-5b7e-4c1d-9a2e-0000000a0001","payer_kind":"bpjs","payer_id":"3f0c2a10-5b7e-4c1d-9a2e-0000000f0002"}'
const res = await fetch("https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/check-in", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    patient_id: "3f0c2a10-5b7e-4c1d-9a2e-0000000a0001",
    payer_kind: "bpjs",
    payer_id: "3f0c2a10-5b7e-4c1d-9a2e-0000000f0002",
  }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.post(
    "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/check-in",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    json={
        "patient_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000a0001",
        "payer_kind": "bpjs",
        "payer_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000f0002",
    },
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

200Booking checked_in dengan encounter_idapplication/json

{
  "id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "code": "string",
  "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_name": "string",
  "patient_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "patient_name": "string",
  "patient_phone_masked": "string",
  "patient_sex": "string",
  "patient_birth_date": "2026-11-02",
  "is_new_patient": true,
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "practitioner_name": "string",
  "schedule_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "service_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "start_at": "2026-11-02T08:00:00+07:00",
  "end_at": "2026-11-02T08:00:00+07:00",
  "status": "booked",
  "source": "portal",
  "payer_kind": "umum",
  "payer_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "complaint": "string",
  "encounter_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "checked_in_at": "2026-11-02T08:00:00+07:00",
  "cancelled_at": "2026-11-02T08:00:00+07:00",
  "cancel_reason": "string",
  "reminder_sent_at": "2026-11-02T08:00:00+07:00",
  "created_at": "2026-11-02T08:00:00+07:00",
  "version": 0
}
Schema 200
Schema 200
NameTypeDescription
idstring (uuid)
codestring
branch_idstring (uuid)
unit_idstring (uuid)
unit_namestring
patient_idstring (uuid) | null
patient_namestring
patient_phone_maskedstring | null
patient_sexstring | null
patient_birth_datestring (date) | null
is_new_patientboolean
practitioner_idstring (uuid)
practitioner_namestring
schedule_idstring (uuid) | null
service_idstring (uuid) | null
start_atstring (date-time)
end_atstring (date-time)
statusbooked | checked_in | cancelled | no_show | done
sourceportal | whatsapp | admin | bpjs
payer_kindumum | bpjs | insurance | company
payer_idstring (uuid) | null
complaintstring | null
encounter_idstring (uuid) | null
checked_in_atstring (date-time) | null
cancelled_atstring (date-time) | null
cancel_reasonstring | null
reminder_sent_atstring (date-time) | null
created_atstring (date-time)
versioninteger
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 404not-foundData tidak ada, milik organisasi lain, atau di luar cakupan cabang klien
  • 409conflictKonflik data atau status tidak mengizinkan aksi
  • 422validationValidasi gagal; rincian per field di errors
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya
POST/booking/appointments/{id}/no-showLink to this operation: Tandai pasien tidak datang

Tandai pasien tidak datang

Hanya setelah jam booking lewat dan status booked.

Scopes
appointments:write
RBAC permissions
appointment.manage · queue.manage
Module
booking

Parameters

Parameters POST /booking/appointments/{id}/no-show
NameInTypeDescription
idrequiredpathstring (uuid)

Code examples

Code example language
curl -X POST "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/no-show" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN"
const res = await fetch("https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/no-show", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.post(
    "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/no-show",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

200Booking no_showapplication/json

{
  "id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "code": "string",
  "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_name": "string",
  "patient_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "patient_name": "string",
  "patient_phone_masked": "string",
  "patient_sex": "string",
  "patient_birth_date": "2026-11-02",
  "is_new_patient": true,
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "practitioner_name": "string",
  "schedule_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "service_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "start_at": "2026-11-02T08:00:00+07:00",
  "end_at": "2026-11-02T08:00:00+07:00",
  "status": "booked",
  "source": "portal",
  "payer_kind": "umum",
  "payer_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "complaint": "string",
  "encounter_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "checked_in_at": "2026-11-02T08:00:00+07:00",
  "cancelled_at": "2026-11-02T08:00:00+07:00",
  "cancel_reason": "string",
  "reminder_sent_at": "2026-11-02T08:00:00+07:00",
  "created_at": "2026-11-02T08:00:00+07:00",
  "version": 0
}
Schema 200
Schema 200
NameTypeDescription
idstring (uuid)
codestring
branch_idstring (uuid)
unit_idstring (uuid)
unit_namestring
patient_idstring (uuid) | null
patient_namestring
patient_phone_maskedstring | null
patient_sexstring | null
patient_birth_datestring (date) | null
is_new_patientboolean
practitioner_idstring (uuid)
practitioner_namestring
schedule_idstring (uuid) | null
service_idstring (uuid) | null
start_atstring (date-time)
end_atstring (date-time)
statusbooked | checked_in | cancelled | no_show | done
sourceportal | whatsapp | admin | bpjs
payer_kindumum | bpjs | insurance | company
payer_idstring (uuid) | null
complaintstring | null
encounter_idstring (uuid) | null
checked_in_atstring (date-time) | null
cancelled_atstring (date-time) | null
cancel_reasonstring | null
reminder_sent_atstring (date-time) | null
created_atstring (date-time)
versioninteger
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 404not-foundData tidak ada, milik organisasi lain, atau di luar cakupan cabang klien
  • 409conflictKonflik data atau status tidak mengizinkan aksi
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya
POST/booking/appointments/{id}/rescheduleLink to this operation: Jadwal ulang booking

Jadwal ulang booking

Aturan slot sama dengan pembuatan booking. Menerbitkan appointment.booked dengan rescheduled: true.

Scopes
appointments:write
RBAC permissions
appointment.manage
Module
booking

Parameters

Parameters POST /booking/appointments/{id}/reschedule
NameInTypeDescription
idrequiredpathstring (uuid)

Request body application/json

Request body POST /booking/appointments/{id}/reschedule
NameTypeDescription
start_atrequiredstring (date-time)
practitioner_idstring (uuid) | null
unit_idstring (uuid) | null
{
  "start_at": "2026-11-03T09:00:00+07:00"
}

Code examples

Code example language
curl -X POST "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/reschedule" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"start_at":"2026-11-03T09:00:00+07:00"}'
const res = await fetch("https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/reschedule", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    start_at: "2026-11-03T09:00:00+07:00",
  }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.post(
    "https://api.medivana.cloud/api/v1/booking/appointments/3f0c2a10-5b7e-4c1d-9a2e-000000000001/reschedule",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    json={
        "start_at": "2026-11-03T09:00:00+07:00",
    },
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

200Booking dengan waktu baruapplication/json

{
  "id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "code": "string",
  "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_name": "string",
  "patient_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "patient_name": "string",
  "patient_phone_masked": "string",
  "patient_sex": "string",
  "patient_birth_date": "2026-11-02",
  "is_new_patient": true,
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "practitioner_name": "string",
  "schedule_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "service_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "start_at": "2026-11-02T08:00:00+07:00",
  "end_at": "2026-11-02T08:00:00+07:00",
  "status": "booked",
  "source": "portal",
  "payer_kind": "umum",
  "payer_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "complaint": "string",
  "encounter_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "checked_in_at": "2026-11-02T08:00:00+07:00",
  "cancelled_at": "2026-11-02T08:00:00+07:00",
  "cancel_reason": "string",
  "reminder_sent_at": "2026-11-02T08:00:00+07:00",
  "created_at": "2026-11-02T08:00:00+07:00",
  "version": 0
}
Schema 200
Schema 200
NameTypeDescription
idstring (uuid)
codestring
branch_idstring (uuid)
unit_idstring (uuid)
unit_namestring
patient_idstring (uuid) | null
patient_namestring
patient_phone_maskedstring | null
patient_sexstring | null
patient_birth_datestring (date) | null
is_new_patientboolean
practitioner_idstring (uuid)
practitioner_namestring
schedule_idstring (uuid) | null
service_idstring (uuid) | null
start_atstring (date-time)
end_atstring (date-time)
statusbooked | checked_in | cancelled | no_show | done
sourceportal | whatsapp | admin | bpjs
payer_kindumum | bpjs | insurance | company
payer_idstring (uuid) | null
complaintstring | null
encounter_idstring (uuid) | null
checked_in_atstring (date-time) | null
cancelled_atstring (date-time) | null
cancel_reasonstring | null
reminder_sent_atstring (date-time) | null
created_atstring (date-time)
versioninteger
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 404not-foundData tidak ada, milik organisasi lain, atau di luar cakupan cabang klien
  • 409conflictKonflik data atau status tidak mengizinkan aksi
  • 422validationValidasi gagal; rincian per field di errors
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya

Slot praktik dan ketersediaannya

Dari jadwal mingguan dikurangi cuti/libur, booking aktif, kuota sesi, dan waktu lewat. Pakai date atau rentang from/to (maks 31 hari). reason bila tidak tersedia: booked, quota_full, leave, closed, past.

Scopes
appointments:readappointments:writeencounters:read(any one of)
RBAC permissions
appointment.manage · appointment.read · encounter.read · queue.manage
Module
booking

Parameters

Parameters GET /booking/slots
NameInTypeDescription
practitioner_idquerystring (uuid)
branch_idquerystring (uuid)
unit_idquerystring (uuid)
datequerystring (date)
fromquerystring (date)
toquerystring (date)
online_onlyquerybooleanHanya jadwal yang boleh dipesan daring
available_onlyqueryboolean

Code examples

Code example language
curl -X GET "https://api.medivana.cloud/api/v1/booking/slots" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN"
const res = await fetch("https://api.medivana.cloud/api/v1/booking/slots", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.get(
    "https://api.medivana.cloud/api/v1/booking/slots",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

200Slotapplication/json

{
  "items": [
    {
      "schedule_id": "3f0c2a10-5b7e-4c1d-9a2e-00000001a101",
      "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
      "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000000b1",
      "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000c0001",
      "date": "2026-11-02",
      "start_at": "2026-11-02T08:00:00+07:00",
      "end_at": "2026-11-02T08:15:00+07:00",
      "time": "08:00",
      "available": false,
      "reason": "booked",
      "remaining_quota": 9
    },
    {
      "schedule_id": "3f0c2a10-5b7e-4c1d-9a2e-00000001a101",
      "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
      "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000000b1",
      "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000c0001",
      "date": "2026-11-02",
      "start_at": "2026-11-02T08:15:00+07:00",
      "end_at": "2026-11-02T08:30:00+07:00",
      "time": "08:15",
      "available": true,
      "reason": null,
      "remaining_quota": 9
    }
  ]
}
Schema 200
Schema 200
NameTypeDescription
itemsrequiredarray<object>
items[].schedule_idstring (uuid)
items[].practitioner_idstring (uuid)
items[].branch_idstring (uuid)
items[].unit_idstring (uuid)
items[].datestring (date)
items[].start_atstring (date-time)
items[].end_atstring (date-time)
items[].timestring
items[].availableboolean
items[].reasonbooked | quota_full | leave | closed | past | null
items[].remaining_quotainteger | null
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 422validationValidasi gagal; rincian per field di errors
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya

Jadwal praktik mingguan

weekday ISO (1 = Senin … 7 = Minggu); jam HH:MM WIB.

Scopes
appointments:readappointments:writeencounters:read(any one of)
RBAC permissions
appointment.manage · appointment.read · encounter.read · queue.manage
Module
booking

Parameters

Parameters GET /booking/schedules
NameInTypeDescription
practitioner_idquerystring (uuid)
branch_idquerystring (uuid)
unit_idquerystring (uuid)
include_inactivequeryboolean

Code examples

Code example language
curl -X GET "https://api.medivana.cloud/api/v1/booking/schedules" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN"
const res = await fetch("https://api.medivana.cloud/api/v1/booking/schedules", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.get(
    "https://api.medivana.cloud/api/v1/booking/schedules",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

200Jadwalapplication/json

{
  "items": [
    {
      "id": "3f0c2a10-5b7e-4c1d-9a2e-00000001a101",
      "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000000b1",
      "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000c0001",
      "unit_name": "Poli Umum",
      "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
      "practitioner_name": "dr. Rina Contoh",
      "weekday": 1,
      "weekday_label": "Senin",
      "start_time": "08:00",
      "end_time": "12:00",
      "slot_minutes": 15,
      "quota": 12,
      "slot_count": 16,
      "allow_online": true,
      "valid_from": "2026-11-01",
      "valid_until": null,
      "is_active": true,
      "note": "Poli umum pagi",
      "version": 1
    }
  ]
}
Schema 200
Schema 200
NameTypeDescription
itemsrequiredarray<object>
items[].practitioner_idstring (uuid)
items[].branch_idstring (uuid) | null
items[].unit_idstring (uuid)
items[].weekdayinteger
items[].start_timestring
items[].end_timestring
items[].slot_minutesinteger
items[].quotainteger | null
items[].allow_onlineboolean
items[].valid_fromstring (date) | null
items[].valid_untilstring (date) | null
items[].notestring | null
items[].idstring (uuid)
items[].unit_namestring
items[].practitioner_namestring
items[].weekday_labelstring
items[].slot_countinteger
items[].is_activeboolean
items[].versioninteger
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya

Buat jadwal praktik

branch_id default cabang aktif; unit harus di cabang itu dan dokter bertugas di cabang itu. Jadwal bertumpuk untuk dokter yang sama di hari yang sama → 409. quota ≤ jumlah slot; allow_online: false menyembunyikan jadwal dari portal pasien.

Scopes
appointments:write
RBAC permissions
appointment.manage
Module
booking

Parameters

Parameters POST /booking/schedules
NameInTypeDescription
X-Branch-IDheaderstring (uuid)Cabang aktif (opsional). Nilai di luar cabang klien diabaikan.

Request body application/json

Request body POST /booking/schedules
NameTypeDescription
practitioner_idstring (uuid)
branch_idstring (uuid) | null
unit_idstring (uuid)
weekdayinteger
start_timestring
end_timestring
slot_minutesinteger
quotainteger | null
allow_onlineboolean
valid_fromstring (date) | null
valid_untilstring (date) | null
notestring | null
{
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
  "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000000b1",
  "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000c0001",
  "weekday": 1,
  "start_time": "08:00",
  "end_time": "12:00",
  "slot_minutes": 15,
  "quota": 12,
  "allow_online": true,
  "valid_from": "2026-11-01",
  "valid_until": null,
  "note": "Poli umum pagi"
}

Code examples

Code example language
curl -X POST "https://api.medivana.cloud/api/v1/booking/schedules" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"practitioner_id":"3f0c2a10-5b7e-4c1d-9a2e-0000000d0001","branch_id":"3f0c2a10-5b7e-4c1d-9a2e-0000000000b1","unit_id":"3f0c2a10-5b7e-4c1d-9a2e-0000000c0001","weekday":1,"start_time":"08:00","end_time":"12:00","slot_minutes":15,"quota":12,"allow_online":true,"valid_from":"2026-11-01","valid_until":null,"note":"Poli umum pagi"}'
const res = await fetch("https://api.medivana.cloud/api/v1/booking/schedules", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    practitioner_id: "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
    branch_id: "3f0c2a10-5b7e-4c1d-9a2e-0000000000b1",
    unit_id: "3f0c2a10-5b7e-4c1d-9a2e-0000000c0001",
    weekday: 1,
    start_time: "08:00",
    end_time: "12:00",
    slot_minutes: 15,
    quota: 12,
    allow_online: true,
    valid_from: "2026-11-01",
    valid_until: null,
    note: "Poli umum pagi",
  }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.post(
    "https://api.medivana.cloud/api/v1/booking/schedules",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    json={
        "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
        "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000000b1",
        "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000c0001",
        "weekday": 1,
        "start_time": "08:00",
        "end_time": "12:00",
        "slot_minutes": 15,
        "quota": 12,
        "allow_online": True,
        "valid_from": "2026-11-01",
        "valid_until": None,
        "note": "Poli umum pagi",
    },
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

201Jadwal dibuatapplication/json

{
  "id": "3f0c2a10-5b7e-4c1d-9a2e-00000001a101",
  "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000000b1",
  "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000c0001",
  "unit_name": "Poli Umum",
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
  "practitioner_name": "dr. Rina Contoh",
  "weekday": 1,
  "weekday_label": "Senin",
  "start_time": "08:00",
  "end_time": "12:00",
  "slot_minutes": 15,
  "quota": 12,
  "slot_count": 16,
  "allow_online": true,
  "valid_from": "2026-11-01",
  "valid_until": null,
  "is_active": true,
  "note": "Poli umum pagi",
  "version": 1
}
Schema 201
Schema 201
NameTypeDescription
practitioner_idstring (uuid)
branch_idstring (uuid) | null
unit_idstring (uuid)
weekdayinteger
start_timestring
end_timestring
slot_minutesinteger
quotainteger | null
allow_onlineboolean
valid_fromstring (date) | null
valid_untilstring (date) | null
notestring | null
idstring (uuid)
unit_namestring
practitioner_namestring
weekday_labelstring
slot_countinteger
is_activeboolean
versioninteger
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 409conflictKonflik data atau status tidak mengizinkan aksi
  • 422validationValidasi gagal; rincian per field di errors
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya

Ubah jadwal praktik

Parsial. quota: 0 menghapus kuota; valid_from/valid_until: "" mengosongkan masa berlaku.

Scopes
appointments:write
RBAC permissions
appointment.manage
Module
booking

Parameters

Parameters PATCH /booking/schedules/{id}
NameInTypeDescription
idrequiredpathstring (uuid)
If-MatchheaderstringVersi dari ETag (mis. "3"). Bila tidak cocok → 412 stale.

Request body application/json

Request body PATCH /booking/schedules/{id}
NameTypeDescription
practitioner_idstring (uuid)
branch_idstring (uuid) | null
unit_idstring (uuid)
weekdayinteger
start_timestring
end_timestring
slot_minutesinteger
quotainteger | null
allow_onlineboolean
valid_fromstring (date) | null
valid_untilstring (date) | null
notestring | null
{
  "end_time": "13:00",
  "quota": 16
}

Code examples

Code example language
curl -X PATCH "https://api.medivana.cloud/api/v1/booking/schedules/3f0c2a10-5b7e-4c1d-9a2e-000000000001" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"end_time":"13:00","quota":16}'
const res = await fetch("https://api.medivana.cloud/api/v1/booking/schedules/3f0c2a10-5b7e-4c1d-9a2e-000000000001", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    end_time: "13:00",
    quota: 16,
  }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.patch(
    "https://api.medivana.cloud/api/v1/booking/schedules/3f0c2a10-5b7e-4c1d-9a2e-000000000001",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    json={
        "end_time": "13:00",
        "quota": 16,
    },
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

200Jadwalapplication/json

{
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "branch_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "weekday": 0,
  "start_time": "08:00",
  "end_time": "12:00",
  "slot_minutes": 0,
  "quota": 0,
  "allow_online": true,
  "valid_from": "2026-11-02",
  "valid_until": "2026-11-02",
  "note": "string",
  "id": "3f0c2a10-5b7e-4c1d-9a2e-000000000001",
  "unit_name": "string",
  "practitioner_name": "string",
  "weekday_label": "string",
  "slot_count": 0,
  "is_active": true,
  "version": 0
}
Schema 200
Schema 200
NameTypeDescription
practitioner_idstring (uuid)
branch_idstring (uuid) | null
unit_idstring (uuid)
weekdayinteger
start_timestring
end_timestring
slot_minutesinteger
quotainteger | null
allow_onlineboolean
valid_fromstring (date) | null
valid_untilstring (date) | null
notestring | null
idstring (uuid)
unit_namestring
practitioner_namestring
weekday_labelstring
slot_countinteger
is_activeboolean
versioninteger
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 404not-foundData tidak ada, milik organisasi lain, atau di luar cakupan cabang klien
  • 409conflictKonflik data atau status tidak mengizinkan aksi
  • 412staleIf-Match tidak cocok dengan versi terbaru
  • 422validationValidasi gagal; rincian per field di errors
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya

Nonaktifkan jadwal praktik

Booking yang sudah ada tidak dibatalkan.

Scopes
appointments:write
RBAC permissions
appointment.manage
Module
booking

Parameters

Parameters DELETE /booking/schedules/{id}
NameInTypeDescription
idrequiredpathstring (uuid)

Code examples

Code example language
curl -X DELETE "https://api.medivana.cloud/api/v1/booking/schedules/3f0c2a10-5b7e-4c1d-9a2e-000000000001" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN"
const res = await fetch("https://api.medivana.cloud/api/v1/booking/schedules/3f0c2a10-5b7e-4c1d-9a2e-000000000001", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
import os
import requests

resp = requests.delete(
    "https://api.medivana.cloud/api/v1/booking/schedules/3f0c2a10-5b7e-4c1d-9a2e-000000000001",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    timeout=30,
)
resp.raise_for_status()

Responses

204Jadwal nonaktif

Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 404not-foundData tidak ada, milik organisasi lain, atau di luar cakupan cabang klien
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya

Cuti dokter dan libur cabang

Scopes
appointments:readappointments:writeencounters:read(any one of)
RBAC permissions
appointment.manage · appointment.read · encounter.read · queue.manage
Module
booking

Parameters

Parameters GET /booking/exceptions
NameInTypeDescription
fromquerystring (date)
toquerystring (date)
practitioner_idquerystring (uuid)

Code examples

Code example language
curl -X GET "https://api.medivana.cloud/api/v1/booking/exceptions" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN"
const res = await fetch("https://api.medivana.cloud/api/v1/booking/exceptions", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.get(
    "https://api.medivana.cloud/api/v1/booking/exceptions",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

200Pengecualian jadwalapplication/json

{
  "items": [
    {
      "id": "3f0c2a10-5b7e-4c1d-9a2e-00000001a201",
      "branch_id": null,
      "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
      "date_from": "2026-11-10",
      "date_to": "2026-11-12",
      "start_time": null,
      "end_time": null,
      "kind": "leave",
      "reason": "Seminar"
    }
  ]
}
Schema 200
Schema 200
NameTypeDescription
itemsrequiredarray<object>
items[].idstring (uuid)
items[].branch_idstring (uuid) | null
items[].practitioner_idstring (uuid) | null
items[].date_fromstring (date)
items[].date_tostring (date)
items[].start_timestring | null
items[].end_timestring | null
items[].kindleave | closed | other
items[].reasonstring | null
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya

Catat cuti dokter atau libur cabang

Isi practitioner_id (cuti, kind: leave) atau branch_id saja (libur cabang, kind: closed). Jam opsional (sebagian hari). Booking aktif yang terdampak dikembalikan agar pasien dihubungi; tidak dibatalkan otomatis.

Scopes
appointments:write
RBAC permissions
appointment.manage
Module
booking

Request body application/json

Request body POST /booking/exceptions
NameTypeDescription
practitioner_idstring (uuid) | null
branch_idstring (uuid) | null
date_fromrequiredstring (date)
date_torequiredstring (date)
start_timestring | null
end_timestring | null
kindrequiredleave | closed | other
reasonstring | null
{
  "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
  "branch_id": null,
  "date_from": "2026-11-10",
  "date_to": "2026-11-12",
  "kind": "leave",
  "reason": "Seminar"
}

Code examples

Code example language
curl -X POST "https://api.medivana.cloud/api/v1/booking/exceptions" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"practitioner_id":"3f0c2a10-5b7e-4c1d-9a2e-0000000d0001","branch_id":null,"date_from":"2026-11-10","date_to":"2026-11-12","kind":"leave","reason":"Seminar"}'
const res = await fetch("https://api.medivana.cloud/api/v1/booking/exceptions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    practitioner_id: "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
    branch_id: null,
    date_from: "2026-11-10",
    date_to: "2026-11-12",
    kind: "leave",
    reason: "Seminar",
  }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const data = await res.json();
import os
import requests

resp = requests.post(
    "https://api.medivana.cloud/api/v1/booking/exceptions",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    json={
        "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
        "branch_id": None,
        "date_from": "2026-11-10",
        "date_to": "2026-11-12",
        "kind": "leave",
        "reason": "Seminar",
    },
    timeout=30,
)
resp.raise_for_status()
data = resp.json()

Responses

201Pengecualian dibuatapplication/json

{
  "exception": {
    "id": "3f0c2a10-5b7e-4c1d-9a2e-00000001a201",
    "branch_id": null,
    "practitioner_id": "3f0c2a10-5b7e-4c1d-9a2e-0000000d0001",
    "date_from": "2026-11-10",
    "date_to": "2026-11-12",
    "start_time": null,
    "end_time": null,
    "kind": "leave",
    "reason": "Seminar"
  },
  "affected_appointments": []
}
Schema 201
Schema 201
NameTypeDescription
exceptionobject
exception.idstring (uuid)
exception.branch_idstring (uuid) | null
exception.practitioner_idstring (uuid) | null
exception.date_fromstring (date)
exception.date_tostring (date)
exception.start_timestring | null
exception.end_timestring | null
exception.kindleave | closed | other
exception.reasonstring | null
affected_appointmentsarray<object>
affected_appointments[].idstring (uuid)
affected_appointments[].codestring
affected_appointments[].branch_idstring (uuid)
affected_appointments[].unit_idstring (uuid)
affected_appointments[].unit_namestring
affected_appointments[].patient_idstring (uuid) | null
affected_appointments[].patient_namestring
affected_appointments[].patient_phone_maskedstring | null
affected_appointments[].patient_sexstring | null
affected_appointments[].patient_birth_datestring (date) | null
affected_appointments[].is_new_patientboolean
affected_appointments[].practitioner_idstring (uuid)
affected_appointments[].practitioner_namestring
affected_appointments[].schedule_idstring (uuid) | null
affected_appointments[].service_idstring (uuid) | null
affected_appointments[].start_atstring (date-time)
affected_appointments[].end_atstring (date-time)
affected_appointments[].statusbooked | checked_in | cancelled | no_show | done
affected_appointments[].sourceportal | whatsapp | admin | bpjs
affected_appointments[].payer_kindumum | bpjs | insurance | company
affected_appointments[].payer_idstring (uuid) | null
affected_appointments[].complaintstring | null
affected_appointments[].encounter_idstring (uuid) | null
affected_appointments[].checked_in_atstring (date-time) | null
affected_appointments[].cancelled_atstring (date-time) | null
affected_appointments[].cancel_reasonstring | null
affected_appointments[].reminder_sent_atstring (date-time) | null
affected_appointments[].created_atstring (date-time)
affected_appointments[].versioninteger
Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 422validationValidasi gagal; rincian per field di errors
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya
DELETE/booking/exceptions/{id}Link to this operation: Hapus cuti/libur

Hapus cuti/libur

Scopes
appointments:write
RBAC permissions
appointment.manage
Module
booking

Parameters

Parameters DELETE /booking/exceptions/{id}
NameInTypeDescription
idrequiredpathstring (uuid)

Code examples

Code example language
curl -X DELETE "https://api.medivana.cloud/api/v1/booking/exceptions/3f0c2a10-5b7e-4c1d-9a2e-000000000001" \
  -H "Authorization: Bearer $MEDIVANA_TOKEN"
const res = await fetch("https://api.medivana.cloud/api/v1/booking/exceptions/3f0c2a10-5b7e-4c1d-9a2e-000000000001", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.MEDIVANA_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
import os
import requests

resp = requests.delete(
    "https://api.medivana.cloud/api/v1/booking/exceptions/3f0c2a10-5b7e-4c1d-9a2e-000000000001",
    headers={"Authorization": f"Bearer {os.environ['MEDIVANA_TOKEN']}"},
    timeout=30,
)
resp.raise_for_status()

Responses

204Dihapus

Errors
  • 401unauthorizedToken tidak ada, tidak valid, kedaluwarsa, atau dicabut
  • 402module-lockedModul tidak aktif di paket organisasi
  • 403forbiddenScope token tidak memberi izin (forbidden), atau langganan klinik baca-saja untuk operasi tulis (read-only)
  • 404not-foundData tidak ada, milik organisasi lain, atau di luar cakupan cabang klien
  • 429rate-limitedBatas laju klien (rate_limit_per_min) terlampaui; coba lagi pada menit berikutnya