Skip to content
Navigation

List the agency's people

GET
https://api.nicer.travel/identity/users

Lists people of the agency the request acts for, a page at a time with limit and nextToken; hasMore says whether another page follows. An admin gets the agency's users, each with their membership settings there, and its pending invitations in items; an advisor gets the accounts of the travelers they serve at the agency. For an admin, the where and fields query parameters narrow the rows and the fields each one carries. Advisors and admins only. Errors: 400 ERROR_UNAUTHORIZED for any other caller.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Query parameters

  • fields
    optional
    string

    For an admin: the attributes each row carries, comma-separated, where a dotted path reaches inside one. type, userId, companyName, invitedBy and tenantId come too where the row has them, and so do a person's settings in the agency whenever they are a member. A person is listed only with a fullName of two or more characters, so fields without fullName list invitations alone.

  • limit
    optional
    string

    How many rows a page reads: 30 when absent, at most 500 for an advisor. Filters apply after the read, so a page can hold fewer.

  • nextToken
    optional
    string

    Where the page starts: the nextToken of the previous page.

  • orderBy
    optional
    string

    For an admin: ASC, the default, reads the rows in ascending order; any other value in descending order.

  • where
    optional
    string

    For an admin: which rows to keep. A condition is field:operator:value with eq, neq, gt, gte, lt, lte, like, beginsWith, exists, inq or between (inq and between take values joined by |), several of one object joined by commas; and(…;…) and or(…;…) combine them. Example: and(deleted:neq:true;role:eq:advisor).

Returns

200

OK

