API version 1 Appointments

1. List My Appointments (api1/appointments/my_appointments)

This method will answer with a collection of user's appointments of the current day that can check in and check out.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/my_appointments GET
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/my_appointments GET
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Response
[
        {
            "client_first_name": "James",
            "client_last_name": "Franco",
            "appointment_name": "abc",
            "appointment_start": "1704936600", // appointment time zone raw
            "appointment_finish": "1704937500", // appointment time zone raw
            "appointment_id": "4925",
            "appointment_address": "262 Kent Street",
            "latitude": "-12.82699366965845",
            "longitude": "-64.22187173858586",
            "case": "BD1009",
            "case_id": "1",
            "has_alert": "Yes/No",
            "appointment_duration": 900,
            "appointment_duration_string": "15m",
            "appointment_start_string": "12:00 PM", // user time zone
            "appointment_finish_string": "12:15 PM", // user time zone
            "appointment_time_zone": "Australia/Sydney",
            "check_in_date": null,
            "check_out_date": null,
            "overstay_time": 0,
            "user_time_zone": "Australia/Sydney"
        },
        {
            "client_first_name": "Jack",
            "client_last_name": "Black",
            "appointment_name": "abc",
            "appointment_start": "1704931200", // appointment time zone raw
            "appointment_finish": "1704932100", // appointment time zone raw
            "appointment_id": "4926",
            "appointment_address": "262 Kent Street",
            "latitude": "-12.82699366965845", 
            "longitude": "-61.22187173858586", 
            "case": "NSW1001",
            "case_id": "2",
            "has_alert": "Yes/No",
            "appointment_duration": 900,
            "appointment_duration_string": "15m",
            "appointment_start_string": "10:30 AM", // user time zone
            "appointment_finish_string": "10:45 AM", // user time zone
            "appointment_time_zone": "Australia/Sydney",
            "check_in_date": "1704919744",
            "check_out_date": "1704919798",
            "overstay_time": 1800 //time in seconds,
            "user_time_zone": "Australia/Sydney"
        }
    ]
    

2. Set Appointment Record (api1/appointments/my_appointments/set_record)

This method will allow to check-in, overstay and check-out an appointment and set an emergency.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/my_appointments/set_record POST
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/my_appointments/set_record POST
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Query Params
Parameter Value Mandatory
appointment_id Appointment ID Yes if type not emergency
type Record type. Options: check_in, check_out, overstay, emergency Yes
latitude User's latitude Yes
longitude User's longitude Yes
overstay_time Overstay time (time in seconds) Yes if type is overstay
emergency_type_id Emergency type ID Yes if type is emergency
time_zone Time zone. (i.e.: Australia/Sydney) Yes
Response

      {
        "response": "Record successfuly saved",
        "appointment_id": "4927",
        "type": "Check-in"
      }
    

3. Undo check-in (api1/appointments/my_appointments/undo_check_in)

