> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developer.nibtravelinsurance.com/reference/quotes-api/quote/create-update-quote/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.nibtravelinsurance.com/_mcp/server. # Create / Update Quote POST https://api-staging.nibtravelinsurance.com/quotes/v2/{brandCode}/quote Content-Type: application/json | Minimum Payload Reference: https://developer.nibtravelinsurance.com/reference/quotes-api/quote/create-update-quote ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `brandCode` (enum, required) — A supported NIB Travel brand code, such as “wn”. - Allowed values: `nibau`, `nibnz`, `tidau`, `wn` ### Body (application/json | Minimum Payload) This endpoint expects an object. - `stage` (enum, optional) — Represents the stage the quote is up to. This can be used for tracking quotes across the different stages in an embedded purchase path. - Allowed values: `INITIAL`, `BASEQUOTE`, `OPTIONS`, `DETAILS`, `MEDICAL_SCREENING`, `PAYMENT` - `input` (QuoteInputMinimumAlt, optional) — Represents the quote parameters used to price the travel insurance booking. ## Response ### 200 Success - `id` (string, optional) - `isNew` (boolean, optional, default: false) - `isPurchased` (boolean, optional, default: false) - `hasConfigChanged` (boolean, optional, default: false) - `isPurchaseInitiated` (boolean, optional, default: false) - `clientSessionId` (string, optional) - `policyNumber` (string, optional) — The policy number is generated when the policy purchase has completed. - `stage` (enum, optional) — Represents the stage the quote is up to. This can be used for tracking quotes across the different stages in an embedded purchase path. - Allowed values: `INITIAL`, `BASEQUOTE`, `OPTIONS`, `DETAILS`, `MEDICAL_SCREENING`, `PAYMENT` - `evaluatedAt` (string, optional) - `input` (QuoteInput, optional) - `priceResults` (list of QuotePriceResult, optional) - `prices` (list of QuotePriceSummary, optional) — Returns an array of prices with available plans based on the parameters quoted. - `clientInfo` (ClientInfo, optional) - `audit` (Audit, optional) - `customerUserId` (long, optional, default: 0) - `brandCode` (string, optional) - `validation` (Validation, optional) ## Types ### QuoteInputMinimumAlt - `customerInterfaceId` (long, optional, default: 0) — Set to a value of 8 for external API integration. - `quoteType` (enum, optional) — Single or Multi Trip. e.g. SINGLETRIP - Allowed values: `SINGLETRIP`, `MULTITRIP` - `homeAddress` (AddressInputMinimum, optional) — Represents the home address of the primary policy holder who is purchasing the policy. - `destinationCountryCodes` (list of string, optional) — List of destination countries. There is a products API endpoint to determine the supported destination countries available. - `departureDate` (string, optional) — Departure date for the trip. - `coverEndDate` (string, optional) — Return date for the trip. - `policyHolders` (list of PolicyHolderInputMinimumAlt, optional) — Basic traveller details including traveller ages are needed to be submitted as part of the initial quote request. This information is required to retrieve a price based on defined age bands. ### QuoteInput - `cultureCode` (string, optional) - `customerInterfaceId` (long, optional, default: 0) - `quoteType` (enum, optional) - Allowed values: `SINGLETRIP`, `MULTITRIP` - `overrideDuplicateCheck` (boolean, optional, default: false) - `skipPersistence` (boolean, optional, default: false) - `planId` (long, optional, default: 0) - `quoteReferencePlanId` (long, optional, default: 0) - `homeAddress` (AddressInput, optional) — Represents the home address of the primary policy holder who is purchasing the policy. - `alternateHomeAddress` (AddressInput, optional) - `destinationCountryCodes` (list of string, optional) — A list of destination country codes or regions, the format is an extended version of ISO-3166 Alpha 3 to include coverage for regions as well as country lists. - `departureDate` (string, optional) — Departure date for the trip. - `returnDate` (string, optional) — Return date for the trip. - `coverEndDate` (string, optional) - `campaignCode` (string, optional) — Can pass in specific discount/campaign codes if a specific discount code is required. This is to allow specific published discount codes are passed through the API. - `partnerCode` (string, optional) - `tripValue` (double, optional) — Optional rating factor used in medical screening, which provides the total value of the trip purchased. - `footprintsDonation` (FootprintsDonationInput, optional) - `basicOptions` (list of BasicOptionInput, optional) - `adventureActivitiesOption` (AdventureActivitiesOptionInput, optional) — aaaa - `specifiedItemOption` (SpecifiedItemOptionInput, optional) - `cancellationOption` (CancellationOptionInput, optional) - `policyHolders` (list of PolicyHolderInput, optional) — Full policy holder information including contact details. (E-mail address, mobile number) It also includes TravelClear options if applicable. - `regulatoryDeclarations` (list of RegulatoryDeclarationInput, optional) - `externalIdentifiers` (ExternalIdentifiers, optional) - `validation` (Validation, optional) ### QuotePriceResult - `planId` (long, optional, default: 0) - `standardExcess` (double, optional) - `campaignId` (long, optional, default: 0) - `campaignDiscountPercentage` (double, optional) - `basePriceResult` (BasePriceResult, optional) - `optionPriceResults` (list of OptionPriceResult, optional) ### QuotePriceSummary - `planId` (long, optional, default: 0) - `totalPrice` (double, optional) - `standardExcess` (double, optional) - `campaignDiscountPercentage` (double, optional) - `campaignDiscount` (double, optional) - `partnerDiscount` (double, optional) - `basePrice` (BasePriceSummary, optional) - `specifiedItemOptionPrice` (OptionPriceSummary, optional) - `adventureActivitiesOptionPrice` (OptionPriceSummary, optional) - `basicOptionPrices` (list of OptionPriceSummary, optional) - `tripCancellationPrice` (OptionPriceSummary, optional) ### ClientInfo - `ipAddress` (string, optional) - `userAgent` (string, optional) - `referer` (string, optional) ### Audit - `createdAt` (string, optional) - `updatedAt` (string, optional) - `createdByUsername` (string, optional) - `updatedByUsername` (string, optional) - `createdByUserId` (long, optional, default: 0) - `updatedByUserId` (long, optional, default: 0) ### Validation - `isValid` (boolean, optional, default: false) - `errors` (list of Notification, optional) ### AddressInputMinimum - `provinceCode` (string, optional) - `countryCode` (string, optional) - `validation` (Validation, optional) ### PolicyHolderInputMinimumAlt - `age` (integer, optional) - `isDependent` (boolean, optional, default: false) - `isPrimary` (boolean, optional, default: false) - `isAmbiguous` (boolean, optional, default: false) - `validation` (Validation, optional) ### AddressInput - `addressLine1` (string, optional) - `addressLine2` (string, optional) - `addressLine3` (string, optional) - `addressLine4` (string, optional) - `provinceCode` (string, optional) - `countryCode` (string, optional) - `postalCode` (string, optional) - `validation` (Validation, optional) ### FootprintsDonationInput - `donationAmount` (double, optional) - `donationProjectId` (long, optional, default: 0) - `donationAccountCode` (string, optional) - `validation` (Validation, optional) ### BasicOptionInput - `optionType` (string, optional) - `isOptedIn` (boolean, optional, default: false) - `optedInTotalValue` (double, optional) - `optedInOffsetValue` (double, optional) - `validation` (Validation, optional) ### AdventureActivitiesOptionInput - `optionType` (string, optional) - `adventureActivityIds` (list of long, optional) - `validation` (Validation, optional) ### SpecifiedItemOptionInput - `optionType` (string, optional) - `specifiedItems` (list of SpecifiedItemInput, optional) - `validation` (Validation, optional) ### CancellationOptionInput - `optionType` (string, optional) - `cancellationCoverLimit` (double, optional) - `validation` (Validation, optional) ### PolicyHolderInput - `guid` (string, optional) - `isDependent` (boolean, optional, default: false) - `age` (integer, optional) - `dateOfBirth` (string, optional) - `isPrimary` (boolean, optional, default: false) - `firstName` (string, optional) - `lastName` (string, optional) - `phoneNumber` (string, optional) - `emailAddress` (string, optional) - `travelClearOption` (TravelClearOptionInput, optional) - `residentIdentifier` (string, optional) - `validation` (Validation, optional) ### RegulatoryDeclarationInput - `hasAgreed` (boolean, optional, default: false) — Parameter indicating that the customer has agreed to the regulatory declarations highlighted in the purchase path. - `termConditionId` (long, optional, default: 0) ### ExternalIdentifiers - `externalMembershipProviderId` (long, optional, default: 0) - `externalMembershipNumber` (string, optional) — External membership number (externalIdentifiers.externalMembershipNumber) Can be used to populate external membership numbers. - `bookingReference` (string, optional) - `marketingSource` (string, optional) ### BasePriceResult - `planId` (long, optional, default: 0) - `netListPrice` (double, optional) - `saleListPrice` (double, optional) - `taxComponents` (list of TaxComponentResult, optional) - `saleListCommission` (double, optional) - `netCampaignDiscount` (double, optional) - `saleCampaignDiscount` (double, optional) - `salePartnerDiscount` (double, optional) - `priceDetails` (list of BasePriceResultDetail, optional) ### OptionPriceResult - `optionId` (long, optional, default: 0) - `optionTypeCode` (string, optional) - `policyHolderGuid` (string, optional) - `netListPrice` (double, optional) - `netListPriceId` (long, optional, default: 0) - `saleListPrice` (double, optional) - `saleListPriceId` (long, optional, default: 0) - `optionCoverageAmount` (double, optional) - `minNetListPrice` (double, optional) - `maxNetListPrice` (double, optional) - `isOptionExplicit` (boolean, optional, default: false) - `isDefault` (boolean, optional, default: false) - `maxItemValuePerPolicy` (double, optional) - `minSaleListPrice` (double, optional) - `maxSaleListPrice` (double, optional) - `taxComponents` (list of TaxComponentResult, optional) - `saleListCommission` (double, optional) - `netCampaignDiscount` (double, optional) - `saleCampaignDiscount` (double, optional) - `salePartnerDiscount` (double, optional) - `priceDetails` (list of OptionPriceResultDetail, optional) ### BasePriceSummary - `price` (double, optional) - `campaignDiscount` (double, optional) - `partnerDiscount` (double, optional) - `taxComponents` (list of TaxComponentSummary, optional) ### OptionPriceSummary - `optionId` (long, optional, default: 0) - `optionType` (string, optional) - `policyHolderGuid` (string, optional) - `price` (double, optional) - `campaignDiscount` (double, optional) - `partnerDiscount` (double, optional) - `items` (list of OptionItemPriceSummary, optional) - `displayOrder` (integer, optional) ### Notification - `code` (string, optional) - `message` (string, optional) - `tokens` (map from string to string, optional) - `property` (string, optional) - `value` (string, optional) - `title` (string, optional) - `detail` (string, optional) ### SpecifiedItemInput - `guid` (string, optional) - `name` (string, optional) - `itemValue` (double, optional) - `itemTypeId` (long, optional, default: 0) - `itemTypeCode` (string, optional) - `validation` (Validation, optional) ### TravelClearOptionInput - `optionType` (string, optional) - `isOptedInForScreening` (boolean, optional, default: false) - `isOptedInForCover` (boolean, optional, default: false) - `validation` (Validation, optional) ### TaxComponentResult - `taxName` (string, optional) - `taxRatePercentage` (double, optional) - `taxAmount` (double, optional) ### BasePriceResultDetail - `age` (integer, optional) - `ageRangeId` (long, optional, default: 0) - `netListPrice` (double, optional) - `netListPriceId` (long, optional, default: 0) - `saleListPrice` (double, optional) - `saleListPriceId` (long, optional, default: 0) - `saleListCommission` (double, optional) - `netCampaignDiscount` (double, optional) - `saleCampaignDiscount` (double, optional) - `salePartnerDiscount` (double, optional) ### OptionPriceResultDetail - `optionSubTypeCode` (string, optional) - `itemGuid` (string, optional) - `netListPrice` (double, optional) - `netListPriceId` (long, optional, default: 0) - `saleListPrice` (double, optional) - `saleListPriceId` (long, optional, default: 0) - `saleListCommission` (double, optional) - `netCampaignDiscount` (double, optional) - `saleCampaignDiscount` (double, optional) - `salePartnerDiscount` (double, optional) - `saleListPricePercentage` (double, optional) - `minItemValue` (double, optional) - `maxItemValuePerUnit` (double, optional) - `specifiedItemTypeId` (long, optional, default: 0) - `specifiedItemTypeCode` (string, optional) - `specifiedItemTypeName` (string, optional) - `isDefault` (boolean, optional, default: false) ### TaxComponentSummary - `taxName` (string, optional) - `taxRatePercentage` (double, optional) - `taxAmount` (double, optional) ### OptionItemPriceSummary - `guid` (string, optional) - `price` (double, optional) - `campaignDiscount` (double, optional) - `partnerDiscount` (double, optional) ## Examples **Request** ```json {} ``` **Response** ```json { "id": "id", "isNew": true, "isPurchased": true, "hasConfigChanged": true, "isPurchaseInitiated": true, "clientSessionId": "clientSessionId", "policyNumber": "policyNumber", "stage": "INITIAL", "evaluatedAt": "evaluatedAt", "input": { "cultureCode": "cultureCode", "customerInterfaceId": 8, "quoteType": "SINGLETRIP", "overrideDuplicateCheck": true, "skipPersistence": true, "planId": 1000000, "quoteReferencePlanId": 1000000, "homeAddress": { "addressLine1": "addressLine1", "addressLine2": "addressLine2", "addressLine3": "addressLine3", "addressLine4": "addressLine4", "provinceCode": "provinceCode", "countryCode": "countryCode", "postalCode": "postalCode" }, "alternateHomeAddress": { "addressLine1": "addressLine1", "addressLine2": "addressLine2", "addressLine3": "addressLine3", "addressLine4": "addressLine4", "provinceCode": "provinceCode", "countryCode": "countryCode", "postalCode": "postalCode" }, "destinationCountryCodes": [ "destinationCountryCodes" ], "departureDate": "2024-11-30", "returnDate": "2024-11-30", "coverEndDate": "2024-11-30", "campaignCode": "campaignCode", "partnerCode": "partnerCode", "tripValue": 1.1, "footprintsDonation": { "donationAmount": 1.1, "donationProjectId": 1000000, "donationAccountCode": "donationAccountCode" }, "basicOptions": [ {} ], "adventureActivitiesOption": { "optionType": "optionType", "adventureActivityIds": [ 1000000 ] }, "specifiedItemOption": { "optionType": "optionType", "specifiedItems": [ {} ] }, "cancellationOption": { "optionType": "optionType", "cancellationCoverLimit": 1.1 }, "policyHolders": [ { "dateOfBirth": "2024-11-30" } ], "regulatoryDeclarations": [ {} ], "externalIdentifiers": { "externalMembershipProviderId": 1000000, "externalMembershipNumber": "externalMembershipNumber", "bookingReference": "bookingReference", "marketingSource": "marketingSource" }, "validation": { "isValid": true, "errors": [ {} ] } }, "priceResults": [ { "planId": 1000000, "standardExcess": 1.1, "campaignId": 1000000, "campaignDiscountPercentage": 1.1, "optionPriceResults": [ {} ] } ], "prices": [ { "planId": 1000000, "totalPrice": 1.1, "standardExcess": 1.1, "campaignDiscountPercentage": 1.1, "campaignDiscount": 1.1, "partnerDiscount": 1.1, "basicOptionPrices": [ {} ] } ], "clientInfo": { "ipAddress": "ipAddress", "userAgent": "userAgent", "referer": "referer" }, "audit": { "createdAt": "createdAt", "updatedAt": "updatedAt", "createdByUsername": "createdByUsername", "updatedByUsername": "updatedByUsername", "createdByUserId": 1000000, "updatedByUserId": 1000000 }, "customerUserId": 1000000, "brandCode": "brandCode", "validation": { "isValid": true, "errors": [ {} ] } } ``` **SDK Code** ```python import requests url = "https://api-staging.nibtravelinsurance.com/quotes/v2/nibau/quote" payload = "{}" headers = { "Authorization": "Bearer ", "Content-Type": "application/json | Minimum Payload" } response = requests.post(url, data=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api-staging.nibtravelinsurance.com/quotes/v2/nibau/quote'; const options = { method: 'POST', headers: { Authorization: 'Bearer ', 'Content-Type': 'application/json | Minimum Payload' }, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-staging.nibtravelinsurance.com/quotes/v2/nibau/quote" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json | Minimum Payload") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api-staging.nibtravelinsurance.com/quotes/v2/nibau/quote") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json | Minimum Payload' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-staging.nibtravelinsurance.com/quotes/v2/nibau/quote") .header("Authorization", "Bearer ") .header("Content-Type", "application/json | Minimum Payload") .body("{}") .asString(); ``` ```php request('POST', 'https://api-staging.nibtravelinsurance.com/quotes/v2/nibau/quote', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json | Minimum Payload', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api-staging.nibtravelinsurance.com/quotes/v2/nibau/quote"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json | Minimum Payload"); request.AddParameter("application/json | Minimum Payload", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json | Minimum Payload" ] let postData = NSData(data: "{}".data(using: String.Encoding.utf8)!) let request = NSMutableURLRequest(url: NSURL(string: "https://api-staging.nibtravelinsurance.com/quotes/v2/nibau/quote")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```