Api

List Rewards

GET
/v1/rewards

A page of Rewards, newest first, with their fulfillment status (decision 0043). Your product grants only the Rewards of the delivery methods operator and manual; RefRef delivers the others. To grant the Rewards that a webhook did not reach, read deliveryMethod=operator (and manual) with fulfillmentStatus=pending.

Authorization

WorkspaceApiKey
X-Api-Key<token>

Workspace-owned Better Auth API key of one environment (Sandbox or Live); it authorizes the Projects of that environment in its Workspace. A Project of the other environment returns 403 ENVIRONMENT_MISMATCH. Never expose it in the browser.

In: header

Query Parameters

projectId*string
Match\S
Length1 <= length <= 512
programId?string
Match\S
Length1 <= length <= 512
beneficiaryKind?string

Value in

  • "individual"
  • "group"
beneficiaryExternalId?string
Match\S
Length1 <= length <= 512
benefitKind?string

Value in

  • "cash"
  • "credit"
  • "discount"
  • "custom"
fulfillmentStatus?string

Value in

  • "pending"
  • "in_progress"
  • "fulfilled"
  • "failed"
  • "cancelled"
  • "revocation_pending"
  • "revoked"
deliveryMethod?string

Who delivers the Reward (decision 0048). Your product grants operator and manual.

Value in

  • "operator"
  • "billing_credit"
  • "billing_discount"
  • "billing_plan_upgrade"
  • "manual"
  • "payout"
after?string
Length1 <= length <= 1024
limit?integer
Range1 <= value <= 100
Default50

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/rewards?projectId=string"
{  "rewards": [    {      "id": "string",      "projectId": "string",      "programId": "string",      "ruleId": "string",      "termsVersionId": "string",      "eventId": "string",      "beneficiaryRole": "referrer",      "beneficiary": {        "participantId": "string",        "kind": "individual",        "externalId": "string"      },      "benefitKind": "cash",      "money": {        "amountMinor": "string",        "netAmountMinor": "string",        "currency": "string",        "currencyExponent": -9007199254740991      },      "discount": {        "rateBps": -9007199254740991      },      "custom": {        "quantity": -9007199254740991,        "customUnitId": "string",        "unitKey": "string",        "unitName": "string",        "unitNamePlural": "string",        "validityDays": -9007199254740991      },      "earnedAt": "string",      "fulfillmentStatus": "pending",      "fulfillment": {        "id": "string",        "externalReference": "string",        "occurredAt": "string",        "actor": "console"      },      "revocation": {        "id": "string",        "externalReference": "string",        "occurredAt": "string",        "actor": "console"      },      "delivery": {        "method": "operator",        "status": "pending",        "reason": "awaiting_operator",        "providerReference": "string"      },      "void": {        "id": "string",        "reasonCode": "fraud",        "reason": "string",        "voidedAt": "string"      }    }  ],  "next": "string",  "success": true}