Skip to content
Navigation

List trips in the back office

GET
https://api.nicer.travel/backoffice/trips

Lists trips for the back office, newest first, with the fields a list shows (read the whole record with GET /backoffice/trips/{travelersTripId}). The agency is named by the x-nicer-company header and nothing else. In an agency: its trips, 50 a page (limit, at most 200), paged with nextToken. Nicer staff who name no agency get the newest trips of every agency in one page, nextToken null; this view returns at most limit trips, so it is capped, not complete. With userId: the trips that person is on, in any relationship, newest first, in one page, each with isArchived (whether they archived it); for an agency admin, only the ones in their agency. Nicer staff may name any agency or none; an agency admin may name only an agency they administer, and may leave the header out when they administer one. Errors: 400 ERROR_INVALID_QUERY for a bad limit or token; 400 ERROR_COMPANY_REQUIRED for an admin of several agencies who names none; 403 ERROR_DO_NOT_HAVE_PERMISSION for a caller who is neither Nicer staff nor an admin of the agency named.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Query parameters

  • limit
    optional
    integer

    How many trips a page holds, 1 to 200; 50 by default. Not used with userId.

    maximum: 200 · minimum: 1 · default: 50
  • nextToken
    optional
    string

    The nextToken of the previous page, to read the next one. Only an agency's list has more than one page.

    minLength: 1
  • userId
    optional
    string

    Lists the trips this person is on, in any relationship, instead of the agency's.

    minLength: 1

Header parameters

  • x-nicer-company
    optional
    string

    Company context for an agency admin who belongs to several companies. Optional when the caller belongs to one.

Returns

200

OK

JSON
  • items
    array of
    object
    required

    The items of this page.

    • associatedUserIds
      array of
      string
      required

      The user id of every person on the trip, in any relationship.

    • companyName
      string
      required

      The agency the trip belongs to.

    • createdAt
      string
      required

      When the trip was created, ISO 8601.

    • createdBy
      string
      required

      The user id of who created the trip.

    • destinations
      array of
      object
      required

      Where the trip goes, in order, each place with its first and last day (YYYY-MM-DD).

      • endDateTime
        string
        required
        pattern: ^\d{4}-\d{2}-\d{2}$
      • startDateTime
        string
        required
        pattern: ^\d{4}-\d{2}-\d{2}$
      • address
        optional

        Any of the following:

        • string
        • null
      • amenities
        optional
        array of
        string
      • city
        optional

        Any of the following:

        • string
        • null
      • country
        optional
        string
      • countryCode
        optional
        string
      • description
        optional
        string
      • distanceFromSearch
        optional
        object
        • unit
          km
          or
          mi
          required
        • value
          number
          required
      • features
        optional
        array of
        string
      • fullAddress
        optional
        string
      • gate
        optional

        Any of the following:

        • string
        • null
      • iataCode
        optional

        Any of the following:

        • string
        • null
      • internovaId
        optional
        string
      • latitude
        optional
        number
      • longitude
        optional
        number
      • name
        optional
        string
      • photos
        optional
        array of
        object
        • name
          string
          required
        • key
          optional
          string
        • url
          optional
          string
      • placeId
        optional
        string
      • region
        optional
        string
      • source
        optional
        string
      • state
        optional

        Any of the following:

        • string
        • null
      • terminal
        optional

        Any of the following:

        • string
        • null
      • timeZone
        optional
        string
      • zipCode
        optional

        Any of the following:

        • string
        • null
      • headerImageUrl
        optional
        string
    • primaryTravelerUserId
      string
      required

      The user id of the trip's lead traveler.

    • travelersTripId
      string
      required

      The trip's id.

    • tripEndDate
      string
      required

      The trip's last day.

    • tripStartDate
      string
      required

      The trip's first day.

    • tripTitle
      string
      required

      The trip's name.

    • updatedAt
      string
      required

      When the trip last changed, ISO 8601.

    • assignedAdvisorUserId
      optional

      The user id of the advisor responsible for the trip; null or absent while none is assigned.

      Any of the following:

      • string
      • null
    • associatedTripItineraryId
      optional

      The trip's itinerary, once its advisor started one; null or absent before.

      Any of the following:

      • string
      • null
    • budget
      optional

      The kind of budget the traveler asked for: goodValue or luxury.

      Any of the following:

      • string
      • string
    • createdReason
      optional
      CREATED_BY_TRAVELER
      or
      CREATED_BY_ADVISOR
      or
      CREATED_BY_MATCHING_ADVISOR
      or
      CREATED_BY_BOOKING

      How the trip came to be: created by the traveler, by an advisor, by a matching advisor or by a booking.

    • deleted
      optional
      boolean

      True once the trip was deleted. Deleted trips are listed too.

    • hasActivity
      optional
      boolean

      True once the traveler approved a segment or an order was placed on the trip.

    • travelers
      optional
      object

      How many adults and children travel.

      • adults
        optional
        number
      • children
        optional
        number
    • isArchived
      optional
      boolean

      Whether the person named by userId archived the trip in their own list. Present only on a list read with userId.

  • nextToken
    required

    Send it back as nextToken to read the next page; null on the last page.

    Any of the following:

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