Appointment

An appointment is a booked chunk of time between a provider and a patient. Each appointment has a unique Zoom url link attached to it.

The appointment model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the appointment.

  • Name
    object
    Type
    string
    Description

    Always 'appointment'.

  • Name
    generated_from_type
    Type
    string
    Description

    Only applies if the patient self-booked the appointment. Whether this appointment was created from a rule or override.

    Possible values:
    rule
    override
  • Name
    generated_from
    Type
    string
    Description

    Only applies if the patient self-booked the appointment. Which rule or override this appointment was created from.

  • Name
    appointment_type
    Type
    string
    Description

    Only applies to external appointments. Type of appointment this is.

  • Name
    name
    Type
    string
    Description

    Name of the appointment.

  • Name
    description
    Type
    string
    Description

    Description of the appointment.

  • Name
    group
    Type
    boolean
    Description

    Whether is appointment is a group appointment.

  • Name
    internal
    Type
    boolean
    Description

    Whether is appointment is an internal appointment.

  • Name
    recurring
    Type
    object
    Description
    Recurrence for the appointment.
  • Name
    start_time
    Type
    number
    Description

    Planned start time of appointment.

  • Name
    end_time
    Type
    number
    Description

    Planned end time of appointment.

  • Name
    actual_start_time
    Type
    number
    Description

    Only applies to non-recurring appointments. Actual start time of appointment.

  • Name
    actual_end_time
    Type
    number
    Description

    Only applies to non-recurring appointments. Actual end time of appointment.

  • Name
    host
    Type
    string
    Description

    Host of the appointment.

  • Name
    attendees
    Type
    array of objects
    Description
    List of attendees for the attendees.
  • Name
    reference_patients
    Type
    array of strings
    Description

    Only applies to internal appointments. Patients that this appointment is about.

  • Name
    charged_while_booking
    Type
    object
    Description

    Amount that was charged to the patient to book the appointment.

  • Name
    charge_after_appointment
    Type
    object
    Description

    Amount to charge the patient once the appointment is successfully completed

  • Name
    charged_externally
    Type
    object
    Description

    Amount that was charged externally (off-platform) in $ to the patient. For example, if the patient paid $100 in cash, this would be 100.

  • Name
    interaction_type
    Type
    string
    Description

    Interaction type.

    Possible values:
    videoCall
    in_person
  • Name
    video_call
    Type
    object
    Description
    Only applies if "interaction_type" is "video_call". Video call details for the appointment.
  • Name
    location
    Type
    object
    Description

    Only applies if 'interaction_type' is 'in_person.'

    Address of the appointment.
  • Name
    status_history
    Type
    array of objects
    Description
    Status history of the appointment.
  • Name
    visit_note
    Type
    string
    Description

    Visit note created for this appointment.

  • Name
    created_by
    Type
    string
    Description

    Creator of the appointment.

  • Name
    created_at
    Type
    number
    Description

    Timestamp (in Unix epoch time in milliseconds) of when the appointment was created.

  • Name
    last_updated_at
    Type
    number
    Description

    Timestamp (in Unix epoch time in milliseconds) of when the appointment was last updated.

Response

