Skip to content
Navigation

Import travelers

POST
https://api.nicer.travel/crm/travelers/import

Adds up to 200 travelers in one call, for example from a spreadsheet. A row whose email or phone belongs to a traveler of the agency is MATCHED, not duplicated; each row reports its own outcome. Requires an Idempotency-Key header. Errors: 400 ERROR_BODY_VALIDATION, 409 CRM_IDEMPOTENCY_CONFLICT.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Header parameters

  • Idempotency-Key
    string
    required

    Unique key (8–255 chars) per request; replays return the original result.

  • x-nicer-company
    string
    required

    Company context. Authentication and tenant membership are validated by the API.

  • X-Nicer-CRM-Contract
    resource
    required
    example: "resource"

Request body JSON required

  • rows
    array of
    object
    required
    • name
      object
      required

      The legal name, as printed on the travel document. The one required field.

      • familyName
        string
        required
        maxLength: 100 · minLength: 1
      • givenName
        string
        required
        maxLength: 100 · minLength: 1
      • middleName
        required

        Any of the following:

        • string
        • null
    • address
      optional

      The traveler's postal address; null or absent leaves none.

      Any of the following:

      • PersonAddress
        • address1
          string
          required
          maxLength: 200 · minLength: 1
        • city
          string
          required
          maxLength: 100 · minLength: 1
        • countryCode
          string
          required
          pattern: ^[A-Z]{2}$
        • postalCode
          string
          required
          maxLength: 20 · minLength: 1
        • stateCode
          string
          required
          maxLength: 100 · minLength: 1
      • null
    • assignedAdvisorUserId
      optional
      string

      Admins only: the user id of the advisor responsible for the traveler. An advisor's new traveler is always their own.

      minLength: 1
    • birthDate
      optional

      Date of birth, YYYY-MM-DD.

      Any of the following:

      • string
      • null
    • contact
      optional
      object

      The traveler's email and phone, the phone in E.164.

      • email
        required

        Any of the following:

        • string
        • null
      • phone
        required

        Any of the following:

        • E164Phone
        • null
    • customFields
      optional
      map of
      CustomFieldValue

      Values of the agency's own custom fields, by key; each key must be a field the agency defined.

    • frequentFlyerPrograms
      optional
      array of
      object

      Up to 8 airline loyalty memberships.

      • airlineIataCode
        string
        required
        pattern: ^[A-Z0-9]{2,3}$
      • memberNumber
        string
        required
        maxLength: 100 · minLength: 1
    • marketingConsent
      optional
      object

      Whether the traveler agreed to marketing messages, per channel; absent means none.

      • email
        boolean
        required

        Whether the traveler agreed to marketing by email.

      • sms
        boolean
        required

        Whether the traveler agreed to marketing by SMS.

      • whatsapp
        boolean
        required

        Whether the traveler agreed to marketing on WhatsApp.

    • nationalityCountryCode
      optional

      Nationality, as an ISO 3166-1 alpha-2 country code.

      Any of the following:

      • CountryCode
      • null
    • preferredChannel
      optional

      How the traveler prefers to be contacted.

      Any of the following:

      • PreferredChannel
      • null
    • preferredLanguage
      optional

      The language to write to the traveler in, e.g. es or en-US.

      Any of the following:

      • LanguageTag
      • null
    • preferredName
      optional

      The name the traveler goes by when it is not their given name, 1 to 100 characters.

      Any of the following:

      • string
      • null
    • referredByTravelerId
      optional

      The traveler of the agency who referred this one.

      Any of the following:

      • TravelerId
      • null
    • residenceCountryCode
      optional

      Country of residence, as an ISO 3166-1 alpha-2 country code.

      Any of the following:

      • CountryCode
      • null
    • sex
      optional

      The sex marker on the travel document.

      Any of the following:

      • ParticipantSex
      • null
    • stage
      optional
      CLIENT
      or
      LEAD

      LEAD when absent, or CLIENT.

    • tags
      optional
      array of
      string

      Up to 20 labels, each 1 to 40 characters.

      maxLength: 40 · minLength: 1
    • visibility
      optional
      ADVISORS
      or
      COMPANY

      Which of the agency's advisors see the traveler; the agency's default when absent.

Returns

200

OK

JSON
  • results
    array of
    object
    required
    • errorCode
      required

      Any of the following:

      • string
      • null
    • index
      integer
      required
      maximum: 9007199254740991 · minimum: 0
    • outcome
      CREATED
      or
      FAILED
      or
      MATCHED
      required
    • travelerId
      required

      Any of the following:

      • TravelerId
      • null

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close