Getting Started
This guide walks you through calling the Meta Partner Packages & Flights API, from obtaining an access token to running your first package and flight searches. All endpoints are served over HTTPS and return application/json.
To integrate, you will need:
- A Client ID and Client Secret, provided to you by TUI.
- An agent code, agreed with TUI. Use the same agent code for every request.
If you don't yet have credentials, contact the Meta Package Team to request access: pip.meta.packages@mail.tuigroup.com
Base URLs
| Environment | Base URL |
|---|---|
| Production | https://prod.api.tui/sales/pip-package/partner |
| Pre-Production | https://pre-prod.api.tui/sales/pip-package/partner |
Use the Pre-Production environment to build and test your integration before going live.
Authentication
The API uses the OAuth 2.0 Client Credentials flow. Before calling any endpoint, request an access token and then send it as a Bearer token on every request.
1. Request an access token
Send your Client ID and Client Secret as HTTP Basic credentials (base64(clientId:clientSecret)) to the token endpoint.
| Environment | Token URL |
|---|---|
| Production | https://prod.api.tui/oauth2/token |
| Pre-Production | https://pre-prod.api.tui/oauth2/token |
curl --request POST \
--url https://prod.api.tui/oauth2/token \
--header 'Accept: application/json' \
--header 'Authorization: Basic <base64(clientId:clientSecret)>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'grant_type=client_credentials'
The response contains an access_token. Reuse the token until it expires rather than requesting a new one per call. The token grants the read:sales-meta-package scope.
2. Call the API with the token
Send the token in the Authorization header:
--header 'Authorization: Bearer <access_token>'
Search Flights
GET /{market}/flights/search/{agent}
Returns available flights for a market, with live pricing and availability.
Parameters
| Parameter | In | Required | Description |
|---|---|---|---|
market |
path | Yes | The source market code. Accepted values: dk, fi, no, se. |
agent |
path | Yes | Your agent code. Use the same for every request. Example: tui. |
adults |
query | Yes | Number of adults. Any integer between 1 and 6. |
childAges |
query | No | Comma-separated child ages, no spaces. Example: 0,5,14. Age ranges — infant: 0-1, child: 2-12, youth: 13-17, adult: 18+. |
departureCode |
query | No | Departure airport. Any valid IATA airport code. |
departureDate |
query | No | Date of departure. ISO 8601 format. Example: 2035-01-31. |
destinationCode |
query | No | Destination airport. Any valid IATA airport code. |
returnDate |
query | No | Date of return. ISO 8601 format. Example: 2035-01-31. |
duration |
query | No | Number of nights between departure date and return date. |
oneWay |
query | No | If true, only one-way flights are returned; if false, one-way flights are excluded; if omitted, all flights are returned. |
limit |
query | No | Number of items to return. Default: 100, maximum: 1000. |
offset |
query | No | Used for pagination. For performance reasons, do not use without adding other query parameters. |
tuiOnly |
query | No | If true, returns flights from TUIfly Nordic and TUI Airways. If false or omitted, returns all airlines. |
Example
curl --location 'https://prod.api.tui/sales/pip-package/partner/no/flights/search/tui?adults=2&limit=10&offset=0' \
--header 'Authorization: Bearer <access_token>'
Flight Route Feed
GET /{market}/flights/{agent}/route-feed
Returns the current flight route feed for a market.
Parameters
| Parameter | In | Required | Description |
|---|---|---|---|
market |
path | Yes | The source market code. Accepted values: dk, fi, no, se. |
agent |
path | Yes | Your agent code. |
Example
curl --location 'https://prod.api.tui/sales/pip-package/partner/no/flights/tui/route-feed' \
--header 'Authorization: Bearer <access_token>'
Search Packages
GET /{market}/packages/{pax}
Returns all available packages for a market and passenger configuration.
Important: Remember to append your own agent string (
&agent=youragentstring) to theurlToBookinglink in each returned package.
Parameters
| Parameter | In | Required | Description |
|---|---|---|---|
market |
path | Yes | The source market code. Accepted values: dk, fi, no, se. |
pax |
path | Yes | The pax configuration. Example values: 2000 (two adults), 2010 (two adults + one child), 2020 (two adults + two children). |
agent |
query | Yes | Your agent code. Use the same for every request. |
fromid |
query | No | The package id to start from. Returned items have an id that comes after this value when sorted ascending. |
limit |
query | No | Number of items to return. Default: 100, maximum: 1000. |
offset |
query | No | Used for pagination. For performance reasons, do not use without adding other query parameters. |
departurecode |
query | No | Departure airport. Any valid IATA airport code. |
departuredate |
query | No | Date of departure. ISO 8601 format. Example: 2035-01-31. |
destinationcode |
query | No | Destination airport. Any valid IATA airport code. |
duration |
query | No | Number of nights in the accommodation. |
accommodationid |
query | No | The id of the accommodation to retrieve. |
maxdaystodeparture |
query | No | Maximum number of days to departure. Returned items depart within this many days from today. |
departuredatefrom |
query | No | Earliest departure date. ISO 8601 format. Example: 2035-01-31. |
departuredatetill |
query | No | Latest departure date. ISO 8601 format. Example: 2035-01-31. |
Example
curl --location 'https://prod.api.tui/sales/pip-package/partner/se/packages/2000?agent=tui&limit=10&offset=0' \
--header 'Authorization: Bearer <access_token>'
Paging Through Packages Efficiently
For best performance, provide a departuredate together with the offset. Supplying only an offset is resource-intensive: it causes significant CPU load per request and can overwhelm the backend with as few as five concurrent requests. Adding a departure date limits the number of candidate records, which lowers CPU usage, lets the backend handle far more concurrent requests, and returns results faster.
Page through one departure date at a time, incrementing the offset by limit:
https://prod.api.tui/sales/pip-package/partner/se/packages/2000?agent=tui&limit=1000&offset=0&departuredate=2024-09-25
https://prod.api.tui/sales/pip-package/partner/se/packages/2000?agent=tui&limit=1000&offset=1000&departuredate=2024-09-25
https://prod.api.tui/sales/pip-package/partner/se/packages/2000?agent=tui&limit=1000&offset=2000&departuredate=2024-09-25
Then move on to the next date:
https://prod.api.tui/sales/pip-package/partner/se/packages/2000?agent=tui&limit=1000&offset=0&departuredate=2024-09-26
https://prod.api.tui/sales/pip-package/partner/se/packages/2000?agent=tui&limit=1000&offset=1000&departuredate=2024-09-26
https://prod.api.tui/sales/pip-package/partner/se/packages/2000?agent=tui&limit=1000&offset=2000&departuredate=2024-09-26
Keep incrementing the offset by limit while totalNumberOfItems equals your limit (e.g. 1000), then continue with the next date.
Fetch Schedules
To keep request/response efficient, package fetching uses a market-driven schedule. Subscribe to the time slots that apply to your market; you will receive the corresponding schedule when you are onboarded. This schedule applies to Packages only.
| Fetch Round | Markets | Schedule (CET) |
|---|---|---|
| 1st Fetch | SE | 05h00 |
| NO, DK, FI | 05h30 | |
| 2nd Fetch | SE | 09h00 |
| NO, DK, FI | 09h30 | |
| 3rd Fetch | SE | 15h00 |
| NO, DK, FI | 15h30 | |
| 4th Fetch | SE | 21h00 |
| NO, DK, FI | 21h30 |
Reference
- Interactive docs: https://prod.api.tui/sales/pip-package/partner/docs/ — open to the internet, but requests require authentication.
- OpenAPI spec: https://prod.api.tui/sales/pip-package/partner/docs/spec
