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
string domain |
Value should be appointment |
Required |
string action |
Value should be get_google_cal_list |
Required |
object data |
Shoud be an empty object. | Required |
Sample Request Body
{
domain: "appointment",
action: "get_google_cal_list",
"data": {}
}
Response Paramters
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
list data |
This list contains result data objects for the request query. |
string label |
The label or name associated with the Google Calendar. |
string id |
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
string domain |
Value should be appointment |
Required |
string action |
Value should be get_google_cal_list |
Required |
object data |
Contains input parameters. | Required |
string quote_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
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
list data |
This list contains result data objects for the request query. |
string label |
The label or name associated with the Google Calendar. |
string id |
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
string domain |
Value should be appointment |
Required |
string action |
Value should be get_appointments_by_date_range |
Required |
object data |
Contains input parameters. | Required |
lsit date_arr |
List of string dates 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
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
list data |
This list contains result data objects for the request query. |
string id |
The ID of the appointment or block slot. |
string quote_no |
The quote number associated with the appointment. |
string date |
The date of the appointment. |
string time_from |
The start time of the appointment. |
string time_to |
The end time of the appointment. |
string note |
Any notes associated with the appointment. |
string created_on |
The creation date of the appointment. |
string user_id |
The ID of the user who created the appointment. |
string staff_id |
The ID of the staff member assigned to the appointment. |
string quote_id |
The ID of the quote associated with the appointment. |
string q_name_1 |
The first name of the customer according to quote. |
string q_name_2 |
The last name of the customer according to quote. |
string q_address_1 |
The address line 1 of the quote address. |
string q_address_2 |
The address line 2 of the quote address. |
string q_suburb |
The suburb of the quote address. |
string q_postcode |
The postal code of the quote address. |
string q_phone |
The phone number associated with the quote. |
string q_mobile |
The mobile number associated with the quote. |
string customer_id |
The customer id of the quote. |
string q_lat |
The latitude of the quote location. |
string q_lng |
The longitude of the quote location. |
string c_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
string domain |
Value should be appointment |
Required |
string action |
Value should be get_google_cal_list |
Required |
object data |
Contains input parameters. | Required |
string app_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
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
list data |
This list contains result data objects for the request query. |
string id |
The ID of the appointment. |
string quote_no |
The quote number associated with the appointment. |
string date_from |
The start date and time of the appointment. |
string date_to |
The end date and time of the appointment. |
string note |
Any notes associated with the appointment. |
string google_event_id |
The Google event ID associated with the appointment. |
string staff_id |
The ID of the staff member assigned to the appointment. |
string created_on |
The creation date of the appointment. |
string user_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
string domain |
Value should be appointment |
Required |
string action |
Value should be google_make_appointment |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user scheduling the appointment. | Required |
string mobile |
The mobile number to send the appointment confirmation SMS. | Required |
string date |
The date of the appointment in YYYY-MM-DD format. | Required |
string time |
The time of the appointment in HH:MM format. | Required |
string note |
Any notes associated with the appointment. | Required |
string calendar_id |
The Google Calendar ID where the appointment will be scheduled. | Required |
string time_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
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
object data |
This list contains result data objects for the request query. |
int status |
Possible values are 1 for sucessful shedule in google calander api, or 2 for error in google calander api call. |
string message |
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
string domain |
Value should be appointment |
Required |
string action |
Value should be save_appointment |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user scheduling the appointment. | Required |
string quote_id |
The ID of the quote associated with the appointment. | Required |
string quote_no |
The quote number associated with the appointment. | Required |
string app_date |
The date of the appointment in YYYY-MM-DD format. | Required |
string time_from |
The time of the appointment starts in HH:MM format. | Required |
string time_to |
The end time of the appointment in HH:MM format. | Required |
string note |
Any notes associated with the appointment. | Required |
string calendar_id |
The Google Calendar ID where the appointment will be scheduled. | Required |
string cal_label |
The label of the calendar. | Required |
string curr_event_id |
The current event ID if the appointment is being rescheduled. | Optional |
string curr_calendar_id |
The current calendar ID if the appointment is being rescheduled. | Optional |
string summary |
The summary of the appointment. | Required |
string description |
The description of the appointment. | Required |
string location |
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
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
list data |
This list contains result data objects for the request query. |
int list item 1 |
There is a an integer number as the first item of the data list and it indicate the status (1 for success) |
object list item 2 |
This object in the data list conatains details regarding the appointment in BlinQ |
object list item 3 |
This object in the data list conatains details regarding the appointment in Google Calander |
int story_id |
BlinQ staory id |
string story_text |
HTML contenent of the story. |
string user_name |
Username of the staff assigned to appointment. |
string story_date_d |
Date of the story. |
string quote_no |
Quote number related to the appointment. |
string curr_event_id |
Google calander current event id |
string curr_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
string domain |
Value should be appointment |
Required |
string action |
Value should be save_appointment_local |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user scheduling the appointment. | Required |
string quote_id |
The ID of the quote associated with the appointment. | Required |
string quote_no |
The quote number associated with the appointment. | Required |
int app_id |
The ID of the appointment if updating an existing appointment. | Optional |
int app_staff_id |
The ID of the staff member assigned to the appointment. | Required |
string app_date |
The date of the appointment in YYYY-MM-DD format. | Required |
string app_from |
The time of the appointment starts in HH:MM format. | Required |
string app_to |
The end time of the appointment in HH:MM format. | Required |
string app_notes |
Additional notes related to the appointment. | Required |
string summary |
The summary of the appointment. | Required |
string description |
The description of the appointment. | Required |
string location |
The location of the appointment. | Required |
int staff_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
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
list data |
This list contains result data objects for the request query. |
int list item 1 |
There is a an integer number as the first item of the data list and it indicate the status (1 for success) |
object list item 2 |
This object in the data list conatains details regarding the appointment in BlinQ |
int story_id |
BlinQ staory id |
string story_text |
HTML contenent of the story. |
string user_name |
Username of the staff assigned to appointment. |
string story_date_d |
Date of the story. |
string quote_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
string domain |
Value should be appointment |
Required |
string action |
Value should be check_appointment |
Required |
object data |
Contains input parameters. | Required |
int app_id_x |
The ID of the appointment (optional, used for updating existing appointments). | Optional |
int app_staff_id |
The ID of the staff member for whom availability is being checked. | Required |
string app_date |
The date of the appointment in the format DD-MM-YYYY | Required |
string app_from |
The start time of the appointment in the format HH:MM | Required |
string app_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
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
list data |
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
string domain |
Value should be appointment |
Required |
string action |
Value should be delete_appointment |
Required |
object data |
Contains input parameters. | Required |
string app_id |
The ID of the appointment to be deleted. | Required |
string quote_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
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
list data |
This list contains result data objects for the request query. |
string quote_no |
The quote number of the deleted appointment. |
string story_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
string domain |
Value should be appointment |
Required |
string action |
Value should be appointment_block_slots |
Required |
object data |
Contains input parameters. | Required |
int user_id |
The ID of the user performing the action. | Required |
int staff_id |
The ID of the staff member for whom the slot is being blocked. | Required |
string app_date |
The date of the appointment slot to be blocked in YYYY-MM-DD format. | Required |
string app_from |
The start time of the appointment slot to be blocked in HH:MM format. | Required |
string app_to |
The end time of the appointment slot to be blocked in HH:MM format. | Required |
string app_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
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
int data |
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
string domain |
Value should be appointment |
Required |
string action |
Value should be appointment_unblock_slots |
Required |
object data |
Contains input parameters. | Required |
int id |
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
string status |
This indicate the status of the response. success is the expected value. |
string message |
This explains the reson for status. |
int data |
int Status indicating success 1 or failure 0 of the operation. |
Sample Response
{
status: "success",
data: {
status: "success",
message: "Appointment Unblock Slots",
data: 1
}
}