{
    "id": "appt_2UxtAULYUrX7GVsTKePy",
    "object": "appointment",

    "generated_from": "rule_2UxtAULYUrX7GVsTKePy",
    "generated_from_type": "rule",
    "appointment_type": "aptp_3XxtAULYUrX7GVsTKePy",
    "name": "Annual Check-in",
    "description": "Annual check-in appointment for all patients",
    "group": false,
    "internal": false,

    "recurring": {
        "is_recurring": false
    },
    "charged_while_booking": {
      "enabled": true,
      "auto_charge_if_possible": true,
      "product": "prod_3XxtAULYUrX7GVsTKePy",
    },
    "charge_after_appointment": {
      "enabled": false
    },
    "charged_externally": 0,

    "start_time": 1692370044000,
    "end_time": 1692373642000,
    "actual_start_time": 1692370044000,
    "actual_end_time": 1692373642000,
    "host": "user_Z1zXZKvqrpwxbznuW6lJ",
    "attendees": [{
        "id":"user_IsW3SoxZQxW0agHKyP2V",
        "attendance_status": "going",
        "no_show": false,
        "payment_status": "not_applicable",
        "last_updated_at": 1653798303000
    }],
    "reference_patients": [],

    "interaction_type": "videoCall",
    "video_call": {
        "join_url" : "https://us06web.zoom.us/j/85129814133",
        "meeting_id": "85129814133"
    },
    "location": {},
    "status_history": [
        {
            "status": "scheduled",
            "changed_by": "user_xeDpGyt67wTor93qKtS7",
            "changed_at": 1653798303000
        }
    ],
    "visit_note": "note_wTor93qKtS7xeDpGyt67",

    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": 1653798303000,
    "last_updated_at": 1653798303000
}


POST/v1/appointments

Create an appointment

Creates a new appointment.

Required attributes

  • Name
    generated_from_type
    Type
    string
    Description

    Only applies if the patient self-booked the appointment. Whether this appointment was created from a rule or override.

    Possible values:
    rule
    override
  • Name
    generated_from
    Type
    string
    Description

    Only applies if the patient self-booked the appointment. Which rule or override this appointment was created from.

  • Name
    appointment_type
    Type
    string
    Description

    Only appplies to external appointments. Type of appointment this is.

  • Name
    name
    Type
    string
    Description

    Name of the appointment.

  • Name
    description
    Type
    string
    Description

    Description of the appointment.

  • Name
    group
    Type
    boolean
    Description

    Whether is appointment is a group appointment.

  • Name
    internal
    Type
    boolean
    Description

    Whether is appointment is an internal appointment.

  • Name
    start_time
    Type
    number
    Description

    Planned start time of appointment.

  • Name
    end_time
    Type
    number
    Description

    Planned end time of appointment.

  • Name
    host
    Type
    string
    Description

    Host of the appointment.

  • Name
    attendees
    Type
    array of strings
    Description

    Attendees of the appointment.

  • Name
    created_by
    Type
    string
    Description

    Creator of the appointment.

Optional attributes

  • Name
    status
    Type
    string
    Description

    Status of the appointment. Defaults to 'scheduled'.

    Possible values:
    scheduled
    started
    complete
    cancelled
    rescheduled
  • Name
    reference_patients
    Type
    array of strings
    Description

    Only applies to internal appointments. Patients that this appointment is about.

Response

{
    "id": "appt_2UxtAULYUrX7GVsTKePy",
    "object": "appointment",

    "generated_from": "rule_2UxtAULYUrX7GVsTKePy",
    "generated_from_type": "rule",
    "appointment_type": "aptp_3XxtAULYUrX7GVsTKePy",
    "name": "Annual Check-in",
    "description": "Annual check-in appointment for all patients",
    "group": false,
    "internal": false,

    "recurring": {
        "is_recurring": false
    },

    "start_time": 1692370044000,
    "end_time": 1692373642000,
    "actual_start_time": 1692370044000,
    "actual_end_time": 1692373642000,
    "host": "user_Z1zXZKvqrpwxbznuW6lJ",
    "attendees": [{
        "id":"user_IsW3SoxZQxW0agHKyP2V",
        "attendance_status": "going",
        "no_show": false,
        "payment_status": "not_applicable",
        "last_updated_at": 1653798303000
    }],
    "reference_patients": [],

    "charged_while_booking": {
      "enabled": true,
      "auto_charge_if_possible": true,
      "product": "prod_3XxtAULYUrX7GVsTKePy",
    },
    "charge_after_appointment": {
      "enabled": false
    },
    "charged_externally": 0,

    "interaction_type": "videoCall",
    "video_call": {
        "join_url" : "https://us06web.zoom.us/j/85129814133",
        "meeting_id": "85129814133"
    },
    "location": {},
    "status_history": [
        {
            "status": "scheduled",
            "changed_by": "user_xeDpGyt67wTor93qKtS7",
            "changed_at": 1653798303000
        }
    ],
    "visit_note": "note_wTor93qKtS7xeDpGyt67",

    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": 1653798303000,
    "last_updated_at": 1653798303000
}

