Docs

Calendar and trips

API reference for calendars and calendar events - with their attendees and invitations - and for trips.

Calendars

EndpointDoes
GET calendars/read.phpLists the calendars events go on

It takes calendar_id, and archived - 1 to include archived calendars. Each has its calendar_id, calendar_name and calendar_color. Calendars are added with the + beside them on the calendar, and their subscription links stay there.

Events

EndpointDoes
GET events/read.phpLists events, or gets one with who is on it
POST events/create.phpPuts an event on a calendar
POST events/update.phpChanges an event, or who is on it
POST events/send.phpEmails the invitation
POST events/skip.phpSkips one day of a repeating event
POST events/delete.phpDeletes an event

An event with no client is anyone's, as on the calendar. A client's event needs the Clients area of the key's role: Read to see it - or the key's agent made it or is on it - Modify to make or change one, and Full to delete one (Modify for one its agent made). See Keys and permissions.

Read

ParameterDoes
event_idJust this event, with its attendees
calendar_idJust this calendar's
client_idJust this client's. 0 for those of no client.
from, toStarting on or after, and on or before, these days - such as 2026-11-01
limit, offsetPaging

A repeating event is one row: event_repeat - Day, Week, Month or Year - every event_repeat_interval, until event_repeat_until, without the days in event_repeat_skip. Each attendee has its kind - agent, contact or guest - name, email and invited_at, when it was sent the invitation.

Fields: event_id, event_title, event_location, event_description, event_start, event_end, event_all_day, event_repeat, event_repeat_interval, event_repeat_until, event_repeat_skip, event_sequence, event_created_at, event_updated_at, event_created_by, event_client_id, event_location_id, event_calendar_id, calendar_name.

Create

FieldNotes
event_titleRequired
event_calendar_idRequired - see Calendars
event_startRequired: 2026-11-20 14:00, or a day - 2026-11-20 - with event_all_day
event_endThe same. An hour after the start if you leave it out.
event_all_day1 for a whole-day event
client_idThe client it's for. Leave it out for one that's nobody's.
event_locationWhere, in words
event_location_idOne of the client's locations
event_description
event_repeat, event_repeat_interval, event_repeat_untilWeek and 2 is every other week. event_repeat_until is its last day.
attendee_user_idsAgents on it, by technician_id
attendee_contact_idsThe client's contacts on it
attendee_emailsAnyone else, by email - a list, or separated by commas
send_invites1 emails each of them an invitation for their calendar

The answer has invited, how many it was emailed to.

curl -X POST https://itflow.example.com/api/v1/events/create.php \
  -H "Content-Type: application/json" \
  -d '{"api_key": "YOUR_API_KEY", "client_id": 1, "event_title": "Onsite - patch panel cleanup", "event_calendar_id": 2, "event_start": "2026-11-20 14:00", "event_end": "2026-11-20 16:00", "attendee_user_ids": [2], "attendee_contact_ids": [1], "send_invites": 1}'

Update, send, skip and delete

Each takes event_id and client_id.

  • Update takes any of the fields under Create, and changes only what you send. client_id can move it to another client. Sending any of the attendee lists sets who is on it - a list you leave out stays. With send_invites, anyone new gets the invitation, those who have it get the change, and anyone taken off is told it's off for them. The answer has emailed.
  • Send emails the invitation, as Email the invitation does: to those not sent it yet, and again, as an update, to those who were. ITFlow has to send mail.
  • Skip takes date, one day of a repeating event to leave out, as Skip this one does. Those who have it get the series without that day.
  • Delete tells those who have it in their calendar that it's off.

Trips

EndpointDoes
GET trips/read.phpLists trips, or gets one
POST trips/create.phpLogs a trip
POST trips/update.phpChanges a trip
POST trips/delete.phpDeletes a trip

Anyone logs and changes their own trips. Seeing everyone's needs Read on Financial, logging or changing someone else's Modify, and deleting someone else's Full.

Read

ParameterDoes
trip_idJust this trip
client_idJust this client's. 0 for trips for no client.
user_idJust this driver's
from, toDriven on or after, and on or before, these days
limit, offsetPaging

Each trip has its driver_name and client_name. trip_miles is the whole trip - there and back for a round_trip.

Fields: trip_id, trip_date, trip_purpose, trip_source, trip_destination, trip_start_odometer, trip_end_odometer, trip_miles, round_trip, trip_own_vehicle, trip_expense_id, trip_billable, trip_invoice_id, trip_invoice_item_id, trip_created_at, trip_updated_at, trip_user_id, trip_client_id, trip_location_id, trip_ticket_id, trip_created_by, driver_name, client_name.

Create, update and delete

FieldNotes
trip_destinationRequired: where it went
trip_purposeRequired: what it was for
trip_milesThe distance one way - required without both odometer readings
trip_dateToday if you leave it out
trip_sourceWhere it started. Your company's address if you leave it out.
round_trip1 for there and back - the distance is doubled
trip_start_odometer, trip_end_odometerWhole numbers. With both, the distance is the difference.
client_idThe client it was for
trip_location_id, trip_ticket_idOne of the client's sites, and tickets
trip_user_idWho drove. The key's agent if you leave it out.
trip_own_vehicle1 for their own car, paid back for the distance
trip_billable1 to bill it to the client

Update takes trip_id and changes only what you send. A trip paid back for keeps its driver, vehicle and distance, and one billed its client and distance. Delete takes trip_id, and a trip paid back for or billed can't be deleted. A field that won't do is refused with 400 and why in message.

{ "api_key": "YOUR_API_KEY", "client_id": 1, "trip_source": "Office", "trip_destination": "Ravenwood Dental, 410 Grant St", "trip_purpose": "Patch panel cleanup", "trip_miles": 12.3, "round_trip": 1, "trip_billable": 1 }
↑↓ to pickEnter to open