---
title: "Add a traveler to 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.

# Add a traveler to a trip

Path: Nicer API › Notes and tasks

`POST /crm/trips/{travelersTripId}/travelers`

URL: `https://api.nicer.travel/crm/trips/{travelersTripId}/travelers`

Puts one existing traveler of the agency on the trip with their part in it, and leaves the trip's other travelers as they are. Nobody is messaged. A traveler already on the trip is left as they are, so the same call again changes nothing and answers the same trip. A trip keeps at most 20 travelers and one PRIMARY. Only the trip's advisor or an agency admin adds a traveler, one they may see in the CRM. Returns the trip with its travelers as GET /crm/trips/{travelersTripId} does; the addition publishes crm.trip-updated.v1. Errors: 400 ERROR_BODY_VALIDATION, also for a trip with 20 travelers already or a second PRIMARY; 404 ERROR_ITEM_NOT_FOUND for a trip or a traveler the caller may not see; 409 CRM_REVISION_CONFLICT only when other changes to the trip kept landing through three tries.

## Authentication

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

## Path parameters

- `travelersTripId` (`crm.trips.travelers.create.path.travelersTripId`; string, required)

## Header parameters

- `x-nicer-company` (`crm.trips.travelers.create.header.x-nicer-company`; string, required) — Company context. Authentication and tenant membership are validated by the API.
- `X-Nicer-CRM-Contract` (`crm.trips.travelers.create.header.X-Nicer-CRM-Contract`; string, required)
  - one of `"resource"` · example: `"resource"`

## Request body

_Required._

- `relationship` (`crm.trips.travelers.create.relationship`; string, required) — The traveler's part in the trip; PRIMARY is the traveler the trip is for.
  - one of `"BILLING_CONTACT"`, `"PAYER"`, `"PRIMARY"`, `"TRAVELER"`
- `travelerId` (`crm.trips.travelers.create.travelerId`; string, required) — The traveler's id in the CRM (TRV…).
  - maxLength: `64` · minLength: `1`

## Example request

```json
{
  "relationship": "BILLING_CONTACT",
  "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: { "x-nicer-company": process.env.NICER_COMPANY },
});

await nicer.crm.trips.travelers.create({
  "travelersTripId": "string",
  "relationship": "BILLING_CONTACT",
  "travelerId": "string"
});
```

### Nicer CLI

```bash
nicer crm trips travelers create --travelers-trip-id 'string' --company "$NICER_COMPANY" --input - <<'JSON'
{
  "relationship": "BILLING_CONTACT",
  "travelerId": "string"
}
JSON
```

### cURL

```bash
curl --request POST \
  --url 'https://api.nicer.travel/crm/trips/<travelersTripId>/travelers' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Nicer-CRM-Contract: resource' \
  --header 'x-nicer-company: string' \
  --data '
{
  "relationship": "BILLING_CONTACT",
  "travelerId": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/crm/trips/<travelersTripId>/travelers';
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-nicer-company': 'string',
    'X-Nicer-CRM-Contract': 'resource',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({relationship: 'BILLING_CONTACT', 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/crm/trips/<travelersTripId>/travelers"

payload = {
    "relationship": "BILLING_CONTACT",
    "travelerId": "string"
}
headers = {
    "Content-Type": "application/json",
    "x-nicer-company": "string",
    "X-Nicer-CRM-Contract": "resource",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "assignedAdvisorUserId": "string",
  "associatedTripItineraryId": "string",
  "companyName": "string",
  "primaryTravelerId": "string",
  "primaryTravelerName": "string",
  "revision": 9007199254740991,
  "salesStage": "BOOKED",
  "travelerCount": 9007199254740991,
  "travelers": [
    {
      "participant": {
        "address": {
          "address1": "Av. Reforma 222",
          "city": "Mexico City",
          "countryCode": "MX",
          "postalCode": "06600",
          "stateCode": "CMX"
        },
        "hotelMembership": {
          "chainCode": "string",
          "memberNumber": "string"
        },
        "birthDate": "2019-08-24",
        "contact": {
          "email": "ana@example.com",
          "phone": "+525512345678"
        },
        "documents": [
          {
            "expirationDate": "2031-02-01",
            "issuingCountryCode": "MX",
            "kind": "PASSPORT",
            "number": "G12345678"
          }
        ],
        "frequentFlyerPrograms": [
          {
            "airlineIataCode": "AM",
            "memberNumber": "123456789"
          }
        ],
        "name": {
          "familyName": "Pérez",
          "givenName": "Ana",
          "middleName": null
        },
        "nationalityCountryCode": "string",
        "sex": "F"
      },
      "relationship": "BILLING_CONTACT",
      "travelerId": "string"
    }
  ],
  "travelersTripId": "string",
  "tripEndDate": "2019-08-24",
  "tripName": "string",
  "tripStartDate": "2019-08-24",
  "updatedAt": "2019-08-24T14:15:22Z"
}
```

- `assignedAdvisorUserId` (`crm.trips.travelers.create.response.200.assignedAdvisorUserId`; any of, required) — The user id of the trip's advisor; null while it has none.
  - any of the following: `string`, `null`
