Package Offers API
The Package Offers API provides real-time pricing and availability for TUI package holidays to third-party agents. Consumers can search by destination and date through the TUI API gateway and receive current package offers.
API Endpoints
| Environment | URL |
|---|---|
| PROD | https://prod.api.tui/packageOffers/packageOffers_v1 |
API Methods
Method: GET
{
"packageOffersRequest": {
"xmlns": "http://tuiuk.com/xsd/package/packageoffers/v1",
"packageType": "Inclusive",
"brandName": "TUI UK",
"departureAirportIATACode": [
"LTN"
],
"departureDate": "2021-06-01",
"duration": {
"numOfDays": 7
},
"whereTo": {
"destination": [{
"destinationName": "Antalya"
}]
},
"IsFlexible": true,
"numOfAdults": 2
}
}
HTTP Headers
| HeaderName | Value | Inbound/Outbound | Description |
|---|---|---|---|
| x-api-key | <your-api-key> | Inbound | Your unique key authorisation to access the packageOffers API. |
| Accept | application/json;packageOffers;version=1.0 / |
Inbound / Outbound | Version of packageOffers API invoked. If specified as / then the latest packageOffers API version will be called. |
Search Input Parameters
Search parameters should be submitted in the same order and are case sensitive.
| Field | Description | Format | Mandatory | Default | Example | ||
|---|---|---|---|---|---|---|---|
| packageType | Type of package. | String | Yes | Inclusive | Inclusive | ||
| maxResultCount | Maximum number of offers to be returned. This is facilitated so that the consumer can select the limit of offers returned from API | Number | No | 100 | |||
| brandName | The three TUI Brands supported. TUI UK, TUI Ireland, First Choice. | String | Yes | TUI UK | |||
| departureAirportIATACode | Standard IATA Airport code. | String | Yes | LGW | |||
| departureDate | Date of travelling. ISO Date format i.e., yyyy-mm-dd. | Date | Yes | 2018-04-18 | |||
| duration | numOfDays | Package duration. | Number | Yes | 7 | ||
| whereTo | Select the destination for your holiday. This is a choice element. | Complex Node | Yes | ||||
| whereTo | destination | regionCode | TUI Specific 6 digit region code. | String | No | 000154 | |
| regionName | Region Name. | String | No | Algarve | |||
| resortCode | TUI Specific 6 digit resort code | String | No | 000172 | |||
| resortName | Resort Name | String | No | Albuferia | |||
| destinationCode | TUI Specific 6 digit destination code. | String | No | 000172 | |||
| destinationName | Destination or Resort Name. | String | No | Albufeira | |||
| accomId | TUI Specific 6 digit accommodation Id. | String | No | 000091 | |||
| accomName | TUI Accommodation Name. | String | No | Aparthotel Brisa Sol | |||
| collection | TUI Collections such asGold, Sensatori, etc. | String | No | Gold | |||
| boardBasisCode | Search by different boardBasisCode supported by TUI. | String Enumerated | No | HB | |||
| isFlexible | Indicator to denote whether the search to be flexible or exact. | Boolean | Yes | FALSE | FALSE | ||
| numOfAdults | Number of travelling passengers whose age is greater than or equal to 18. | Number | Yes | 4 | |||
| numOfChild | Number of travelling passengers whose age is less than 18 at the time of travelling. | Number | No | 2 | |||
| childAgeOnReturn | Array of numbers to capture the age of every child travelling. | Number Array | No | 10 |
Response Parameters
Every response includes a standard HTTP status code. A successful request returns 200 OK; failed requests return an appropriate 4xx or 5xx code together with any available error details.
| Field | Description | Format | Mandatory | Default | Example | ||||
|---|---|---|---|---|---|---|---|---|---|
| offersAvailable | Number of offers returned by TUI. | Number | Yes | 100 | |||||
| maxResultCount | Maximum number of offers to be returned as specified in the request by API consumer. This is facilitated so that the consumer can select the limit of offers returned from TUI API. If a valid integer is populated in the request then the value of offersAvailable will be same as maxResultCount.If not populated in the request the value is defaulted to 0. | Number | Yes | 0 | 100 | ||||
| party | numOfAdults | Number of travelling passengers whose age is equal to or greater than 18 years. | Number | Yes | 6 | ||||
| numOfChildren | Number of travelling passengers whose age is less than 18 years and greater than 2 Years. If no children are travelling then this field is defaulted to 0. | Number | Yes | 0 | 2 | ||||
| numOfInfants | Number of travelling passengers whose age is less than 2 years. If no infants are travelling then this field is defaulted to 0. | Number | Yes | 0 | 1 | ||||
| packageOffers | packageType | Currently we support only Inclusive packageTypes. | String | No | Inclusive | ||||
| collection | Search our specific collection packages, such as Sensatori, Gold, etc. | String | No | Gold | |||||
| departureDate | Date of travel. | Date | Yes | 2018-04-26 | |||||
| duration | numOfDays | Duration of the package. | Number | Yes | 7 | ||||
| prices | currencyCode | Currency code returned in the offer. | String | No | GBP | ||||
| currencyName | Name of the currency returned for every offer. | String | No | Sterling Pounds | |||||
| totalPrice | Total price of the offer. | String | No | 7683 | |||||
| totalPricePerPerson | Price of the offer displayed per traveling passenger. | String | Yes | 100 | |||||
| deposit | Deposit for the offer. | String | No | 100 | |||||
| brandCode | Internal code referred by TUI for every brand we support like TUI UK, TUI Ireland, First Choice. | String | No | T | |||||
| brandName | Brand Names for the packages like TUI UK, TUI Ireland, First Choice. | String | No | TUI UK | |||||
| freeChildIncluded | This flag when populated indicates whether the offer includes a free child or not. | Boolean | No | TRUE | |||||
| transfersIncluded | This flag when populated indicates whether the transfer is included as part of the package or not. | Boolean | No | TRUE | |||||
| contentItem | name | Brand Logo. | String | No | |||||
| url | URL for the brand selected. | String | No | https://www.tui-brandnet.com/static/system/modules/com.tui.brandnet.bootstrap/1.3.0/resources/img/logo.svg | |||||
| accommodationOffers | accomId | Unique 6 digit code maintained in TUI. | String | Yes | 057420 | ||||
| accomCode | Unique alpha numeric code maintained in TUI. | String | No | TUAN0136 | |||||
| accomName | Name of the Hotel or accommodation. | String | No | Akra Hotel | |||||
| accomOverview | Short description of the accommodation. | String | No | This is a glossy hotel, with floor-to-ceiling windows and grounds cloaked in lawns and palms. It comes with all the trimmings, like a choice of great pools, a trio of restaurants, and a luxe spa. | |||||
| continent | Name of the continent where the accommodation belongs to. | String | Yes | Europe | |||||
| countryCode | Country code | String | No | TUR | |||||
| countryName | Country name. | String | No | Turkey | |||||
| regionCode | Region to which the accommodation belongs to. | String | No | ||||||
| regionName | Name of the region. | String | No | ||||||
| resortCode | Resort to which the accomodation belongs to. | String | No | ||||||
| resortName | Name of the Resort | String | No | ||||||
| destinationCode | Destination Code. | String | No | 001387 | |||||
| destinationName | Destination Name. | String | No | Antalya | |||||
| checkInDate | Date when checked in to hotel. | String | Yes | 2018-05-30 | |||||
| duration | numOfDays | Duration of the package offer. | Number | Yes | 7 | ||||
| contentItem | name | Name of the Deep linking URL to our website for booking i.e., Accommodation overview page . | String | Yes | Accommodation Overview | ||||
| URL | Deep linking URL to our website for booking. | String | No | ||||||
| accomUnits | boardBasisCode | TUI Supported Board Basis codes | String | No | BB | ||||
| boardBasisName | Board Basis Name. | String | No | Bed and Breakfast | |||||
| location | longitude | Longitude of the Hotel. | String | No | 30.726529773 | ||||
| latitude | Latitude of the Hotel. | String | No | 36.864297068 | |||||
| information | Location information about the Hotel. | String | No | Set on the seafront with a bathing platform|3km from resort centre|15km from Antalya airport|13 km from Antalya bus terminal | |||||
| facilityOverview | A brief overview on Hotel Facilities. | String | No | This huge, high-rise hotel has three restaurants and a large swimming pool. Little ones get their own pool, plus a playground to make friends in. There's a traditional Turkish wellness centre, too, with favourites like a sauna and a Turkish bath | |||||
| usps | Unique selling points of the Hotel or Accommodation with "|" as delimeter. | String | No | 5 pools|Close to Antalya Old Town|3 stylish restaurants | |||||
| rating | Hotel Rating. | String | No | 4 | |||||
| quantityOfferred | Number of units offered. | String | No | 1 | |||||
| contentItem | This node captures the content data, i.e. 5 Image URLs regarding Hotel and one Image URL for destination. | ||||||||
| name | Name of the content published like "Hotel Image 1" or "Destination Image". | String | Yes | Hotel Image 1 | |||||
| url | Image URL. | String | No | https://cdn.content.tuigroup.com/adamtui/2016_10/1_10/8ba7c259-cfe0-4d17-8cde-a69200a85626/TUR_ANT_2004WebOriginalCompressed.jpg?i10c=img.resize(width:1080);img.crop(width:1080%2Cheight:608) | |||||
| flightOffers | contentItem | ||||||||
| name | Inbound Flight Logo or Outbound Flight Logo. | String | Yes | ||||||
| URL | Image URL | String | No | https://www.tui-brandnet.com/static/system/modules/com.tui.brandnet.bootstrap/1.3.0/resources/img/logo.svg | |||||
| flightSegment | Captures details of the flights for each flight route, i.e. Outbound and Inbound. | Yes | |||||||
| routeCode | Route code captured with in TUI Systems for every flight route. | String | Yes | AYTLTN3ALTNAYT | |||||
| flightNum | Flight number. | String | Yes | FHY510 | |||||
| direction | Direction of the flight. E.g. Outbound/Inbound | String | Yes | Inbound | |||||
| numOfStops | Number of Transits. 0 if it is a direct flight, else the number of transits for each segment. | String | Yes | 0 | |||||
| flightDuration | hours | Number of hours in the flight duration. | Number | Yes | 4 | ||||
| minutes | Minutes | Number | Yes | 30 | |||||
| carrierCode | Flight carrier code. | String | Yes | TOM | |||||
| cabinClass | Cabin class. | String | No | Economy | |||||
| departure | Captures the flight departure details for every leg. | No | |||||||
| airportCode | IATA Airport code. | String | Yes | LTN | |||||
| date | Flight departure date in ISO Format, i.e. yyyy-mm-dd | Date | Yes | 2018-04-14 | |||||
| time | Flight departure Time in ISO Format, i.e. hh:mm:ss | Time | Yes | 08:30:00 | |||||
| arrival | Captures the flight arrival details for every leg. | No | |||||||
| airportCode | IATA Airport code | String | Yes | LGW | |||||
| date | Flight arrival date in ISO Format i.e., yyyy-mm-dd | Date | Yes | 2018-04-14 | |||||
| time | Flight arrival Time in ISO Format i.e., hh:mm:ss | Time | Yes | 10:30:00 |
Error Messages
In addition to the standard HTTP response code, failed API calls contain error information in the message body. Gateway errors generally relate to access control or an invalid API key, while API-generated errors describe invalid request content or downstream processing failures.
| Error Code | Error Message |
|---|---|
| E001 | Departure Airport must be specified |
| E002 | Departure Date must be specified |
| E003 | Atleast one adult must be travelling |
| E004 | Age of All children must be specified |
| E005 | Child Age must be less than 18 years |
| E006 | Only 9 Passengers are currently supported for Web bookings |
| E007 | For legal reasons, the number of infants needs to be same or less than number of adults |
| E008 | Invalid Board Basis code |
| E009 | Unknown collection name |
| E010 | Brand name and departure airport do not correlate. Please correct the search criteria |
| E011 | Please specify valid brand name |
| E012 | Please specify valid duration for your package |
| E013 | Unable to connect to search service |
| E014 | Request timed out before search results returned |
| E015 | Atleast one destination or one collection must be provided. |
| E016 | Not Active |
| E017 | No Matching accoms |
| E018 | Request not supported |
| E019 | Invalid Parameter |
Warning Messages
In addition to errors, the API may return warnings. These provide supplementary information and may indicate that the search criteria should be refined or that the returned result has a minor data gap.
| Warning Code | Warning Message |
|---|---|
| W001 | Unable to route to accommodation overview page for the package Id(packageID) |
| W002 | No offers available for the given search criteria for the date(departureDate) |
| W003 | Accommodation unavailable |
| W004 | Transport unavailable |
| W005 | Outbound flight logo URL for the carrierCode(carrierCode) not available |
| W006 | Destination Image URL not available for (destinationCode) |
| W007 | Not all accommodation Images are available for (accomName) |
| W008 | Room Image not available for the room (roomName)in the hotel (accomName) |
| W009 | Inbound flight logo URL for the carrierCode:(carrierCode) not available |
| W010 | There are no TUI packages for the given destination(destination) |
Support
For support, contact TIBCO Operations Support.
