Appointments / Online Booking platform

This guide outlines the steps to create appointments, handle online booking clients and patients, and send confirmation emails in Provet Cloud. Follow these steps to streamline the process.

Step 1: Create an Appointment

API endpoint: https://provetcloud.com/<provet_id>/api/0.1/appointment/

Request Body Example:

{
    "start": "2022-01-10T11:00:00",
    "end": "2022-01-10T12:00:00",
    "department": "https://provetcloud.com/<provet_id>/api/0.1/department/1/",
    "title": "New Test appointment",
    "type": "2",
    "reason": "https://provetcloud.com/<provet_id>/api/0.1/reason/<id of the reason to use>/",
    "complaint": "<Any string, usually is the description of the reason above>",
    "user": "https://provetcloud.com/<provet_id>/api/0.1/user/<id of the user that will be the supervising veterinarian of the appointment>/"
}

Notes:

  • To associate an appointment with an existing client and their patients, include the following fields:

    {
        "client": "https://provetcloud.com/<provet_id>/api/0.1/client/<id of the created or matched client>/",
        "patients": [
            "https://provetcloud.com/<provet_id>/api/0.1/patient/<id of the client's patient>/"
        ]
    }
    
  • If the client or patient does not exist, you may need to create them first or store a preliminary appointment by adding a note (e.g., "Preliminary online booking") for later processing.

Appointment type values:

Value

Description

1

Consultation

2

Online booking

3

Other

4

Internal booking

5

Unknown client

6

Farm visit

7

Preliminary booking

8

Boarding

9

Pet service

Additional Considerations

Checking for Existing Clients and Patients

Before creating a new onlinebookingclient or onlinebookingpatient, implement logic to:

  1. Search for existing clients.

  2. Match clients to their associated patients.

If found, create a normal appointment directly using the client and patient data via the appointment/ endpoint.

Temporary Appointments

If neither client nor patient exists, you can:

  1. Add a placeholder note (e.g., "Preliminary online booking") in the notes field of the appointment endpoint.

  2. Then complete steps 2–3 to create the online booking client and patient later.

Step 2: Create an Online Booking Client

This step is required if you want to mimic the built-in online booking portal in Provet Cloud.

API endpoint: https://provetcloud.com/<provet_id>/api/0.1/onlinebookingclient/

Request Body Example:

{
    "appointment": "https://provetcloud.com/<provet_id>/api/0.1/appointment/<id of the created appointment>/",
    "first_name": "Tim",
    "last_name": "Test",
    "email": "tim.test@emailaddress.com",
    "phone_number": "+123456789",
    "street_address": "1234",
    "zip_code": "000001",
    "city": "Helsinki"
}

Step 3: Create an Online Booking Patient

If the online booking client has pets, create an online booking patient.

API endpoint: https://provetcloud.com/<provet_id>/api/0.1/onlinebookingpatient/

Request Body Example:

{
    "onlinebookingclient": "https://provetcloud.com/<provet_id>/api/0.1/onlinebookingclient/<id of the created client above>/",
    "name": "Randy",
    "species": 6657001,
    "breed": 6957001,
    "notes": "Nothing to note here"
}

Replace species and breed IDs with the appropriate values, which can be retrieved by querying the /patient/<id>/ endpoint.

Step 4: Send Appointment Confirmation Email

To send a confirmation you need to use the send_appointment_confirmation/ endpoint. This works for both normal and online booking appointments.

Note

For online booking type appointments, the onlinebookingclient and onlinebookingpatient must be connected to the appointment before using send_appointment_confirmation.

API endpoint: https://provetcloud.com/<provet_id>/api/0.1/send_appointment_confirmation/

Optional parameters:

  • dont_send_email_confirmation — if given, does not send email

  • dont_send_sms_confirmation — if given, does not send SMS

Request Body Example:

{
    "request_hash": "snigu9xn0zllp61u"
}

The request_hash is returned when the appointment is created. Store this value temporarily or fetch it again as needed.

Additional Info

Appointment reminders can be created via the appointment_reminder/ endpoint. See the API reference for details.