JSON
  • hasMore
    boolean
    required

    Whether another page follows: pass nextToken to read it.

  • invites
    array of
    object
    required

    Always empty: an admin's pending invitations come in items.

    • companyName
      string
      required

      The agency the invitation is to.

    • createdBy
      string
      required

      The user id of whoever sent it, or SYSTEM for a paid Join.

    • invitedBy
      string
      required

      The user id of whoever sent it, or SYSTEM for a paid Join.

    • lastModifiedBy
      string
      required

      The user id of whoever last changed it, or SYSTEM.

    • role
      advisor
      or
      traveler
      or
      admin
      or
      superadmin
      required

      The role the invitee gets on accepting.

    • inviteId
      string
      required

      The invitation's id.

    • userId
      string
      required

      The user id of whoever sent it; JOIN#<registrationId> for a paid Join.

    • createdAt
      string
      required

      When it was sent.

    • type
      string
      required
    • updatedAt
      string
      required

      When it last changed.

    • advisorId
      optional

      The advisor some older invitations name.

      Any of the following:

      • string
      • null
    • deleted
      optional
      boolean

      True once it was cancelled.

    • email
      optional
      string

      The email it was sent to.

    • expiresAt
      optional
      string

      When it can no longer be accepted; one without it expires seven days after createdAt.

    • familyName
      optional
      string

      The invitee's last name.

    • fullName
      optional
      string

      The invitee's first and last name, joined.

    • givenName
      optional
      string

      The invitee's first name.

    • metadata
      optional
      map of
      string

      Details stored with it, such as joinRegistrationId.

    • phoneNumber
      optional
      string

      The phone it was sent to.

    • resendCount
      optional
      number

      How many times it was sent again; four at most.

    • sendMessage
      optional
      boolean

      Whether the request asked to send it, kept on invitations of a person whose traveler account was opened from a staff invitation.

  • items
    array of
    required

    For an admin, the agency's people with their settings there and its pending invitations; for an advisor, the accounts of the travelers they serve at the agency. A person whose fullName is shorter than two characters is left out.

    One of the following:

    • object
      • userId
        string
        required

        The person's id.

      • type
        string
        required
      • avatar
        optional
        string

        The person's photo: a URL, or the file's storage key in the answers of DELETE /identity/user/{userId} and of an admin's GET /identity/users.

      • biography
        optional

        What the person writes about themself.

        Any of the following:

        • string
        • null
      • calendarUrl
        optional

        A link where people book time with the person.

        Any of the following:

        • string
        • null
      • companyName
        optional

        The agency the person last switched into; null, empty or absent on some older accounts.

        Any of the following:

        • string
        • null
      • deleted
        optional
        boolean

        True once the account is closed.

      • deletedAt
        optional

        When the account was closed.

        Any of the following:

        • string
        • null
      • deletedBy
        optional
        string

        The user id of whoever closed the account.

      • email
        optional

        The email the person signs in with; absent, or null on some older accounts, for a person who signed up by phone.

        Any of the following:

        • string
        • null
      • externalIntercomId
        optional

        A support-tool id some older accounts keep.

        Any of the following:

        • string
        • null
      • familyName
        optional
        string

        The person's last name.

      • fullName
        optional

        givenName and familyName joined; null until the person has both.

        Any of the following:

        • string
        • null
      • givenName
        optional
        string

        The person's first name.

      • instagram
        optional

        The person's Instagram handle.

        Any of the following:

        • string
        • null
      • invitedAt
        optional

        When the person was invited, on some older accounts.

        Any of the following:

        • string
        • null
      • invitedBy
        optional

        The user id of whoever invited or referred the person.

        Any of the following:

        • string
        • null
      • lastModifiedBy
        optional
        string

        The user id of whoever last changed the account.

      • location
        optional
        object

        Where the person says they are.

        • address
          optional
          string
        • city
          optional
          string
        • country
          optional
          string
        • countryCode
          optional
          string
        • latitude
          optional
          number
        • longitude
          optional
          number
        • neighborhood
          optional
          string
        • region
          optional
          string
        • state
          optional
          string
        • zipCode
          optional
          string
      • phoneNumber
        optional

        The phone number the person signs in with; absent, or null on some older accounts, for a person who signed up by email.

        Any of the following:

        • string
        • null
      • registrationSource
        optional
        string
      • role
        optional
        advisor
        or
        traveler
        or
        admin
        or
        superadmin

        The person's role in the agency they last switched into.

      • searchKey
        optional
        string

        fullName in lowercase, which searches match.

      • tenantOwner
        optional
        boolean

        Set on some older accounts.

      • tourProgress
        optional
        map of
        object

        The in-app product tours the person completed, skipped or dismissed, by tour id.

      • username
        optional
        string

        The person's handle, made from their name, for referral links.

      • zoneinfo
        optional

        The person's time zone, an IANA name such as America/Bogota.

        Any of the following:

        • string
        • null
      • tenantId
        optional
        string

        The partition the account is stored in: the userId for every account opened today.

      • createdAt
        optional
        string

        When the account was opened.

      • updatedAt
        optional
        string

        When the account last changed.

      • bookingAccessEnabled
        optional
        boolean
      • documents
        optional
        array of
        string
      • hasAdvisorPortalAccess
        optional
        boolean
      • isTestUser
        optional
        boolean
      • noLeads
        optional
        boolean
      • onboardingCompleted
        optional
        boolean
    • object
      • companyName
        string
        required

        The agency the invitation is to.

      • userId
        string
        required

        The user id of whoever sent it; some older invitations carry a placeholder id here instead.

      • type
        string
        required
      • advisorId
        optional

        The advisor some older invitations name.

        Any of the following:

        • string
        • null
      • createdBy
        optional
        string

        The user id of whoever sent it, or SYSTEM for a paid Join.

      • deleted
        optional
        boolean

        True once it was cancelled.

      • email
        optional
        string

        The email it was sent to.

      • expiresAt
        optional
        string

        When it can no longer be accepted; one without it expires seven days after createdAt.

      • familyName
        optional
        string

        The invitee's last name.

      • fullName
        optional
        string

        The invitee's first and last name, joined.

      • givenName
        optional
        string

        The invitee's first name.

      • invitedBy
        optional
        string

        The user id of whoever sent it, or SYSTEM for a paid Join.

      • lastModifiedBy
        optional
        string

        The user id of whoever last changed it, or SYSTEM.

      • metadata
        optional
        map of
        string

        Details stored with it, such as joinRegistrationId.

      • phoneNumber
        optional
        string

        The phone it was sent to.

      • resendCount
        optional
        number

        How many times it was sent again; four at most.

      • role
        optional
        advisor
        or
        traveler
        or
        admin
        or
        superadmin

        The role the invitee gets on accepting.

      • sendMessage
        optional
        boolean

        Whether the request asked to send it, kept on invitations of a person whose traveler account was opened from a staff invitation.

      • inviteId
        optional
        string

        The invitation's id.

      • createdAt
        optional
        string

        When it was sent.

      • updatedAt
        optional
        string

        When it last changed.

  • nextToken
    required

    Where the next page starts; null after the last one.

    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