List Widget Rewards

GET
/v1/widget/rewards

The Rewards that credit the participant that the Widget token names, in the referral Program of the token, newest first, each with its Widget status. The token needs the widget:read scope. The first page (no cursor) has the summary. A participant that the Project does not have gets an empty list; the route creates no participant. An affiliate or loyalty Program gets 404 NOT_FOUND; a cursor that is not valid gets 400 INVALID_REQUEST. The response is not cached (Cache-Control: private, no-store).

Authorization

WidgetJWT
AuthorizationBearer <token>

HS256 with typ refref-widget+jwt, aud refref-widget, programId the referral Program of the Widget, sub the external ID of the participant, participantKind its kind (individual or group), optional email the contact email of the participant, mandatory iat and exp, lifetime at most 900 seconds. scope lists one or more Widget scopes separated by one space; widget:read gives Widget init, the referral and Reward reads, and the payout details read, and widget:payout gives the payout details save, for example "widget:read widget:payout". A token without the scope of an operation gets 403. Signed by the backend of the Program's Project with the Project secret. A Widget request names no Project and no Program; the token's Program gives both.

In: header

Query Parameters

cursor?string
Length1 <= length <= 2048
limit?integer
Range1 <= value <= 50
Default20

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/widget/rewards"
{  "summary": {    "referralCount": 0,    "rewardCount": 0,    "earned": [      {        "currency": "string",        "currencyExponent": -9007199254740991,        "netAmountMinor": "string"      }    ],    "latestRewardAt": "string"  },  "items": [    {      "id": "string",      "date": "string",      "role": "referrer",      "referralId": "string",      "benefitKind": "cash",      "money": {        "amountMinor": "string",        "netAmountMinor": "string",        "currency": "string",        "currencyExponent": -9007199254740991      },      "discount": {        "rateBps": 0,        "code": "string",        "applied": true      },      "custom": {        "quantity": 0,        "validityDays": 0,        "unitName": "string",        "unitNamePlural": "string"      },      "status": "on_hold",      "action": "add_payout_method",      "availableAt": "string"    }  ],  "nextCursor": "string"}