Skip to content
Navigation

Get a person's analytics profile in the back office

GET
https://api.nicer.travel/backoffice/audience/{userId}

Returns the people profile the product analytics tool keeps for one person, keyed by their user id and written by a nightly import from Identity: typed, the advisor a traveler plans with and when the profile was last synced; under properties, every other property with the analytics tool's own names and values, personal data included (name, email, phone, photo, location). The agency is named by the x-nicer-company header and nothing else: with one named, a profile of another agency is not found; with none, any profile. Nicer staff only. Errors: 404 ERROR_ITEM_NOT_FOUND when the analytics tool holds no profile for the person, or, with an agency named, the profile belongs to another agency; 403 ERROR_DO_NOT_HAVE_PERMISSION for a caller who is not Nicer staff; 502 ERROR_ANALYTICS_UNAVAILABLE when the analytics tool does not answer.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Path parameters

  • userId
    string
    required

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

    For a traveler, the name of the advisor the CRM assigned them at their agency, as of the latest import; null for anyone else or when none is assigned.

    Any of the following:

    • string
    • null
  • properties
    map of
    BackofficeAnalyticsValue
    required

    Every other property of the profile, under the analytics tool's own names and as it holds them ($-prefixed ones are the tool's own). advisorName and syncedAt are not repeated here. Personal data: name, email, phone, photo and location properties.

  • syncedAt
    required

    When the import last wrote the profile, UTC. It dates the sync, never the person's last visit; null when the tool holds no such date.

    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