openapi: 3.0.1
info:
title: TravelMessage.v31
version: '3.1'
contact:
name: G7-OTA-TEAM
url: 'https://prod.api.tui/'
email: b2bota.g7.support@tui.nl
description: |
This API can be used to get availability and create bookings for TUI packages following the ANVR G7 standard.
With the Supply feed OTA's get information of all the available TUI packages, along with other relevant details
such as price, extras, etc. For Supply the TravelMessage 3.1 is not used. So this is defined on another page.
But it contains the necessary data to continue with the API's described here.
The information from the Supply file can be used to do an AvailabilityRequest to get more detailed data. This data can
be used for getting a Price breakdown using the ReceiptRequest or start the bookflow transaction using the Sell,
Assign and BookRequests to create a booking in tui.nl.
With AddProAvailability and AddProDetails information can be requested for available extra's and transportrental
and added to the Sell, Assign and BookRequests.
The BreakRequest can be used After SellRequest but before BookRequest to cancel the current transaction.
If a booking is successfully created the RecapRequest can be used to get all information from that booking
and CancellationRequest can be used to directly cancel a booking.
The schema's are based on the travelmessage.xsd and translated to OpenAPI specification. Not all groups and/or
fields are used in the defined api's. Also it is possible that fields that are **not mandatory** for G7 are in
fact **mandatory** for TUI.
All api's are based on the 3.1 G7 version with a few changes to support TUI packages. The Supply has a
custom defined schema.
x-header: |
This API returns the price and availability for TUI's packages specifically for OTA's according to the G7 standard.
x-summary: |
This API returns the price and availability for TUI's packages specifically for OTA's according to the G7 standard.
The Travelmessage API returns information on all the available tui.nl packages, along with other relevant details such as price, extras, etc. for this specified package.
This API also allows to start a bookingdialogue for these packages.
servers:
- url: https://prod.api.tui
description: Production
- url: https://playground.api.tui
description: Playground for testing
paths:
/travelmessage/v3.1/availabilityrequest:
post:
tags:
- TravelMessage
summary: Does an AvailabilityRequest
description: |
The availability of a journey can be requested with the dialogue Availability.
For this API the "*Package approach*" is used. This means that filling the "*PackageDetails*" in the request
will return a complete package (Transport, accommodation and/or additional products) in the response. These
components must be used in the next steps of the booking process
**Request:** Besides the mandatory fields only filtering is possible for:
* DeparturePoint
* BoardType
**Response:**
* Happy flow: Transport, Accommodation and AdditionalProducts data for chosen product
* No availability: Error message given "No data found"
* Error: Response has an errormessage
security:
- oAuth2ClientCredentials: [ ]
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/AvailabilityRequestTree'
examples:
AvailabilityRequest:
$ref: '#/components/examples/AvailabilityRequestExample'
responses:
'200':
description: AvailabilityRequest Handled
content:
application/xml:
schema:
$ref: '#/components/schemas/AvailabilityResponseTree'
examples:
AvailabilityResponse:
$ref: '#/components/examples/AvailabilityResponseExample'
AvailabilityResponse(no availability):
$ref: '#/components/examples/AvailabilityResponseNaExample'
AvailabilityResponse (error):
$ref: '#/components/examples/ErrorMessageExample'
'400':
description: Missing elements in Request
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Server Error
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
/travelmessage/v3.1/receiptrequest:
post:
tags:
- TravelMessage
summary: Does a ReceiptRequest
description: |
The ReceiptRequest message can be done to get an actual price of a chosen package and components. It's a kind
of combination of Sell- and AssignRequest but without starting a transaction.
The response contains only a price breakdown for each passenger. If no prices are found an errormessage
will be returned with the message "no data found".
The price description can contain only a description or a description plus additional information. If a price
component relates to the package itself only a description is given, for example "reissom". If a price is related
to a specific component additional information is given to trace the price back to the component. This information
is in the following format seperated with a pipe "|":
1. Description
2. Type (T = Transport, A = Accommodation/Unit, TE = Transport Extra, E = Extra)
3. Relation (depending on type)
T = TransportID
A = AccommodationID, UnitID and ArrivalDate
TE = TransportID, GroupID, ExtraID, StartDate
E = GroupID, ExtraID, startDate
Examples:
- Package: "Reissom"
- Transport (T) : "Luchthaventoeslag|T|f36627fe-b3ec-4a08-afba-820ff267a7e5#20231103 OR 503 AMSMBJ"
- Accommodation(A): "Vroegboekkorting|A|A0192836|2919b8e9-7ae3-4883-9ecf-0377d8a8d202|11/03/2023"
- Transport Extra (TE): "Klasse (PWIM)|TE|f36627fe-b3ec-4a08-afba-820ff267a7e5#20231103 OR 503 AMSMBJ|SEAT|PWIM|2023-11-03"
- Extra (E): "Transfer (TXX)|E|Transfer|TXX|2023-11-03"
For this Request/Response the v3.1.xsd is changed to fit the needs for TUI.
**Response:**
* Happy flow: Price breakdown for each passenger
* No data found: response has an errormessage with type info
* Error: response has an errormessage
security:
- oAuth2ClientCredentials: [ ]
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/ReceiptRequestTree'
examples:
ReceiptRequest:
$ref: '#/components/examples/ReceiptRequestExample'
responses:
'200':
description: ReceiptRequest Handled
content:
application/xml:
schema:
$ref: '#/components/schemas/ReceiptResponseTree'
examples:
ReceiptResponse:
$ref: '#/components/examples/ReceiptResponseExample'
ReceiptResponse (no data found):
$ref: '#/components/examples/ReceiptResponseNaExample'
ReceiptResponse (error):
$ref: '#/components/examples/ErrorMessageExample'
'400':
description: Missing elements in Request
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Server Error
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
/travelmessage/v3.1/sellrequest:
post:
tags:
- TravelMessage
summary: Does a SellRequest
description: |
The dialogue of Sell aims at indicating the package parts which have been selected for the subsequent
dialogue. The message contains package information and optional information relating to Transport,
Accommodation and Additional products (Roundtrip and Cruise information are not implemented yet).
For TUI the SellRequest is used to create a new session. Some basic validation is taking place,
and the response is more or less a copy of the request. It is important to put all the parts in the
SellRequest, because they will be checked in the next step, the AssignRequest.
When parts are changed (for example rooms) or added (for example extra's) a new SellRequest has to be
done.
**Response:**
* Happy flow: copy of request with status = "OK"
* Error: response has an errormessage
security:
- oAuth2ClientCredentials: [ ]
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/SellRequestTree'
examples:
SellRequest:
$ref: '#/components/examples/SellRequestExample'
responses:
'200':
description: SellRequest Handled
content:
application/xml:
schema:
$ref: '#/components/schemas/SellResponseTree'
examples:
SellResponse:
$ref: '#/components/examples/SellResponseExample'
SellResponse (error):
$ref: '#/components/examples/ErrorMessageExample'
'400':
description: Missing elements in Request
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Server Error
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
/travelmessage/v3.1/assignrequest:
post:
tags:
- TravelMessage
summary: Does a AssignRequest
description: |
In the AssignRequest the passengers and there assignments to the package parts are given. The "*SenderSessionID*"
of the SellResponse must be used as "*ReceiverSessionID*" in the AssignRequest to use the session created during
the SellRequest. Validation is done to check if the same parts are used as in SellRequest.
The response may contain more elements then assigned (extras). These are default components which do not
influence the price, like flight extra's as SeatsType, Meals, Luggage or default transfers. Usually upgrades
for these components are available. Because AssignResponse gives no description of these default components (just
and ID and dates) the Extras itself will also be returned in te response. The means that the TResponse also
contains AdditionalProducts and Transport.TransportTo[From].AdditionalProducts.
Besides these components also a price breakdown is returned.
The price description can contain only a description or a description plus additional information. If a price
component relates to the package itself only a description is given, for example "reissom". If a price is related
to a specific component additional information is given to trace the price back to the component. This information
is in the following format seperated with a pipe "|":
1. Description
2. Type (T = Transport, A = Accommodation/Unit, TE = Transport Extra, E = Extra)
3. Relation (depending on type)
T = TransportID
A = AccommodationID, UnitID and ArrivalDate
TE = TransportID, GroupID, ExtraID, StartDate
E = GroupID, ExtraID, startDate
Examples:
- Package: "Reissom"
- Transport (T) : "Luchthaventoeslag|T|f36627fe-b3ec-4a08-afba-820ff267a7e5#20231103 OR 503 AMSMBJ"
- Accommodation(A): "Vroegboekkorting|A|A0192836|2919b8e9-7ae3-4883-9ecf-0377d8a8d202|11/03/2023"
- Transport Extra (TE): "Klasse (PWIM)|TE|f36627fe-b3ec-4a08-afba-820ff267a7e5#20231103 OR 503 AMSMBJ|SEAT|PWIM|2023-11-03"
- Extra (E): "Transfer (TXX)|E|Transfer|TXX|2023-11-03"
Changes for passenger information (for example name) or a different assignment can be done without doing a new
SellRequest.
**Response:**
* Happy flow: Copy of assignment plus price breakdown
* Error: response has an errormessage
security:
- oAuth2ClientCredentials: [ ]
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/AssignRequestTree'
examples:
AssignRequest:
$ref: '#/components/examples/AssignRequestExample'
responses:
'200':
description: AssignRequest Handled
content:
application/xml:
schema:
$ref: '#/components/schemas/AssignResponseTree'
examples:
AssignResponse:
$ref: '#/components/examples/AssignResponseExample'
AssignResponse (error):
$ref: '#/components/examples/ErrorMessageExample'
'400':
description: Missing elements in Request
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Server Error
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
/travelmessage/v3.1/bookrequest:
post:
tags:
- TravelMessage
summary: Does a BookRequest
description: |
There can be made a booking with the dialogue of BookRequest. Although the xml data of the BookRequest is
the same as the AssignRequest and required in the G7 XML for TUI only the confirmation counts. So using
the same "*ReceiverSessionID*" as in the AssignRequest is enough. Changes made to passengers and assignments
at this stage will be ignored. The information that was in the Assign stage will be used.
**Request:**
* Same as AssignRequest, but changes are ignored.
**Response:**
* Happy flow: Confirmed Booking (with BookID)
* Error: response has an errormessage
security:
- oAuth2ClientCredentials: [ ]
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/BookRequestTree'
examples:
BookRequest:
$ref: '#/components/examples/BookRequestExample'
responses:
'200':
description: BookRequest Handled
content:
application/xml:
schema:
$ref: '#/components/schemas/BookResponseTree'
examples:
BookResponse:
$ref: '#/components/examples/BookResponseExample'
BookResponse (error):
$ref: '#/components/examples/ErrorMessageExample'
'400':
description: Missing elements in Request
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Server Error
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
/travelmessage/v3.1/breakrequest:
post:
tags:
- TravelMessage
summary: Does a BreakRequest
description: |
The Break-dialogue allows the OTA to cut off a session between the travel agent and the tour operator decently.
A new session can be started by sending a new SellRequest.
**Response:**
* Happy flow : Only a Control group is returned
* Error: response has an errormessage
security:
- oAuth2ClientCredentials: [ ]
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/BreakRequestTree'
examples:
BreakRequest:
$ref: '#/components/examples/BreakRequestExample'
responses:
'200':
description: BreakRequest Handled
content:
application/xml:
schema:
$ref: '#/components/schemas/BreakResponseTree'
examples:
BreakResponse:
$ref: '#/components/examples/BreakResponseExample'
BreakResponse (error):
$ref: '#/components/examples/ErrorMessageExample'
'400':
description: Missing elements in Request
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Server Error
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
/travelmessage/v3.1/addproavailabilityrequest:
post:
tags:
- TravelMessage
summary: Does a AddProAvailabilityRequest
description: |
AddProAvailability is used to acquire summary information about additional products.
There a two approaches defined in the ANVR documentation. With **overview** response, ResponseID is filled
with AvailabilityResponse. Only minimum information, ID and description are given in the response.
If a **detailed** response is necessary ResponseID will be filled with AvailabilityDetailsResponse. Detailed
information is given like prices, age restrictions allotment etc.
For TUI both approaches are not implemented (yet) but a third approach is done.
If as RequestID/ResponseID "*AddProAvailabilityTransportRequest/Response*" is given with a Transportgroup
then detailed information is returned for extra's that are transport dependent. For example if flights
are given extra's can be returned like luggage upgrades, meals upgrades and so on.
The returned information can be used in the ReceiptRequest and the bookflow in Sell, Assign and BookRequest.
**Request:**
* Overview, request only contains PackageDetails section and ResponseID is "*AvailabilityResponse*" (not implemented)
* Details, request only contains PackageDetails section and ResponseID is "*AvailabilityDetailsResponse*" (not implemented)
* Transport, request contains PackageDetails and Transport section and RequestID/ResponseID is
"*AddProAvailabilityTransportRequest/Response*"
**Response:**
* Overview, only basic information is returned
* Details, detailed information is returned
* Transport, detailed information is returned for the given transports
This information is grouped in Transport-AdditionalProducts-Extras and is related with the given transports
by the group RelatedTransport
security:
- oAuth2ClientCredentials: [ ]
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/AddProAvailabilityRequestTree'
examples:
AddProAvailabilityRequest (Transport):
$ref: '#/components/examples/AddProAvailabilityRequestTransportExample'
AddProAvailabilityRequest:
$ref: '#/components/examples/AddProAvailabilityRequestExample'
responses:
'200':
description: AddProAvailabilityRequest Handled
content:
application/xml:
schema:
$ref: '#/components/schemas/AddProAvailabilityResponseTree'
examples:
AddProAvailabilityResponse (Transport):
$ref: '#/components/examples/AddProAvailabilityResponseTransportExample'
AddProAvailabilityResponse (error):
$ref: '#/components/examples/ErrorMessageExample'
AddProAvailabilityResponse:
value: '<TravelMessage>NOT IMPLEMENTED</TravelMessage>'
'400':
description: Missing elements in Request
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Server Error
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
/travelmessage/v3.1/addprodetailsrequest:
post:
tags:
- TravelMessage
summary: Does a AddProDetailsRequest
description: >
AddProDetails is used to acquire detailed information about additional products. It is a continuation of the
AddProAvailability overview request. It is possible to get separate information for each extra or transport
rental, just by adding the extra or transport rental in the request.
**NOT IMPLEMENTED (YET)**
security:
- oAuth2ClientCredentials: []
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/AddProDetailsRequestTree'
examples:
AddProDetailsRequest:
$ref: '#/components/examples/AddProDetailsRequest'
responses:
'200':
description: AddProDetailsRequest Handled
content:
application/xml:
schema:
$ref: '#/components/schemas/AddProDetailsResponseTree'
examples:
AddProDetailsResponse:
$ref: '#/components/examples/AddProDetailsResponse'
'400':
description: Missing elements in Request
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Server Error
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
/travelmessage/v3.1/recaprequest:
post:
tags:
- TravelMessage
summary: Does a RecapRequest
description: |
With the dialogue of Recap a recapitulation from the data stored at the Touroperator concerning the
current session or currently booked trip can be requested.
For TUI only getting the requested booking is implemented.
**Request:**
* Only "*BookID*" is required in the SecurityInfo group.
**Response:**
* All information concerning the given booking like Passenger info, Transport, Accommodation Extra's, and Prices.
* Error: if booking cannot be found with given request data
The price description can contain only a description or a description plus additional information. If a price
component relates to the package itself only a description is given, for example "reissom". If a price is related
to a specific component additional information is given to trace the price back to the component. This information
is in the following format seperated with a pipe "|":
1. Description
2. Type (T = Transport, A = Accommodation/Unit, TE = Transport Extra, E = Extra)
3. Relation (depending on type)
T = TransportID
A = AccommodationID, UnitID and ArrivalDate
TE = TransportID, GroupID, ExtraID, StartDate
E = GroupID, ExtraID, startDate
Examples:
- Package: "Reissom"
- Transport (T) : "Luchthaventoeslag|T|f36627fe-b3ec-4a08-afba-820ff267a7e5#20231103 OR 503 AMSMBJ"
- Accommodation(A): "Vroegboekkorting|A|A0192836|2919b8e9-7ae3-4883-9ecf-0377d8a8d202|11/03/2023"
- Transport Extra (TE): "Klasse (PWIM)|TE|f36627fe-b3ec-4a08-afba-820ff267a7e5#20231103 OR 503 AMSMBJ|SEAT|PWIM|2023-11-03"
- Extra (E): "Transfer (TXX)|E|Transfer|TXX|2023-11-03"
security:
- oAuth2ClientCredentials: [ ]
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/RecapRequestTree'
examples:
RecapRequestExample:
$ref: '#/components/examples/RecapRequestExample'
responses:
'200':
description: RecapRequest Handled
content:
application/xml:
schema:
$ref: '#/components/schemas/RecapResponseTree'
examples:
RecapResponseExample:
$ref: '#/components/examples/RecapResponseExample'
RecapResponse (error):
$ref: '#/components/examples/ErrorMessageExample'
'400':
description: Missing elements in Request
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Server Error
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
/travelmessage/v3.1/cancellationrequest:
post:
tags:
- TravelMessage
summary: Does a CancellationRequest
description: |
Two messages will be send by cancelling a booking; a CancellationRequest followed by a CancellationConfirmedRequest.
This is because of the possible cancellation costs which require confirmation.
For TUI now only CancellationConfirmedRequest is implemented. No check yet for getting the cancellation cost
first.
**Request:**
* "*BookID*", "*DepartureDate*" and "*ContactName*" are required in the SecurityInfo group.
**Response:**
* Given back cancellation costs when cancellation is done.
* Error: If booking is not found or booking is already cancelled
security:
- oAuth2ClientCredentials: [ ]
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/CancellationRequestTree'
examples:
CancellationRequestExample:
$ref: '#/components/examples/CancellationConfirmedRequestExample'
responses:
'200':
description: CancellationRequest Handled
content:
application/xml:
schema:
$ref: '#/components/schemas/CancellationResponseTree'
examples:
CancellationResponse:
$ref: '#/components/examples/CancellationConfirmedResponseExample'
CancellationResponse (Already Cancelled):
$ref: '#/components/examples/CancellationConfirmedResponseAcExample'
CancellationResponse (error):
$ref: '#/components/examples/ErrorMessageExample'
'400':
description: Missing elements in Request
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Server Error
content:
application/xml:
schema:
$ref: '#/components/schemas/ProblemDetails'
components:
securitySchemes:
oAuth2ClientCredentials:
type: oauth2
description: This API uses OAuth 2 with the implicit grant flow.
flows:
clientCredentials:
tokenUrl: 'https://prod.api.tui/oauth2/token'
scopes: {}
schemas:
# Enums
AccommodationType:
type: string
enum:
- alb
- apo
- app
- bnb
- bng
- bry
- cam
- car
- cha
- cpr
- cru
- est
- ghf
- gue
- hos
- hot
- hui
- kas
- mai
- mot
- pen
- pou
- res
- rh
- ron
- sch
- tnt
- vak
- vil
- wng
- ALB
- APO
- APP
- BNB
- BNG
- BRY
- CAM
- CAR
- CHA
- CPR
- CRU
- EST
- GHF
- GUE
- HOS
- HOT
- HUI
- KAS
- MAI
- MOT
- PEN
- POU
- RES
- RH
- RON
- SCH
- TNT
- VAK
- VIL
- WNG
AgeType:
type: string
enum:
- Max
- Min
xml:
attribute: true
BoardType:
type: string
enum:
- lg # logies
- lo
- hp
- vp
- ab
- bb
- cb
- br
- vb
- ai
- dv
- ph
- pv
- pa
- ua
- ld
- LG
- LO
- HP
- VP
- AB
- BB
- CB
- BR
- VB
- AI
- DV
- PH
- PV
- PA
- UA
- LD
ClassTip:
type: string
enum:
- Yes
- No
xml:
attribute: true
ControlLanguage:
type: string
enum:
- NL
xml:
attribute: true
CurrencyType:
type: string
enum:
- EUR
xml:
attribute: true
DocumentAddressTypeID:
type: string
enum:
- KLT #Adressing to the customer
- RSB #Adressingto the travelagency
DocumentDeliveryID:
type: string
enum:
- EMAIL #Information will bes end by e-mail
- POST #Information will be send by postal services
- URL #Information can be downloaded using the supported URL
DocumentTypeID:
type: string
enum:
- HTML #HTML-format
- PAPER #The document will be deliverd on paper
- PDF #PDF-format
- TEXT #Text-format
- XML #XML-format
DurationType:
type: string
enum:
- dagen
- nachten
xml:
attribute: true
DutchDays:
type: string
enum:
- ma
- di
- wo
- do
- vr
- za
- zo
ExtrasCategoryType:
type: string
enum:
- autoverhuur
- accomodatieservice
- bagage
- camperverhuur
- citycards
- entreekaarten
- excursiecards
- fietsverhuur
- ferryservice
- overnachtingshotel
- openbaarvervoerkaarten
- parkeerservice
- restaurant
- skischool
- skimateriaal
- skipas
- taxiservice
- transfer
- transportservice
- stoelen
FacilityType:
type: string
enum:
- 1e
- 1k
- 2e
- 2k
- 3e
- 3k
- ac
- az
- ba
- bd
- bg
- bi
- bk
- bl
- br
- bt
- bu
- bz
- do
- dz
- et
- ex
- fr
- gl
- gs
- in
- js
- kn
- ks
- kt
- lu
- lz
- ma
- mz
- no
- oo
- pz
- sp
- st
- su
- tb
- te
- tz
- ve
- vz
- wc
- we
- wk
- zq
- zu
- zw
- zx
- zy
- zz
- 1E
- 1K
- 2E
- 2K
- 3E
- 3K
- AC
- AZ
- BA
- BD
- BG
- BI
- BK
- BL
- BR
- BT
- BU
- BZ
- DO
# --- truncated at 32 KB (239 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/tui-group/refs/heads/main/openapi/tui-group-tui-b2bota-g7-travelmessage-openapi.yml