### List Events Response Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi Example JSON response containing a list of event objects. ```json { "events": [ { "id": "999", "type": "1", "is_type_blocked": false, "is_type_customer": true, "is_type_lead": false, "is_type_work_order": false, "work_order_id": "0", "customer": { "id": "19321", "display_name": "John Doe", "first_name": "John", "last_name": "Doe", "email": "johndoe@test.com", "phone": "2123334444" }, "location": { "address": "300 North Los Angeles Street", "address_secondary": "Suite 10", "city": "Los Angeles", "state": "CA", "zip": "90012" }, "name": "Carpet Cleaning", "datetime_start": "2021-03-12 10:00:00", "datetime_start_iso": "2021-03-12T10:00:00-05:00", "datetime_end": "2021-03-12 11:00:00", "datetime_end_iso": "2021-03-12T11:00:00-05:00", "timezone": "America/New_York", "timezone_text": "Eastern Time (UTC -4)", "color": { "id": 1, "code": "#4cb052" }, "all_day": false, "notify_at": "PT2H", "notify_at_text": "2 hours before", "notes": "Has 2 dogs", "is_recurring": false, "datetime_added": "2021-03-16T02:48:36+00:00", "datetime_updated": null }, ] } ``` -------------------------------- ### Get Event Details Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi Retrieves specific event information using a GET request. ```curl curl --location -g '{{url}}/connect/api/v1/events/958' \ --header 'Markate-Version: {{markate_version}}' ``` -------------------------------- ### List Events Request Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi Example cURL request to fetch events within a specified date range. ```curl curl --location -g '{{url}}/connect/api/v1/events?date_start=2021-01-01&date_end=2021-04-01' \ --header 'Markate-Version: {{markate_version}}' ``` -------------------------------- ### GET /connect/api/v1/events/{id} Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi Retrieves the details of a specific event using its ID. ```APIDOC ## GET /connect/api/v1/events/{id} ### Description Retrieves the details of a specific event using its ID. ### Method GET ### Endpoint {{url}}/connect/api/v1/events/{id} ### Headers - **Markate-Version** (string) - Required - The API version. - **Authorization** (string) - Required - Bearer Token ### Path Parameters - **id** (string) - Required - The ID of the event to retrieve. ### Request Example ```curl curl --location -g '{{url}}/connect/api/v1/events/958' \ --header 'Markate-Version: {{markate_version}}' ``` ### Response #### Success Response (200) - **event** (object) - Contains the event details. - **id** (string) - The event ID. - **type** (string) - The event type. - **is_type_blocked** (boolean) - Indicates if the event type is blocked. - **is_type_customer** (boolean) - Indicates if the event type is for a customer. - **is_type_lead** (boolean) - Indicates if the event type is for a lead. - **is_type_work_order** (boolean) - Indicates if the event type is a work order. - **work_order_id** (string) - The associated work order ID. - **customer** (object) - Customer details. - **id** (string) - Customer ID. - **display_name** (string) - Customer display name. - **first_name** (string) - Customer first name. - **last_name** (string) - Customer last name. - **email** (string) - Customer email. - **phone** (string) - Customer phone number. - **location** (object) - Location details. - **address** (string) - Street address. - **address_secondary** (string) - Secondary address information. - **city** (string) - City. - **state** (string) - State. - **zip** (string) - Zip code. - **name** (string) - The name of the event. - **datetime_start** (string) - The start date and time of the event. - **datetime_start_iso** (string) - The start date and time in ISO format. - **datetime_end** (string) - The end date and time of the event. - **datetime_end_iso** (string) - The end date and time in ISO format. - **timezone** (string) - The timezone of the event. - **timezone_text** (string) - Textual representation of the timezone. - **color** (object) - Color details. - **id** (integer) - Color ID. - **code** (string) - Hex color code. - **all_day** (boolean) - Indicates if the event is an all-day event. - **notify_at** (string) - Notification time interval. - **notify_at_text** (string) - Textual representation of the notification time. - **notes** (string) - Notes for the event. - **is_recurring** (boolean) - Indicates if the event is recurring. - **datetime_added** (string) - The date and time the event was added. - **datetime_updated** (string or null) - The date and time the event was last updated. #### Response Example ```json { "event": { "id": "958", "type": "1", "is_type_blocked": false, "is_type_customer": true, "is_type_lead": false, "is_type_work_order": false, "work_order_id": "0", "customer": { "id": "3142", "display_name": "Aisha Voss", "first_name": "Aisha", "last_name": "Voss", "email": "aisha@gmail.com", "phone": "6232995971" }, "location": { "address": "55 Fruit Street", "address_secondary": "", "city": "Boston", "state": "MA", "zip": "02114" }, "name": "F", "datetime_start": "2021-01-08 21:00:00", "datetime_start_iso": "2021-01-08T21:00:00-05:00", "datetime_end": "2021-01-08 22:00:00", "datetime_end_iso": "2021-01-08T22:00:00-05:00", "timezone": "America/New_York", "timezone_text": "Eastern Time (UTC -4)", "color": { "id": 1, "code": "#4cb052" }, "all_day": false, "notify_at": "PT5M", "notify_at_text": "5 minutes before", "notes": "", "is_recurring": false, "datetime_added": "2021-01-09T02:34:45+00:00", "datetime_updated": null } } ``` ``` -------------------------------- ### GET /connect/api/v1/events/ical Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi Retrieves a list of events in iCal format for a specified date range. ```APIDOC ## GET /connect/api/v1/events/ical ### Description Retrieves a list of events in iCal format. The response is limited to a maximum of 400 events, and the date range interval must not exceed 93 days. ### Method GET ### Endpoint /connect/api/v1/events/ical ### Parameters #### Query Parameters - **date_start** (string) - Required - Start date of the range (e.g., YYYY-MM-DD) - **date_end** (string) - Required - End date of the range (e.g., YYYY-MM-DD) - **work_order_id** (string) - Optional - Filter by work order ID - **employee_id** (string) - Optional - Filter by employee ID ``` -------------------------------- ### GET /connect/api/v1/events Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi Retrieves a list of events within a specified date range. The interval between date_start and date_end cannot exceed 93 days, and the response is limited to a maximum of 400 events. ```APIDOC ## GET /connect/api/v1/events ### Description Retrieves a list of events within a specified date range. The interval between date_start and date_end cannot exceed 93 days, and the response is limited to a maximum of 400 events. ### Method GET ### Endpoint {{url}}/connect/api/v1/events ### Parameters #### Query Parameters - **date_start** (string) - Required - Format yyyy-mm-dd, get all events starting from this date - **date_end** (string) - Required - Format yyyy-mm-dd, get all events up to this date - **work_order_id** (int) - Optional - Filter by work order - **employee_id** (int) - Optional - Filter by employee ### Request Example curl --location -g '{{url}}/connect/api/v1/events?date_start=2021-01-01&date_end=2021-04-01' \ --header 'Markate-Version: {{markate_version}}' ### Response #### Success Response (200) - **events** (array) - A list of Event objects #### Response Example { "events": [ { "id": "999", "type": "1", "is_type_blocked": false, "is_type_customer": true, "is_type_lead": false, "is_type_work_order": false, "work_order_id": "0", "customer": { "id": "19321", "display_name": "John Doe", "first_name": "John", "last_name": "Doe", "email": "johndoe@test.com", "phone": "2123334444" }, "location": { "address": "300 North Los Angeles Street", "address_secondary": "Suite 10", "city": "Los Angeles", "state": "CA", "zip": "90012" }, "name": "Carpet Cleaning", "datetime_start": "2021-03-12 10:00:00", "datetime_start_iso": "2021-03-12T10:00:00-05:00", "datetime_end": "2021-03-12 11:00:00", "datetime_end_iso": "2021-03-12T11:00:00-05:00", "timezone": "America/New_York", "timezone_text": "Eastern Time (UTC -4)", "color": { "id": 1, "code": "#4cb052" }, "all_day": false, "notify_at": "PT2H", "notify_at_text": "2 hours before", "notes": "Has 2 dogs", "is_recurring": false, "datetime_added": "2021-03-16T02:48:36+00:00", "datetime_updated": null } ] } ``` -------------------------------- ### POST /connect/api/v1/events Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi Creates a new event with specified details. ```APIDOC ## POST /connect/api/v1/events ### Description Creates a new event with specified details. ### Method POST ### Endpoint {{url}}/connect/api/v1/events ### Headers - **Markate-Version** (string) - Required - The API version. - **Authorization** (string) - Required - Bearer Token - **Content-Type** (string) - Required - application/x-www-form-urlencoded ### Request Body - **type** (integer) - Required - Allowed values 1 for normal event, 2 for work order event. - **customer_id** (integer) - Required - The customer ID. - **employee_id** (integer) - Optional - Assign the event to an employee. - **name** (string) - Required - Event name. - **datetime_start** (string) - Required - Event start date and time. - **datetime_end** (string) - Required - Event end date and time. - **all_day** (integer) - Required - Default 0. If set to 1, datetime_start and datetime_end times will be ignored. - **timezone** (string) - Optional - If not set, the default timezone will be used. - **color_id** (integer) - Required - A color ID, default 1. - **notify_at** (string) - Optional - A date-time interval. Defaults to user settings if not set. - **notes** (string) - Optional - Notes for the event. ### Request Example ```curl curl --location -g '{{url}}/connect/api/v1/events' \ --header 'Markate-Version: {{markate_version}}' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'type=1' \ --data-urlencode 'customer_id=19321' \ --data-urlencode 'name=Carpet Cleaning' \ --data-urlencode 'datetime_start=2021-03-12 10:00:00' \ --data-urlencode 'datetime_end=2021-03-12 11:00:00' \ --data-urlencode 'all_day=0' \ --data-urlencode 'color_id=1' \ --data-urlencode 'notify_at=PT2H' \ --data-urlencode 'notes=Has 2 dogs' ``` ### Response #### Success Response (200) - **event** (object) - Contains the created event details. - **id** (string) - The event ID. - **type** (string) - The event type. - **is_type_blocked** (boolean) - Indicates if the event type is blocked. - **is_type_customer** (boolean) - Indicates if the event type is for a customer. - **is_type_lead** (boolean) - Indicates if the event type is for a lead. - **is_type_work_order** (boolean) - Indicates if the event type is a work order. - **work_order_id** (string) - The associated work order ID. - **customer** (object) - Customer details. - **id** (string) - Customer ID. - **display_name** (string) - Customer display name. - **first_name** (string) - Customer first name. - **last_name** (string) - Customer last name. - **email** (string) - Customer email. - **phone** (string) - Customer phone number. - **location** (object) - Location details. - **address** (string) - Street address. - **address_secondary** (string) - Secondary address information. - **city** (string) - City. - **state** (string) - State. - **zip** (string) - Zip code. - **name** (string) - The name of the event. - **datetime_start** (string) - The start date and time of the event. - **datetime_start_iso** (string) - The start date and time in ISO format. - **datetime_end** (string) - The end date and time of the event. - **datetime_end_iso** (string) - The end date and time in ISO format. - **timezone** (string) - The timezone of the event. - **timezone_text** (string) - Textual representation of the timezone. - **color** (object) - Color details. - **id** (integer) - Color ID. - **code** (string) - Hex color code. - **all_day** (boolean) - Indicates if the event is an all-day event. - **notify_at** (string) - Notification time interval. - **notify_at_text** (string) - Textual representation of the notification time. - **notes** (string) - Notes for the event. - **is_recurring** (boolean) - Indicates if the event is recurring. - **datetime_added** (string) - The date and time the event was added. - **datetime_updated** (string or null) - The date and time the event was last updated. #### Response Example ```json { "event": { "id": "999", "type": "1", "is_type_blocked": false, "is_type_customer": true, "is_type_lead": false, "is_type_work_order": false, "work_order_id": "0", "customer": { "id": "19321", "display_name": "John Doe", "first_name": "John", "last_name": "Doe", "email": "johndoe@test.com", "phone": "2123334444" }, "location": { "address": "300 North Los Angeles Street", "address_secondary": "Suite 10", "city": "Los Angeles", "state": "CA", "zip": "90012" }, "name": "Carpet Cleaning", "datetime_start": "2021-03-12 10:00:00", "datetime_start_iso": "2021-03-12T10:00:00-05:00", "datetime_end": "2021-03-12 11:00:00", "datetime_end_iso": "2021-03-12T11:00:00-05:00", "timezone": "America/New_York", "timezone_text": "Eastern Time (UTC -4)", "color": { "id": 1, "code": "#4cb052" }, "all_day": false, "notify_at": "PT2H", "notify_at_text": "2 hours before", "notes": "Has 2 dogs", "is_recurring": false, "datetime_added": "2021-03-16T02:48:36+00:00", "datetime_updated": null } } ``` ``` -------------------------------- ### Create New Event Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi Creates a new event using a POST request with form-urlencoded data. ```curl curl --location -g '{{url}}/connect/api/v1/events' \ --header 'Markate-Version: {{markate_version}}' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'type=1' \ --data-urlencode 'customer_id=19321' \ --data-urlencode 'name=Carpet Cleaning' \ --data-urlencode 'datetime_start=2021-03-12 10:00:00' \ --data-urlencode 'datetime_end=2021-03-12 11:00:00' \ --data-urlencode 'all_day=0' \ --data-urlencode 'color_id=1' \ --data-urlencode 'notify_at=PT2H' \ --data-urlencode 'notes=Has 2 dogs' ``` -------------------------------- ### POST /connect/api/v1/events/{id} Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi Updates an existing event record. Supports both sparse updates and full object updates. ```APIDOC ## POST /connect/api/v1/events/{id} ### Description Updates an existing event. You can provide a sparse object to update specific fields or a full object. ### Method POST ### Endpoint {{url}}/connect/api/v1/events/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the event to update. #### Request Body - **name** (string) - Optional - The name of the event. - **datetime_start** (string) - Optional - Start date and time (format: YYYY-MM-DD HH:MM:SS). - **datetime_end** (string) - Optional - End date and time (format: YYYY-MM-DD HH:MM:SS). - **timezone** (string) - Optional - The timezone for the event. - **employee_id** (int) - Optional - The ID of the employee assigned to the event. - **all_day** (int) - Optional - Flag indicating if the event is all day (0 or 1). - **color_id** (int) - Optional - The color ID for the event. - **notify_at** (string) - Optional - Notification time offset (e.g., PT2H). - **notes** (string) - Optional - Additional notes for the event. ### Request Example curl --location -g '{{url}}/connect/api/v1/events/2281' \ --header 'Markate-Version: {{markate_version}}' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'name=Carpet Cleaning updated' \ --data-urlencode 'employee_id=394' ### Response #### Success Response (200) - This request does not return a response body. ``` -------------------------------- ### Retrieve iCal events list Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi Fetches a list of events in iCal format. Requests are limited to a maximum of 400 events and a date range interval of 93 days. ```cURL {{url}}/connect/api/v1/events/ical?date_start=2023-05-01 &date_end=2023-05-31&work_order_id=&employee_id= ``` -------------------------------- ### Event Response Structure Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi The JSON structure returned by the event API endpoints. ```json { "event": { "id": "958", "type": "1", "is_type_blocked": false, "is_type_customer": true, "is_type_lead": false, "is_type_work_order": false, "work_order_id": "0", "customer": { "id": "3142", "display_name": "Aisha Voss", "first_name": "Aisha", "last_name": "Voss", "email": "aisha@gmail.com", "phone": "6232995971" }, "location": { "address": "55 Fruit Street", "address_secondary": "", "city": "Boston", "state": "MA", "zip": "02114" }, "name": "F", "datetime_start": "2021-01-08 21:00:00", "datetime_start_iso": "2021-01-08T21:00:00-05:00", "datetime_end": "2021-01-08 22:00:00", "datetime_end_iso": "2021-01-08T22:00:00-05:00", "timezone": "America/New_York", "timezone_text": "Eastern Time (UTC -4)", "color": { "id": 1, "code": "#4cb052" }, "all_day": false, "notify_at": "PT5M", "notify_at_text": "5 minutes before", "notes": "", "is_recurring": false, "datetime_added": "2021-01-09T02:34:45+00:00", "datetime_updated": null } } ``` ```json { "event": { "id": "999", "type": "1", "is_type_blocked": false, "is_type_customer": true, "is_type_lead": false, "is_type_work_order": false, "work_order_id": "0", "customer": { "id": "19321", "display_name": "John Doe", "first_name": "John", "last_name": "Doe", "email": "johndoe@test.com", "phone": "2123334444" }, "location": { "address": "300 North Los Angeles Street", "address_secondary": "Suite 10", "city": "Los Angeles", "state": "CA", "zip": "90012" }, "name": "Carpet Cleaning", "datetime_start": "2021-03-12 10:00:00", "datetime_start_iso": "2021-03-12T10:00:00-05:00", "datetime_end": "2021-03-12 11:00:00", "datetime_end_iso": "2021-03-12T11:00:00-05:00", "timezone": "America/New_York", "timezone_text": "Eastern Time (UTC -4)", "color": { "id": 1, "code": "#4cb052" }, "all_day": false, "notify_at": "PT2H", "notify_at_text": "2 hours before", "notes": "Has 2 dogs", "is_recurring": false, "datetime_added": "2021-03-16T02:48:36+00:00", "datetime_updated": null } } ``` -------------------------------- ### Update Event v20210301 Source: https://documenter.getpostman.com/view/1022061/Tz5qYwJi Use this cURL command to update specific fields of an event. Ensure the access token and Markate version are correctly set. ```curl curl --location -g '{{url}}/connect/api/v1/events/2281' \ --header 'Markate-Version: {{markate_version}}' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'name=Carpet Cleaning updated' \ --data-urlencode 'employee_id=394' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.