Skip to main content

Appointments API

Content

This guide provides information on how to interact with the Appointments REST API of Bloom Enterprise.

How to use it?

ItemValue
BASE_URIhttp://SERVER_IP/appwidget
RESPONSE_FORMATJSON
Attention

If the integration you are trying to develop will require pooling Bloom Enterprise’s REST API, you should use WebSockets instead. Please contact Q-Better’s team to know more details.

Location

List locations

ItemValue
NameList
URLBASE_URI/location/list
HTTP MethodPOST
Response DataFetches a list of locations. Can be filtered by location and server service group id. Can be translated by sending the correct language code.

Request options

ItemValue
server_service_idCan be a string or null.
location_group_idCan be a string or null.
langCan be a string or null.

Query parameters

ItemValue
filter[region][]String
filter[city][]String

Request body example

JSON
{
"server_service_group_id ": string,
"location_group_id ": string,
"lang ": string (Ex: pt_PT),
}

Query parameters example

ItemValue
URLBASE_URI/location/list?filter[region][]=STRING&filter[city][]=STRING

Responde Example

JSON
{
success: boolean,
locations: [
{
id: string,
name: string,
group: {
id: string/null,
name: string/null,
}
},
{...}
]
}

List with groups

ItemValue
NameList with groups
URLBASE_URI/location/listwithgroups
HTTP MethodPOST
Response DataFetches a list of locations and groups. Can be filtered by location and server service group id. Can be translated by sending the correct language code.

Request options

ItemValue
server_service_idCan be a string or null.
location_group_idCan be a string or null.
langCan be a string or null.

Request body example

JSON
{
"server_service_group_id ": string,
"location_group_id ": string,
"lang ": string (Ex: pt_PT),
}

Query parameters example

ItemValue
URLBASE_URI/location/listwithgroups?filter[region][]=STRING&filter[city][]=STRING

Responde Example

JSON
{
success: boolean,
locations: [
{
id: string,
name: string,
coordinates: string,
group: {
id: string/null,
name: string/null,
}
},
{...}
],
location_groups: [
{
id: string,
label: string,
value: boolean
},
{...}
]
}

List cities

ItemValue
NameList cities
URLBASE_URI/location/listcities
HTTP MethodGET
Response DataGet a list of cities.

Response example

JSON
{
success: boolean,
cities: [
string,
string,
...
]
}

List regions

ItemValue
NameList regions
URLBASE_URI/location/listregions
HTTP MethodGET
Response DataGet a list of regions.

Response example

JSON
{
success: boolean,
regions: [
string,
string,
...
]
}

Location groups

List location groups

ItemValue
NameList location groups
URLBASE_URI/locationgroup/list
HTTP MethodPOST
Response DataLists the location groups. If filter is sent, lists the location groups that have the server service specified.

Request options

ItemValue
server_service_idCan be a string or null.

Request body example

JSON
{
"server_service_id": string,
}

Responde Example

JSON
{
success: boolean,
location_groups: [
{
id: string,
name: string,
description: string,
coordinates: string,
},
{...}
]
}

Server Services

List all or a specific server service

ItemValue
NameList all or a specific server service
URLBASE_URI/serverservice/list
HTTP MethodPOST
Response DataGet a list of server services and their info. Can be filtered by location and server service group id. Can be translated by sending the correct language code.

Request options

ItemValue
server_service_group_idCan be a string or null.
location_idCan be a string or null.
langCan be a string or null.

Request body example

JSON
{
"server_service_group_id ": string,
"location_id ": string,
"lang ": string (Ex: pt_PT),
}

Response example

JSON
{
success: boolean,
services: [
{
id: string,
name: string,
server_service_group: {
id: string/null,
name: string/null,
}
},
{...}
]
}

List all or a specific server service and server services groups

ItemValue
NameList all or a specific server service and server services groups
URLBASE_URI/serverservice/listwithgroups
HTTP MethodPOST
Response DataGet a list of server services and server service groups with their info.

