Skip to content
Navigation

Get rewards and earnings in the back office

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

Returns traveler rewards and every earning the platform has booked, over every date: each traveler's reward balance now, by agency and currency (at most 200, the most available first; an overdrawn bucket reads zero and its shortfall moves into receivable), and every earning ever booked by earning kind, beneficiary kind, status and currency, gross: reversals and clawbacks are not subtracted. Amounts are in each row's own currency, never converted. The agency is named by the x-nicer-company header and nothing else: with one named, that agency's ledger; with none, every agency's. Nicer staff only. Errors: 403 ERROR_DO_NOT_HAVE_PERMISSION for a caller who is not Nicer staff.

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
  • balances
    array of
    object
    required

    Traveler reward balances, the most available first. One row per agency, traveler and currency; at most 200.

    • availableMinor
      integer
      required

      The rewards available now, in minor units.

      maximum: 9007199254740991 · minimum: 0
    • companyName
      string
      required

      The agency whose ledger it is.

      minLength: 1
    • currency
      string
      required

      The balance's currency.

      pattern: ^[A-Z]{3}$
    • pendingMinor
      integer
      required

      The rewards earned but not available yet, in minor units.

      maximum: 9007199254740991 · minimum: 0
    • receivableMinor
      integer
      required

      What the traveler owes back, in minor units, an overdrawn bucket included.

      maximum: 9007199254740991 · minimum: 0
    • travelerUserId
      string
      required

      The traveler, as the ledger's beneficiary.

      minLength: 1
  • earnings
    array of
    object
    required

    Every earning ever booked, gross. One row per earning kind, beneficiary kind, status and currency, the largest amount first.

    • amountMinor
      integer
      required

      The earnings' total, in minor units.

      maximum: 9007199254740991 · minimum: -9007199254740991
    • beneficiaryKind
      ADVISOR
      or
      COMPANY
      or
      TRAVELER
      required

      Who earns: an advisor, the agency or a traveler.

    • currency
      string
      required

      The earnings' currency.

      pattern: ^[A-Z]{3}$
    • earningKind
      string
      ·
      one of 7 values
      required

      What the earnings are for.

      Allowed values: ADJUSTMENT, ADVISOR_COMMISSION, AGENCY_COMMISSION, HOST_SHARE, PLANNING_FEE, REFERRAL_COMMISSION, TRAVELER_REWARD
    • entries
      integer
      required

      How many earnings.

      maximum: 9007199254740991 · minimum: 0
    • status
      PENDING
      or
      AVAILABLE
      or
      REVERSED
      required

      Whether the earnings are PENDING, AVAILABLE or REVERSED.

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