Skip to main content

Migration guide

Overview

This documentation is a guide to support you with the migration from v1.0 to v3 of the Culture API, previously known as the Reference API.

What's changing

We tried to keep the changes to this API as minimal as possible in order to make it easy to migrate.

Key changes:

  • The API key is now passed as a header
  • The response keys are in camelCase instead of PascalCase
  • We added a status field
  • We removed the RoundingCoefficient field from the currencies response

Changes

info

What are the variables

Common changes

  1. Instead of sending the API as a query parameter, you will have to pass it through an x-api-key header.
  2. We added a status field that can be either RESULT_STATUS_COMPLETE or RESULT_STATUS_FAILED.

Markets

The URL changed:

v1.0 (before)v3 (after)
{base-url}/reference/v1.0/countries/{locale}{base-url}/v3/culture/markets/{locale}
Show request example
curl --location --request GET 'https://partners.api.skyscanner.net/apiservices/v3/culture/markets/en-GB' \
--header 'x-api-key: prtl6749387986743898559646983194'

The response also changed slightly:

v1.0 (Before)

response
├── Countries
│ ├── Code
└── └── Name

v3 (After)

response
├── status
├── markets
│ ├── code
└── └── name
Show the response comparison
v1.0 (before)v3 (after)
{
"Countries": [
{
"Code": "AD",
"Name": "Andorra"
},
{
"Code": "AE",
"Name": "United Arab Emirates"
},
{
"Code": "AF",
"Name": "Afghanistan"
},
...
]
}
{
"status": "RESULT_STATUS_COMPLETE",
"markets": [
{
"code": "AD",
"name": "Andorra"
},
{
"code": "AE",
"name": "United Arab Emirates"
},
{
"code": "AF",
"name": "Afghanistan"
},
...
]
}

Locales

The URL changed:

v1.0 (before)v3 (after)
{base-url}/reference/v1.0/locales{base-url}/v3/culture/locales
Show request example
curl --location --request GET 'https://partners.api.skyscanner.net/apiservices/v3/culture/locales' \
--header 'x-api-key: prtl6749387986743898559646983194'

The response also changed slightly:

v1.0 (Before)

response
├── Locales
│ ├── Code
└── └── Name

v3 (After)

response
├── status
├── locales
│ ├── code
└── └── name
Show the response comparison
v1.0 (before)v3 (after)
{
"Locales": [
{
"Code": "ar-AE",
"Name": "العربية (الإمارات العربية المتحدة)"
},
{
"Code": "az-AZ",
"Name": "Azərbaycan­ılı (Azərbaycan)"
},
{
"Code": "bg-BG",
"Name": "български (България)"
},
{
"Code": "ca-ES",
"Name": "català (català)"
},
...
]
}
{
"status": "RESULT_STATUS_COMPLETE",
"locales": [
{
"code": "ar-AE",
"name": "العربية (الإمارات العربية المتحدة)"
},
{
"code": "az-AZ",
"name": "Azərbaycan­ılı (Azərbaycan)"
},
{
"code": "bg-BG",
"name": "български (България)"
},
{
"code": "ca-ES",
"name": "català (català)"
},
...
]
}

Currencies

The URL changed:

v1.0 (before)v3 (after)
{base-url}/reference/v1.0/currencies{base-url}/v3/culture/currencies
Show request example
curl --location --request GET 'https://partners.api.skyscanner.net/apiservices/v3/culture/currencies' \
--header 'x-api-key: prtl6749387986743898559646983194'

The response also changed slightly:

v1.0 (Before)

response
├── Currencies
│ ├── Code
│ ├── Symbol
│ ├── ThousandsSeparator
│ ├── DecimalSeparator
│ ├── SymbolOnLeft
│ ├── SpaceBetweenAmountAndSymbol
│ ├── RoundingCoefficient
└── └── DecimalDigits

v3 (After)

response
├── status
├── currencies
│ ├── code
│ ├── symbol
│ ├── thousandsSeparator
│ ├── decimalSeparator
│ ├── symbolOnLeft
│ ├── spaceBetweenAmountAndSymbol
└── └── decimalDigits

The RoundingCoefficient was removed because we don't support it anymore in Skyscanner. You can always assume that the rounding coefficient is 0.

Show the response comparison
v1.0 (before)v3 (after)
{
"Currencies": [
{
"Code": "USD",
"Symbol": "$",
"ThousandsSeparator": ",",
"DecimalSeparator": ".",
"SymbolOnLeft": true,
"SpaceBetweenAmountAndSymbol": false,
"RoundingCoefficient": 0,
"DecimalDigits": 2
},
...
]
}
{
"status": "RESULT_STATUS_COMPLETE",
"currencies": [
{
"code": "USD",
"symbol": "$",
"thousandsSeparator": ",",
"decimalSeparator": ".",
"symbolOnLeft": true,
"spaceBetweenAmountAndSymbol": false,
"decimalDigits": 2
},
...
]
}