Fulfill Reward
Records that your product granted the Reward, or that you paid a cash Reward yourself. Only a Reward whose delivery method is operator or manual takes it; RefRef delivers the other methods, and they return 400. The Reward ID is the idempotency key: a repeat with the same facts, or after a webhook delivery recorded the fulfillment, returns the Reward; other facts return 409. A Reward voided before its grant has a cancelled delivery, and a fulfillment of it returns 409.
Authorization
WorkspaceApiKey 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
Path Parameters
\S1 <= length <= 512Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/rewards/string/fulfillment" \ -H "Content-Type: application/json" \ -d '{ "projectId": "string" }'{ "id": "string", "projectId": "string", "programId": "string", "ruleId": "string", "termsVersionId": "string", "eventId": "string", "beneficiaryRole": "referrer", "beneficiary": { "participantId": "string", "kind": "individual", "externalId": "string", "partnerId": "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", "code": "string", "appliedAt": "string" }, "void": { "id": "string", "reasonCode": "fraud", "reason": "string", "voidedAt": "string" }, "success": true}Recorded Webhook
RefRef recorded an Event with its attribution decision. RefRef POSTs the event to each enabled endpoint of the Project that subscribes to event.recorded, and retries for about 72 hours until the endpoint answers 2xx.
Get Delivery Settings GET
Read how a Program delivers Rewards: hold days and the method of each benefit kind. Needs the programs:read key permission.