Book appointment
create_appointmentBook a confirmed appointment (staff bookings skip the approval queue). startTime must be one get_availability offers for that type and date; any other time is rejected with conflict. Inactive appointment types can't be booked (not_found). Answer each required field from list_appointment_types. Emails the carrier a confirmation at contactEmail. Returns the new appointment. Requires scope appointments:write (Scheduler role or above).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Notes from the carrier or scheduler, visible to staff. | |
| doorId | No | Specific door to use. Only honored when the location assigns doors; omit to auto-pick. | |
| poNumbers | No | Every purchase order on this appointment, in order. Duplicates ignoring case are dropped. When set, this wins over poReference. | |
| startTime | Yes | A startTime returned by get_availability, unchanged. | |
| driverName | No | Driver's name. | |
| locationId | Yes | Location id, from list_locations. | |
| companyName | Yes | Carrier company name. | |
| contactName | No | Carrier contact person's name. | |
| driverNotes | No | Instructions for the driver. | |
| driverPhone | No | Driver's mobile; check-in texts go here when SMS check-in is on. | |
| poReference | No | One purchase order. Kept for older clients. Prefer poNumbers when the load has more than one. If both are sent, poNumbers wins. Sending only this replaces the list with this single value. | |
| contactEmail | Yes | Carrier contact email; confirmations and changes are emailed here. | |
| contactPhone | No | Carrier contact phone, e.g. +1 214 555 0100. | |
| customFields | No | Answers to the type's booking questions, keyed by fieldDefinitions[].key, e.g. { "sealNumber": "A123" }. A MULTI_TEXT question takes an array of strings, e.g. { "customerPo": ["4501", "4502"] }. | |
| trailerNumber | No | Trailer number. | |
| appointmentTypeId | Yes | Appointment type id, from list_appointment_types (get_location_setup also lists inactive types). |