Create itinerary item
segment_createCreate a new segment in a trip. FIRST call segment_get_schema to get the required fields for the segment type. Required in fields, besides trip_id: Flight airline (or a flightNumber starting with the airline code, e.g. UA 123), departureAirportCode, arrivalAirportCode, startDateTime; Lodging propertyName, startDateTime; Activity title, startDateTime; EventTicket eventName, startDateTime; CarRental rentalCompany, startDateTime; Train and Ferry operator, departureCity, arrivalCity, startDateTime; Transfer provider, pickupLocation, dropoffLocation, startDateTime; Parking facilityName, startDateTime; Note title; Poll title, options. Then provide the trip_id, segment_type, and fields matching the schema. Segment dates must fall within the parent trip dates. Dates up to 1 day outside the trip extend it, with a warning; further out, call trip_update first. For an Activity, Lodging, EventTicket or Parking at a real place, call places_search first and put the result's place ID in fields.placeId: Tineo links that place (map pin and coordinates) and fills a missing name, address, phone and website. Never invent a time: if the user has not given or chosen one, ask, or send the date only (YYYY-MM-DD) in startDateTime and Tineo stores it as time not set. Send a clock time only when the user stated it or a booking shows it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Field values matching the schema for the segment type. Get schema first with segment_get_schema. Activity activityType is one of: tour, dining, show, spa, class, sports, sightseeing, other (other words are mapped or saved as other). title is optional for Flight, Lodging, Transfer, CarRental and Parking: Tineo derives one (e.g. "AA72 SYD → LAX", the property name, "Transfer to <dropoff>"). | |
| trip_id | Yes | The trip ID to add the segment to | |
| segment_type | No | The type of segment to create (Flight, Lodging, CarRental, Train, Transfer, Ferry, EventTicket, Parking, Activity, Note, Poll) |