---
title: "Quote travel insurance for a trip"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Quote travel insurance for a trip

Path: Nicer API › Booking

`POST /booking/trips/{travelersTripId}/insurance-quotes`

URL: `https://api.nicer.travel/booking/trips/{travelersTripId}/insurance-quotes`

Requests travel-insurance quotes for the trip's insurable itinerary items plus any `customItems`, using the trip's start and end dates as coverage dates. Requires an authenticated company user with access to the trip, an `Idempotency-Key`, and a trip that has both dates (otherwise 409 `INSURANCE_TRIP_DATES_REQUIRED`). Returns the quotes, which segments were insurable and selected, and the per-traveler fields still missing.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Path parameters

- `travelersTripId` (`booking.trips.insuranceQuotes.create.path.travelersTripId`; string, required)

## Header parameters

- `Idempotency-Key` (`booking.trips.insuranceQuotes.create.header.Idempotency-Key`; string, required) — Unique key (8–255 chars) per request; replays return the original result.
- `x-nicer-company` (`booking.trips.insuranceQuotes.create.header.x-nicer-company`; string, required) — Company context. Authentication and tenant membership are validated by the API.

## Request body

_Required._

- `depositDate` (`booking.trips.insuranceQuotes.create.depositDate`; string, required)
  - format: `date` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$`
- `travelers` (`booking.trips.insuranceQuotes.create.travelers`; array of object, required)
  - `travelerId` (`booking.trips.insuranceQuotes.create.travelers.travelerId`; string, required)
    - minLength: `1`
  - `address` (`booking.trips.insuranceQuotes.create.travelers.address`; object, optional)
    - `address1` (`booking.trips.insuranceQuotes.create.travelers.address.address1`; string, optional)
      - maxLength: `200` · minLength: `1`
    - `city` (`booking.trips.insuranceQuotes.create.travelers.address.city`; string, optional)
      - maxLength: `100` · minLength: `1`
    - `countryCode` (`booking.trips.insuranceQuotes.create.travelers.address.countryCode`; string, optional)
      - maxLength: `3` · minLength: `2`
    - `postalCode` (`booking.trips.insuranceQuotes.create.travelers.address.postalCode`; string, optional)
      - maxLength: `20` · minLength: `1`
    - `stateCode` (`booking.trips.insuranceQuotes.create.travelers.address.stateCode`; string, optional)
      - maxLength: `100` · minLength: `1`
  - `birthDate` (`booking.trips.insuranceQuotes.create.travelers.birthDate`; string, optional)
    - format: `date` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$`
  - `email` (`booking.trips.insuranceQuotes.create.travelers.email`; string, optional)
    - format: `email` · pattern: `^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$`
  - `familyName` (`booking.trips.insuranceQuotes.create.travelers.familyName`; string, optional)
    - maxLength: `100` · minLength: `1`
  - `givenName` (`booking.trips.insuranceQuotes.create.travelers.givenName`; string, optional)
    - maxLength: `100` · minLength: `1`
  - `phoneNumber` (`booking.trips.insuranceQuotes.create.travelers.phoneNumber`; string, optional)
    - maxLength: `40` · minLength: `1`
- `customItems` (`booking.trips.insuranceQuotes.create.customItems`; array of object, optional)
  - default: `[]`
  - `amountMinor` (`booking.trips.insuranceQuotes.create.customItems.amountMinor`; integer, required)
    - maximum: `9007199254740991`
  - `countryCode` (`booking.trips.insuranceQuotes.create.customItems.countryCode`; string, required)
    - maxLength: `3` · minLength: `2`
  - `currency` (`booking.trips.insuranceQuotes.create.customItems.currency`; string, required)
    - pattern: `^[A-Z]{3}$`
  - `reference` (`booking.trips.insuranceQuotes.create.customItems.reference`; string, required)
    - maxLength: `255` · minLength: `1`
  - `title` (`booking.trips.insuranceQuotes.create.customItems.title`; string, required)
    - maxLength: `300` · minLength: `1`
  - `startsOn` (`booking.trips.insuranceQuotes.create.customItems.startsOn`; string, optional)
    - format: `date` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$`
- `language` (`booking.trips.insuranceQuotes.create.language`; string, optional)
  - one of `"en-us"`, `"es-es"` · default: `"en-us"`
- `planId` (`booking.trips.insuranceQuotes.create.planId`; string, optional)
  - maxLength: `100` · minLength: `1`
- `segmentIds` (`booking.trips.insuranceQuotes.create.segmentIds`; array of string, optional)
  - minLength: `1` · default: `[]`
- `selectedCoverageCodes` (`booking.trips.insuranceQuotes.create.selectedCoverageCodes`; array of string, optional)
  - maxLength: `100` · minLength: `1` · default: `[]`

## Example request

```json
{
  "customItems": [],
  "depositDate": "2019-08-24",
  "language": "en-us",
  "planId": "string",
  "segmentIds": [],
  "selectedCoverageCodes": [],
  "travelers": [
    {
      "address": {
        "address1": "string",
        "city": "string",
        "countryCode": "str",
        "postalCode": "string",
        "stateCode": "string"
      },
      "birthDate": "2019-08-24",
      "email": "user@example.com",
      "familyName": "string",
      "givenName": "string",
      "phoneNumber": "string",
      "travelerId": "string"
    }
  ]
}
```

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
  headers: { "Idempotency-Key": process.env.NICER_IDEMPOTENCY_KEY, "x-nicer-company": process.env.NICER_COMPANY },
});

await nicer.booking.trips.insuranceQuotes.create({
  "travelersTripId": "string",
  "depositDate": "2019-08-24",
  "travelers": [
    {
      "travelerId": "string"
    }
  ]
});
```

