Skip to content
Navigation

Update a trip's travelers or sales stage

PUT
https://api.nicer.travel/crm/trips/{travelersTripId}

Keeps exactly the travelers in the body and moves the trip to salesStage, if the trip is still at the revision sent, and answers the trip with its travelers as GET /crm/trips/{travelersTripId} does, at the next revision. A traveler on the trip left out of travelers leaves it, and stays among the agency's travelers; a body without travelers leaves the list as it is. A traveler sent as a participant, as a checkout collects them, is found by email or phone or added to the agency; a traveler added that way stays the agency's even if the trip's own change then fails. The trip's staff (its advisor of record and the agency's admins) and its members signed in may update its travelers; only staff move its sales stage. The change publishes crm.trip-updated.v1 with the sections it changed. Errors: 400 ERROR_BODY_VALIDATION, also for a body with neither travelers nor salesStage; 403 ERROR_UNAUTHORIZED for a member moving the sales stage; 404 ERROR_ITEM_NOT_FOUND for a trip the caller may not read, or a traveler they may not name; 409 CRM_REVISION_CONFLICT when the trip changed since it was read: read it again.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Path parameters

  • travelersTripId
    string
    required

Header parameters

  • 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

  • revision
    integer
    required

    The trip's revision as read; a change made since answers 409 CRM_REVISION_CONFLICT.

    maximum: 9007199254740991 · minimum: 0
  • salesStage
    optional
    string
    ·
    one of 7 values

    The sales stage to move the trip to. Only the trip's staff, its advisor or an agency admin, may send it.

    Allowed values: BOOKED, COMPLETED, INQUIRY, LOST, PLANNING, PROPOSAL, TRAVELING
  • travelers
    optional
    array of
    object

    Every traveler to keep on the trip, up to 20: one on the trip left out leaves it, and one sent twice keeps the part sent last.

    • relationship
      BILLING_CONTACT
      or
      PAYER
      or
      PRIMARY
      or
      TRAVELER
      required

      The traveler's part in the trip.

    • participant
      optional
      object

      A person as a checkout collects them, used when travelerId is left out: for the trip's staff, the agency's traveler with this email or phone when they may see one; otherwise a new traveler of the agency.

      • address
        required

        The person's postal address; null when unknown.

        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
      • birthDate
        required

        The person's date of birth, YYYY-MM-DD; null when unknown.

        Any of the following:

        • string
        • null
      • contact
        object
        required

        How to reach the person.

        • email
          required

          Any of the following:

          • string
          • null
        • phone
          required

          Any of the following:

          • E164Phone
          • null
      • documents
        array of
        object
        required

        The person's travel documents (passport, visa, national ID), up to 12; empty when there are none.

        • expirationDate
          required

          The day the document expires, YYYY-MM-DD; null for one that does not.

          Any of the following:

          • string
          • null
        • issuingCountryCode
          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
          string
          ·
          one of 7 values
          required

          What the document is.

          Allowed values: DRIVER_LICENSE, KNOWN_TRAVELER_NUMBER, NATIONAL_ID, PASSPORT, REDRESS_NUMBER, RESIDENCE_PERMIT, VISA
        • number
          string
          required

          The document's number, in full, 1 to 100 characters.

          maxLength: 100 · minLength: 1
        • citizenshipCountry
          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
          optional

          The day the document was issued, YYYY-MM-DD; null or absent when unknown.

          Any of the following:

          • string
          • null
        • placeOfBirth
          optional

          The place of birth printed on the document; null or absent when unknown.

          Any of the following:

          • string
          • null
        • placeOfIssue
          optional

          Where the document was issued; null or absent when unknown.

          Any of the following:

          • string
          • null
      • name
        object
        required

        The person's legal name, as printed on their travel document.

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

          Any of the following:

          • string
          • null
      • nationalityCountryCode
        required

        The person's nationality, as an ISO 3166-1 alpha-2 country code; null when unknown.

        Any of the following:

        • CountryCode
        • null
      • sex
        required

        The sex marker printed on the person's travel document; null when unknown.

        Any of the following:

        • ParticipantSex
        • null
      • hotelMembership
        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
            string
            required
            pattern: ^[A-Z0-9]{2}$
          • memberNumber
            string
            required
            maxLength: 50 · minLength: 1 · pattern: ^[A-Za-z0-9-]+$
        • null
      • frequentFlyerPrograms
        optional
        array of
        object

        The person's airline loyalty memberships, up to 8, sent with a flight booking.

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

      An existing traveler of the agency (TRV…). Required unless participant is sent. Only the trip's staff may name one who is not on the trip yet.

      maxLength: 64 · minLength: 1

Returns

200

OK

JSON
  • assignedAdvisorUserId
    required

    The user id of the trip's advisor; null while it has none.

    Any of the following:

    • string
    • null
  • associatedTripItineraryId
    required

    The trip's itinerary (TI…), when its advisor started one; null otherwise.

    Any of the following:

    • string
    • null
  • companyName
    string
    required

    The agency the trip belongs to.

  • primaryTravelerId
    required

    The traveler the trip is for, its PRIMARY traveler; null while it has none.

    Any of the following:

    • TravelerId
    • null
  • primaryTravelerName
    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
    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
    required

    Where the trip stands as a sale; null while it has no stage.

    Any of the following:

    • SalesStage
    • null
  • travelerCount
    integer
    required

    How many travelers are on the trip.

    maximum: 9007199254740991 · minimum: 0
  • travelersTripId
    string
    required

    The trip's id (TT…).

  • tripEndDate
    required

    The trip's last day, YYYY-MM-DD; null while it has no dates.

    Any of the following:

    • string
    • null
  • tripName
    required

    The trip's name; null when it has none.

    Any of the following:

    • string
    • null
  • tripStartDate
    required

    The trip's first day, YYYY-MM-DD; null while it has no dates.

    Any of the following:

    • string
    • null
  • updatedAt
    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
    optional
    array of
    object

    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
      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
        required

        The person's postal address; null when unknown.

        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
      • birthDate
        required

        The person's date of birth, YYYY-MM-DD; null when unknown.

        Any of the following:

        • string
        • null
      • contact
        object
        required

        How to reach the person.

        • email
          required

          Any of the following:

          • string
          • null
        • phone
          required

          Any of the following:

          • E164Phone
          • null
      • documents
        array of
        object
        required

        The person's travel documents (passport, visa, national ID), up to 12; empty when there are none.

        • expirationDate
          required

          The day the document expires, YYYY-MM-DD; null for one that does not.

          Any of the following:

          • string
          • null
        • issuingCountryCode
          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
          string
          ·
          one of 7 values
          required

          What the document is.

          Allowed values: DRIVER_LICENSE, KNOWN_TRAVELER_NUMBER, NATIONAL_ID, PASSPORT, REDRESS_NUMBER, RESIDENCE_PERMIT, VISA
        • number
          string
          required

          The document's number, in full, 1 to 100 characters.

          maxLength: 100 · minLength: 1
        • citizenshipCountry
          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
          optional

          The day the document was issued, YYYY-MM-DD; null or absent when unknown.

          Any of the following:

          • string
          • null
        • placeOfBirth
          optional

          The place of birth printed on the document; null or absent when unknown.

          Any of the following:

          • string
          • null
        • placeOfIssue
          optional

          Where the document was issued; null or absent when unknown.

          Any of the following:

          • string
          • null
      • name
        object
        required

        The person's legal name, as printed on their travel document.

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

          Any of the following:

          • string
          • null
      • nationalityCountryCode
        required

        The person's nationality, as an ISO 3166-1 alpha-2 country code; null when unknown.

        Any of the following:

        • CountryCode
        • null
      • sex
        required

        The sex marker printed on the person's travel document; null when unknown.

        Any of the following:

        • ParticipantSex
        • null
      • hotelMembership
        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
            string
            required
            pattern: ^[A-Z0-9]{2}$
          • memberNumber
            string
            required
            maxLength: 50 · minLength: 1 · pattern: ^[A-Za-z0-9-]+$
        • null
      • frequentFlyerPrograms
        optional
        array of
        object

        The person's airline loyalty memberships, up to 8, sent with a flight booking.

        • airlineIataCode
          string
          required
          pattern: ^[A-Z0-9]{2,3}$
        • memberNumber
          string
          required
          maxLength: 100 · minLength: 1
    • relationship
      BILLING_CONTACT
      or
      PAYER
      or
      PRIMARY
      or
      TRAVELER
      required

      The traveler's part in the trip; PRIMARY is the traveler the trip is for.

    • 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.
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