HRN V2 API
As part of our ongoing digital development roadmap, we are excited to announce Hurtigruten V2 API.
Featuring a new data model, V2 is easier to integrate, while enhanced data integrity significantly reduces the risk of incomplete data, ensuring a smoother and more consistent experience for developers and clients.
The V2 API is being released in phases, beginning with our read-only API. The read only API provides access to Hurtigruten availability, pricing and content describing Hurtigruten’s offerings, ships, cabins and ports.
Booking management, payments, and more are to be announced at a later date.
Should you encounter any issues or have questions, our technical team will be happy to assist you. Please reach out via Jira Service Management by raising a request here: B2B Support Portal.
Your feedback is invaluable in helping us shape future improvements. We encourage you to share your feedback through the following link.
Getting Started
Environments
We maintain a staging environment which you can use to test, play, and develop against. The staging environment behaves identically to the production environment, so when you're ready to make the switch, you need only switch the base URL.
Staging: https://partner.staging.hurtigruten.com/api/v2
Production: https://partner.hurtigruten.com/api/v2
Authentication
Note
If you have a valid user_key for the V1 API, you can use it here as your agencyId.
As part of your onboarding to the API, you will have been provisioned a clientId, a clientSecret and an agencyId.
You use these credentials to obtain a bearer token, which lets you access the Partner API.
- Staging: https://b2b-portal-staging.eu.auth0.com/oauth/token
- Production: https://b2b-portal-production.eu.auth0.com/oauth/token
And one of the following values for audience:
- Staging: https://staging.partner.hurtigruten.com/api
- Production: https://partner.hurtigruten.com/api
curl --request POST \
--url https://b2b-portal-staging.eu.auth0.com/oauth/token \
--header 'content-type: application/json' \
--data '{"client_id":"YOUR_CLIENT_ID","client_secret":"YOUR_CLIENT_SECRET","agency_id":"YOUR_AGENCY_ID","audience":"https://staging.partner.hurtigruten.com/api","grant_type":"client_credentials"}'
Response
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"scope": "application:Partner.WebApi",
"expires_in": 86400,
"token_type": "Bearer"
}
The bearer token is valid for a set amount of time as indicated by expires_in (in seconds) and should be cached for re-use. You then attach your bearer token in the header of your requests to the Partner API
curl --location 'https://partner.staging.hurtigruten.com/api/v2/example-endpoint' \
--header 'Authorization: Bearer "YOUR_BEARER_TOKEN"'