### Nicer CLI

```bash
nicer booking trips insurance-quotes create --travelers-trip-id 'string' --company "$NICER_COMPANY" --input - <<'JSON'
{
  "depositDate": "2019-08-24",
  "travelers": [
    {
      "travelerId": "string"
    }
  ]
}
JSON
```

### cURL

```bash
curl --request POST \
  --url 'https://api.nicer.travel/booking/trips/<travelersTripId>/insurance-quotes' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: string' \
  --header 'x-nicer-company: string' \
  --data '
{
  "customItems": [],
  "depositDate": "2019-08-24",
  "language": "en-us",
  "planId": "string",
  "segmentIds": [],
  "selectedCoverageCodes": [],
  "travelers": [
    {
      "address": {
        "address1": "string",
        "city": "string",
        "countryCode": "str",
        "postalCode": "string",
        "stateCode": "string"
      },
      "birthDate": "2019-08-24",
      "email": "user@example.com",
      "familyName": "string",
      "givenName": "string",
      "phoneNumber": "string",
      "travelerId": "string"
    }
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/booking/trips/<travelersTripId>/insurance-quotes';
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Idempotency-Key': 'string',
    'x-nicer-company': 'string',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({
    customItems: [],
    depositDate: '2019-08-24',
    language: 'en-us',
    planId: 'string',
    segmentIds: [],
    selectedCoverageCodes: [],
    travelers: [
      {
        address: {
          address1: 'string',
          city: 'string',
          countryCode: 'str',
          postalCode: 'string',
          stateCode: 'string'
        },
        birthDate: '2019-08-24',
        email: 'user@example.com',
        familyName: 'string',
        givenName: 'string',
        phoneNumber: 'string',
        travelerId: 'string'
      }
    ]
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/booking/trips/<travelersTripId>/insurance-quotes"

payload = {
    "customItems": [],
    "depositDate": "2019-08-24",
    "language": "en-us",
    "planId": "string",
    "segmentIds": [],
    "selectedCoverageCodes": [],
    "travelers": [
        {
            "address": {
                "address1": "string",
                "city": "string",
                "countryCode": "str",
                "postalCode": "string",
                "stateCode": "string"
            },
            "birthDate": "2019-08-24",
            "email": "user@example.com",
            "familyName": "string",
            "givenName": "string",
            "phoneNumber": "string",
            "travelerId": "string"
        }
    ]
}
headers = {
    "Content-Type": "application/json",
    "Idempotency-Key": "string",
    "x-nicer-company": "string",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "insurableSegmentIds": [
    "string"
  ],
  "missingFields": [
    {
      "fields": [
        "ADDRESS"
      ],
      "travelerId": "string"
    }
  ],
  "quotes": [
    {
      "availableOptions": [
        {
          "coverageCode": "string",
          "coverageName": "string",
          "description": "string",
          "effectiveDate": "2019-08-24",
          "expirationDate": "2019-08-24",
          "isSelected": true,
          "price": {
            "amountMinor": 9007199254740991,
            "currency": "string"
          }
        }
      ],
      "description": "string",
      "expiresAt": "2019-08-24T14:15:22Z",
      "planId": "string",
      "planName": "string",
      "price": {
        "breakdown": {
          "baseMinor": 9007199254740991,
          "discountMinor": 9007199254740991,
          "nicerAdjustmentMinor": 9007199254740991,
          "supplierFeesMinor": 9007199254740991,
          "taxesMinor": 9007199254740991
        },
        "currency": "string",
        "totalMinor": 9007199254740991,
        "insuredTripCostMinor": 9007199254740991
      },
      "productKind": "INSURANCE",
      "providerKey": "string",
      "quoteId": "string",
      "selectedOptions": [
        {
          "coverageCode": "string",
          "coverageName": "string",
          "description": "string",
          "effectiveDate": "2019-08-24",
          "expirationDate": "2019-08-24",
          "isSelected": true,
          "price": {
            "amountMinor": 9007199254740991,
            "currency": "string"
          }
        }
      ],
      "travelerPricing": [
        {
          "coverageAmountMinor": 9007199254740991,
          "policyCostMinor": 9007199254740991,
          "travelerId": "string"
        }
      ]
    }
  ],
  "selectedSegmentIds": [
    "string"
  ]
}
```