- `associatedTripItineraryId` (`crm.trips.travelers.create.response.200.associatedTripItineraryId`; any of, required) — The trip's itinerary (TI…), when its advisor started one; null otherwise.
  - any of the following: `string`, `null`
- `companyName` (`crm.trips.travelers.create.response.200.companyName`; string, required) — The agency the trip belongs to.
- `primaryTravelerId` (`crm.trips.travelers.create.response.200.primaryTravelerId`; any of, required) — The traveler the trip is for, its PRIMARY traveler; null while it has none.
  - any of the following: `TravelerId`, `null`
- `primaryTravelerName` (`crm.trips.travelers.create.response.200.primaryTravelerName`; any of, required) — The primary traveler's name as the agency knows them; null while the trip has no primary traveler.
  - any of the following: `string`, `null`
- `revision` (`crm.trips.travelers.create.response.200.revision`; integer, required) — The revision of the trip's CRM record: send it back with a change, and a change made since answers 409 CRM_REVISION_CONFLICT. 0 while the CRM keeps nothing of the trip yet.
  - maximum: `9007199254740991` · minimum: `0`
- `salesStage` (`crm.trips.travelers.create.response.200.salesStage`; any of, required) — Where the trip stands as a sale; null while it has no stage.
  - any of the following: `SalesStage`, `null`
- `travelerCount` (`crm.trips.travelers.create.response.200.travelerCount`; integer, required) — How many travelers are on the trip.
  - maximum: `9007199254740991` · minimum: `0`
- `travelersTripId` (`crm.trips.travelers.create.response.200.travelersTripId`; string, required) — The trip's id (TT…).
- `tripEndDate` (`crm.trips.travelers.create.response.200.tripEndDate`; any of, required) — The trip's last day, YYYY-MM-DD; null while it has no dates.
  - any of the following: `string`, `null`
- `tripName` (`crm.trips.travelers.create.response.200.tripName`; any of, required) — The trip's name; null when it has none.
  - any of the following: `string`, `null`
- `tripStartDate` (`crm.trips.travelers.create.response.200.tripStartDate`; any of, required) — The trip's first day, YYYY-MM-DD; null while it has no dates.
  - any of the following: `string`, `null`
- `updatedAt` (`crm.trips.travelers.create.response.200.updatedAt`; any of, required) — When the trip's CRM record last changed; null while the CRM keeps nothing of the trip yet.
  - any of the following: `string`, `null`
