unPLUGDevelopers

Management API · Reports

Rewards report Coming soon

GET/v1/reports/rewards

Returns one row per reward that was issued or redeemed in the range, brand-wide, in your brand's default time zone. Rewards with no activity are left out.

Permissions: Secret key with reports:read.

Query parameters#

  • fromstring (date)Required
    First local date.
  • tostring (date)Required
    Last local date, included.

Response fields#

Returns 200 with RewardsReport

  • fromstring (date)
    As in the program summary.
  • tostring (date)
    As in the program summary.
  • time_zonestring
    As in the program summary.
  • currencystring
    As in the program summary.
  • dataarray of RewardReportRow
    Show attributesRewardReportRow
    • reward_idstring (uuid)
      The reward.
    • namestring
      Its name today.
    • kindstring
      points (bought with points at checkout) or wallet (issued to the wallet).
      One of points, wallet
    • points_costintegerNullable
      For points rewards. Null for wallet rewards.
    • issuedinteger
      Wallet items issued. Always 0 for points rewards, which never enter the wallet.
    • redeemedinteger
      Redemptions captured by an order.
    • points_spentinteger
      Points spent on it. 0 for wallet rewards.
    • discount_centsinteger
      Discount given through it.

Codes aren't rewards, so redemptions of a promo code such as WELCOME10 appear in the program summary's rewards figures but not here. That's why this report adds up to 144 redemptions and the summary to 148.

Error descriptions#

400Bad request
missing_param

from or to is missing.

400Bad request
invalid_param

A date isn't YYYY-MM-DD, or to is before from.

403Forbidden
missing_scope

The key doesn't have reports:read.

Any endpoint can also return the common errors.