Link Search Menu Expand Document

Standalone Property Descriptions

Properties
  1. Pick Up & Drop Off Location parameters
  2. pickupDateTime(pickupDateTime: LocalDateTime)
  3. dropOffDateTime(dropOffDateTime: LocalDateTime)
  4. clientId
  5. country
  6. currency
  7. darkModeConfig
  8. logging
  9. loyaltyToken
  10. orderId
  11. passenger
  12. theme

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:

ParameterDescriptionUsageType
ageCustomer’s ageDriver age used for the search. Default age is 30String
countryCustomer’s countryCountry of residence. If not set, it fallbacks to the country set in the main CTSdkData or the device’s countryString
//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:

ParameterDescriptionExampleType
pnrFlight PNR. Also used as the order ID when orderId is not setCT123456String
visitorIDUsed to track visitor abandonmentabc123-visitor-idString
flightFareSizeFlight fare T-shirt sizing; typical values include S, M, L, and XLMString
contextWhere in the flow the SDK is loaded. When set to MMB, the search is built from flightOrigin and flightReturnMMBString
flightOriginOrigin flight details separated by pipes: IATA departure, IATA arrival, datetime departure, datetime arrival, flight number. Used when context is MMBDUB|LHR|2025-01-16T06:05:00|2025-01-16T07:25:00|XX8719String
flightReturnReturn flight details, same format as flightOrigin. Used when context is MMBLHR|DUB|2025-01-22T21:20:00|2025-01-23T22:45:00|XX8720String
//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.