Book Doctolib appointment
Input
motive_id requiredVisit motive id, from list_slots.visit_motives.
start_date requiredSlot start, exactly as list_slots returns it, e.g. 2027-01-07T12:30:00.000+01:00.
profile_path requiredProfile path with ?pid=practice-N, from search_practitioners or list_slots.
confirm optionalfalse: stop at checkout, the slot held for 15 minutes. true: book the slot.
Default: falsenew_patient optionaltrue when the patient has never consulted this practitioner. Needed only when Doctolib asks (asks_new_patient in the checkout result).
Output
stage requiredquestions requiredOther required questions Doctolib asks before it books. The script cannot answer them, so a booking with questions fails.
start_date requiredSlot the checkout holds.
appointment requiredThe booked appointment (stage booked); null at checkout.
asks_new_patient requiredDoctolib asks whether the patient has consulted this practitioner before: pass new_patient.
price optionalAmount to pay at booking, when Doctolib asks for one.
motive optionaladdress optionalpatient optionalThe account holder the appointment is for.
telehealth optionalpractitioner optionalprofile_path optional