Appointments
This domain serves for Appointment requests.
Get Google Calendar List
POST Retrieves a list of Google Calendar IDs and labels associated with the profiles.
Request Paramters
stringdomain |
Value should be appointment |
Required |
stringaction |
Value should be get_google_cal_list |
Required |
objectdata |
Shoud be an empty object. | Required |
Sample Request Body
{
domain: "appointment",
action: "get_google_cal_list",
"data": {}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
listdata |
This list contains result data objects for the request query. |
stringlabel |
The label or name associated with the Google Calendar. |
stringid |
The ID of the Google Calendar. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Google Calendar List Read",
data: [
{
id: "blinq.com.au_8cb5aqgj4uut2ielfil6lone5g@group.calendar.google.com",
label: "Staff A"
},
{
id: "blinq.com.au_0k87p0olihj40e2jd63r2920sg@group.calendar.google.com",
label: "Staff B"
}
]
}
}
Get Appointments by Quote No
POST This function retrieves the details of an appointment slot based on the provided quote number.
Request Paramters
stringdomain |
Value should be appointment |
Required |
stringaction |
Value should be get_google_cal_list |
Required |
objectdata |
Contains input parameters. | Required |
stringquote_no |
The quote number of the appointment to retrieve. | Required |
Sample Request Body
{
domain: "appointment",
action: "get_google_cal_list",
data: {
quote_no: "Q05240064"
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
listdata |
This list contains result data objects for the request query. |
stringlabel |
The label or name associated with the Google Calendar. |
stringid |
The ID of the Google Calendar. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Google Calendar List Read",
data: [
{
id: "blinq.com.au_8cb5aqgj4uut2ielfil6lone5g@group.calendar.google.com",
label: "Staff A"
},
{
id: "blinq.com.au_0k87p0olihj40e2jd63r2920sg@group.calendar.google.com",
label: "Staff B"
}
]
}
}
Get Appointments by Date Range
POST This function retrieves the details of appointment slots within a specified date range.
Request Paramters
stringdomain |
Value should be appointment |
Required |
stringaction |
Value should be get_appointments_by_date_range |
Required |
objectdata |
Contains input parameters. | Required |
lsitdate_arr |
List of stringdates in the format of YYYY-MM-DD |
Required |
Sample Request Body
{
"domain":"appointment",
"action": "get_appointments_by_date_range",
"data":{
"date_arr":["2024-10-24","2024-10-25","2024-10-26"]
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
listdata |
This list contains result data objects for the request query. |
stringid |
The ID of the appointment or block slot. |
stringquote_no |
The quote number associated with the appointment. |
stringdate |
The date of the appointment. |
stringtime_from |
The start time of the appointment. |
stringtime_to |
The end time of the appointment. |
stringnote |
Any notes associated with the appointment. |
stringcreated_on |
The creation date of the appointment. |
stringuser_id |
The ID of the user who created the appointment. |
stringstaff_id |
The ID of the staff member assigned to the appointment. |
stringquote_id |
The ID of the quote associated with the appointment. |
stringq_name_1 |
The first name of the customer according to quote. |
stringq_name_2 |
The last name of the customer according to quote. |
stringq_address_1 |
The address line 1 of the quote address. |
stringq_address_2 |
The address line 2 of the quote address. |
stringq_suburb |
The suburb of the quote address. |
stringq_postcode |
The postal code of the quote address. |
stringq_phone |
The phone number associated with the quote. |
stringq_mobile |
The mobile number associated with the quote. |
stringcustomer_id |
The customer id of the quote. |
stringq_lat |
The latitude of the quote location. |
stringq_lng |
The longitude of the quote location. |
stringc_hdfu |
Custom field associated with the quote. |
Sample Response
{
"status": "success",
"data": {
"status": "success",
"message": "Appointments Read for Date Range",
"data": [
{
"id": "20406573560478",
"quote_no": "Q10240113",
"date": "2024-10-26",
"time_from": "14:00",
"time_to": "14:30",
"note": "Online Appointment",
"created_on": "2024-10-25",
"user_id": "8987",
"staff_id": "0",
"quote_id": "134",
"q_name_1": "ABC Company",
"q_name_2": "Jhon Doe",
"q_address_1": "President Apartments",
"q_address_2": "10 Mary Street",
"q_suburb": "Brisbane",
"q_postcode": "4000",
"q_phone": "61212345678",
"q_mobile": "61412345678",
"customer_id": "129",
"customer_no": "C240097",
"q_lat": null,
"q_lng": null,
"c_hdfu": "Social Media"
}
]
}
}
Get Appointments by ID
POST This function retrieves the details of an appointment slot based on the provided appointment ID.
Request Paramters
stringdomain |
Value should be appointment |
Required |
stringaction |
Value should be get_google_cal_list |
Required |
objectdata |
Contains input parameters. | Required |
stringapp_id |
The ID of the appointment to retrieve. | Required |
Sample Request Body
{
"domain":"appointment",
"action": "get_appointments_by_id",
"data":{
"app_id":20406573560478
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
listdata |
This list contains result data objects for the request query. |
stringid |
The ID of the appointment. |
stringquote_no |
The quote number associated with the appointment. |
stringdate_from |
The start date and time of the appointment. |
stringdate_to |
The end date and time of the appointment. |
stringnote |
Any notes associated with the appointment. |
stringgoogle_event_id |
The Google event ID associated with the appointment. |
stringstaff_id |
The ID of the staff member assigned to the appointment. |
stringcreated_on |
The creation date of the appointment. |
stringuser_id |
The ID of the user who created the appointment. |
Sample Response
{
"status": "success",
"data": {
"status": "success",
"message": "Appointments Read by ID",
"data": {
"id": "20406573560478",
"quote_no": "Q10240113",
"date_from": "2024-10-26 14:00:00",
"date_to": "2024-10-26 14:30:00",
"note": "Online Appointment",
"google_event_id": null,
"staff_id": "0",
"created_on": "2024-10-25",
"user_id": "8987"
}
}
}
Google Make Appointment
POST This api call schedules an appointment using the Google Calendar API. This call also sends an SMS notification to the provided mobile number upon successful scheduling.
Request Paramters
stringdomain |
Value should be appointment |
Required |
stringaction |
Value should be google_make_appointment |
Required |
objectdata |
Contains input parameters. | Required |
intuser_id |
The ID of the user scheduling the appointment. | Required |
stringmobile |
The mobile number to send the appointment confirmation SMS. | Required |
stringdate |
The date of the appointment in YYYY-MM-DD format. | Required |
stringtime |
The time of the appointment in HH:MM format. | Required |
stringnote |
Any notes associated with the appointment. | Required |
stringcalendar_id |
The Google Calendar ID where the appointment will be scheduled. | Required |
stringtime_zone |
The time zone for the appointment. | Required |
Sample Request Body
{
"domain":"appointment",
"action": "google_make_appointment",
"data":{
"mobile":"+94123456789",
"date":"2024-10-27",
"time":"11:00",
"note":"Test Appointment from API",
"calendar_id":"blinq.com.au_8cb5aqgj4uut2ielfil6lone5g@group.calendar.google.com",
"time_zone":"+5:30"
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
objectdata |
This list contains result data objects for the request query. |
intstatus |
Possible values are 1 for sucessful shedule in google calander api, or 2 for error in google calander api call. |
stringmessage |
This indicates the message or data that describes the status field in data object |
Sample Response
{
"status": "success",
"data": {
"status": "success",
"message": "Appointment Made",
"data": {
"status": 1,
"message": "Appointment Scheduled Successfully"
}
}
}
Save Appointment
POST This api call schedules an appointment and updates it on Google Calendar. This call also sends an SMS notification to the provided mobile number upon successful scheduling (if configured).
Request Paramters
stringdomain |
Value should be appointment |
Required |
stringaction |
Value should be save_appointment |
Required |
objectdata |
Contains input parameters. | Required |
intuser_id |
The ID of the user scheduling the appointment. | Required |
stringquote_id |
The ID of the quote associated with the appointment. | Required |
stringquote_no |
The quote number associated with the appointment. | Required |
stringapp_date |
The date of the appointment in YYYY-MM-DD format. | Required |
stringtime_from |
The time of the appointment starts in HH:MM format. | Required |
stringtime_to |
The end time of the appointment in HH:MM format. | Required |
stringnote |
Any notes associated with the appointment. | Required |
stringcalendar_id |
The Google Calendar ID where the appointment will be scheduled. | Required |
stringcal_label |
The label of the calendar. | Required |
stringcurr_event_id |
The current event ID if the appointment is being rescheduled. | Optional |
stringcurr_calendar_id |
The current calendar ID if the appointment is being rescheduled. | Optional |
stringsummary |
The summary of the appointment. | Required |
stringdescription |
The description of the appointment. | Required |
stringlocation |
The location of the appointment. | Required |
Sample Request Body
{
"domain":"appointment",
"action": "save_appointment",
"data":{
"quote_id":"0123456789",
"quote_no":"Q05240064",
"app_date":"2024-06-17",
"time_from":"10:00",
"time_to":"11:00",
"note":"Test",
"calendar_id":"blinq.com.au_8cb5aqgj4uut2ielfil6lone5g@group.calendar.google.com",
"cal_label":"Test Label",
"curr_event_id":"m8pihktc2oa1dv7u7rccq69uus",
"curr_calendar_id":"blinq.com.au_8cb5aqgj4uut2ielfil6lone5g@group.calendar.google.com",
"summary":"Test Summery",
"description":"Teset description",
"location":"Office"
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
listdata |
This list contains result data objects for the request query. |
intlist item 1 |
There is a an integer number as the first item of the data list and it indicate the status (1 for success) |
objectlist item 2 |
This object in the data list conatains details regarding the appointment in BlinQ |
objectlist item 3 |
This object in the data list conatains details regarding the appointment in Google Calander |
intstory_id |
BlinQ staory id |
stringstory_text |
HTML contenent of the story. |
stringuser_name |
Username of the staff assigned to appointment. |
stringstory_date_d |
Date of the story. |
stringquote_no |
Quote number related to the appointment. |
stringcurr_event_id |
Google calander current event id |
stringcurr_calendar_id |
Google calander current calander id |
Sample Response
{
"status": "success",
"data": {
"status": "success",
"message": "Appointment Saved",
"data": [
1,
{
"story_id": 642,
"story_text": "\nAppointment has been re-scheduled.\n
\n
\n Date: 17th June 2024 from 10:00AM to 11:00AM\n
\n Calendar: Test Label\n
\n Location: \n Office\n
\n Link: \n blinq.link/667050f1cc60f",
"user_name": "Tom",
"story_date_d": "Jun 18, 2024",
"quote_no": "Q05240064"
},
{
"curr_event_id": "qmp1i73mbe2onilroimc2ivdlo",
"curr_calendar_id": "blinq.com.au_8cb5aqgj4uut2ielfil6lone5g@group.calendar.google.com"
}
]
}
}
Save Appointment Local
POST This function handles the saving of an appointment locally.
Request Paramters
stringdomain |
Value should be appointment |
Required |
stringaction |
Value should be save_appointment_local |
Required |
objectdata |
Contains input parameters. | Required |
intuser_id |
The ID of the user scheduling the appointment. | Required |
stringquote_id |
The ID of the quote associated with the appointment. | Required |
stringquote_no |
The quote number associated with the appointment. | Required |
intapp_id |
The ID of the appointment if updating an existing appointment. | Optional |
intapp_staff_id |
The ID of the staff member assigned to the appointment. | Required |
stringapp_date |
The date of the appointment in YYYY-MM-DD format. | Required |
stringapp_from |
The time of the appointment starts in HH:MM format. | Required |
stringapp_to |
The end time of the appointment in HH:MM format. | Required |
stringapp_notes |
Additional notes related to the appointment. | Required |
stringsummary |
The summary of the appointment. | Required |
stringdescription |
The description of the appointment. | Required |
stringlocation |
The location of the appointment. | Required |
intstaff_id |
The ID of the staff member creating or modifying the appointment. | Required |
Sample Request Body
{
"domain":"appointment",
"action": "save_appointment_local",
"data":{
"app_staff_id":"",
"app_date": "2024-07-25",
"app_from": "09:00",
"app_to": "09:30",
"app_notes":"Test 4",
"app_id": "",
"quote_id": 111,
"quote_no": "Q07240092",
"condition": "edit_2",
"summary":"Test",
"description":"Test",
"location":"Test"
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
listdata |
This list contains result data objects for the request query. |
intlist item 1 |
There is a an integer number as the first item of the data list and it indicate the status (1 for success) |
objectlist item 2 |
This object in the data list conatains details regarding the appointment in BlinQ |
intstory_id |
BlinQ staory id |
stringstory_text |
HTML contenent of the story. |
stringuser_name |
Username of the staff assigned to appointment. |
stringstory_date_d |
Date of the story. |
stringquote_no |
Quote number related to the appointment. |
Sample Response
{
"status": "success",
"data": {
"status": "success",
"message": "Appointment Saved Local",
"data": [
2,
"Appointment slot not available"
]
}
}
Check Appointment
POST Checks the availability of appointment slots based on the provided parameters.
Request Paramters
stringdomain |
Value should be appointment |
Required |
stringaction |
Value should be check_appointment |
Required |
objectdata |
Contains input parameters. | Required |
intapp_id_x |
The ID of the appointment (optional, used for updating existing appointments). | Optional |
intapp_staff_id |
The ID of the staff member for whom availability is being checked. | Required |
stringapp_date |
The date of the appointment in the format DD-MM-YYYY | Required |
stringapp_from |
The start time of the appointment in the format HH:MM | Required |
stringapp_to |
The end time of the appointment in the format HH:MM | Required |
Sample Request Body
{
"domain":"appointment",
"action": "check_appointment",
"data":{
"app_id_x":7,
"app_staff_id":8864,
"app_date":"12-07-2024",
"app_from":"10:10",
"app_to":"10:20"
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
listdata |
Additional data related to the appointment operation. |
Sample Response
{
"status": "success",
"data": {
"status": "success",
"message": "Appointment Read",
"data": [
1,
0
]
}
}
Delete Appointment
POSTDeletes an appointment from the database and associated Google Calendar event if exists.
Request Paramters
stringdomain |
Value should be appointment |
Required |
stringaction |
Value should be delete_appointment |
Required |
objectdata |
Contains input parameters. | Required |
stringapp_id |
The ID of the appointment to be deleted. | Required |
stringquote_no |
The quote number of the appointment to delete. | Required |
Sample Request Body
{
"domain":"appointment",
"action": "delete_appointment",
"data":{
"app_id":20406573560411,
"quote_no":"Q07240092"
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
listdata |
This list contains result data objects for the request query. |
stringquote_no |
The quote number of the deleted appointment. |
stringstory_text |
A message confirming the deletion of the appointment. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Appointment Deleted",
data: {
quote_no: "Q03240045",
story_text: "Appointment has been deleted"
}
}
}
Appointment Block Slots
POSTBlocks a time slot for appointments in the database.
Request Paramters
stringdomain |
Value should be appointment |
Required |
stringaction |
Value should be appointment_block_slots |
Required |
objectdata |
Contains input parameters. | Required |
intuser_id |
The ID of the user performing the action. | Required |
intstaff_id |
The ID of the staff member for whom the slot is being blocked. | Required |
stringapp_date |
The date of the appointment slot to be blocked in YYYY-MM-DD format. | Required |
stringapp_from |
The start time of the appointment slot to be blocked in HH:MM format. | Required |
stringapp_to |
The end time of the appointment slot to be blocked in HH:MM format. | Required |
stringapp_note |
Additional notes for the blocked appointment slot. | Required |
Sample Request Body
{
domain: "appointment",
action: "appointment_block_slots",
data: {
user_id: 69,
staff_id: 8864,
app_date: "2024-06-12",
app_from: "11:10",
app_to: "11:20",
app_note: "Test"
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
intdata |
The ID of the newly inserted appointment block slot in the database. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Appointment Block Slots",
data: 14
}
}
Appointment Unblock Slots
POSTUnblocks a previously blocked appointment slot from the database.
Request Paramters
stringdomain |
Value should be appointment |
Required |
stringaction |
Value should be appointment_unblock_slots |
Required |
objectdata |
Contains input parameters. | Required |
intid |
The ID of the appointment block slot to be unblocked. | Required |
Sample Request Body
{
domain: "appointment",
action: "appointment_unblock_slots",
data: {
id: 12
}
}
Response Paramters
stringstatus |
This indicate the status of the response. success is the expected value. |
stringmessage |
This explains the reson for status. |
intdata |
int Status indicating success 1 or failure 0 of the operation. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Appointment Unblock Slots",
data: 1
}
}