- `insurableSegmentIds` (`booking.trips.insuranceQuotes.create.response.200.insurableSegmentIds`; array of string, required)
  - minLength: `1`
- `missingFields` (`booking.trips.insuranceQuotes.create.response.200.missingFields`; array of object, required)
  - `fields` (`booking.trips.insuranceQuotes.create.response.200.missingFields.fields`; array of string, required)
    - one of `"ADDRESS"`, `"BIRTH_DATE"`, `"CITY"`, `"COUNTRY"`, `"EMAIL"`, `"FAMILY_NAME"`, `"GIVEN_NAME"`, `"PHONE_NUMBER"`, `"POSTAL_CODE"`, `"STATE"`
  - `travelerId` (`booking.trips.insuranceQuotes.create.response.200.missingFields.travelerId`; string, required)
    - minLength: `1`
- `quotes` (`booking.trips.insuranceQuotes.create.response.200.quotes`; array of object, required)
  - `availableOptions` (`booking.trips.insuranceQuotes.create.response.200.quotes.availableOptions`; array of object, required)
    - `coverageCode` (`booking.trips.insuranceQuotes.create.response.200.quotes.availableOptions.coverageCode`; string, required)
      - maxLength: `100` · minLength: `1`
    - `isSelected` (`booking.trips.insuranceQuotes.create.response.200.quotes.availableOptions.isSelected`; boolean, required)
    - `price` (`booking.trips.insuranceQuotes.create.response.200.quotes.availableOptions.price`; any of, required)
      - any of the following:
        - `Money`
          - `amountMinor` (`Money.amountMinor`; integer, required)
            - maximum: `9007199254740991` · minimum: `0`
          - `currency` (`Money.currency`; string, required)
            - pattern: `^[A-Z]{3}$`
        - `null`
    - `coverageName` (`booking.trips.insuranceQuotes.create.response.200.quotes.availableOptions.coverageName`; string, optional)
      - maxLength: `300`
    - `description` (`booking.trips.insuranceQuotes.create.response.200.quotes.availableOptions.description`; string, optional)
      - maxLength: `2000`
    - `effectiveDate` (`booking.trips.insuranceQuotes.create.response.200.quotes.availableOptions.effectiveDate`; string, optional)
      - format: `date` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$`
    - `expirationDate` (`booking.trips.insuranceQuotes.create.response.200.quotes.availableOptions.expirationDate`; string, optional)
      - format: `date` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$`
  - `description` (`booking.trips.insuranceQuotes.create.response.200.quotes.description`; string, required)
  - `expiresAt` (`booking.trips.insuranceQuotes.create.response.200.quotes.expiresAt`; string, required)
    - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`
  - `planId` (`booking.trips.insuranceQuotes.create.response.200.quotes.planId`; string, required)
    - minLength: `1`
  - `planName` (`booking.trips.insuranceQuotes.create.response.200.quotes.planName`; string, required)
    - minLength: `1`
  - `price` (`booking.trips.insuranceQuotes.create.response.200.quotes.price`; object, required)
    - `breakdown` (`booking.trips.insuranceQuotes.create.response.200.quotes.price.breakdown`; object, required)
      - `baseMinor` (`booking.trips.insuranceQuotes.create.response.200.quotes.price.breakdown.baseMinor`; any of, required)
        - any of the following: `integer`, `null`
      - `discountMinor` (`booking.trips.insuranceQuotes.create.response.200.quotes.price.breakdown.discountMinor`; integer, required)
        - maximum: `9007199254740991` · minimum: `0`
      - `nicerAdjustmentMinor` (`booking.trips.insuranceQuotes.create.response.200.quotes.price.breakdown.nicerAdjustmentMinor`; integer, required)
        - maximum: `9007199254740991` · minimum: `0`
      - `supplierFeesMinor` (`booking.trips.insuranceQuotes.create.response.200.quotes.price.breakdown.supplierFeesMinor`; any of, required)
        - any of the following: `integer`, `null`
      - `taxesMinor` (`booking.trips.insuranceQuotes.create.response.200.quotes.price.breakdown.taxesMinor`; any of, required)
        - any of the following: `integer`, `null`
    - `currency` (`booking.trips.insuranceQuotes.create.response.200.quotes.price.currency`; string, required)
      - pattern: `^[A-Z]{3}$`
    - `totalMinor` (`booking.trips.insuranceQuotes.create.response.200.quotes.price.totalMinor`; integer, required)
      - maximum: `9007199254740991` · minimum: `0`
    - `insuredTripCostMinor` (`booking.trips.insuranceQuotes.create.response.200.quotes.price.insuredTripCostMinor`; integer, required)
      - maximum: `9007199254740991` · minimum: `0`
  - `productKind` (`booking.trips.insuranceQuotes.create.response.200.quotes.productKind`; string, required)
  - `providerKey` (`booking.trips.insuranceQuotes.create.response.200.quotes.providerKey`; string, required)
  - `quoteId` (`booking.trips.insuranceQuotes.create.response.200.quotes.quoteId`; string, required)
    - minLength: `1`
  - `selectedOptions` (`booking.trips.insuranceQuotes.create.response.200.quotes.selectedOptions`; array of object, required)
    - `coverageCode` (`booking.trips.insuranceQuotes.create.response.200.quotes.selectedOptions.coverageCode`; string, required)
      - maxLength: `100` · minLength: `1`
    - `isSelected` (`booking.trips.insuranceQuotes.create.response.200.quotes.selectedOptions.isSelected`; boolean, required)
    - `price` (`booking.trips.insuranceQuotes.create.response.200.quotes.selectedOptions.price`; any of, required)
      - any of the following:
        - `Money`
          - `amountMinor` (`Money.amountMinor`; integer, required)
            - maximum: `9007199254740991` · minimum: `0`
          - `currency` (`Money.currency`; string, required)
            - pattern: `^[A-Z]{3}$`
        - `null`
    - `coverageName` (`booking.trips.insuranceQuotes.create.response.200.quotes.selectedOptions.coverageName`; string, optional)
      - maxLength: `300`
    - `description` (`booking.trips.insuranceQuotes.create.response.200.quotes.selectedOptions.description`; string, optional)
      - maxLength: `2000`
    - `effectiveDate` (`booking.trips.insuranceQuotes.create.response.200.quotes.selectedOptions.effectiveDate`; string, optional)
      - format: `date` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$`
    - `expirationDate` (`booking.trips.insuranceQuotes.create.response.200.quotes.selectedOptions.expirationDate`; string, optional)
      - format: `date` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$`
  - `travelerPricing` (`booking.trips.insuranceQuotes.create.response.200.quotes.travelerPricing`; array of object, required)
    - `coverageAmountMinor` (`booking.trips.insuranceQuotes.create.response.200.quotes.travelerPricing.coverageAmountMinor`; integer, required)
      - maximum: `9007199254740991` · minimum: `0`
    - `policyCostMinor` (`booking.trips.insuranceQuotes.create.response.200.quotes.travelerPricing.policyCostMinor`; integer, required)
      - maximum: `9007199254740991` · minimum: `0`
    - `travelerId` (`booking.trips.insuranceQuotes.create.response.200.quotes.travelerPricing.travelerId`; string, required)
      - minLength: `1`
- `selectedSegmentIds` (`booking.trips.insuranceQuotes.create.response.200.selectedSegmentIds`; array of string, required)
  - minLength: `1`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`booking.trips.insuranceQuotes.create.response.400.errorCode`; string, required)
- `errorMessage` (`booking.trips.insuranceQuotes.create.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`booking.trips.insuranceQuotes.create.response.401.errorCode`; string, required)
- `errorMessage` (`booking.trips.insuranceQuotes.create.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`booking.trips.insuranceQuotes.create.response.403.errorCode`; string, required)
- `errorMessage` (`booking.trips.insuranceQuotes.create.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Booking/booking.trips.insuranceQuotes.create/index.md
