TripAdd API (1.10.0)

Download OpenAPI specification:Download

TripAdd API enables you to create personalized travel ancillary product bundles and make orders.

Concepts

A Bundle is a set of products defined by an ancillary manager. They can contain specific products or product categories. Bundles and markups are managed on the TripAdd Partner Portal.

A Bundle Offer is a unique short-lived set of product offers created for a specific user and based on specific trip parameters. Bundle offers can be available from 15 minutes to 25 hours, depending on which products are included in the bundle. The offers later expire and have to be generated again to ensure up-to-date pricing and availability of products at the time of booking. The bundle expiration time is returned in the API response.

Pricing Types

TripAdd supports the following pricing types for products in bundles: passenger and group. The passenger-type products will have individual pricing per passenger, while the group-type products will have a single price for the entire group/booking. When calculating the total order price, you should multiply the passenger-type product prices by the passenger count and add the group-type product prices directly.

Age Categories

TripAdd uses these age categories: adult (12 years old and above), child (2-11 years old), and infant (up to 2 years old). Each product will specify which age categories it applies to.

Product Delivery

Product delivery information is returned in the create order response. TripAdd has a wide variety of products with different delivery options. Each product will contain its delivery information consisting of a short description, voucher codes, and/or links to vouchers or product pages. For example, the eSIM product delivery will have the following information:

{
  "description": "Your data plan will be automatically activated on {{arrivalDateTime}}. You can install the eSIM at any time before your departure."
  "links": [
    "label": "Claim Now",
    "url": "https://app.tripadd.com/esim/jwmdyxemed"
  ]
}

Integration Steps

  1. Reach out to acquire credentials to the TripAdd Partner Portal.

  2. Generate API tokens. On the partner portal, go to "Integration" → "API Tokens" and click "Create Token" to generate a new API token. Make sure to save the token because it cannot be retrieved in the dashboard again.

  3. Create a Bundle. Click "New Bundle" and follow the steps to set up a product bundle. At the "Installation" step, you will receive a unique "Bundle ID" which you will need for the API calls. Bundles created in "Test Mode" can only be used with "Test Mode" tokens.

  4. Call the "Create Bundle Offer" endpoint. Each time you want to present a bundle offer to the user, you should call this endpoint. It will check product availability and pricing based on trip parameters and create a unique offer.

  5. Call the "Create Order" endpoint. Once the user selects the products, completes the booking, and you successfully process the payment, call this API to purchase the products.

Authentication

TripAdd API expects your access token as part of the Authorization header in your requests using the Bearer method. Send your token in the HTTP request header like this: Authorization: Bearer <token>. The access token must be provided with all API calls. Access tokens created in "Test Mode" work only with data created in "Test Mode" and vice versa.

Notice: Make sure you keep your access tokens secret and do not expose them to the client side code.

Environments

TripAdd API is available on two environments: sandbox and production. The sandbox environment is meant for integration testing: the API matches production but the orders will not incur charges. Access tokens on these environments will be different.

Environment API Base URL
Sandbox https://sandbox.tripadd.com/v1
Production https://api.tripadd.com/v1

Front-end

TripAdd bundles can be integrated into any checkout flow using your existing technology stack. You only need to make sure to allow HTML tags in product and delivery description fields.

Optionally, if you use React in your front end, you can take advantage of our React component library. It is a collection of UI elements providing the easiest way to integrate the TripAdd bundles into your checkout path.

Changelog

1.10.0 (2024-06-18) Added "Get Orders" API. It is now possible to fetch all your orders with pagination.

1.9.0 (2024-05-06) Added the order and product purchase status to the "Create Order" response.

1.8.0 (2024-01-17) Added support for partial orders: you can now specify individual products for each passenger. Added passenger_purchases to the "Create Order" request. The previous request format is still supported but deprecated.

1.7.9 (2023-12-12) Added customer_ip element to the available_data object in the "Create Bundle Offer" request.

