Was this helpful?

Multi-leg or Multi-day Collections

Itinerary Collections provide a mechanism to create additional lists for your itinerary. The common target use case is creating discrete legs or lists that could represent different days.

Docs IconCurrently, Itinerary Segments are used to break up a list into sub-sections which can be used to represent parts of a trip.

Understanding Collection Use-cases

Segments primarily are used in order to take a list, and create segments to provide an optional way of filtering down a list. There is one list and the list items are assigned to the segment which can then be used to filter.

Collections are used to create new lists containing their own children.

FeatureItinerary SegmentItinerary Collection
Can break up larger lists✔️✔️
Location can appear in multiple✔️
Controls the ordering✔️
Target Use CaseBreaking up a list into segments, where locations could overlapCreating and plotting discrete lists, such as Days

Creating an Itinerary Collection

Itinerary Collections can be used in order to create additional lists.

1# Creates an Itinerary Collection, which can be used to create new sub-lists
2
3mutation createItinerarySegment(
4  $itineraryId: ID!
5  $itineraryCollection: CreateItineraryCollectionInput!
6) {
7  createItineraryCollection(
8    itineraryId: $itineraryId
9    collection: $itineraryCollection
10  ) {
11    collection {
12      id
13    }
14  }
15}

Sandbox: Configure | Try Operation

alpaca.tech

Copyright © 2024 - Made with love ❤️ in Australia.