This method will allow to undo check-in to an appointment.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/my_appointments/undo_check_in PUT
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/my_appointments/undo_check_in PUT
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Query Params (As it's PUT method this need to go on the x-www-form-urlencoded)
Parameter Value Mandatory
appointment_id Appointment ID Yes
Response

    {
      "response": "Undid check-in successfuly.",
      "appointment_id": "4927"
    }
    

4. List users emergencies (api1/appointments/my_appointments/emergencies)

This method will answer with a collection of user's requested emergencies of the current day.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/my_appointments/emergencies GET
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/my_appointments/emergencies GET
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Response
[
        {
            "time": "04:43 AM",
            "description": "Call the cops"
        },
        {
            "time": "04:50 AM",
            "description": "Call the ambulance"
        }
    ]
    

5. List Appointments (api1/appointments)

This method will answer with a collection of appointments. The collection will be in JSON format and the date will be formated with the user's timezone format.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments GET
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments GET
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Query Params
Parameter Value Mandatory
start Start date (i.e.: dd-mm-yyyy) Yes
end End date (i.e.: dd-mm-yyyy) Yes
user_ids User ids (i.e.: 1,2,3)
Note 1: If not sent, the respond will the events related to the current user
No
category A category filter: A valid category id (list option id)
list_type_name = appointments_categories
Note 1: Do not send to prevent apply this filter
No
status A status filter: A valid status id (list option id)
list_type_name = appointments_status
Note 1: Send "-1" to return events without status
Note 2: Do not send to prevent apply this filter
No
Response
[
    {
        "id": "4923",
        "title": "Appoitmnet 1",
        "start": "2024-01-09 20:30:00",
        "end": "2024-01-09 21:00:00",
        "all_day_event": "Yes/No",
        "is_recurrent": "Yes/No",
        "client_reply": "Yes/No",
        "status": "Confirmed",
        "status_color": "92bcdc",
        "category": "Appointment",
        "client_name": "Client 3 (BD1008)",
        "resources": "",
        "outstanding_amount": "Yes/No",
        "case_id": "6",
        "has_alert": "Yes/No",
        "no_linked_billing": "Yes/No",
        "draft_counter": 0,
        "invoiced_counter": 0,
        "uninvoiced_counter": 0,
        "invoice_paid_counter": 0,
        "invoice_partially_paid_counter": 0,
        "invoiced_counter": 1,
        "has_online_meeting": "Yes/No",
        "employees": [
            {
                "user_id": "3",
                "name": "Jhon Doe"
            }
        ]
    },
    {
        "id": "4922",
        "title": "Appoitmnet 2",
        "start": "2024-01-10 06:15:00",
        "end": "2024-01-10 09:30:00",
        "all_day_event": "Yes/No",
        "is_recurrent": "Yes/No",
        "client_reply": "Yes/No",
        "status": "Cancelled",
        "status_color": "FF8787",
        "category": "Tasks",
        "client_name": "Client 2 (BD1019)",
        "resources": "",
        "outstanding_amount": "Yes/No",
        "case_id": "3",
        "has_alert": "Yes/No",
        "no_linked_billing": "Yes/No",
        "draft_counter": 0,
        "invoiced_counter": 0,
        "uninvoiced_counter": 1,
        "invoice_paid_counter": 0,
        "invoice_partially_paid_counter": 0,
        "invoiced_counter": 0,
        "has_online_meeting": "Yes/No",
        "employees": [
            {
                "user_id": "3",
                "name": "Jhon Doe"
            }
        ]
    },
    {
        "id": "4924",
        "title": "Appoitmnet 3",
        "start": "2024-01-10 10:00:00",
        "end": "2024-01-10 10:15:00",
        "all_day_event": "Yes/No",
        "client_reply": "Yes/No",
        "status": "Completed",
        "status_color": "92bcdc",
        "category": "Appointment",
        "client_name": "Client 1 (BD1009)",
        "resources": "MP Theatre | Music System", // resources are separeted by |
        "outstanding_amount": "Yes/No",
        "case_id": null,
        "has_alert": "Yes/No",
        "no_linked_billing": "Yes/No",
        "draft_counter": 0,
        "invoiced_count": 0,
        "uninvoiced_count": 0,
        "invoice_paid_count": 0,
        "invoice_partially_paid_count": 0,
        "invoiced_counter": 0,
        "has_online_meeting": "Yes/No",
        "employees": [
            {
                "user_id": "3",
                "name": "Jhon Doe"
            }
        ]
    }]
    

6. Get Appointments details (api1/appointments/details)

This method will answer with a collection of appointment's details. The collection will be in JSON format and the date will be formated with the appointment's timezone format.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/details GET
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/details GET
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Query Params
Parameter Value Mandatory
id Appointment ID Yes
Response

    {
      "appointment_id": "4934",
      "case_id" : "1013",
      "title": "Appt title",
      "description": "This is a description",
      "start": "2024-01-24 11:30:00",
      "end": "2024-01-24 12:00:00",
      "allow_overlap": "Yes/No",
      "is_recurrent": "Yes/No",
      "all_day_event": "Yes/No",
      "time_zone": "Australia/Sydney",
      "status_id": "4125",
      "status": "Completed",
      "category_id": "4168",
      "category": "Task",
      "client_name": "Client Name (BD1009)",
      "case_id": "1013",
      "meeting_url": "url",
      "meeting_type": "Teams/Zoom/or empty",
      "location": "Other",
      "location_id": "-2", // -2 = other, -1 = client address, id > 0 office ID,
      "direction_id": "521",
      "case_notes": "Note with HTML",
      "street": "6 Help Street",
      "postcode": "2067",
      "suburb": "Chatswood",
      "sublocality": "City of Willoughby",
      "state": "New South Wales",
      "country": "Australia",
      "latitude": "-33.7959483",
      "longitude": "151.1797115",
      "care_of": "",
      "mmm_classification": "",
      "billing_total_outstatind": "$49.50",
      "billing_employee": "John Doe",
      "billing_employee_id": "210",
      "billing_employee_team": "Safety Team",
      "billing_employee_team_id": "4498",
      "billing_service_contract": "BD: AU Test",
      "billing_service_contract_id": "368",
      "billing": "Charge Code 4 : 1. Test",
      "billing_value": "00:00 100.00 1 0 1 0.00 1 0 0 0 Charge Code 4 2903",
      "billing_details": "dsfgdfg",
      "billing_description": "1. Test",
      "billing_code": "Charge Code 4",
      "employees": [
          {
              "user_id": "210",
              "name": "John Doe"
          }
      ],
      "resources": [
          {
              "id": "11",
              "name": "(SYD) Meeting Room 2"
          }
      ]
    }
    

7. List Appointment Employees (api1/appointments/employees)

This endpoint returns a collection of employee data that can be displayed on the calendar for the logged-in user. The response is in JSON format.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/employees GET
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/employees GET
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Query Params
Parameter Description Mandatory
start_date Appointment start date (format: dd-mm-yyyy) Yes
end_date Appointment end date (format: dd-mm-yyyy) Yes
start_time Appointment start time (format: hh:mm AM/PM) Yes
end_time Appointment end time (format: hh:mm AM/PM) Yes
time_zone Time zone of the request Yes
can_overlap Indicates if overlapping is allowed (Yes/No) Yes
recurrence JSON string with recurrence details (optional) No
holidays_recurr JSON string with holiday recurrence details (optional) No
Response
  
  [
    {
        "user_id": "20",
        "name": "Alexey Yaskin",
        "image": "default.png",
        "available": true,
        "events": []
    },
    {
        "user_id": "11",
        "name": "Amanda B",
        "image": "default.png",
        "available": false,
        "events": [{"title": "Meeting", "time": "10:00 AM"}]
    }
  ]
  

8. List Appointment Locations (api1/appointments/locations)

This method will answer with a collection of available appointment locations. The collection will be in JSON format.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/locations GET
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/locations GET
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Query Params
Parameter Value Mandatory
user_ids User IDs (i.e.: 1,2,3) Yes
start_date Appointment start date (i.e.: dd-mm-yyyy) Yes
end_date Appointment end date (i.e.: dd-mm-yyyy) Yes
start_time Appointment start time (i.e.: hh:mm am/pm) Yes
end_time Appointment end time (i.e.: hh:mm am/pm) Yes
time_zone Appointment time zone Yes
all_day Appointment all day event (options: Yes/No) Yes
Response
      
[ { "id": "2", // internal IInsight ID "name": "Office 2", "office_location": "306", "latitude": "10.1508842", "longitude": "10.6690775", "office_location_string": "150 Bourke Street, Woolloomooloo, City of Sydney, New South Wales, Australia, 2010" }, { "id": "-1", "name": "Client Address" }, { "id": "-2", "name": "Other" },
]

9. Add Event (api1/appointments/add_event)

This method will allow to create a new appointment/event in IInsight.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/add_event POST
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/add_event POST
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Query Params
Parameter Value Mandatory
title An event title Yes
description An event description No
start_date The event start date.
Organisation Date Format (e.g. d-m-Y => 09-02-2024).
Yes
finish_date The event finish date.
Organisation Date Format (e.g. d-m-Y => 09-02-2024).
Yes
start_time The event start time.
Format: "h:i a" (e.g. 01:30 pm)
Yes
finish_time The event finish time.
Format: "h:i a" (e.g. 01:30 pm)
Yes
buffer_before The event buffer before value in minutes.
A positive integer value (e.g. 15).
No
buffer_after The event buffer after value in minutes.
A positive integer value (e.g. 15).
No
time_zone A valid time zone (e.g. Australia/Sydney) Yes
can_overlap A flag value (Yes/No) Yes
is_recurrent A flag value (Yes/No)
If "Yes". Then "recurrence" will be required.
Yes
all_day_event A flag value (Yes/No) Yes
employees A JSON String of an array of employee ids (e.g. [1, 2]) Yes
category A valid category id (list option id)
list_type_name = appointments_categories
Yes
status A valid status id (list option id)
list_type_name = appointments_status
Yes
case_number A valid case client id No
location_id A valid location id Yes
direction_id A valid direction id No
office_resources A JSON String of an array of office resource ids belonging to sent location (e.g. [1, 2])
Locations: Client Address and Other have not resources.
No
recurrence Required if "is_recurrent" is "Yes".
A JSON String of an object config for recurrence.
This object requires the following attributes: pattern, range.
Conditional
↳ pattern An object of possible patterns for recurrence.
This object requires at least one of the following attributes: day, week, month, year.
Yes
  ↳ day An object of day configuration.
This object requires at least one of the following attributes: every_day, every_week.
No
    ↳ every_day A positive integer value between 1 - 7. (To repeat every N days) No
    ↳ every_week A true boolean value. (To repeat every week) No
  ↳ week An object of week configuration.
This object requires the following attributes: every_week, days.
No
    ↳ every_week A positive integer value. (To repeat every N weeks) Yes
    ↳ days An array of days configuration.
Possible values: "MO", "TU", "WE", "TH", "FR", "SA", "SU".
Yes
  ↳ month An object of month configuration.
This object requires at least one of the following attributes: on_day_of_every_month, on_position_of_day_of_every_month.
No
    ↳ on_day_of_every_month An object of on_day_of_every_month configuration.
This object requires the following attributes: day, every_month.
No
      ↳ day A positive integer value between 1 - 31. (To repeat this specific day) Yes
      ↳ every_month A positive integer value. (To repeat every N months) Yes
    ↳ on_position_of_day_of_every_month An object of on_position_of_day_of_every_month configuration.
This object requires the following attributes: position, day, every_month.
No
      ↳ position A week day position. (To repeat in this specific position)
Possible values: "First", "Second", "Third", "Fourth", "Last".
Yes
      ↳ day A week day. (To repeat in this specific day)
Possible values: "MO", "TU", "WE", "TH", "FR", "SA", "SU".
Yes
      ↳ every_month A positive integer value. (To repeat every N months) Yes
  ↳ year An object of year configuration.
This object requires the following attributes: every_year.
This object requires at least one of the following attributes: day_of_month, on_position_of_day_of_month.
No
    ↳ every_year A positive integer value. (To repeat every N years) Yes
    ↳ day_of_month An object of day_of_month configuration.
This object requires the following attributes: day, month.
No
      ↳ day A positive integer value between 1 - 31. (To repeat this specific day) Yes
      ↳ month A positive integer value. 1 - 12 (To repeat this specific month) Yes
    ↳ on_position_of_day_of_month An object of on_position_of_day_of_month configuration.
This object requires the following attributes: position, day, month.
Yes
      ↳ position A week day position. (To repeat in this specific position)
Possible values: "First", "Second", "Third", "Fourth", "Last".
Yes
      ↳ day A week day. (To repeat in this specific day)
Possible values: "MO", "TU", "WE", "TH", "FR", "SA", "SU".
Yes
      ↳ month A positive integer value. 1 - 12 (To repeat this specific month) Yes
↳ range An object of range configuration for recurrence.
This object requires the following attributes: start_date.
This object requires at least one of the following attributes: end_after, end_by.
Yes
  ↳ start_date The range start date.
Organisation Date Format (e.g. d-m-Y => 09-02-2024).
Yes
  ↳ end_after A positive integer value. (The range end after N ocurrences) No
  ↳ end_by The range end by date.
Organisation Date Format (e.g. d-m-Y => 09-02-2024).
No
holidays_recurr A JSON String of an array of dates to exclude of the recurrence dates
Organisation Date Format (e.g. d-m-Y => ["09-02-2024", "10-02-2024"]).
No
flag_out_of_hours This value is not mandatory but this endpoint could answer with a flag confirmation {confirm: "flag_out_of_hours"}.
If flag is required will be necessary to send "Yes" to confirm that user agreed to add events out of Business hours
Conditional
meeting_url_type A flag to know if there is created a meeting.
Possible Values: "zoom", "team"
No
zoom_meeting A JSON String of a config object for meeting_url_type = zoom.
This object requires the following attributes: meeting_id, operator_id.
Conditional
↳ meeting_id A string value. Yes
↳ operator_id A string value. Yes
Response Structure

A JSON object with the following attributes: success, message, error_type, confirm, data.

Attribute Value Mandatory
success A boolean value. "true" for success event creation. "false" for failed event creation. Yes
message A string message about the success value. Yes
error_type A (string | null) value. An identifier used to show customized error data.
Possible values:
 null = Simple text message (Use message attribute)
 simple_list = Simple text message + Simple list (Use message and data attributes)
 unavailable_employees = Simple text message + Customized table (Use message and data attributes)
 unavailable_resources = Simple text message + Customized table (Use message and data attributes)
Yes
confirm A flag confirmation returned when the user needs to confirm a validation.
A (string | null) value. An identifier used to show customized confirm data.
Possible values:
 null = Action no required.
 flag_out_of_hours = Simple text message + Simple list (Use message and data attributes)

If the user agreed? Will be necessary re-send all request data including the flag [confirm] = 'Yes'. (e.g. flag_out_of_hours = 'Yes')
Yes
data The available request result data. Yes
Failed Response
      
{ "success": false, "message": "The following resources are not available", "errors_type": "unavailable_resources", "confirm": null, "data": [ { "appointment_id": "3948", "appointment_name": "Test", "reservation_resource_date_start": "01-01-2024 12:30 pm", "reservation_resource_date_end": "01-01-2024 1:30 pm", "offices_department_name": "Office 1", "office_resource_id": "2", "office_resource_name": "Car", "office_resource_group": "Vehicles" }, { "appointment_id": "3948", "appointment_name": "Test", "reservation_resource_date_start": "01-01-2024 12:30 pm", "reservation_resource_date_end": "01-01-2024 1:30 pm", "offices_department_name": "Office 1", "office_resource_id": "3", "office_resource_name": "Conference Room", "office_resource_group": "Rooms" }, ]
}
Success Response
      
{ "success": true, "message": "2 event(s) created.", "errors_type": null, "confirm": null, "data": { "appointmentIds": [ 3946, 3947 ] }
}

10. Delete event (api1/appointments/delete)

This method will allow to delete a event or recurrent events.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/delete DELETE
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/delete DELETE
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Query Params (As it's DELETE method this need to go on the x-www-form-urlencoded)
Parameter Value Mandatory
id Event ID. (i.e.: 1) Yes
criteria Criteria for recurrent events, the default is 'this', 'following' will delete the current event too. (options: this, following, all) No
Failed Response

    {
      "success": false,
      "response": "You don't have permission to delete events"
    }
    
Success Response

    {
      "success": true,
      "response": "Appointment(s) successfuly deleted"
    }
    

11. Edit Event (api1/appointments/edit_event)

This method will allow to edit appointments/events in IInsight.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/edit_event PUT
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/edit_event PUT
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Query Params (As it's PUT method this need to go on the x-www-form-urlencoded)
Parameter Value Mandatory
title An event title Yes
description An event description No
start_date The event start date.
Organisation Date Format (e.g. d-m-Y => 09-02-2024).
Yes
finish_date The event finish date.
Organisation Date Format (e.g. d-m-Y => 09-02-2024).
Yes
start_time The event start time.
Format: "h:i a" (e.g. 01:30 pm)
Yes
finish_time The event finish time.
Format: "h:i a" (e.g. 01:30 pm)
Yes
buffer_before The event buffer before value in minutes.
A positive integer value (e.g. 15).
No
buffer_after The event buffer after value in minutes.
A positive integer value (e.g. 15).
No
time_zone A valid time zone (e.g. Australia/Sydney) Yes
can_overlap A flag value (Yes/No) Yes
is_recurrent A flag value (Yes/No)
If "Yes". Then "recurrence" will be required.
Note 1: Just a non-recurring event can be changed to recurrent.
Note 2: A recurring event cannot be converted to a non-recurring event.
Yes
all_day_event A flag value (Yes/No) Yes
employees A JSON String of an array of employee ids (e.g. [1, 2]) Yes
category A valid category id (list option id)
list_type_name = appointments_categories
Yes
status A valid status id (list option id)
list_type_name = appointments_status
Yes
case_number A valid case client id No
location_id A valid location id Yes
direction_id A valid direction id No
office_resources A JSON String of an array of office resource ids belonging to sent location (e.g. [1, 2])
Locations: Client Address and Other have not resources.
No
recurrence Required if "is_recurrent" is "Yes".
A JSON String of an object config for recurrence.
This object requires the following attributes: pattern, range.
Conditional
↳ pattern An object of possible patterns for recurrence.
This object requires at least one of the following attributes: day, week, month, year.
Yes
  ↳ day An object of day configuration.
This object requires at least one of the following attributes: every_day, every_week.
No
    ↳ every_day A positive integer value between 1 - 7. (To repeat every N days) No
    ↳ every_week A true boolean value. (To repeat every week) No
  ↳ week An object of week configuration.
This object requires the following attributes: every_week, days.
No
    ↳ every_week A positive integer value. (To repeat every N weeks) Yes
    ↳ days An array of days configuration.
Possible values: "MO", "TU", "WE", "TH", "FR", "SA", "SU".
Yes
  ↳ month An object of month configuration.
This object requires at least one of the following attributes: on_day_of_every_month, on_position_of_day_of_every_month.
No
    ↳ on_day_of_every_month An object of on_day_of_every_month configuration.
This object requires the following attributes: day, every_month.
No
      ↳ day A positive integer value between 1 - 31. (To repeat this specific day) Yes
      ↳ every_month A positive integer value. (To repeat every N months) Yes
    ↳ on_position_of_day_of_every_month An object of on_position_of_day_of_every_month configuration.
This object requires the following attributes: position, day, every_month.
No
      ↳ position A week day position. (To repeat in this specific position)
Possible values: "First", "Second", "Third", "Fourth", "Last".
Yes
      ↳ day A week day. (To repeat in this specific day)
Possible values: "MO", "TU", "WE", "TH", "FR", "SA", "SU".
Yes
      ↳ every_month A positive integer value. (To repeat every N months) Yes
  ↳ year An object of year configuration.
This object requires the following attributes: every_year.
This object requires at least one of the following attributes: day_of_month, on_position_of_day_of_month.
No
    ↳ every_year A positive integer value. (To repeat every N years) Yes
    ↳ day_of_month An object of day_of_month configuration.
This object requires the following attributes: day, month.
No
      ↳ day A positive integer value between 1 - 31. (To repeat this specific day) Yes
      ↳ month A positive integer value. 1 - 12 (To repeat this specific month) Yes
    ↳ on_position_of_day_of_month An object of on_position_of_day_of_month configuration.
This object requires the following attributes: position, day, month.
Yes
      ↳ position A week day position. (To repeat in this specific position)
Possible values: "First", "Second", "Third", "Fourth", "Last".
Yes
      ↳ day A week day. (To repeat in this specific day)
Possible values: "MO", "TU", "WE", "TH", "FR", "SA", "SU".
Yes
      ↳ month A positive integer value. 1 - 12 (To repeat this specific month) Yes
↳ range An object of range configuration for recurrence.
This object requires the following attributes: start_date.
This object requires at least one of the following attributes: end_after, end_by.
Yes
  ↳ start_date The range start date.
Organisation Date Format (e.g. d-m-Y => 09-02-2024).
Yes
  ↳ end_after A positive integer value. (The range end after N ocurrences) No
  ↳ end_by The range end by date.
Organisation Date Format (e.g. d-m-Y => 09-02-2024).
No
holidays_recurr A JSON String of an array of dates to exclude of the recurrence dates
Organisation Date Format (e.g. d-m-Y => ["09-02-2024", "10-02-2024"]).
No
flag_out_of_hours This value is not mandatory but this endpoint could answer with a flag confirmation {confirm: "flag_out_of_hours"}.
If flag is required will be necessary to send "Yes" to confirm that user agreed to add events out of Business hours
Conditional
recurrence_flag An integer value used when a recurring event is beign updated. (e.g. 1)
This is a flag used to know how the edition will affect the recurrence.
Possible Values: 0.- This event, 1.- This and following events, 2.- All events.
Conditional
meeting_url_type A flag to know if there is created a meeting.
Possible Values: "zoom", "team"
No
zoom_meeting A JSON String of a config object for meeting_url_type = zoom.
This object requires the following attributes: meeting_id, operator_id.
Conditional
↳ meeting_id A string value. Yes
↳ operator_id A string value. Yes
Response Structure

A JSON object with the following attributes: success, message, error_type, confirm, data.

Attribute Value Mandatory
success A boolean value. "true" for success event edition. "false" for failed event edition. Yes
message A string message about the success value. Yes
error_type A (string | null) value. An identifier used to show customized error data.
Possible values:
 null = Simple text message (Use message attribute)
 simple_list = Simple text message + Simple list (Use message and data attributes)
 unavailable_employees = Simple text message + Customized table (Use message and data attributes)
 unavailable_resources = Simple text message + Customized table (Use message and data attributes)
Yes
confirm A flag confirmation returned when the user needs to confirm a validation.
A (string | null) value. An identifier used to show customized confirm data.
Possible values:
 null = Action no required.
 flag_out_of_hours = Simple text message + Simple list (Use message and data attributes)

If the user agreed? Will be necessary re-send all request data including the flag [confirm] = 'Yes'. (e.g. flag_out_of_hours = 'Yes')
Yes
data The available request result data. Yes
Failed Response
      
{ "success": false, "message": "The following resources are not available", "errors_type": "unavailable_resources", "confirm": null, "data": [ { "appointment_id": "3948", "appointment_name": "Test", "reservation_resource_date_start": "01-01-2024 12:30 pm", "reservation_resource_date_end": "01-01-2024 1:30 pm", "offices_department_name": "Office 1", "office_resource_id": "2", "office_resource_name": "Car", "office_resource_group": "Vehicles" }, { "appointment_id": "3948", "appointment_name": "Test", "reservation_resource_date_start": "01-01-2024 12:30 pm", "reservation_resource_date_end": "01-01-2024 1:30 pm", "offices_department_name": "Office 1", "office_resource_id": "3", "office_resource_name": "Conference Room", "office_resource_group": "Rooms" }, ]
}
Success Response
      
{ "success": true, "message": "2 event(s) edited.", "errors_type": null, "confirm": null, "data": { "appointmentIds": [ 3946, 3947 ] }
}

12. Recurrence Days (api1/appointments/recurrence_days)

This method returns a list of recurrence days for a given recurrence config.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/recurrence_days GET
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/recurrence_days GET
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Query Params
Parameter Value Mandatory
recurrence Required if "is_recurrent" is "Yes".
A JSON String of an object config for recurrence.
This object requires the following attributes: pattern, range.
Conditional
↳ pattern An object of possible patterns for recurrence.
This object requires at least one of the following attributes: day, week, month, year.
Yes
  ↳ day An object of day configuration.
This object requires at least one of the following attributes: every_day, every_week.
No
    ↳ every_day A positive integer value between 1 - 7. (To repeat every N days) No
    ↳ every_week A true boolean value. (To repeat every week) No
  ↳ week An object of week configuration.
This object requires the following attributes: every_week, days.
No
    ↳ every_week A positive integer value. (To repeat every N weeks) Yes
    ↳ days An array of days configuration.
Possible values: "MO", "TU", "WE", "TH", "FR", "SA", "SU".
Yes
  ↳ month An object of month configuration.
This object requires at least one of the following attributes: on_day_of_every_month, on_position_of_day_of_every_month.
No
    ↳ on_day_of_every_month An object of on_day_of_every_month configuration.
This object requires the following attributes: day, every_month.
No
      ↳ day A positive integer value between 1 - 31. (To repeat this specific day) Yes
      ↳ every_month A positive integer value. (To repeat every N months) Yes
    ↳ on_position_of_day_of_every_month An object of on_position_of_day_of_every_month configuration.
This object requires the following attributes: position, day, every_month.
No
      ↳ position A week day position. (To repeat in this specific position)
Possible values: "First", "Second", "Third", "Fourth", "Last".
Yes
      ↳ day A week day. (To repeat in this specific day)
Possible values: "MO", "TU", "WE", "TH", "FR", "SA", "SU".
Yes
      ↳ every_month A positive integer value. (To repeat every N months) Yes
  ↳ year An object of year configuration.
This object requires the following attributes: every_year.
This object requires at least one of the following attributes: day_of_month, on_position_of_day_of_month.
No
    ↳ every_year A positive integer value. (To repeat every N years) Yes
    ↳ day_of_month An object of day_of_month configuration.
This object requires the following attributes: day, month.
No
      ↳ day A positive integer value between 1 - 31. (To repeat this specific day) Yes
      ↳ month A positive integer value. 1 - 12 (To repeat this specific month) Yes
    ↳ on_position_of_day_of_month An object of on_position_of_day_of_month configuration.
This object requires the following attributes: position, day, month.
Yes
      ↳ position A week day position. (To repeat in this specific position)
Possible values: "First", "Second", "Third", "Fourth", "Last".
Yes
      ↳ day A week day. (To repeat in this specific day)
Possible values: "MO", "TU", "WE", "TH", "FR", "SA", "SU".
Yes
      ↳ month A positive integer value. 1 - 12 (To repeat this specific month) Yes
↳ range An object of range configuration for recurrence.
This object requires the following attributes: start_date.
This object requires at least one of the following attributes: end_after, end_by.
Yes
  ↳ start_date The range start date.
Organisation Date Format (e.g. d-m-Y => 09-02-2024).
Yes
  ↳ end_after A positive integer value. (The range end after N ocurrences) No
  ↳ end_by The range end by date.
Organisation Date Format (e.g. d-m-Y => 09-02-2024).
No
holidays_recurr A JSON String of an array of dates to exclude of the recurrence dates
Organisation Date Format (e.g. d-m-Y => ["09-02-2024", "10-02-2024"]).
No
Response Structure

A JSON object with the following attributes: success, message, error_type, confirm, data.

Attribute Value Mandatory
success A boolean value. "true" for success generation. "false" for failed generation. Yes
message A string message about the success value. Yes
data The available request result data. Yes
Failed Response
      
{ "success": false, "message": "Please provide a valid month number", "data": null
}
Success Response
      
{ "success": true, "message": "Success Generation", "data": [ { "date": "01-01-2024", "day": "Monday", "excluded": true }, { "date": "05-01-2026", "day": "Monday", "excluded": false }, { "date": "03-01-2028", "day": "Monday", "excluded": false } ]
}

13. List case appointments (api1/appointments/by_case_id)

This method returns a list appointments linked to a case.

URL
Server URL HTTP type
UAT https://api-uk-uat.iinsightonline.com/api1/appointments/by_case_id GET
PRODUCTION https://api-uk.iinsightonline.com/api1/appointments/by_case_id GET
Authorization
Parameter Value Mandatory
Type Bearer Token Yes
Token The token is generated using the /auth/login method Yes
Query Params
Parameter Value Mandatory
id Case id Yes
Response
      
{ "success": true, "data": [ { "id" => "1", "name" => "start date - appointment title" }, { "id" => "2", "name" => "start date - appointment title" }, ]
}