Skip to content
Navigation

Get the audience in the back office

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

Returns who is on the platform according to the product analytics tool's people profiles, which a nightly import writes from Identity for every account with a name: how many profiles there are, how many belong to deleted or test accounts, and the live ones (neither) by agency, country, platform role and month the account was created. The figures may be up to 15 minutes old: the analytics tool allows few reads an hour, so the answer is cached. The agency is named by the x-nicer-company header and nothing else: with one named, only the profiles of that agency; with none, every profile. Nicer staff only. Errors: 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>

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
  • byCompany
    map of
    integer
    required

    Live profiles by agency name; nicer for the accounts that signed up with no agency, unknown for the profiles with none recorded.

  • byCountry
    map of
    integer
    required

    Live profiles by the two-letter country code the analytics tool placed them in; unknown for the profiles it could not place.

  • byRole
    map of
    integer
    required

    Live profiles by platform role (traveler, advisor, admin or superadmin); unknown for the profiles with none recorded.

  • createdByMonth
    map of
    integer
    required

    Live profiles by the UTC month (YYYY-MM) the account was created in; unknown when the profile has no creation date.

  • deleted
    integer
    required

    How many profiles belong to deleted accounts. A deleted test account counts here and in testUsers.

    maximum: 9007199254740991 · minimum: 0
  • testUsers
    integer
    required

    How many profiles are test accounts, as their agency membership marks them.

    maximum: 9007199254740991 · minimum: 0
  • total
    integer
    required

    How many profiles there are, deleted and test accounts included.

    maximum: 9007199254740991 · minimum: 0

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