GET/v1/appointments/:id

Retrieve an appointment

Retrieves the specified appointment object.

Response

{
   "id": "appt_2UxtAULYUrX7GVsTKePy",
    "object": "appointment",

    "generated_from": "rule_2UxtAULYUrX7GVsTKePy",
    "generated_from_type": "rule",
    "appointment_type": "aptp_3XxtAULYUrX7GVsTKePy",
    "name": "Annual Check-in",
    "description": "Annual check-in appointment for all patients",
    "group": false,
    "internal": false,

    "recurring": {
        "is_recurring": false
    },

    "start_time": 1692370044000,
    "end_time": 1692373642000,
    "actual_start_time": 1692370044000,
    "actual_end_time": 1692373642000,
    "host": "user_Z1zXZKvqrpwxbznuW6lJ",
    "attendees": [{
        "id":"user_IsW3SoxZQxW0agHKyP2V",
        "attendance_status": "going",
        "no_show": false,
        "payment_status": "not_applicable",
        "last_updated_at": 1653798303000
    }],
    "reference_patients": [],

    "charged_while_booking": {
      "enabled": true,
      "auto_charge_if_possible": true,
      "product": "prod_3XxtAULYUrX7GVsTKePy",
    },
    "charge_after_appointment": {
      "enabled": false
    },
    "charged_externally": 0,

    "interaction_type": "videoCall",
    "video_call": {
        "join_url" : "https://us06web.zoom.us/j/85129814133",
        "meeting_id": "85129814133"
    },
    "location": {},
    "status_history": [
        {
            "status": "scheduled",
            "changed_by": "user_xeDpGyt67wTor93qKtS7",
            "changed_at": 1653798303000
        }
    ],
    "visit_note": "note_wTor93qKtS7xeDpGyt67",

    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": 1653798303000,
    "last_updated_at": 1653798303000
}

POST/v1/appointments/:id

Update an appointment

Update the specified appointment object by setting the values of the parameters passed. Any other parameters not provided will not be modified.

