Customize Trip Element for your needs
The Trip Element can be customized through a configuration object that is included at the time of element creation.
Attribute | Required | Type | Description |
---|---|---|---|
language | Optional | String | Default en-US . View supported languages |
placement | Required | String | Name of booking stage or page the element is embedded on. Used for measuring engagement in analytics reports. Supported values: discovery , booking , confirmation , mmb , covidPage , destinationPage , homePage , search , bookingConfirmation |
segments | Optional | Array of Objects | View Segment Model |
travellers | Optional | Array of Objects | View Traveller Model |
features | Optional | Object | View Features Model |
Describe the trip using a set of Segments.
Attribute | Required | Type | Description |
---|---|---|---|
segmentType | Required | String, Supported values: OUTBOUND , `RETURN | Direction of the flight.` |
segmentSubType | Required for connecting flight. | String. Supported values: AIR , TRANSIT | Is this a connecting flight. |
origin | Optional if features.showResults is false; Required otherwise | Object | View Location Model |
destination | Optional if features.showResults is false; Required otherwise | Object | View Location Model |
travelMode | Optional | String. Default: AIR |
One of the following attributes is required.
Attribute | Required | Type | Description | Example |
---|---|---|---|---|
countryCode | Optional, if one other is specified | String | ISO3 Country Code e.g. CAN for Canada | eVisa Trip Element Pre-Configuration |
airportCode | Optional, if one other is specified | String | IATA Airport Code e.g. YYZ for Pearson International Airport, Toronto, Canada | Using Airport and Region Code |
regionCode | Optional, if one other is specified | String | alpha3 Region Code e.g. US-TX for Texas, USA | Using Airport and Region Code |
Attribute | Required | Type | Description | Example |
---|---|---|---|---|
nationality | Optional | String | ISO3 Country Code e.g. CAN for Canada | Defining a Traveller |
passport | Optional | Object | Passport details of the travel |
Attribute | Required | Type | Description | Example |
---|---|---|---|---|
number | Optional | String | Passport number | NN234567 |
nationality | Optional | String | Passport nationality | CAN |
givenNames | Optional | String | Given names as stated on passport | John Richard |
surname | Optional | String | Surname as stated on passport | Smith |
issueDate | Optional | String | Issue date as stated on passport | 2020-01-30 |
Attribute | Required | Type | Description |
---|---|---|---|
type | Optional | String | Currently only value COVID_19 |
status | Optional | String | Currently only value FULLY_VACCINATED or NOT_VACCINATED |
Customize the appearance of the Trip Element by enabling & disabling feature flags.
Attribute | Required | Type | Description |
---|---|---|---|
showSegments | Optional | Boolean | Show/hide navigation between segments. Default: true |
showTitle | Optional | Boolean | Show/hide title. Default: true |
enableSegmentEditor | Optional | Boolean | Show/hide the UI to edit a trip, including "Edit my trip" button. |
showResults | Optional | Boolean | Show/hide travel restrictions results on load. Default: true |
showResults is true
by default, if this is true origin and destination has
to be specified. Set this to false
to load the widget with no destination
and origin specified.