Skip to main content
Patients, appointments, doctors and branches each have an external_id: your system’s id for the same record. Set it once and you never need to store Docistra’s ids.

Use your id anywhere

Every path {id} takes either Docistra’s id or yours with the ext: prefix:
Body references work the same way: "doctor_id": "ext:D-7", "branch_id": "ext:B-1", "patient_id": "ext:P-10293".

Setting it

  • Patients: send external_id on POST /patients. A patient already in Docistra (same phone and name) is matched and linked, not copied.
  • Appointments: send external_id on POST /appointments. For a booking made in Docistra (by the AI agent, the booking page or reception), link it later with PATCH /appointments/{id} {"external_id": "A-55013"} after you get the appointment.created webhook.
  • Doctors and branches: PATCH /doctors/{id} / PATCH /branches/{id} with {"external_id": "..."}. Every organization can do this.

Rules

  • An external_id is unique per organization and record type. Reusing one returns 409 external_id_taken.
  • Up to 200 characters.
  • Send null to unlink.
  • Webhook payloads carry your ids too: external_id, plus patient_external_id, doctor_external_id and branch_external_id on appointments.