Authorization

nib Travel API access is via a Bearer token authorization set in the HTTP Header. To get a bearer token, the token endpoint in the users api needs to be called first using the user credentials approach. The below curl request shows the input parameters needed for the token endpoint

curl --location 'https://api-staging.nibtravelinsurance.com/users/<<brandCode>>/token'
--data-urlencode 'customerInterfaceId=8'
--data-urlencode 'userTypeId=4'
--data-urlencode 'client_id=API'
--data-urlencode 'grant_type=password'
--data-urlencode 'username=<<userName@someone.com>>'
--data-urlencode 'password=<<SomePassword123$>>'

The endpoint details for Prod and Staging environments are given below

The possible brand codes are given below. Partner brand codes are also supported:

BrandValue
World Nomadswn
NIB AUnibau
NIB New Zealandnibnz
Travel insurance direct AUtidau

The parameter details are given below

ParameterValueDescription
customerInterfaceId88 represents third party website
userTypeId44 represents partner
client_idAPIAPI is for external APIs
grant_typepassword
usernameUser name of the password
passwordPassword of the user

The response from the above request will give the access_token.

nib Travel API endpoints can be accessed by passing this access_token value as bearer token in HTTP Headers like this example given below.

curl --location 'https://api-staging.nibtravelinsurance.com/endpoint'
--header 'Authorization: Bearer <<access_token>>'
Built with