Standalone Property Descriptions
Properties
CTSdkData Builder
The values below are used by the SDK or forwarded to the CarTrawler web booking flow.
Pick Up & Drop Off Location parameters
Pick up location can be passed as a IATA, coordinates or OTA Location ID. Priority is IATA > coordinates > OTA location id
‘pickupLocationIATA’ and ‘dropOffLocationIATA’: It takes a three-letter code that represents airports worldwide. E.g ‘DUB’ for Dublin.
- ‘pickUpLocationCoordinates’ and ‘dropOffLocationCoordinates’: It takes a CTCoordinates object:
data class CtCoordinates( val latitude: Double, val longitude: Double ) - ‘pickupLocationId’ and ‘dropOffLocationId’: It takes an OTA Location ID for pickup location, e.g 11 for Dublin.
pickupDateTime(pickupDateTime: LocalDateTime)
The pick-up date and time of the search sent to the web booking flow.
dropOffDateTime(dropOffDateTime: LocalDateTime)
The drop-off date and time of the search sent to the web booking flow.
clientId
A string identifier provided by CarTrawler required to use the CarTrawler API.
country
An optional two letter country code string, based on the ISO standard e.g “US”, “IE”, used as the country of residence. The country code associated with the device’s system region is used by default.
currency
An optional currency code string, based on the ISO standard currency codes e.g “USD”. The currency associated with the device’s system region is used by default.
darkModeConfig
An optional int that can be passed to the SDK to control whether or not Dark Mode should be used, for more details check Dark Mode. The following options can be used:
AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
AppCompatDelegate.MODE_NIGHT_YES
AppCompatDelegate.MODE_NIGHT_NO
logging
A boolean value for additional logging while debugging.
loyaltyToken
An optional token passed through to supported web flows so customer details can be prepopulated. The SDK forwards this value only and does not decode, validate, or transform it.
orderId
A String value that represents the Order ID for a Flight PNR or Booking Reference, example: IE1234 (limited to 64 characters). If it is more than 32 characters, it will be split in the following format when retrieving this data: {first32characters}.{remainingCharacters}.
passenger
An optional CTSdkPassenger. The following values are forwarded to the web booking flow:
| Parameter | Description | Usage | Type |
|---|---|---|---|
| age | Customer’s age | Driver age used for the search. Default age is 30 | String |
| country | Customer’s country | Country of residence. If not set, it fallbacks to the country set in the main CTSdkData or the device’s country | String |
//Example CTSdkPassenger initialisation
val passenger = CTSdkPassenger.Builder()
.country("IE")
.age("29")
.build()
//Use CTSdkPassenger when initialising CTSdkBuilder
val sdkData = CTSdkData.Builder(clientId = clientId).passenger(passenger).build()
theme
An @StyleRes int that is used to setup the theme for the SDK, for more details check Themes.
Adding Flight Information
Partners can optionally add flight data when initialising the SDK. The following CTFlightDetails values are forwarded to the web booking flow:
| Parameter | Description | Example | Type |
|---|---|---|---|
| pnr | Flight PNR. Also used as the order ID when orderId is not set | CT123456 | String |
| visitorID | Used to track visitor abandonment | abc123-visitor-id | String |
| flightFareSize | Flight fare T-shirt sizing; typical values include S, M, L, and XL | M | String |
| context | Where in the flow the SDK is loaded. When set to MMB, the search is built from flightOrigin and flightReturn | MMB | String |
| flightOrigin | Origin flight details separated by pipes: IATA departure, IATA arrival, datetime departure, datetime arrival, flight number. Used when context is MMB | DUB|LHR|2025-01-16T06:05:00|2025-01-16T07:25:00|XX8719 | String |
| flightReturn | Return flight details, same format as flightOrigin. Used when context is MMB | LHR|DUB|2025-01-22T21:20:00|2025-01-23T22:45:00|XX8720 | String |
//Example CTFLightDetails initialisation
val flightDetails = CTFlightDetails.Builder()
.pnr("12345")
.visitorID("abc123-visitor-id")
.flightFareSize("M")
.build()
//Use CTFlightDetails when initialising CTSdkBuilder
val sdkData = CTSdkData.Builder(clientId = clientId).flightDetails(flightDetails).build()
For the full list of flight values used by the Grid View, see In Path Grid View property descriptions.
Builder methods kept for compatibility
The following CTSdkData.Builder methods are still available so existing integrations compile, but they configured screens that are no longer part of the SDK and have no effect on the web booking flow:
addPromotionCode, accountId, clientUserIdentifier, enableCustomCashTreatment, enableSupplierBenefitAutoApplyCodes, flightNumberRequired, loyaltyRegex, uspDisplayType, visitorId, withSettingsMenuIconType and utmParameters.
Promotion codes, CarTrawler Cash, supplier benefits and loyalty are configured for your partner in the web booking flow; please contact your CarTrawler representative to change them.