QBOS REST API documentation (appointment)

(return to Main Document)

Introduction

The appointment API allows client applications to maintain appointment data including any part of its demographic record sets.

Audience

This developer's guide is intended for software developers needing a technical reference for using the QBOS REST API. The information you find in this guide is written by software engineering, and is authoritative on how the API behaves.

Additional resources, information about this guide

Occasionally, we make a mistake in this documentation, or unknowingly break a feature that you depend on. If this has happened to you, we apologize! You can help us fix the issue by contacting us. We appreciate your help.

Getting Started

To place any request in QBOS API application from third party application you need to authenticate user account and set/calculate values for the following request headers: x-qbos-id, x-qbos-nonce, x-qbos-date-utc, x-qbos-hash-version, x-qbos-auth

See details in Authentication Documentation.

appointment properties

Properties prefixed with '_' (underscore) are read-only properties. i.e. POST and PUT processing will ignore these properties.

Name Type Max length Numeric Required
For POST
Filterable Description

id

bigint

 

 

 

Required for GET(by id),PUT,DELETE

parent_id

bigint

 

yes

 

parent_type

nvarchar

50

 

yes

 

type

nvarchar

50

 

 

 

Value is "appointment"

title

varchar

120

 

yes

 

Title/Subject of an appointment

body

varchar

 

 

 

begin_datetime

char

20

 

yes

yes

Can be used to filter appointments since datetime value. For example: GET .../v1/o/{parent_type}/{parent_id}/links/appointment?begin_datetime=2015-02-15T00:00:00Z

end_datetime

char

20

 

yes

 

reminder_secs

int

 

 

 

schedule_model_id

int

 

 

 

The id of the model data for the appointment. The model which provides extended properties for an appointment. Default is 0 as generic model.

Read appointment by id:

GET https:/.../v1/o/appointment/{id}

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

Response data: GET https:/.../v1/o/appointment/162344
{ "linked" : {"schedule_model":[ {"type":"generic","id":"0","_type_id":"750","_title":"Appointment","_type_color":"EE82EE","href":"\/v1\/o\/generic\/0"}],"appointment_resource":[ {"type":"appointment_resource","id":"1551","sub_type":"","_title":"TEST PATIENT 2","href":"\/v1\/o\/appointment_resource\/1551"}]}, "parent_type" : "contact", "parent_id" : 532577, "type" : "appointment", "id" : 162344, "sub_type" : "", "title" : "Appointment", "body" : "Test", "begin_datetime" : "2014-01-29T11:00:00Z", "end_datetime" : "2014-01-29T11:15:00Z", "reminder_secs" : 0, "schedule_model_id" : 750, "href" : "\/v1\/o\/appointment\/162344" }

Read appointment from parent:

GET https:/.../v1/o/{parent_type}/{parent_id}/links/appointment[?{filter}]

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

GET https:/.../v1/o/contact/532577/links/appointment
Response example is shown in XML format here even though REST API returns JSON format:
<appointment><appointment parent_type="contact" parent_id="532577" type="appointment" id="162321" sub_type="" _title="Appointment" begin_datetime="2014-01-29T04:30:00Z" end_datetime="2014-01-29T05:15:00Z" href="/v1/o/appointment/162321"/><appointment parent_type="contact" parent_id="532577" type="appointment" id="162344" sub_type="" _title="Appointment" begin_datetime="2014-01-29T11:00:00Z" end_datetime="2014-01-29T11:15:00Z" href="/v1/o/appointment/162344"/></appointment>

Create appointment:

POST https:/.../v1/o/contact/532577/appointment

Request data [See properties]:

{"appointment": [ { "parent_type" : "contact", "parent_id" : 532577, "property_a" : "value-a", "property" : "See appointment properties", "property_z" : "value-z" } ] }

Response codes:

Update appointment:

PUT https:/.../v1/o/appointment/{id}

Request data [See properties]:

{"appointment": [ { "id" : 162344, "property_a" : "value-a", "property" : "See appointment properties", "property_z" : "value-z" } ] }

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 200 - OK Content returned [See response data]
  • 204 - OK No content
  • 404 - Not found

Delete appointment:

DELETE https:/.../v1/o/appointment/{id}

The "id" in JSON payload is required to match the {id} in the URI to ensure that deletion requests are intended and safe

{"appointment": [{"id":162344}]}

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 204 - OK
  • 404 - Not found

Response data:
{}