Required attributes

    Optional attributes

    • Name
      name
      Type
      string
      Description

      Name of the appointment.

    • Name
      description
      Type
      string
      Description

      Description of the appointment.

    • Name
      actual_start_time
      Type
      number
      Description

      Actual start time of appointment.

    • Name
      actual_end_time
      Type
      number
      Description

      Actual end time of appointment.

    • Name
      attendees
      Type
      array of strings
      Description

      Attendees of the appointment.

    • Name
      reference_patients
      Type
      array of strings
      Description

      Only applies to internal appointments. Patients that this appointment is about.

    Response

    {
       "id": "appt_2UxtAULYUrX7GVsTKePy",
        "object": "appointment",
    
        "generated_from": "rule_2UxtAULYUrX7GVsTKePy",
        "generated_from_type": "rule",
        "appointment_type": "aptp_3XxtAULYUrX7GVsTKePy",
        "name": "Annual Check-in",
        "description": "Annual check-in appointment for all patients",
        "group": false,
        "internal": false,
    
        "recurring": {
            "is_recurring": false
        },
    
        "start_time": 1692370044000,
        "end_time": 1692373642000,
        "actual_start_time": 1692370044000,
        "actual_end_time": 1692373642000,
        "host": "user_Z1zXZKvqrpwxbznuW6lJ",
        "attendees": [{
            "id":"user_IsW3SoxZQxW0agHKyP2V",
            "attendance_status": "going",
            "no_show": false,
            "payment_status": "not_applicable",
            "last_updated_at": 1653798303000
        }],
        "reference_patients": [],
    
        "charged_while_booking": {
          "enabled": true,
          "auto_charge_if_possible": true,
          "product": "prod_3XxtAULYUrX7GVsTKePy",
        },
        "charge_after_appointment": {
          "enabled": false
        },
        "charged_externally": 0,
    
        "interaction_type": "videoCall",
        "video_call": {
            "join_url" : "https://us06web.zoom.us/j/85129814133",
            "meeting_id": "85129814133"
        },
        "location": {},
        "status_history": [
            {
                "status": "scheduled",
                "changed_by": "user_xeDpGyt67wTor93qKtS7",
                "changed_at": 1653798303000
            }
        ],
        "visit_note": "note_wTor93qKtS7xeDpGyt67",
    
        "created_by": "user_xeDpGyt67wTor93qKtS7",
        "created_at": 1653798303000,
        "last_updated_at": 1653798303000
    }
    

    GET/v1/appointments

    List all appointments

    Returns a list of all appointments. Pass attributes as query params to filter the list of appointments based on that criteria.

    Optional query parameters

    • Name
      host
      Type
      string
      Description

      Host to filter by.

    • Name
      attendees
      Type
      string
      Description

      Comma-separated list of attendee IDs to filter by.

    • Name
      search_from
      Type
      number
      Description

      Timestamp in Unix epoch time in milliseconds. Only return appointments that start after this time.

    • Name
      search_until
      Type
      number
      Description

      Timestamp in Unix epoch time in milliseconds. Only return appointments that start before this time.

    • Name
      status
      Type
      string
      Description

      Status to filter by.

    Request

    GET
    /v1/appointments
    curl https://{{base_subdomain}}.avonhealth.com/v1/appointments?host=user_Z1zXZKvqrpwxbznuW6lJ&attendees=user_IsW3SoxZQxW0agHKyP2V&search_from=1553798303000&search_until=1753798303000&status=active \
      -H "Authorization: Bearer {{token}}" \
      -H "x-jwt: {{jwt}}"
    

    Response

    {
      "object": "list",
      "data": [
        {
          "id": "appt_2UxtAULYUrX7GVsTKePy",
          "object": "appointment",
    
          "generated_from": "rule_2UxtAULYUrX7GVsTKePy",
          "generated_from_type": "rule",
          "appointment_type": "aptp_3XxtAULYUrX7GVsTKePy",
          "name": "Annual Check-in",
          "description": "Annual check-in appointment for all patients",
          "group": false,
          "internal": false,
    
          "recurring": {
              "is_recurring": false
          },
    
          "start_time": 1692370044000,
          "end_time": 1692373642000,
          "actual_start_time": 1692370044000,
          "actual_end_time": 1692373642000,
          "host": "user_Z1zXZKvqrpwxbznuW6lJ",
          "attendees": [{
              "id":"user_IsW3SoxZQxW0agHKyP2V",
              "attendance_status": "going",
              "no_show": false,
              "payment_status": "not_applicable",
              "last_updated_at": 1653798303000
          }],
          "reference_patients": [],
    
          "charged_while_booking": {
            "enabled": true,
            "auto_charge_if_possible": true,
            "product": "prod_3XxtAULYUrX7GVsTKePy",
          },
          "charge_after_appointment": {
            "enabled": false
          },
          "charged_externally": 0,
    
          "interaction_type": "videoCall",
          "video_call": {
              "join_url" : "https://us06web.zoom.us/j/85129814133",
              "meeting_id": "85129814133"
          },
          "location": {},
          "status_history": [
              {
                  "status": "scheduled",
                  "changed_by": "user_xeDpGyt67wTor93qKtS7",
                  "changed_at": 1653798303000
              }
          ],
          "visit_note": "note_wTor93qKtS7xeDpGyt67",
    
          "created_by": "user_xeDpGyt67wTor93qKtS7",
          "created_at": 1653798303000,
          "last_updated_at": 1653798303000
        },
      ]
    }