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:
"doctor_id": "ext:D-7", "branch_id": "ext:B-1", "patient_id": "ext:P-10293".
Setting it
- Patients: send
external_idonPOST /patients. A patient already in Docistra (same phone and name) is matched and linked, not copied. - Appointments: send
external_idonPOST /appointments. For a booking made in Docistra (by the AI agent, the booking page or reception), link it later withPATCH /appointments/{id}{"external_id": "A-55013"}after you get theappointment.createdwebhook. - Doctors and branches:
PATCH /doctors/{id}/PATCH /branches/{id}with{"external_id": "..."}. Every organization can do this.
Rules
- An
external_idis unique per organization and record type. Reusing one returns409 external_id_taken. - Up to 200 characters.
- Send
nullto unlink. - Webhook payloads carry your ids too:
external_id, pluspatient_external_id,doctor_external_idandbranch_external_idon appointments.