keldoc-js-sdk
Description
This module provides an Keldoc API implementation.
Install
$ npm install keldoc-js-sdk --save
Features
- Agendas
- Appointments
- Availabilities
- Available slots
- Config
- ConfigWebhooks
- Motives
- Patients
- Specialities
Documentation
- agenda.get()
- appointments.create()
- appointments.update()
- appointments.remove()
- availabilities.get()
- availableSlots.get()
- config.get()
- motives.get()
- patients.create()
- patients.update()
- specialties.get()
- configWebhooks.create()
- configWebhooks.update()
- configWebhooks.remove()
Examples
Create your keldoc sdk by requiring it, making it's initial configuration and instantiating it.
From import
sdk const keldoc = sdk
From require
const sdk = ; sdk; const keldoc = sdk;
API Methods
Agenda
-
Fetch all agendas.
Function
keldocagendas ;
Appointments
-
Create a new appointment
Arguments
start_at Datetime start agenda_id Integer Agenda state String 'confirmed' or 'canceled' required duration Integer duration in seconds no_show Boolean patient hasn ' t come patient_arrived Boolean patient is waiting in the waiting room no_show_excused Boolean patient hasn ' t come but he excused motive_id Integer motive id skip_sms_confirmation Boolean disable sms confirmation for consultation skip_email_confirmation Boolean disable email confirmation for consultation skip_sms_reminder Boolean disable sms reminder for consultation skip_email_reminder Boolean disable email reminder for consultation patient_id Integer patient ID patientfirst_name String patient firstname patientlast_name String patient lastname patientmaiden_name String patient maiden name patientgender Char 'm' or 'f' patientphone String patient phone number patientphone2 String patient alternative phone number patientemail String patient email address patientstreet String patient street number & streetnames patientcity String patient city name patientzipcode String patient city zipcode
keldocappointments ;
-
Update an existing appointment
Arguments
id Integer KelDoc internal ID for appointment to update start_at Datetime start agenda_id Integer Agenda state String 'confirmed' or 'canceled' required duration Integer duration in seconds no_show Boolean patient hasn ' t come patient_arrived Boolean patient is waiting in the waiting room no_show_excused Boolean patient hasn ' t come but he excused motive_id Integer motive id skip_sms_confirmation Boolean disable sms confirmation for consultation skip_email_confirmation Boolean disable email confirmation for consultation skip_sms_reminder Boolean disable sms reminder for consultation skip_email_reminder Boolean disable email reminder for consultation patient_id Integer patient ID patientfirst_name String patient firstname patientlast_name String patient lastname patientmaiden_name String patient maiden name patientgender Char 'm' or 'f' patientphone String patient phone number patientphone2 String patient alternative phone number patientemail String patient email address patientstreet String patient street number & streetnames patientcity String patient city name patientzipcode String patient city zipcode
keldocappointments ;
-
Delete an appointment
Arguments
id Integer KelDoc internal ID for appointment to remove
keldocappointments ;
Availabilities
-
Fetch available slots for agendas. Maximum duration between start date and end date is 7 days.
Arguments
motive_id Integer KelDoc internal start_date Datetime start date end_date Datetime end date agenda_ids Array IDs of agendas
keldocavailabilities ;
Available slots
- Fetch available slots for agendas. Maximum duration between start date and end date is 2 months (default is 2 months from now).
- When motive_ids is [], it means the available slot is for all motives. Arguments
agenda_id Array ID of agenda start_date Datetime start date end_date Datetime end date
keldocavailableSlots ;
Config
- Retrieves account configuration : agendas, motives, specialties
keldocconfig ;
Motives
Fetch all motives
keldocmotives ;
Patients
-
Create a new patient
Arguments
first_name String patient firstname last_name String patient lastname maiden_name String patient maiden name gender Char 'm' or 'f' phone String patient phone number email String patient email address street String patient street number & streetnames city String patient city name zipcode String patient city zipcode
keldocpatients ;
-
Update an existing patient
Arguments
id Integer KelDoc internal ID for patient to update first_name String patient firstname last_name String patient lastname maiden_name String patient maiden name gender Char 'm' or 'f' phone String patient phone number email String patient email address street String patient street number & streetnames city String patient city name zipcode String patient city zipcode
keldocpatients ;
Specialties
- Fetch all specialties
keldocspecialties ;
ConfigWebhooks
-
Create account webhook
Arguments
url String Webhook url
keldocconfigWebhooks ;
-
Update account webhook
Arguments
url String Webhook url
keldocconfigWebhooks ;
-
Delete account webhook
Arguments
url String Webhook url
keldoc ;
Scripts
Run using npm run