Overview
This developer portal is designed to let you utilise nib Travel APIs. These APIs provide the ability to provide integrated experiences around customised quote and purchase flows.
Environment access
To access the environments utilise the following URL for staging and production environments respectively:
Environment | URL |
---|---|
Staging | https://api-staging.nibtravelinsurance.com |
Production | https://api.nibtravelinsurance.com |
API access conventions
APIs will be required to include a brand code parameter as part of the URL parameters passed in. This will typically be set to the brand instance. Example brand codes for nib Travel brands include:
BrandCode | Brand |
---|---|
WN | World Nomads |
TIDAU | Travel Insurance Direct Australia |
NIBAU | NIB Travel Insurance (Australia) |
Individual APIs are accessed via top level URL prefix, for example:
API | URL |
---|---|
Quotes API | https://api.nibtravelinsurance.com/quotes |
Products API | https://api.nibtravelinsurance.com/products |
Users API | https://api.nibtravelinsurance.com/users |
Policies API | https://api.nibtravelinsurance.com/policies |
API versioning
nib Travel APIs are versioned based on URI versioning. For example the following would be different versions of the same quote API endpoint. The API reference documentation includes the current version of the API in use where relevant:
/v1/{brandCode}/quote
/v2/{brandCode}/quote
Non-breaking changes
Non-breaking API changes do not require a new API version to be introduced. Non breaking API changes include:
- New optional JSON attributes supported on request.
- New optional JSON attributes supported on response.
- New optional query parameters.
Breaking changes
Breaking changes include the following and require a new API version:
- Changes to request or response attribute names.
- Changes of data type for any existing attributes that would break API clients.
- Changes to HTTP error response codes.
- Removal of attribute names in request or response.
- Any query parameter or optional request parameter that changes behaviour when passed.
- Changing meaning of existing data elements - e.g. Price breakdowns, etc.
- Changes to authorisation.
Error handling
nib Travel APIs have the following HTTP status codes returned for error handling:
HTTP Status code | Details |
---|---|
200 | Successful request - Individual responses are documented in Swagger |
400 | Client error - see { error } property returned in JSON format |
401 | Unauthorised request |
403 | Forbidden |
404 | Not found - When accessing resources that don't exist |
422 | Invalid request |
500 | Server error |