- `travelers` (`crm.trips.travelers.create.response.200.travelers`; array of object, optional) — Who travels on the trip, the PRIMARY traveler first. Present in the answers about one trip (GET and PUT /crm/trips/{travelersTripId}, POST /crm/trips/{travelersTripId}/travelers); absent from GET /crm/trips, which never reads a trip's travelers.
  - `participant` (`crm.trips.travelers.create.response.200.travelers.participant`; object, required) — The traveler's details as a checkout takes them. Their documents are answered to the trip's staff, and to a traveler on the trip for themselves and the relatives they fill in for; anyone else reads an empty list.
    - `address` (`crm.trips.travelers.create.response.200.travelers.participant.address`; any of, required) — The person's postal address; null when unknown.
      - any of the following:
        - `PersonAddress`
          - `address1` (`PersonAddress.address1`; string, required)
            - maxLength: `200` · minLength: `1`
          - `city` (`PersonAddress.city`; string, required)
            - maxLength: `100` · minLength: `1`
          - `countryCode` (`PersonAddress.countryCode`; string, required)
            - pattern: `^[A-Z]{2}$`
          - `postalCode` (`PersonAddress.postalCode`; string, required)
            - maxLength: `20` · minLength: `1`
          - `stateCode` (`PersonAddress.stateCode`; string, required)
            - maxLength: `100` · minLength: `1`
        - `null`
    - `birthDate` (`crm.trips.travelers.create.response.200.travelers.participant.birthDate`; any of, required) — The person's date of birth, YYYY-MM-DD; null when unknown.
      - any of the following: `string`, `null`
    - `contact` (`crm.trips.travelers.create.response.200.travelers.participant.contact`; object, required) — How to reach the person.
      - `email` (`crm.trips.travelers.create.response.200.travelers.participant.contact.email`; any of, required)
        - any of the following: `string`, `null`
      - `phone` (`crm.trips.travelers.create.response.200.travelers.participant.contact.phone`; any of, required)
        - any of the following: `E164Phone`, `null`
    - `documents` (`crm.trips.travelers.create.response.200.travelers.participant.documents`; array of object, required) — The person's travel documents (passport, visa, national ID), up to 12; empty when there are none.
      - `expirationDate` (`crm.trips.travelers.create.response.200.travelers.participant.documents.expirationDate`; any of, required) — The day the document expires, YYYY-MM-DD; null for one that does not.
        - any of the following: `string`, `null`
      - `issuingCountryCode` (`crm.trips.travelers.create.response.200.travelers.participant.documents.issuingCountryCode`; any of, required) — The country that issued the document, as an ISO 3166-1 alpha-2 country code; null when unknown.
        - any of the following: `CountryCode`, `null`
      - `kind` (`crm.trips.travelers.create.response.200.travelers.participant.documents.kind`; string, required) — What the document is.
        - one of `"DRIVER_LICENSE"`, `"KNOWN_TRAVELER_NUMBER"`, `"NATIONAL_ID"`, `"PASSPORT"`, `"REDRESS_NUMBER"`, `"RESIDENCE_PERMIT"`, `"VISA"`
      - `number` (`crm.trips.travelers.create.response.200.travelers.participant.documents.number`; string, required) — The document's number, in full, 1 to 100 characters.
        - maxLength: `100` · minLength: `1`
      - `citizenshipCountry` (`crm.trips.travelers.create.response.200.travelers.participant.documents.citizenshipCountry`; any of, optional) — The citizenship stated on this document, as an ISO 3166-1 alpha-2 country code; it is not always the person's nationality. Null or absent when the document states none.
        - any of the following: `CountryCode`, `null`
      - `issueDate` (`crm.trips.travelers.create.response.200.travelers.participant.documents.issueDate`; any of, optional) — The day the document was issued, YYYY-MM-DD; null or absent when unknown.
        - any of the following: `string`, `null`
      - `placeOfBirth` (`crm.trips.travelers.create.response.200.travelers.participant.documents.placeOfBirth`; any of, optional) — The place of birth printed on the document; null or absent when unknown.
        - any of the following: `string`, `null`
      - `placeOfIssue` (`crm.trips.travelers.create.response.200.travelers.participant.documents.placeOfIssue`; any of, optional) — Where the document was issued; null or absent when unknown.
        - any of the following: `string`, `null`
    - `name` (`crm.trips.travelers.create.response.200.travelers.participant.name`; object, required) — The person's legal name, as printed on their travel document.
      - `familyName` (`crm.trips.travelers.create.response.200.travelers.participant.name.familyName`; string, required)
        - maxLength: `100` · minLength: `1`
      - `givenName` (`crm.trips.travelers.create.response.200.travelers.participant.name.givenName`; string, required)
        - maxLength: `100` · minLength: `1`
      - `middleName` (`crm.trips.travelers.create.response.200.travelers.participant.name.middleName`; any of, required)
        - any of the following: `string`, `null`
    - `nationalityCountryCode` (`crm.trips.travelers.create.response.200.travelers.participant.nationalityCountryCode`; any of, required) — The person's nationality, as an ISO 3166-1 alpha-2 country code; null when unknown.
      - any of the following: `CountryCode`, `null`
    - `sex` (`crm.trips.travelers.create.response.200.travelers.participant.sex`; any of, required) — The sex marker printed on the person's travel document; null when unknown.
      - any of the following: `ParticipantSex`, `null`
    - `hotelMembership` (`crm.trips.travelers.create.response.200.travelers.participant.hotelMembership`; any of, optional) — The person's membership number with the hotel chain (chainCode), for a hotel booking; null or left out when there is none.
      - any of the following:
        - `HotelMembership`
          - `chainCode` (`HotelMembership.chainCode`; string, required)
            - pattern: `^[A-Z0-9]{2}$`
          - `memberNumber` (`HotelMembership.memberNumber`; string, required)
            - maxLength: `50` · minLength: `1` · pattern: `^[A-Za-z0-9-]+$`
        - `null`
    - `frequentFlyerPrograms` (`crm.trips.travelers.create.response.200.travelers.participant.frequentFlyerPrograms`; array of object, optional) — The person's airline loyalty memberships, up to 8, sent with a flight booking.
      - `airlineIataCode` (`crm.trips.travelers.create.response.200.travelers.participant.frequentFlyerPrograms.airlineIataCode`; string, required)
        - pattern: `^[A-Z0-9]{2,3}$`
      - `memberNumber` (`crm.trips.travelers.create.response.200.travelers.participant.frequentFlyerPrograms.memberNumber`; string, required)
        - maxLength: `100` · minLength: `1`
  - `relationship` (`crm.trips.travelers.create.response.200.travelers.relationship`; string, required) — The traveler's part in the trip; PRIMARY is the traveler the trip is for.
    - one of `"BILLING_CONTACT"`, `"PAYER"`, `"PRIMARY"`, `"TRAVELER"`
  - `travelerId` (`crm.trips.travelers.create.response.200.travelers.travelerId`; string, required) — The traveler's id in the CRM (TRV…).
    - maxLength: `64` · minLength: `1`

### 400

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

#### Example

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

- `errorCode` (`crm.trips.travelers.create.response.400.errorCode`; string, required)
- `errorMessage` (`crm.trips.travelers.create.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

- `errorCode` (`crm.trips.travelers.create.response.401.errorCode`; string, required)
- `errorMessage` (`crm.trips.travelers.create.response.401.errorMessage`; string, required)

### 403

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

#### Example

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

- `errorCode` (`crm.trips.travelers.create.response.403.errorCode`; string, required)
- `errorMessage` (`crm.trips.travelers.create.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Notes-and-tasks/crm.trips.travelers.create/index.md
