URL
https://api.clinicbuddy.com/api/v2/?clinic=CLINIC_ID_HERE&key=KEY_HERE
- CLINIC_ID_HERE : clinic id, e.g. 4
- KEY_HERE : result of MD5([current UTC date in YYYY-MM-DD format] . [telebooking password]), e.g. 495782042261656ed086ac0890474573
- The dot (.) indicates appending a string and should not be included as part of the hash.
FUNCTIONS
1. Get patient by id:- &act=get_patient
- &patient_id=PATIENT_ID_HERE (e.g. 11640)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_patient&patient_id=11640
- &act=search_patient
- &s=SEARCH_STRING_HERE (e.g. 1987)
- The maximum number of records returned is 20.
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=search_patient&s=1987
- &act=authenticate_patient
- &username=USERNAME_HERE (e.g. 1975-05-11-1232 or user@gmail.com or ...)
- &password=PASSWORD_HERE
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=authenticate_patient&username=1975-05-11-1232&password=secret
- &act=get_providers
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_providers
- &act=get_provider_groups
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_provider_groups
- &act=get_locations
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_locations
- &act=get_activities
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_activities
- &act=get_activity_groups
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_activity_groups
- &act=get_rooms
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_rooms
- &act=get_calendar
- &terapeut_id=PROVIDER_ID_HERE (e.g. 10)
- &date=DATE_HERE (date in YYYY-MM-DD format, e.g. 2012-05-28)
- &location_id=LOCATION_ID_HERE (optional, e.g. 1 or multiple as 1;2;3;4)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_calendar&terapeut_id=3&date=2012-05-28&location_id=1;2
- &act=get_workhours
- &terapeut_id=PROVIDER_ID_HERE (e.g. 10)
- &date_from=DATE_FROM_HERE (date in YYYY-MM-DD format, e.g. 2012-04-16)
- &date_to=DATE_TO_HERE (date in YYYY-MM-DD format, e.g. 2012-05-28)
- &location_id=LOCATION_ID_HERE (optional, e.g. 1 or multiple as 1;2;3;4)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_workhours&terapeut_id=7&date_from=2011-08-16&date_to=2011-08-16&location_id=1;2
- &act=get_available_times
- &activity_id=ACTIVITY_ID_HERE (e.g. 10)
- &date_from=DATE_FROM_HERE (date in YYYY-MM-DD format, e.g. 2012-04-16)
- &date_to=DATE_TO_HERE (date in YYYY-MM-DD format, e.g. 2012-05-28)
- &terapeut_id=PROVIDER_ID_HERE (optional, e.g. 10)
- &terapeut_group_id=PROVIDER_GROUP_ID_HERE (optional, e.g. 10)
- &location_id=LOCATION_ID_HERE (optional, e.g. 1 or multiple as 1;2;3;4)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_available_times&terapeut_id=3&activity_id=1&date_from=2012-05-28&date_to=2013-05-30&location_id=1;2
- &act=get_next_available_time
- &activity_id=ACTIVITY_ID_HERE (e.g. 10)
- &terapeut_group_id=PROVIDER_GROUP_ID_HERE (optional, e.g. 10)
- &location_id=LOCATION_ID_HERE (optional, e.g. 1 or multiple as 1;2;3;4)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_next_available_time&activity_id=1&location_id=1;2
- &act=sync_calendar
- &last_updated=DATETIME_HERE (datetime in YYYY-MM-DD HH:MM:SS format, e.g. 2012-05-28 23:00:05)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=sync_calendar&last_updated=2012-05-28 23:00:05
- &act=add_patient
- &patient_firstname=FIRSTNAME_HERE (e.g. Sherlock)
- &patient_lastname=LASTNAME_HERE (e.g. Holmes)
- &patient_email=EMAIL_HERE (e.g. s.holmes@gmail.com)
- &patient_birth=BIRTH_DATE_HERE (e.g. 1981-12-18-9876)
- ... (other parameters corresponding patient fields)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=add_patient&patient_firstname=Sherlock&patient_lastname=Holmes&patient_email=s.holmes%40gmail.com&patient_birth=1981-12-18-9876
- &act=add_calendar
- &booking_patient_id=PATIENT_ID_HERE (e.g. 11992)
- &booking_terapeut_id=PROVIDER_ID_HERE (e.g. 7)
- &booking_activity_id=ACTIVITY_ID_HERE (e.g. 2)
- &booking_time_start=BOOKING_TIME_START_HERE (datetime in YYYY-MM-DD HH:MM:SS format, e.g. 2012-05-30 12:00:00)
- &booking_time_end=BOOKING_TIME_END_HERE (optional, datetime in YYYY-MM-DD HH:MM:SS format, e.g. 2012-05-30 12:30:00)
- &booking_location_id=BOOKING_LOCATION_ID_HERE (optional, e.g. 3)
- ... (other parameters corresponding booking fields)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=add_calendar&booking_patient_id=11992&booking_terapeut_id=7&booking_activity_id=2&booking_time_start=2012-05-30 12:00:00&booking_time_end=2012-05-30 12:30:00&booking_location_id=3
- &act=test_add_calendar
- &booking_terapeut_id=PROVIDER_ID_HERE (e.g. 7)
- &booking_activity_id=ACTIVITY_ID_HERE (e.g. 2)
- &booking_time_start=BOOKING_TIME_START_HERE (datetime in YYYY-MM-DD HH:MM:SS format, e.g. 2012-05-30 12:00:00)
- &booking_time_end=BOOKING_TIME_END_HERE (datetime in YYYY-MM-DD HH:MM:SS format, e.g. 2012-05-30 12:30:00)
- &booking_room_id=BOOKING_ROOM_ID_HERE (optional, e.g. 2)
- &booking_location_id=BOOKING_LOCATION_ID_HERE (optional, e.g. 3)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=test_add_calendar&booking_terapeut_id=7&booking_activity_id=2&booking_time_start=2012-05-30 12:00:00&booking_time_end=2012-05-30 12:30:00&booking_location_id=3
- POST request with the following parameters:
- act=email_patient
- patient_id=PATIENT_ID_HERE (e.g. 7)
- subject=SUBJECT_HERE (e.g. Welcome)
- text=EMAIL_TEXT_HERE (e.g. Hello)
- attached files: file1=FILE_1_NAME, url1=FILE_1_URL, ... (optional, e.g. https://api.clinicbuddy.com/rehab.jpg)
- The maximum number of attachments is 5.
- Example:
POST https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2
Params: act=email_patient&patient_id=7&subject=Welcome&text=Hello&file1=rehab.jpg&url1=https%3A%2F%2Fapi.clinicbuddy.com%2Frehab.jpg
- POST request with the following parameters:
- act=sms_patient
- patient_id=PATIENT_ID_HERE (e.g. 7)
- text=SMS_TEXT_HERE (e.g. Welcome)
- Example:
POST https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2
Params: act=sms_patient&patient_id=7&text=Welcome
- POST request with the following parameters:
- act=add_letter
- patient_id=PATIENT_ID_HERE (e.g. 7)
- text=LETTER_TEXT_HERE (e.g. Welcome)
- Example:
POST https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2
Params: act=add_letter&patient_id=7&text=Welcome
- POST request with the following parameters:
- act=add_file
- patient_id=PATIENT_ID_HERE (e.g. 7)
- file=FILE_NAME_HERE (e.g. rehab.jpg)
- url=URL_HERE (e.g. https://api.clinicbuddy.com/rehab.jpg)
- public=TRUE or FALSE (e.g. TRUE)
- Example:
POST https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2
Params: act=add_file&patient_id=7&file=rehab.jpg&url=https%3A%2F%2Fapi.clinicbuddy.com%2Frehab.jpg&public=TRUE
- &act=get_available_group_times
- &date_from=DATE_FROM_HERE (date in YYYY-MM-DD format, e.g. 2012-04-16)
- &date_to=DATE_TO_HERE (date in YYYY-MM-DD format, e.g. 2012-05-28)
- &activity_id=ACTIVITY_ID_HERE (optional, e.g. 10)
- &terapeut_id=PROVIDER_ID_HERE (optional, e.g. 10)
- &terapeut_group_id=PROVIDER_GROUP_ID_HERE (optional, e.g. 10)
- &location_id=LOCATION_ID_HERE (optional, e.g. 1 or multiple as 1;2;3;4)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_available_group_times&date_from=2012-05-28&date_to=2013-05-30&location_id=1;2
- &act=add_group_calendar
- &booking_groupbooking_id=GROUPBOOKING_ID_HERE (e.g. 15)
- &booking_patient_id=PATIENT_ID_HERE (e.g. 11992)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=add_group_calendar&booking_groupbooking_id=15&booking_patient_id=11992
- &act=get_booking
- &booking_id=BOOKING_ID_HERE (e.g. 2150)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_booking&booking_id=2150
- &act=update_booking
- &booking_id=BOOKING_ID_HERE (e.g. 2150)
- &booking_terapeut_id=PROVIDER_ID_HERE (optional, e.g. 2)
- &booking_patient_id=PATIENT_ID_HERE (optional, e.g. 11640)
- &booking_flagged=0_OR_1 (optional, e.g. 1)
- ... (other parameters corresponding booking fields)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=update_booking&booking_id=2150&booking_terapeut_id=2&booking_flagged=1
- &act=get_case
- &case_id=CASE_ID_HERE (e.g. 100)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_case&case_id=100
- &act=save_case_answer
- &case_id=CASE_ID_HERE (e.g. 100)
- &case_template_item_name=CASE_TEMPLATE_ITEM_NAME_HERE (e.g. payer)
- &status=STATUS_HERE (optional, e.g. 1)
- &value=VALUE_HERE (optional, e.g. Private)
- &comment=COMMENT_HERE (optional, e.g. Paid)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=save_case_answer&case_id=100&case_template_item_name=payer&value=Private
- &act=get_activity_providers
- &activity_id=ACTIVITY_ID_HERE (e.g. 5)
- &location_id=LOCATION_ID_HERE (optional, e.g. 2)
- &date_from=DATE_FROM_HERE (optional, date in YYYY-MM-DD format, e.g. 2021-01-01)
- &date_to=DATE_TO_HERE (optional, date in YYYY-MM-DD format, e.g. 2021-01-31)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_activity_providers&activity_id=5
- &act=get_provider_activities
- &provider_id=PROVIDER_ID_HERE (e.g. 10)
- &location_id=LOCATION_ID_HERE (optional, e.g. 2)
- &date_from=DATE_FROM_HERE (optional, date in YYYY-MM-DD format, e.g. 2021-01-01)
- &date_to=DATE_TO_HERE (optional, date in YYYY-MM-DD format, e.g. 2021-01-31)
- Example:
https://api.clinicbuddy.com/apiv2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_provider_activities&provider_id=10
- &act=get_patient_bookings
- &patient_id=PATIENT_ID_HERE (e.g. 100)
- Example:
https://api.clinicbuddy.com/api/v2/?clinic=4&key=c296bfcf10b60b1e6a966bb1280fc6c2&act=get_patient_bookings&patient_id=100
OUTPUT FORMATS
- &output=xml (default and can be omitted) indicates output as XML
- &output=json indicates output in JavaScript Object Notation (JSON)
STATUS CODES
"OK"
indicates that no errors occurred; the request was successfully executed and at least one result was returned."ZERO_RESULTS"
indicates that the request was successful but returned no results."ERROR"
indicates that an errors occurred; "error" xml tag / json element provides more information."INVALID_REQUEST"
generally indicates that some parameter is missing."REQUEST_DENIED"
indicates that your request was denied, generally because of a wrong user and key pair."SERVICE_UNAVAILABLE"
indicates that service is temporary inavailable.
ERROR CODES
- 1: INCORRECT_DATE_FORMAT
- 2: INCORRECT_ACTIVITY_ID
- 3: INCORRECT_PROVIDER_ID
- 4: INCORRECT_DATETIME_FORMAT
- 5: EMAIL_FAILED
- 6: INCORRECT_PATIENT_EMAIL
- 7: INCORRECT_PATIENT_ID
- 8: SMS_FAILED
- 9: INCORRECT_GROUP_BOOKING_ID
- 10: PATIENT_ALREADY_IN_GROUP
- 11: BOOKING_IS_NOT_POSSIBLE
- 12: PATIENT_NOT_FOUND
- 13: MULTIPLE_PATIENTS_FOUND
- 14: INCORRECT_PASSWORD
- 15: INCORRECT_REMOTE_FILE
- 16: INCORRECT_BOOKING_ID
- 17: OPERATION_FAILED
- 18: INCORRECT_CASE_ID
- 19: INCORRECT_CASE_TEMPLATE_ITEM_NAME