Request options

ItemValue
server_service_group_idCan be a string or null.
location_idCan be a string or null.
langCan be a string or null.

Request body example

JSON
{
"server_service_group_id ": string,
"location_id ": string,
"lang ": string (Ex: pt_PT),
}

Response example

JSON
{
success: boolean,
services: [
{
id: string,
name: string,
server_service_group: {
id: string/null,
name: string/null,
}
},
{...}
],
service_groups: [
{
id: string,
label: string,
value: boolean
},
{...}
]
}

Appointments

Create an appointment

ItemValue
NameCreate an appointment
URLBASE_URI/appointment
HTTP MethodPOST
Response DataA list of successful appointments and a list of impossible appointments.

Request options

ItemValue
server_service_idString
location_idString
dateString (dd/mm/yyyy).
hourString (hh:mm).

Request body example

JSON
{
"server_service_id ": string,
"location_id": string,
"date": string dd/mm/yyyy,
"hour": string hh:mm,
}

Response example

JSON
{
success: boolean,
successfulAppointments: [
{
id:string,
date:string,
hour:string,
checkin:string
},
impossibleAppointments: [
{
id:string,
date:string,
hour:string,
checkin:string
},
],
is_confirmed: 0/1 (int)
}

Get appointments

ItemValue
NameGet appointments
URLhttp://SERVER_IP/restapi/appointments/getAppointments
HTTP MethodGET
Response DataA list of successful appointments and a list of impossible appointments.

Request options

ItemValue
resourcesArray [User ID, Service ID or Location ID]
dateArray [Start Date String (yyyy-mm-dd hh:mm:ss), End Date String (yyyy-mm-dd hh:mm:ss)]
statusArray [Integers]

Status

ItemMeaning
0Appointment Pending
1Appointment Confirmed
2Appointment Finished
3Appointment Deleted
5Appointment Invalid
6Appointment Expired
8Appointment Checked in

Query parameters example

ItemValue
URLhttp://SERVER_IP/restapi/appointments/getAppointments?filter[resources][]=STRING&filter[date][]=STRING&filter[status][]=STRING

Response example

JSON
{
"success": boolean,
"data": {
"appointments": [
{
"id": string,
"starting_time": string dd/mm/yyyy hh:mm,
"ending_time": string dd/mm/yyyy hh:mm,
"status": integer,
"display_name": string,
"customer": string/null,
"service": {
"id": string,
"name": string,
"address": string
},
"code": string,
"answers": [
{
"id": string,
"question_text": string,
"question_answer": string,
"question": string,
"answer_text": string,
"device_type": integer,
"qat_id": string
}
],
"appointment": {
"answers": {
"text": string
}
}
}
],
"global_configurations": [
{
"id": string,
"value": string
},
{
"id": string,
"value": string
}
]
}
}

Update appointment

ItemValue
NameUpdate appointments
URLhttp://SERVER_IP/restapi/appointments/updateAppointments
HTTP MethodPOST
Response Datasuccess or error message

Request options (Array of objects)

ItemValue
idString
checkedin_atDate String (yyyy-mm-dd hh:mm:ss)
statusInteger
answersArray [Question Answers]

Status

ItemMeaning
0Appointment Pending
1Appointment Confirmed
2Appointment Finished
3Appointment Deleted
5Appointment Invalid
6Appointment Expired
8Appointment Checked in

Request example

JSON
[
{
"id": string,
"checkedin_at": string dd/mm/yyyy hh:mm,
"status": integer,
"answers": [
{
"id": string,
"answer_text": string,
"qat_id": string,
"question": string,
"question_answer": string,
"question_text": string
}
]
}
]

Booking

Get free appointment slots

ItemValue
NameGet free appointment slots
URLBASE_URI/booking/freeSlots
HTTP METHODPOST
RESPONSE DATAA list of free appointment slots by day.

Request options

ItemValue
server_service_idString
location_idString
yearInteger
monthInteger
dayInteger
fromString (hh:mm)
toString (hh:mm)

Request example

JSON
{
"server_service_id ": string,
"location_id": string,
"year": string YYYY,
"month": string MM,
"day": string DD,
"from": string hh:mm,,
}

Response example

JSON
{
“success”: boolean,
“slots”:[
{
“day”: “dd/mm/yyyy”
“weekday”: 1-7
“hours”:[
“hh:mm”,
(…)
]
}
(…)
]
}

Get free appointment slots by day

ItemValue
NameGet free appointment slots by day
URLBASE_URI/booking/freeSlotsDay
HTTP METHODPOST
RESPONSE DATAA list of free appointment slots by day.

Request options

ItemValue
server_service_idString
location_idString
yearInteger
monthInteger
dayInteger
fromString (hh:mm)
toString (hh:mm)

Request example

JSON
{
"server_service_id ": string,
"location_id": string,
"year": string YYYY,
"month": string MM,
"day": string DD,
"from": string hh:mm,,
}

Response example

JSON
{
“success”: boolean,
“hours”:[
“hh:mm”,
(…)
]
}

Get if is free to book

ItemValue
NameGet if is free to book
URLBASE_URI/booking/freeToBook
HTTP METHODGET
RESPONSE DATAA list of free appointment slots by day.

Get taken appointment slots

ItemValue
NameGet taken appointment slots
URLBASE_URI/booking/takenSlots
HTTP METHODPOST
RESPONSE DATAA list of taken appointment slots.

Request options

ItemValue
server_service_idString
location_idString
yearInteger
monthInteger
dayInteger
fromString (hh:mm)
toString (hh:mm)

Request body example

JSON
{
"server_service_id ": string,
"location_id": string,
"year": string YYYY,
"month": string MM,
"day": string DD,
"from": string hh:mm,,
}

Response example

JSON
{
“success”: boolean,
“blocks”:[
{
“dd/mm/yyyy”: {
“hours”: [
“hh:mm”,
“hh:mm”,
(...)
],
“details”: {
“day”: “d”,
“month”: “d”,
“weekday”: 1-7,
}
}
}
(…)
]
}

Widget

Get widget layout

ItemValue
NameGet widget layout
URLBASE_URI/appointments/widget
HTTP METHODGET
RESPONSE DATAGet a html with a widget layout

Response example

<html>

</html>

Check-in

Check-in a ticket from an appointment

Need a Bearer token see the documentation for:
API Queue Management

ItemValue
URLhttp://SERVER_IP/restapi/v2/queuemanagement/checkin
HTTP METHODJSON
RESPONSE DATASuccess or error message

Request options

ItemValue
codeInteger [REQUIRED]
langString (guid)
device_idString (guid)
eticket_customerString (guid)

Request example

JSON
{
"success": boolean,
“ticket”: {
"id": string (guid),
"number": integer,
"date": string (date),
"cancelled": boolean,
"transferred": boolean,
"state": integer,
"note": string,
"lang": string (guid),
"custom_field": string,
"client_name": string,
"flags": integer,
"app_displayname": string,
"app_id": string (guid),
"scheduled_to": string (date),
"ticket_service": {
(...)
},
"dst_service": {
(...)
},
"dst_desk": {
(...)
},
"dst_user": {
(...)
},
"device": {
(...)
},
"location": string (guid),
"dst_location": {
(...)
},
"extra_info": [
{
"answer": string,
"answer_text": string,
"id": string,
"question": string
},
(...)
],
"tickets_to_print": integer,
"number_of_waiting_tickets": integer,
"avg_waiting_time": integer

},
“ticket_strings”: {
"people_waiting": string,
"waiting_time": string,
"date_text": string,
"prioritary_ticket": string,
"extra_text": string,
"footer_text": string
},
}