1.7.8 (2023-10-22) Updated booking_reference in CreateOrderRequest` to accept values from minimum 5 to maximum 16 character long.

1.7.7 (2023-10-16) Added confirmation_recipients in the "Create Order" request, allowing you to specify the recipients for the order confirmation and order cancellation emails.

1.7.6 (2023-10-03) Added net_price in the "Create Bundle Offer" API response.

1.7.5 (2023-08-24) Added delivery to "Create Order" response, which contains information about product delivery to user.

1.7.4 (2023-08-22) Added terms_url in the "Create Bundle Offer" API response. You can use it to link users to the Terms and Conditions for the products in the bundle.

1.7.3 (2023-08-09) Added support for partial cancellations. It is now possible to cancel only part of the order by specifying product IDs.

1.7.2 (2023-08-04) Added support_url in the "Create Order" API response.

1.7.1 (2023-06-21) Added product cancellation details to the "Product" object (cancellation_policy, refundable_until).

1.7.0 (2023-06-21) Added the detailed pricing information to the "Create Bundle Offer" response (pricing, bundled_pricing). Changed the price and bundled_price values to include the TripAdd fee and removed the separate fee object. The price field in the "Create Order" request will have to include the TripAdd fee, as the separate field for fee is removed.

1.6.1 (2023-05-05) Made the customer's phone number optional in the "Create Order" request. To receive all the product offers that do require the customer's phone number, customer_phone has to be set as "true" in available_data in the "Create Bundle Offer" request.

1.6.0 (2023-05-03) Added product delivery information to "Create Order" response. You can now find product instructions, coupon codes and links to vouchers in the response to construct your own product delivery email.

1.5.1 (2023-05-02) Added expires_at in the BundleOffer response. It will inform you how long the bundle offer is available for the booking until it expires and has to be generated again.

1.5.0 (2023-04-14) Renamed "Create Bundle" API to "Create Bundle Offer" API to improve distinction between bundles and bundle offers. The documentation reflects the new API but the old API paths and parameters are still being supported until migration is complete.

1.4.2 (2023-04-14) Made date_of_birth, gender, cabin_class optional and removed retail_price.

1.4.1 (2023-04-13) Made outbound_flights optional.

1.4.0 (2023-02-22) Added language property on CreateBundleRequest object. The language property should be ISO 639-1 (language code) i.e. "en".

1.3.0 (2023-02-22) Removed price from the bundles and added bundled_price on bundle products. You can now display how much individual products cost when purchased in full bundle.

1.2.0 (2023-01-27) Added "Cancel Order" API.

1.1.1 (2022-11-28) Added cabin_class on the flight object.

1.1.0 (2022-11-25) Added "Get Order" API. It is now possible to fetch any previous order information by its ID.

1.0.4 (2022-11-24) Made passenger email and phone fields optional. At least one (customer's) email and phone pair is still required to deliver the products after purchase.

1.0.3 (2022-11-16) Moved passengers data to orders. The passenger data is now collected at the time of ordering and only the passenger age category is required to generate a product bundle. If possible the optional information should be provided for better recommendations.

1.0.2 (2022-11-07) Made customer address optional. It is now possible to create an order without customer's address although any additional information will enable more products.

1.0.1 (2022-11-03) Added optional fields for providing flight departure and arrival terminals. The additional information will enable more products.

1.0.0 Initial API release.

Bundle Offers

Create Bundle Offer

Creates a personalized travel ancillary product bundle offer based on the provided trip information. The flight and passenger information will be used to select the best products (according to the particular flight options and passenger types). The offers expire between 15 minutes and 25 hours depending on the products in the bundle. The bundle offers can only be used for purchase once. You should generate a new offer for each checkout session. After the bundle has expired, we cannot guarantee a successful purchase of products due to any changes in pricing and/or availability.

❗️ Review available_data field

You may not have all the customer and passenger data available at the time of creating the bundle offer. If any additional data (such as the customer's phone number or PNR) will be collected later in the process or become available during the ordering, you should set the appropriate flags to true. Certain products requiring additional data will not be returned in the bundle offer if their flags are set to false.

Authorizations:
bearerAuth
Request Body schema: application/json
required
bundle_id
required
string

Bundle for offer generation. You can manage your bundles on the TripAdd partner portal. You will find this identifier on the installation page of the bundle.

currency
required
string (currency)
Enum: "EUR" "USD" "GBP" "INR"

Three-letter ISO 4217 representing the currency code. Only one currency per organization is supported based on the contract.

object (booking_value)

Booking value to take advantage of refund products.

required
object

Trip destination.

arrival_date_time
required
string

The local arrival date and time in yyyy-MM-dd'T'HH:mm:ss format, for example 2022-04-24T09:44:51.

return_date_time
string

The local return date and time in yyyy-MM-dd'T'HH:mm:ss format, for example 2022-04-24T09:44:51. It must match the arrival_date_time of the last flight when the inbound_flights data is sent.

required
Array of objects (partial_passenger) non-empty

Passenger information.

Array of objects (Flight)

Departure flight information.

Array of objects (Flight)

Return flight information.

object (available_data)

Allows specifying what additional information will be included in the "Create Order" request. Some products will not be available without additional data.

language
string (language_code)
Default: "en"
Enum: "af" "ak" "am" "ar" "as" "ay" "az" "be" "bg" "bm" "bn" "bs" "ca" "co" "cs" "cy" "da" "de" "doi" "dv" "ee" "el" "en" "es" "et" "eu" "fa" "fi" "fil" "fr" "fy" "ga" "gd" "gl" "gn" "gu" "ha" "he" "hi" "hr" "ht" "hu" "hy" "id" "ig" "ilo" "is" "it" "ja" "jv" "ka" "kk" "km" "kn" "ko" "ku" "ky" "lb" "lg" "ln" "lo" "lt" "lv" "mg" "mi" "mk" "ml" "mn" "mr" "ms" "mt" "my" "ne" "nl" "no" "ny" "om" "or" "pa" "pl" "ps" "pt" "qu" "ro" "ru" "rw" "sa" "sd" "si" "sk" "sl" "sm" "sn" "so" "sq" "sr" "st" "su" "sv" "sw" "ta" "te" "tg" "th" "ti" "tk" "tl" "tr" "ts" "tt" "ug" "uk" "ur" "uz" "vi" "xh" "yi" "yo" "zh_CN" "zh_TW" "zu"

Two-letter ISO 639-1 representing the language code.

Responses

Request samples

Content type
application/json
{
  • "bundle_id": "019cb030-aadd-4bb1-be61-00bc6c6a1b08",
  • "currency": "USD",
  • "booking_value": {
    },
  • "destination": {
    },
  • "arrival_date_time": "2022-04-24T09:44:51",
  • "return_date_time": "2022-04-24T09:44:51",
  • "passengers": [
    ],
  • "outbound_flights": [
    ],
  • "inbound_flights": [
    ],
  • "available_data": {
    },
  • "language": "en"
}

Response samples

Content type
application/json
{
  • "id": "019cb030-aadd-4bb1-be61-00bc6c6a1b07",
  • "currency": "USD",
  • "products": [
    ],
  • "passengers": [
    ],
  • "expires_at": "2022-04-24T09:44:51.000Z",
  • "language": "en",
}

Get Bundle Offer

Retrieve previously generated bundle offer by ID.

Authorizations:
bearerAuth
path Parameters
bundle_offer_id
required
string
Example: 8162eccc-6050-4eaa-8df0-0998cf9e9cf6

Unique identifier of the bundle offer.

Responses

Response samples

Content type
application/json
{
  • "id": "019cb030-aadd-4bb1-be61-00bc6c6a1b07",
  • "currency": "USD",
  • "products": [
    ],
  • "passengers": [
    ],
  • "expires_at": "2022-04-24T09:44:51.000Z",
  • "language": "en",
}

Orders

Create Order

Create an order for a bundle offer. It will make bookings on external supplier systems and may take up to 120s to complete. It is important to increase the timeout of this API call to 120 seconds. You also need to use unique client_reference_id values to avoid double bookings (in rare cases when bookings take longer).

Authorizations:
bearerAuth
Request Body schema: application/json
required
currency
required
string (currency)
Enum: "EUR" "USD" "GBP" "INR"

Three-letter ISO 4217 representing the currency code. Only one currency per organization is supported based on the contract.

bundle_offer_id
required
string

The ID of the bundle offer for this order.

client_reference_id
required
string <= 36 characters

An identifier to reference the order in your system. It has to be unique to avoid duplicate bookings.

price
required
number > 0

The price of the order (including the TripAdd fee). It will be used to validate the price calculation.

booking_reference
string or null [ 5 .. 16 ] characters

Booking reference (PNR number) for the trip. It must be provided if the bundle was created with booking_reference set to true in available_data.

required
Array of objects (passenger_purchase) non-empty

Passenger purchases.

required
object (customer)

The customer information.

Array of objects (confirmation_recipient)

The list of the recipients for the order confirmation and order cancellation emails.

Responses

Request samples

Content type
application/json
{
  • "currency": "USD",
  • "bundle_offer_id": "6982caed-fbfc-4719-bc41-0060a1c97e5d",
  • "client_reference_id": "6982caed-fbfc-4719-bc41-0060a1c97e5d",
  • "price": 42.24,
  • "booking_reference": "PNR123",
  • "passenger_purchases": [
    ],
  • "customer": {
    },
  • "confirmation_recipients": []
}

Response samples

Content type
application/json
{
  • "id": "019cb030-aadd-4bb1-be61-00bc6c6a1b07",
  • "client_reference_id": "6982caed-fbfc-4719-bc41-0060a1c97e5d",
  • "confirmation_code": "ASASD12",
  • "currency": "USD",
  • "price": "42.24",
  • "products": [
    ],
  • "cancellations": [
    ],
  • "status": "COMPLETED"
}

Get Orders

Retrieve all orders.

Authorizations:
bearerAuth
query Parameters
limit
required
integer [ 1 .. 100 ]
Default: 50

A limit on the number of orders to return, ranging between 1 and 100.

offset
required
integer
Default: 0

An offset query parameter is used to exclude the first N orders from a response.

client_reference_id
string <= 36 characters
Example: client_reference_id=6982caed-fbfc-4719-bc41-0060a1c97e5d

A client reference identifier can be given to filter orders matching the same value.

Responses

Response samples

Content type
application/json
{
  • "orders": [
    ]
}

Get Order

Retrieve order by ID.

Authorizations:
bearerAuth
path Parameters
order_id
required
string
Example: 8162eccc-6050-4eaa-8df0-0998cf9e9cf6

Unique identifier of the order.

Responses

Response samples

Content type
application/json
{
  • "id": "019cb030-aadd-4bb1-be61-00bc6c6a1b07",
  • "client_reference_id": "6982caed-fbfc-4719-bc41-0060a1c97e5d",
  • "confirmation_code": "ASASD12",
  • "currency": "USD",
  • "price": "42.24",
  • "products": [
    ],
  • "cancellations": [
    ],
  • "status": "COMPLETED"
}

Cancel Order

Cancel Order.

Authorizations:
bearerAuth
path Parameters
order_id
required
string
Example: 8162eccc-6050-4eaa-8df0-0998cf9e9cf6

Unique identifier of the order.

Request Body schema: application/json
optional
product_ids
Array of strings non-empty

IDs of the product offers to be cancelled.

Responses

Request samples

Content type
application/json
{
  • "product_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "019cb030-aadd-4bb1-be61-00bc6c6a1b07",
  • "client_reference_id": "6982caed-fbfc-4719-bc41-0060a1c97e5d",
  • "confirmation_code": "ASASD12",
  • "currency": "USD",
  • "price": "42.24",
  • "products": [
    ],
  • "cancellations": [
    ],
  • "status": "COMPLETED"
}