List 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 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
1 <= length <= 20481 <= value <= 5020Response 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"}List Widget Referrals GET
The referrals where the participant that the Widget token names is the referrer, in the referral Program of the token, newest first. The token needs the widget:read scope. 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).
Created Webhook
RefRef created a participant: a trusted call or a Widget token named one that the Project did not have, or a partner joined the Project. A partner has no externalId. RefRef POSTs the event to each enabled endpoint of the Project that subscribes to participant.created, and retries for about 72 hours until the endpoint answers 2xx.