Events within Trackops are not required to be connected to a case or a subject.
Returns a collection of event records, optionally filtered by the available request parameters.
Available Request Parameters:
|id||integer||no||ID of the event.|
|title||string||no||Title/name of the event.|
|calendar||integer||no||ID of the calendar the event is assigned to.|
|case||integer||no||ID of the case connected to this event.|
|subject||integer||no||ID of the subject associated with this event.|
|is_allday||boolean||no||When true, only include "all day" events.|
|start_from||timestamp||no||Event starts on or after the date (Alias: From).|
|start_to||timestamp||no||Event starts on or before the date (Alias: To).|
|end_from||timestamp||no||Event ends on or after the date.|
|end_to||timestamp||no||Event ends on or before the date.|
|alert_from||timestamp||no||Event alert is scheduled on or after the date.|
|alert_to||timestamp||no||Event alert is scheduled on or before the date.|
|alert_sent_from||timestamp||no||Event alert was delivered on or after the date.|
|alert_sent_to||timestamp||no||Event alert was delivered on or before the date.|
|created_from||timestamp||no||Created on or after the date, as determined by the system.|
|created_to||timestamp||no||Created on or before the date, as determined by the system.|
|updated_from||timestamp||no||Updated on or after the date, as determined by the system.|
|updated_to||timestamp||no||Updated on or before the date, as determined by the system.|
Note: All timestamp parameters are queried and returned in UTC.
Getting an Event
Returns a single event record, based on the numeric ID.
Creating an Event
Creates a new event based on the given criteria. Upon success, returns an event object. See the example request at the bottom of this section for a better idea of how a fully formed request should look.
|casefile_id||integer||yes||The ID of the case this event is connected to.|
|calendar_id||integer||yes||The ID of the calendar associated with this event.|
|subject_id||integer||no||The ID subject that this event is connected to. Note: The subject must be connected to the same `casefile_id` as the event.|
|case_service_id||integer||no||The ID of the case service being performed on this event.|
|timestamp||yes||The start date and time in ISO format. This value should be set in UTC.|
|end_at||timestamp||yes||The end date and time in ISO format. This value should be set in UTC.|
|is_allday||boolean||no||Determines if this event is considered an "all day" calendar event.|
|timezone||no||The timezone this event is scheduled for. Timezones should be defined in Region/Locale format (e.g. America/New_York). A full list of timezones is available here.|
|title||string||yes||The name of the event.|
|body||string||no||The description and/or notes for the event.|
An address object, with the following properties:
Note: See below for an address reference.
|users_list||collection||no||An array of staff IDs that should be assigned to this event.|
Address Field Object Reference
Addresses are comprised of an `address` object with a collection of properties. The two fields to pay close attention to are the `state` and `country` fields. Both of these may have specific requirements.
- If the country is set as US (United States), the state code must be a 2-character ANSI US state code.
- If the country is set to CA (Canada), the state code must be a 2-character Canadian province code.
- If the country is set to AU (Australia), the state code must be a 3-character Australian state abbreviation codes.
- If the country is none of the above, it can be left blank or set to a custom value.
- The country must be defined as a 2-character country code.
Example Address Object
"address_1": "2000 Blake Street",
Example New Event Request
A new event is created by POSTing a JSON object to the specified end point using the above criteria. The JSON object must contain the required fields (as shown above) and must be nested under a event object. See the following example request:
"start_at": "2023-01-30 18:00:00",
"end_at": "2023-01-30 22:00:00",
"title": "Test API Event",
"body": "this is a test from the API",
"address_1": "2000 Blake Street",
"users_list": [1, 2, 3]
Note: The above request is for demonstration purposes only, your implementation will require unique data provided by your account.