For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGuidesAPI ReferenceChangelog
HomeGuidesAPI ReferenceChangelog
  • Quotes API
      • POSTQuote Purchase
  • Products API
  • Policies API
  • Card Token API
  • Users API
LogoLogo
Quotes APIPurchase

Quote Purchase

POST
https://api-staging.nibtravelinsurance.com/quotes/v2/:brandCode/purchase
POST
/quotes/v2/:brandCode/purchase
$curl -X POST https://api-staging.nibtravelinsurance.com/quotes/v2/nibau/purchase \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json | Minimum Payload" \
> -d '{}'
200Successful
1{
2 "quote": {
3 "id": "id",
4 "isNew": true,
5 "isPurchased": true,
6 "hasConfigChanged": true,
7 "isPurchaseInitiated": true,
8 "clientSessionId": "clientSessionId",
9 "policyNumber": "policyNumber",
10 "stage": "INITIAL",
11 "evaluatedAt": "evaluatedAt",
12 "input": {
13 "cultureCode": "cultureCode",
14 "customerInterfaceId": 8,
15 "quoteType": "SINGLETRIP",
16 "overrideDuplicateCheck": true,
17 "skipPersistence": true,
18 "planId": 1000000,
19 "quoteReferencePlanId": 1000000,
20 "destinationCountryCodes": [
21 "destinationCountryCodes"
22 ],
23 "departureDate": "2024-11-30",
24 "returnDate": "2024-11-30",
25 "coverEndDate": "2024-11-30",
26 "campaignCode": "campaignCode",
27 "partnerCode": "partnerCode",
28 "tripValue": 1.1,
29 "basicOptions": [
30 {}
31 ],
32 "policyHolders": [
33 {
34 "dateOfBirth": "2024-11-30"
35 }
36 ],
37 "regulatoryDeclarations": [
38 {}
39 ]
40 },
41 "priceResults": [
42 {}
43 ],
44 "prices": [
45 {}
46 ],
47 "clientInfo": {
48 "ipAddress": "ipAddress",
49 "userAgent": "userAgent",
50 "referer": "referer"
51 },
52 "audit": {
53 "createdAt": "createdAt",
54 "updatedAt": "updatedAt",
55 "createdByUsername": "createdByUsername",
56 "updatedByUsername": "updatedByUsername",
57 "createdByUserId": 1000000,
58 "updatedByUserId": 1000000
59 },
60 "customerUserId": 1000000,
61 "brandCode": "brandCode",
62 "validation": {
63 "isValid": true,
64 "errors": [
65 {}
66 ]
67 }
68 },
69 "cardToken": {
70 "token": "token",
71 "source": "source",
72 "validation": {
73 "isValid": true,
74 "errors": [
75 {}
76 ]
77 }
78 },
79 "threeDSRequestInfo": {
80 "userAgent": "userAgent",
81 "acceptHeader": "acceptHeader",
82 "acceptLanguage": "acceptLanguage",
83 "origin": "origin",
84 "threeDSStatus": "threeDSStatus",
85 "threeDSRequest": "threeDSRequest",
86 "browserInfo": {
87 "color": "color",
88 "height": "height",
89 "width": "width",
90 "tzOffset": "tzOffset",
91 "javaEnabled": "javaEnabled"
92 }
93 },
94 "paymentIds": "paymentIds",
95 "threeDSResponseInfo": {
96 "threeDSStatus": "threeDSStatus",
97 "threeDSRequestPattern": "threeDSRequestPattern",
98 "threeDSResponse": "threeDSResponse"
99 },
100 "paymentResult": "paymentResult",
101 "paymentMethod": "paymentMethod",
102 "validation": {
103 "isValid": true,
104 "errors": [
105 {}
106 ]
107 }
108}
Send final quote request for purchase and receive confirmation of policy purchase.
Was this page helpful?
Previous

Email quote

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

brandCodeenumRequired

A supported NIB Travel brand code, such as “wn”

Allowed values:

Request

This endpoint expects an object.
quoteobjectOptional
cardTokenobjectOptional

Tokenised credit card information – Unredacted credit cards should not be passed through the Quote API.

validationobjectOptional

Response

Success
quoteobject
cardTokenobject

Tokenised credit card information – Unredacted credit cards should not be passed through the Quote API.

threeDSRequestInfoobject
paymentIdsstring
threeDSResponseInfoobject
paymentResultstring
paymentMethodstring
validationobject