HTTP endpoints
simulate
POST /api/v1/simulate
Requires events:write. Keep the Bearer key on your server.
SDK
grizzlee.simulate(event: { type: "order.completed"; customerId: string; orderId: string; occurredAt: string; eventId: string; commissionableCents: number; currency: "CAD" | "USD" | "EUR" | "GBP"; customerDisplayName?: string | undefined; newCustomer?: boolean | undefined; categories?: string[] | undefined; customerOrderNumber?: number | undefined; totalCents?: number | undefined; customerEmail?: string | undefined; incentiveAppliedCents?: number | undefined; }, attribution?: { programId: string; referralCode: string; customerId: string; occurredAt: string; channel: "link" | "qr" | "coupon" | "in_app"; providerPromoCodeId?: string | undefined; customerDisplayName?: string | undefined; orderId?: string | undefined; } | undefined): Promise<{ result: EventResult; rewards: Reward[]; }>HTTP
Use your backend's HTTP client. The cURL request shows the wire format. Replace path parameters and example values.
curl --fail-with-body --request POST \
'https://app.grizzlee.ca/api/v1/simulate' \
-H "Authorization: Bearer $GRIZZLEE_SERVER_KEY" \
-H 'Content-Type: application/json' \
--data '{"event":{"type":"order.completed","eventId":"payment-example","orderId":"order-example","customerId":"customer-example","currency":"CAD","totalCents":10000,"commissionableCents":10000,"occurredAt":"2026-10-11T12:00:00.000Z"}}'Request body
| Field | Type | Required | Details |
|---|---|---|---|
event | union | Yes | |
attribution | object | No |
event
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
event.type | "order.completed" | Yes | |
event.eventId | string | Yes | |
event.orderId | string | Yes | |
event.customerId | string | Yes | |
event.customerDisplayName | string | No | |
event.customerEmail | string | No | |
event.newCustomer | boolean | No | |
event.customerOrderNumber | integer | No | minimum 1. maximum 1000000 |
event.currency | "CAD", "USD", "EUR", "GBP" | Yes | |
event.totalCents | integer | No | minimum 0. maximum 1000000000000 |
event.commissionableCents | integer | Yes | minimum 0. maximum 1000000000000 |
event.incentiveAppliedCents | integer | No | minimum 0. maximum 1000000000000 |
event.categories | array | No | |
event.occurredAt | string | Yes | date-time |
event.categories[]
Type: string.
Type: string.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
event.type | "order.refunded" | Yes | |
event.eventId | string | Yes | |
event.orderId | string | Yes | |
event.refundedTotalCents | integer | No | minimum 0. maximum 1000000000000 |
event.refundedCommissionableCents | integer | No | minimum 0. maximum 1000000000000 |
event.fullRefund | boolean | No | |
event.occurredAt | string | Yes | date-time |
Variant 3
| Field | Type | Required | Details |
|---|---|---|---|
event.type | "order.adjusted" | Yes | |
event.eventId | string | Yes | |
event.orderId | string | Yes | |
event.totalCents | integer | No | minimum 0. maximum 1000000000000 |
event.commissionableCents | integer | No | minimum 0. maximum 1000000000000 |
event.reason | string | No | |
event.occurredAt | string | Yes | date-time |
attribution
| Field | Type | Required | Details |
|---|---|---|---|
attribution.programId | string | Yes | |
attribution.customerId | string | Yes | |
attribution.customerDisplayName | string | No | |
attribution.orderId | string | No | |
attribution.referralCode | string | Yes | |
attribution.providerPromoCodeId | string | No | |
attribution.channel | "link", "qr", "coupon", "in_app" | Yes | |
attribution.occurredAt | string | Yes | date-time |
Request schema
{
"type": "object",
"properties": {
"event": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "order.completed"
},
"eventId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"orderId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"customerId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"customerDisplayName": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"customerEmail": {
"type": "string",
"format": "email",
"maxLength": 254
},
"newCustomer": {
"type": "boolean"
},
"customerOrderNumber": {
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
"currency": {
"type": "string",
"enum": [
"CAD",
"USD",
"EUR",
"GBP"
]
},
"totalCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"commissionableCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"incentiveAppliedCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"categories": {
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,39}$"
}
]
},
"maxItems": 20
},
"occurredAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"type",
"eventId",
"orderId",
"customerId",
"currency",
"commissionableCents",
"occurredAt"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "order.refunded"
},
"eventId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"orderId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"refundedTotalCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"refundedCommissionableCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"fullRefund": {
"type": "boolean"
},
"occurredAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"type",
"eventId",
"orderId",
"occurredAt"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "order.adjusted"
},
"eventId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"orderId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"totalCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"commissionableCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"occurredAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"type",
"eventId",
"orderId",
"occurredAt"
],
"additionalProperties": false
}
]
},
"attribution": {
"type": "object",
"properties": {
"programId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"customerId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"customerDisplayName": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"orderId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"referralCode": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"providerPromoCodeId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"channel": {
"type": "string",
"enum": [
"link",
"qr",
"coupon",
"in_app"
]
},
"occurredAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"programId",
"customerId",
"referralCode",
"channel",
"occurredAt"
],
"additionalProperties": false
}
},
"required": [
"event"
],
"additionalProperties": false
}Response
HTTP responses wrap this value in data. The SDK returns the value directly unless the note above describes a wrapper.
| Field | Type | Required | Details |
|---|---|---|---|
result | object | Yes | |
rewards | array | Yes |
result
| Field | Type | Required | Details |
|---|---|---|---|
result.eventId | string | Yes | |
result.orderId | string | Yes | |
result.duplicate | boolean | Yes | |
result.customerOrderNumber | number | No | Completions only. The purchase number Grizzlee gave the order. |
result.incentiveFlag | object | No | Completions only. Present when incentiveAppliedCents did not match the reservation. |
result.decisions | array | Yes | |
result.rewardIds | array | Yes | |
result.reversalCents | number | Yes | |
result.restoredCents | number | No | Reward amount given back because the order's cumulative refund total went down. |
result.increasedCents | number | No | Adjustments only. Reward value a higher order total added. Lower totals report reversalCents. |
result.stale | union | No | True when a refund or adjustment event was older than the latest applied one of its kind for the order and changed nothing. |
result.referralSelection | object | No |
result.incentiveFlag
| Field | Type | Required | Details |
|---|---|---|---|
result.incentiveFlag.reason | union | Yes | |
result.incentiveFlag.rewardId | string | No | |
result.incentiveFlag.programId | string | No | Program of the reservation or referral checked. Absent for no_referral. |
result.incentiveFlag.reservationId | string | No | The reservation sent with the order, when there was one. |
result.incentiveFlag.maxCents | union | Yes | Largest discount the terms allow on one order. Null when they set no cap or there are no terms. |
result.incentiveFlag.reportedCents | number | Yes | incentiveAppliedCents as the merchant reported it. |
result.incentiveFlag.reason
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
Variant 6
Type: string.
Variant 7
Type: string.
Variant 8
Type: string.
result.incentiveFlag.maxCents
Variant 1
Type: null.
Variant 2
Type: number.
result.decisions[]
| Field | Type | Required | Details |
|---|---|---|---|
result.decisions.programId | string | Yes | |
result.decisions.programName | string | Yes | |
result.decisions.partnerId | string | No | |
result.decisions.outcome | union | Yes | |
result.decisions.reason | string | Yes | |
result.decisions.reasonParts | array | No | reason as codes. Absent on decisions made before codes existed. |
result.decisions.amountCents | number | Yes | |
result.decisions.selfReferral | object | No | Present when the customer's identity signals matched the partner's. blocked comes with a skipped outcome. review comes with a reward held as pending. flagged comes with a reward that follows the program's usual approval. |
result.decisions.fraud | object | No | Present when fraud rules fired. blocked comes with a skipped outcome. review comes with a reward held as pending. flagged comes with a reward that follows the program's usual approval. |
result.decisions.milestoneCount | number | No | Milestone decisions that reached the count check: the person's reports that count for this program, at or after the referral and not reversed, this report included. |
result.decisions.milestoneThreshold | number | No | The effective bonus count, or 1 for each-report-only programs. |
result.decisions.outcome
Variant 1
Type: string.
Variant 2
Type: string.
result.decisions.reasonParts[]
| Field | Type | Required | Details |
|---|---|---|---|
result.decisions.reasonParts.code | union | Yes | |
result.decisions.reasonParts.params | object | No |
result.decisions.reasonParts.code
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
Variant 6
Type: string.
Variant 7
Type: string.
Variant 8
Type: string.
Variant 9
Type: string.
Variant 10
Type: string.
Variant 11
Type: string.
Variant 12
Type: string.
Variant 13
Type: string.
Variant 14
Type: string.
Variant 15
Type: string.
Variant 16
Type: string.
Variant 17
Type: string.
Variant 18
Type: string.
Variant 19
Type: string.
Variant 20
Type: string.
Variant 21
Type: string.
Variant 22
Type: string.
Variant 23
Type: string.
Variant 24
Type: string.
Variant 25
Type: string.
Variant 26
Type: string.
Variant 27
Type: string.
Variant 28
Type: string.
Variant 29
Type: string.
Variant 30
Type: string.
Variant 31
Type: string.
Variant 32
Type: string.
Variant 33
Type: string.
Variant 34
Type: string.
Variant 35
Type: string.
Variant 36
Type: string.
Variant 37
Type: string.
Variant 38
Type: string.
result.decisions.reasonParts.params
Type: object.
result.decisions.selfReferral
| Field | Type | Required | Details |
|---|---|---|---|
result.decisions.selfReferral.action | union | Yes | |
result.decisions.selfReferral.signals | array | Yes |
result.decisions.selfReferral.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
result.decisions.selfReferral.signals[]
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
Variant 6
Type: string.
result.decisions.fraud
| Field | Type | Required | Details |
|---|---|---|---|
result.decisions.fraud.action | union | Yes | |
result.decisions.fraud.rules | array | Yes |
result.decisions.fraud.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
result.decisions.fraud.rules[]
| Field | Type | Required | Details |
|---|---|---|---|
result.decisions.fraud.rules.action | union | Yes | |
result.decisions.fraud.rules.rule | union | Yes | |
result.decisions.fraud.rules.signals | array | Yes | Matching signal types, never values. Empty for disposable_email. |
result.decisions.fraud.rules.count | number | No | Customers counted, this one included when referred inside the window. Velocity rules only. |
result.decisions.fraud.rules.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
result.decisions.fraud.rules.rule
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
result.decisions.fraud.rules.signals[]
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
result.stale
Variant 1
Type: boolean.
Variant 2
Type: boolean.
result.referralSelection
| Field | Type | Required | Details |
|---|---|---|---|
result.referralSelection.winner | union | Yes | |
result.referralSelection.skipped | array | Yes |
result.referralSelection.winner
Variant 1
Type: null.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
result.referralSelection.winner.programId | string | Yes | |
result.referralSelection.winner.partnerId | string | Yes | |
result.referralSelection.winner.occurredAt | string | Yes | |
result.referralSelection.winner.type | union | No | |
result.referralSelection.winner.providerPromoCodeId | string | No | |
result.referralSelection.winner.index | number | No | Absent when the customer's recorded attribution is retained. |
result.referralSelection.winner.type
Variant 1
Type: string.
Variant 2
Type: string.
result.referralSelection.skipped[]
| Field | Type | Required | Details |
|---|---|---|---|
result.referralSelection.skipped.index | number | Yes | |
result.referralSelection.skipped.reason | union | Yes |
result.referralSelection.skipped.reason
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
Variant 6
Type: string.
Variant 7
Type: string.
Variant 8
Type: string.
Variant 9
Type: string.
rewards[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.id | string | Yes | |
rewards.companyId | string | Yes | |
rewards.orderId | string | No | The order that earned the reward. Absent on milestone rewards. |
rewards.milestone | string | No | The milestone that earned the reward. Absent on order rewards. Exactly one of the two is set. |
rewards.reportEventId | string | No | Each-report rewards name their source. Absent on at-count bonuses. |
rewards.milestoneReportReversed | union | No | |
rewards.valueCents | number | No | |
rewards.milestoneCount | number | No | Milestone rewards: the person's reports of the milestone that count for this program now, those at or after the referral minus reversed ones. Grizzlee updates it with every report, reversal, revocation and reinstatement for the person and milestone. Absent on rewards no milestone event has touched since milestones were counted. |
rewards.milestoneRevoked | union | No | Milestone rewards: true while the milestone is revoked for the person. Updated with milestoneCount. Absent when not revoked, and on rewards no milestone event has touched since milestones were counted. |
rewards.programId | string | Yes | |
rewards.partnerId | string | Yes | |
rewards.customerId | string | Yes | |
rewards.currency | union | Yes | |
rewards.rewardType | union | Yes | |
rewards.offer | object | No | Offer rewards only. Terms copied when earned. Later program edits leave them alone. |
rewards.originalCents | number | Yes | What the reward earned when it was created. Never changes. |
rewards.adjustedCents | number | No | Signed total that order adjustments added to or removed from originalCents. Absent until the order is adjusted. The reward is worth originalCents + adjustedCents - reversedCents. |
rewards.reversedCents | number | Yes | Reversed by refunds, a rejection or a milestone revocation. |
rewards.status | union | Yes | |
rewards.selfReferral | object | No | Present when the customer's identity signals matched the partner's. With action review the reward started pending and waits for someone to approve or reject it, and automatic approval skips it. With action flagged it follows the program's usual approval. |
rewards.fraud | object | No | Present when fraud rules fired. rules lists each rule ID with its signal types, never values. With action review the reward started pending, waits for someone to approve or reject it, and automatic approval skips it. With action flagged it follows the program's usual approval. |
rewards.rejectedAt | string | No | When someone rejected the pending reward. A rejected reward is reversed for good. |
rewards.rejectionReason | string | No | Why it was rejected, as entered. |
rewards.statusBeforeReversal | union | No | Status the reward had when a refund fully reversed it. A later restoration returns it to this status. |
rewards.deliveryMode | union | No | Delivery mode when earned. Absent on older money rewards, which use the Grizzlee wallet. Absent on offer rewards. Readers ignore delivery for offers. |
rewards.createdAt | string | Yes | |
rewards.availableAt | string | Yes | Rewards no longer have a hold, so new rewards use createdAt. Older rewards keep their original date. |
rewards.programSnapshot | object | Yes | |
rewards.programVersion | number | No | The program version the reward was earned under. Absent on rewards earned before programs had versions. programSnapshot holds their rules either way. |
rewards.historicalBasis | "total" | No | Historical subtotal rewards keep their reporting-total basis for refunds and adjustments. |
rewards.basisCents | number | No | |
rewards.explanation | string | Yes | |
rewards.explanationParts | array | No | explanation as codes. Absent on rewards earned before codes existed. |
rewards.calculation | object | No |
rewards.milestoneReportReversed
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.milestoneRevoked
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.currency
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.rewardType
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.offer
| Field | Type | Required | Details |
|---|---|---|---|
rewards.offer.terms | union | Yes | |
rewards.offer.expiresAt | union | Yes |
rewards.offer.terms
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.offer.terms.type | "percent" | Yes | |
rewards.offer.terms.rateBps | number | Yes | |
rewards.offer.terms.orders | number | Yes | How many of the friend's orders get the incentive. |
rewards.offer.terms.expiresAfterDays | union | Yes | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.offer.terms.returnOnFullRefund | boolean | Yes | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.offer.terms.maxDiscountCents | number | No | Largest discount for one order. |
rewards.offer.terms.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.offer.terms.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.offer.terms.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.offer.terms.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.offer.terms.orderCategories.include | array | No | |
rewards.offer.terms.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.offer.terms.type | "fixed" | Yes | |
rewards.offer.terms.orders | number | Yes | How many of the friend's orders get the incentive. |
rewards.offer.terms.expiresAfterDays | union | Yes | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.offer.terms.returnOnFullRefund | boolean | Yes | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.offer.terms.amountCents | number | Yes | |
rewards.offer.terms.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.offer.terms.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.offer.terms.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.offer.terms.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.offer.terms.orderCategories.include | array | No | |
rewards.offer.terms.orderCategories.exclude | array | No |
rewards.offer.expiresAt
Variant 1
Type: null.
Variant 2
Type: string.
rewards.status
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.selfReferral
| Field | Type | Required | Details |
|---|---|---|---|
rewards.selfReferral.action | union | Yes | |
rewards.selfReferral.signals | array | Yes |
rewards.selfReferral.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.selfReferral.signals[]
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
Variant 6
Type: string.
rewards.fraud
| Field | Type | Required | Details |
|---|---|---|---|
rewards.fraud.action | union | Yes | |
rewards.fraud.rules | array | Yes |
rewards.fraud.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.fraud.rules[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.fraud.rules.action | union | Yes | |
rewards.fraud.rules.rule | union | Yes | |
rewards.fraud.rules.signals | array | Yes | Matching signal types, never values. Empty for disposable_email. |
rewards.fraud.rules.count | number | No | Customers counted, this one included when referred inside the window. Velocity rules only. |
rewards.fraud.rules.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.fraud.rules.rule
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.fraud.rules.signals[]
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
rewards.statusBeforeReversal
Variant 1
Type: string.
Variant 2
Type: string.
rewards.deliveryMode
Variant 1
Type: string.
Variant 2
Type: string.
rewards.programSnapshot
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.currency | union | Yes | Must match the company currency. |
rewards.programSnapshot.name | string | Yes | |
rewards.programSnapshot.kind | union | Yes | |
rewards.programSnapshot.rewardType | union | Yes | |
rewards.programSnapshot.attributionWindowDays | union | Yes | Days after a referral that a first purchase, or a milestone, still counts. The latest referral always wins until one qualifies. Only milestone programs may use null, which means the referral never expires. |
rewards.programSnapshot.active | boolean | Yes | |
rewards.programSnapshot.orderCategories | object | No | Order categories that earn rewards. Order programs only. The friend incentive has its own orderCategories. Absent means every order can earn. |
rewards.programSnapshot.compensation | union | No | |
rewards.programSnapshot.tracking | object | No | Tracking methods are independent of kind. Provider discounts require a connected provider. |
rewards.programSnapshot.destinationUrl | string | No | The page partner links and QR codes open. A published signup page's destination takes precedence. Without either, partners have no link. |
rewards.programSnapshot.display | object | No | Optional public name, headline and milestone label for partner and customer screens. |
rewards.programSnapshot.trigger | union | No | What earns a reward. Defaults to completed orders. |
rewards.programSnapshot.milestoneRewards | object | No | |
rewards.programSnapshot.fixedRefundMode | union | No | How fixed rewards change after a partial refund. |
rewards.programSnapshot.duration | union | No | |
rewards.programSnapshot.delivery | object | No | Who delivers approved rewards of each type. Defaults to the Grizzlee wallet for both. |
rewards.programSnapshot.reviewRewards | union | No | When true, new rewards wait as pending until someone approves them. Otherwise they start approved. |
rewards.programSnapshot.fraudChecks | object | No | Self-referral and other fraud rules. Absent means every rule uses its default. |
rewards.programSnapshot.performance | object | No | |
rewards.programSnapshot.limits | object | No | |
rewards.programSnapshot.customTerms | array | No | |
rewards.programSnapshot.friendIncentive | union | No | Optional offer for the referred customer. |
rewards.programSnapshot.partnerOffer | union | No | Offer programs only. What the partner earns per qualifying referred order. |
rewards.programSnapshot.currency
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.programSnapshot.kind
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.programSnapshot.rewardType
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.programSnapshot.attributionWindowDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.orderCategories.include | array | No | |
rewards.programSnapshot.orderCategories.exclude | array | No |
rewards.programSnapshot.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.compensation.type | "percentage" | Yes | |
rewards.programSnapshot.compensation.rateBps | number | Yes | |
rewards.programSnapshot.compensation.phases | array | No |
rewards.programSnapshot.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.compensation.phases.rateBps | number | Yes | |
rewards.programSnapshot.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.compensation.type | "fixed" | Yes | |
rewards.programSnapshot.compensation.amountCents | number | Yes |
rewards.programSnapshot.tracking
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.tracking.links | union | No | |
rewards.programSnapshot.tracking.qrCodes | union | No | |
rewards.programSnapshot.tracking.attributionCodes | union | No | |
rewards.programSnapshot.tracking.providerPromoCodes | union | No |
rewards.programSnapshot.tracking.links
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.tracking.qrCodes
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.tracking.attributionCodes
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.tracking.providerPromoCodes
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.display
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.en | object | No | |
rewards.programSnapshot.display.fr-CA | object | No | |
rewards.programSnapshot.display.hy | object | No | |
rewards.programSnapshot.display.ru | object | No |
rewards.programSnapshot.display.en
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.en.publicName | string | No | The name partners and customers see. Falls back to the program name. |
rewards.programSnapshot.display.en.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
rewards.programSnapshot.display.en.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
rewards.programSnapshot.display.en.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.en.milestoneLabel.one | string | Yes | |
rewards.programSnapshot.display.en.milestoneLabel.other | string | Yes |
rewards.programSnapshot.display.fr-CA
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.fr-CA.publicName | string | No | The name partners and customers see. Falls back to the program name. |
rewards.programSnapshot.display.fr-CA.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
rewards.programSnapshot.display.fr-CA.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
rewards.programSnapshot.display.fr-CA.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.fr-CA.milestoneLabel.one | string | Yes | |
rewards.programSnapshot.display.fr-CA.milestoneLabel.other | string | Yes |
rewards.programSnapshot.display.hy
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.hy.publicName | string | No | The name partners and customers see. Falls back to the program name. |
rewards.programSnapshot.display.hy.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
rewards.programSnapshot.display.hy.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
rewards.programSnapshot.display.hy.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.hy.milestoneLabel.one | string | Yes | |
rewards.programSnapshot.display.hy.milestoneLabel.other | string | Yes |
rewards.programSnapshot.display.ru
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.ru.publicName | string | No | The name partners and customers see. Falls back to the program name. |
rewards.programSnapshot.display.ru.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
rewards.programSnapshot.display.ru.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
rewards.programSnapshot.display.ru.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.ru.milestoneLabel.one | string | Yes | |
rewards.programSnapshot.display.ru.milestoneLabel.other | string | Yes |
rewards.programSnapshot.trigger
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.trigger.type | "order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.trigger.type | "milestone" | Yes | |
rewards.programSnapshot.trigger.milestone | string | Yes |
rewards.programSnapshot.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.milestoneRewards.eachReport | object | No | |
rewards.programSnapshot.milestoneRewards.atCount | object | No |
rewards.programSnapshot.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.milestoneRewards.eachReport.compensation | union | Yes | |
rewards.programSnapshot.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
rewards.programSnapshot.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
rewards.programSnapshot.milestoneRewards.eachReport.compensation.amountCents | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
rewards.programSnapshot.milestoneRewards.eachReport.compensation.rateBps | number | Yes |
rewards.programSnapshot.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.milestoneRewards.atCount.amountCents | number | Yes | |
rewards.programSnapshot.milestoneRewards.atCount.count | number | Yes |
rewards.programSnapshot.fixedRefundMode
Variant 1
Type: string.
Variant 2
Type: string.
rewards.programSnapshot.duration
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "only_order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "first_order" | Yes |
Variant 3
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "first_n_orders" | Yes | |
rewards.programSnapshot.duration.count | number | Yes |
Variant 4
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "days" | Yes | |
rewards.programSnapshot.duration.days | number | Yes |
Variant 5
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "months" | Yes | |
rewards.programSnapshot.duration.months | number | Yes |
Variant 6
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "lifetime" | Yes |
rewards.programSnapshot.delivery
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.delivery.cash | union | No | |
rewards.programSnapshot.delivery.credit | union | No |
rewards.programSnapshot.delivery.cash
Variant 1
Type: string.
Variant 2
Type: string.
rewards.programSnapshot.delivery.credit
Variant 1
Type: string.
Variant 2
Type: string.
rewards.programSnapshot.reviewRewards
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.fraudChecks
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.selfReferral | object | No | |
rewards.programSnapshot.fraudChecks.duplicateAccounts | object | No | |
rewards.programSnapshot.fraudChecks.rapidRepeats | object | No | |
rewards.programSnapshot.fraudChecks.repeatCustomer | object | No | |
rewards.programSnapshot.fraudChecks.disposableEmail | object | No |
rewards.programSnapshot.fraudChecks.selfReferral
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.selfReferral.action | union | No |
rewards.programSnapshot.fraudChecks.selfReferral.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.programSnapshot.fraudChecks.duplicateAccounts
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.duplicateAccounts.action | union | No | |
rewards.programSnapshot.fraudChecks.duplicateAccounts.accounts | number | No | Customers sharing one card or device that trigger the rule. This one counts when referred inside the window. |
rewards.programSnapshot.fraudChecks.duplicateAccounts.windowDays | number | No | |
rewards.programSnapshot.fraudChecks.duplicateAccounts.ipAccounts | union | No | Customers sharing one IP address that trigger the rule. null leaves IP addresses out. |
rewards.programSnapshot.fraudChecks.duplicateAccounts.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.programSnapshot.fraudChecks.duplicateAccounts.ipAccounts
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.fraudChecks.rapidRepeats
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.rapidRepeats.action | union | No | |
rewards.programSnapshot.fraudChecks.rapidRepeats.referrals | number | No | Referrals from one device that trigger the rule. This one counts when referred inside the window. |
rewards.programSnapshot.fraudChecks.rapidRepeats.windowMinutes | number | No | |
rewards.programSnapshot.fraudChecks.rapidRepeats.ipReferrals | union | No | Referrals from one IP address that trigger the rule. null leaves IP addresses out. |
rewards.programSnapshot.fraudChecks.rapidRepeats.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.programSnapshot.fraudChecks.rapidRepeats.ipReferrals
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.fraudChecks.repeatCustomer
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.repeatCustomer.action | union | No |
rewards.programSnapshot.fraudChecks.repeatCustomer.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.programSnapshot.fraudChecks.disposableEmail
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.disposableEmail.action | union | No | A disposable address does not show a second person, so this rule cannot block. |
rewards.programSnapshot.fraudChecks.disposableEmail.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.programSnapshot.performance
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.performance.metric | union | Yes | |
rewards.programSnapshot.performance.tiers | array | Yes | |
rewards.programSnapshot.performance.windowDays | number | No |
rewards.programSnapshot.performance.metric
Variant 1
Type: string.
Variant 2
Type: string.
rewards.programSnapshot.performance.tiers[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.performance.tiers.name | string | Yes | |
rewards.programSnapshot.performance.tiers.minValue | number | Yes | |
rewards.programSnapshot.performance.tiers.bonusBps | number | Yes |
rewards.programSnapshot.limits
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.limits.customerCapCents | number | No | |
rewards.programSnapshot.limits.partnerCapCents | number | No |
rewards.programSnapshot.customTerms[]
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.target | "partner" | Yes | |
rewards.programSnapshot.customTerms.targetId | string | Yes | |
rewards.programSnapshot.customTerms.compensation | union | No | |
rewards.programSnapshot.customTerms.milestoneRewards | object | No | |
rewards.programSnapshot.customTerms.customerCapCents | union | No | |
rewards.programSnapshot.customTerms.partnerCapCents | union | No |
rewards.programSnapshot.customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.type | "percentage" | Yes | |
rewards.programSnapshot.customTerms.compensation.rateBps | number | Yes | |
rewards.programSnapshot.customTerms.compensation.phases | array | No |
rewards.programSnapshot.customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.phases.rateBps | number | Yes | |
rewards.programSnapshot.customTerms.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.type | "fixed" | Yes | |
rewards.programSnapshot.customTerms.compensation.amountCents | number | Yes |
rewards.programSnapshot.customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.eachReport | object | No | |
rewards.programSnapshot.customTerms.milestoneRewards.atCount | object | No |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensation
rewards.programSnapshot.customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.atCount.amountCents | number | Yes | |
rewards.programSnapshot.customTerms.milestoneRewards.atCount.count | number | Yes |
rewards.programSnapshot.customTerms.customerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.customTerms.partnerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.target | "customer" | Yes | |
rewards.programSnapshot.customTerms.targetId | string | Yes | |
rewards.programSnapshot.customTerms.compensation | union | No | |
rewards.programSnapshot.customTerms.milestoneRewards | object | No | |
rewards.programSnapshot.customTerms.customerCapCents | union | No |
rewards.programSnapshot.customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.type | "percentage" | Yes | |
rewards.programSnapshot.customTerms.compensation.rateBps | number | Yes | |
rewards.programSnapshot.customTerms.compensation.phases | array | No |
rewards.programSnapshot.customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.phases.rateBps | number | Yes | |
rewards.programSnapshot.customTerms.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.type | "fixed" | Yes | |
rewards.programSnapshot.customTerms.compensation.amountCents | number | Yes |
rewards.programSnapshot.customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.eachReport | object | No | |
rewards.programSnapshot.customTerms.milestoneRewards.atCount | object | No |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensation
rewards.programSnapshot.customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.atCount.amountCents | number | Yes | |
rewards.programSnapshot.customTerms.milestoneRewards.atCount.count | number | Yes |
rewards.programSnapshot.customTerms.customerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.friendIncentive
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.friendIncentive.type | "percent" | Yes | |
rewards.programSnapshot.friendIncentive.rateBps | number | Yes | |
rewards.programSnapshot.friendIncentive.maxDiscountCents | number | No | Largest discount for one order. |
rewards.programSnapshot.friendIncentive.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.programSnapshot.friendIncentive.orders | number | No | How many of the friend's orders get the incentive. |
rewards.programSnapshot.friendIncentive.newCustomersOnly | union | No | true: use the merchant's newCustomer answer, or recorded purchases when omitted. false: returning customers qualify too. A supplied answer uses the order limit after the referral. |
rewards.programSnapshot.friendIncentive.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.programSnapshot.friendIncentive.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.programSnapshot.friendIncentive.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.programSnapshot.friendIncentive.newCustomersOnly
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.friendIncentive.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.friendIncentive.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.friendIncentive.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.friendIncentive.orderCategories.include | array | No | |
rewards.programSnapshot.friendIncentive.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.friendIncentive.type | "fixed" | Yes | |
rewards.programSnapshot.friendIncentive.amountCents | number | Yes | |
rewards.programSnapshot.friendIncentive.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.programSnapshot.friendIncentive.orders | number | No | How many of the friend's orders get the incentive. |
rewards.programSnapshot.friendIncentive.newCustomersOnly | union | No | true: use the merchant's newCustomer answer, or recorded purchases when omitted. false: returning customers qualify too. A supplied answer uses the order limit after the referral. |
rewards.programSnapshot.friendIncentive.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.programSnapshot.friendIncentive.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.programSnapshot.friendIncentive.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.programSnapshot.friendIncentive.newCustomersOnly
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.friendIncentive.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.friendIncentive.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.friendIncentive.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.friendIncentive.orderCategories.include | array | No | |
rewards.programSnapshot.friendIncentive.orderCategories.exclude | array | No |
rewards.programSnapshot.partnerOffer
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.partnerOffer.type | "percent" | Yes | |
rewards.programSnapshot.partnerOffer.rateBps | number | Yes | |
rewards.programSnapshot.partnerOffer.maxDiscountCents | number | No | Largest discount for one order. |
rewards.programSnapshot.partnerOffer.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.programSnapshot.partnerOffer.orders | number | No | How many of the friend's orders get the incentive. |
rewards.programSnapshot.partnerOffer.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.programSnapshot.partnerOffer.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.programSnapshot.partnerOffer.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.programSnapshot.partnerOffer.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.partnerOffer.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.partnerOffer.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.partnerOffer.orderCategories.include | array | No | |
rewards.programSnapshot.partnerOffer.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.partnerOffer.type | "fixed" | Yes | |
rewards.programSnapshot.partnerOffer.amountCents | number | Yes | |
rewards.programSnapshot.partnerOffer.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.programSnapshot.partnerOffer.orders | number | No | How many of the friend's orders get the incentive. |
rewards.programSnapshot.partnerOffer.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.programSnapshot.partnerOffer.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.programSnapshot.partnerOffer.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.programSnapshot.partnerOffer.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.partnerOffer.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.partnerOffer.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.partnerOffer.orderCategories.include | array | No | |
rewards.programSnapshot.partnerOffer.orderCategories.exclude | array | No |
rewards.explanationParts[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.explanationParts.code | union | Yes | |
rewards.explanationParts.params | object | No |
rewards.explanationParts.code
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
Variant 6
Type: string.
Variant 7
Type: string.
Variant 8
Type: string.
Variant 9
Type: string.
Variant 10
Type: string.
Variant 11
Type: string.
rewards.explanationParts.params
Type: object.
rewards.calculation
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.compensation | union | Yes | |
rewards.calculation.milestoneRewards | object | No | |
rewards.calculation.fixedRefundMode | union | No | Saved for fixed reward refunds. Older rewards default to prorate. |
rewards.calculation.phaseAfterMonths | number | No | |
rewards.calculation.tier | object | No | |
rewards.calculation.customTerms | object | No | |
rewards.calculation.uncappedCents | number | Yes | |
rewards.calculation.customerCapCents | number | No | |
rewards.calculation.partnerCapCents | number | No |
rewards.calculation.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.compensation.type | "percentage" | Yes | |
rewards.calculation.compensation.rateBps | number | Yes | |
rewards.calculation.compensation.phases | array | No |
rewards.calculation.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.compensation.phases.rateBps | number | Yes | |
rewards.calculation.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.compensation.type | "fixed" | Yes | |
rewards.calculation.compensation.amountCents | number | Yes |
rewards.calculation.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.milestoneRewards.eachReport | object | No | |
rewards.calculation.milestoneRewards.atCount | object | No |
rewards.calculation.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.milestoneRewards.eachReport.compensation | union | Yes | |
rewards.calculation.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
rewards.calculation.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
rewards.calculation.milestoneRewards.eachReport.compensation.amountCents | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
rewards.calculation.milestoneRewards.eachReport.compensation.rateBps | number | Yes |
rewards.calculation.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.milestoneRewards.atCount.amountCents | number | Yes | |
rewards.calculation.milestoneRewards.atCount.count | number | Yes |
rewards.calculation.fixedRefundMode
Variant 1
Type: string.
Variant 2
Type: string.
rewards.calculation.tier
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.tier.name | string | Yes | |
rewards.calculation.tier.minValue | number | Yes | |
rewards.calculation.tier.bonusBps | number | Yes | |
rewards.calculation.tier.value | number | Yes |
rewards.calculation.customTerms
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.customTerms.target | union | Yes | |
rewards.calculation.customTerms.targetId | string | Yes |
rewards.calculation.customTerms.target
Variant 1
Type: string.
Variant 2
Type: string.
Response schema
{
"type": "object",
"properties": {
"result": {
"type": "object",
"properties": {
"eventId": {
"type": "string"
},
"orderId": {
"type": "string"
},
"duplicate": {
"type": "boolean"
},
"customerOrderNumber": {
"type": "number",
"description": "Completions only. The purchase number Grizzlee gave the order."
},
"incentiveFlag": {
"type": "object",
"properties": {
"reason": {
"anyOf": [
{
"type": "string",
"const": "no_reservation"
},
{
"type": "string",
"const": "reservation_expired"
},
{
"type": "string",
"const": "reservation_released"
},
{
"type": "string",
"const": "reservation_consumed"
},
{
"type": "string",
"const": "reservation_locked"
},
{
"type": "string",
"const": "no_referral"
},
{
"type": "string",
"const": "exceeds_terms"
},
{
"type": "string",
"const": "category_not_eligible"
}
]
},
"rewardId": {
"type": "string"
},
"programId": {
"type": "string",
"description": "Program of the reservation or referral checked. Absent for no_referral."
},
"reservationId": {
"type": "string",
"description": "The reservation sent with the order, when there was one."
},
"maxCents": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
],
"description": "Largest discount the terms allow on one order. Null when they set no cap or there are no terms."
},
"reportedCents": {
"type": "number",
"description": "incentiveAppliedCents as the merchant reported it."
}
},
"required": [
"reason",
"maxCents",
"reportedCents"
],
"description": "Completions only. Present when incentiveAppliedCents did not match the reservation."
},
"decisions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"programId": {
"type": "string"
},
"programName": {
"type": "string"
},
"partnerId": {
"type": "string"
},
"outcome": {
"anyOf": [
{
"type": "string",
"const": "skipped"
},
{
"type": "string",
"const": "rewarded"
}
]
},
"reason": {
"type": "string"
},
"reasonParts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"anyOf": [
{
"type": "string",
"const": "fixed"
},
{
"type": "string",
"const": "no_referral"
},
{
"type": "string",
"const": "percentage"
},
{
"type": "string",
"const": "offer"
},
{
"type": "string",
"const": "report"
},
{
"type": "string",
"const": "report_percentage"
},
{
"type": "string",
"const": "milestone_bonus"
},
{
"type": "string",
"const": "schedule_month"
},
{
"type": "string",
"const": "tier_bonus"
},
{
"type": "string",
"const": "custom_partner_terms"
},
{
"type": "string",
"const": "custom_customer_terms"
},
{
"type": "string",
"const": "capped"
},
{
"type": "string",
"const": "no_order_referral"
},
{
"type": "string",
"const": "no_customer_referral"
},
{
"type": "string",
"const": "partner_not_in_program"
},
{
"type": "string",
"const": "self_referral_blocked"
},
{
"type": "string",
"const": "fraud_blocked"
},
{
"type": "string",
"const": "milestone_before_referral"
},
{
"type": "string",
"const": "order_before_referral"
},
{
"type": "string",
"const": "report_value_missing"
},
{
"type": "string",
"const": "milestone_window_expired"
},
{
"type": "string",
"const": "order_window_expired"
},
{
"type": "string",
"const": "milestone_progress"
},
{
"type": "string",
"const": "report_limit_reached"
},
{
"type": "string",
"const": "milestone_already_rewarded"
},
{
"type": "string",
"const": "report_value_no_reward"
},
{
"type": "string",
"const": "customer_cap_reached"
},
{
"type": "string",
"const": "partner_cap_reached"
},
{
"type": "string",
"const": "category_excluded"
},
{
"type": "string",
"const": "categories_missing"
},
{
"type": "string",
"const": "categories_required"
},
{
"type": "string",
"const": "first_order_only"
},
{
"type": "string",
"const": "first_order_after_referral_only"
},
{
"type": "string",
"const": "first_orders_only"
},
{
"type": "string",
"const": "first_orders_after_referral_only"
},
{
"type": "string",
"const": "duration_ended"
},
{
"type": "string",
"const": "rate_no_reward"
},
{
"type": "string",
"const": "order_no_reward"
}
]
},
"params": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
}
},
"required": [
"code"
]
},
"description": "reason as codes. Absent on decisions made before codes existed."
},
"amountCents": {
"type": "number"
},
"selfReferral": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"const": "blocked"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "flagged"
}
]
},
"signals": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "email"
},
{
"type": "string",
"const": "phone"
},
{
"type": "string",
"const": "card"
},
{
"type": "string",
"const": "device"
},
{
"type": "string",
"const": "ip"
},
{
"type": "string",
"const": "customer_id"
}
]
}
}
},
"required": [
"action",
"signals"
],
"description": "Present when the customer's identity signals matched the partner's. blocked comes with a\nskipped outcome. review comes with a reward held as pending. flagged comes with a reward that\nfollows the program's usual approval."
},
"fraud": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"const": "blocked"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "flagged"
}
]
},
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"const": "blocked"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "flagged"
}
]
},
"rule": {
"anyOf": [
{
"type": "string",
"const": "duplicate_accounts"
},
{
"type": "string",
"const": "rapid_repeats"
},
{
"type": "string",
"const": "repeat_customer"
},
{
"type": "string",
"const": "disposable_email"
}
]
},
"signals": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "email"
},
{
"type": "string",
"const": "phone"
},
{
"type": "string",
"const": "card"
},
{
"type": "string",
"const": "device"
},
{
"type": "string",
"const": "ip"
}
]
},
"description": "Matching signal types, never values. Empty for disposable_email."
},
"count": {
"type": "number",
"description": "Customers counted, this one included when referred inside the window. Velocity rules only."
}
},
"required": [
"action",
"rule",
"signals"
]
}
}
},
"required": [
"action",
"rules"
],
"description": "Present when fraud rules fired. blocked comes with a skipped outcome. review comes with a\nreward held as pending. flagged comes with a reward that follows the program's usual approval."
},
"milestoneCount": {
"type": "number",
"description": "Milestone decisions that reached the count check: the person's reports that count for this\nprogram, at or after the referral and not reversed, this report included."
},
"milestoneThreshold": {
"type": "number",
"description": "The effective bonus count, or 1 for each-report-only programs."
}
},
"required": [
"programId",
"programName",
"outcome",
"reason",
"amountCents"
]
}
},
"rewardIds": {
"type": "array",
"items": {
"type": "string"
}
},
"reversalCents": {
"type": "number"
},
"restoredCents": {
"type": "number",
"description": "Reward amount given back because the order's cumulative refund total went down."
},
"increasedCents": {
"type": "number",
"description": "Adjustments only. Reward value a higher order total added. Lower totals report reversalCents."
},
"stale": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
],
"description": "True when a refund or adjustment event was older than the latest applied one of its kind for\nthe order and changed nothing."
},
"referralSelection": {
"type": "object",
"properties": {
"winner": {
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"properties": {
"programId": {
"type": "string"
},
"partnerId": {
"type": "string"
},
"occurredAt": {
"type": "string"
},
"type": {
"anyOf": [
{
"type": "string",
"const": "code"
},
{
"type": "string",
"const": "receipt"
}
]
},
"providerPromoCodeId": {
"type": "string"
},
"index": {
"type": "number",
"description": "Absent when the customer's recorded attribution is retained."
}
},
"required": [
"programId",
"partnerId",
"occurredAt"
]
}
]
},
"skipped": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "number"
},
"reason": {
"anyOf": [
{
"type": "string",
"const": "expired"
},
{
"type": "string",
"const": "invalid"
},
{
"type": "string",
"const": "self_referral"
},
{
"type": "string",
"const": "wrong_program"
},
{
"type": "string",
"const": "program_inactive"
},
{
"type": "string",
"const": "partner_inactive"
},
{
"type": "string",
"const": "fraud"
},
{
"type": "string",
"const": "customer_already_referred"
},
{
"type": "string",
"const": "older"
}
]
}
},
"required": [
"index",
"reason"
]
}
}
},
"required": [
"winner",
"skipped"
]
}
},
"required": [
"eventId",
"orderId",
"duplicate",
"decisions",
"rewardIds",
"reversalCents"
]
},
"rewards": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"companyId": {
"type": "string"
},
"orderId": {
"type": "string",
"description": "The order that earned the reward. Absent on milestone rewards."
},
"milestone": {
"type": "string",
"description": "The milestone that earned the reward. Absent on order rewards. Exactly one of the two is set."
},
"reportEventId": {
"type": "string",
"description": "Each-report rewards name their source. Absent on at-count bonuses."
},
"milestoneReportReversed": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
]
},
"valueCents": {
"type": "number"
},
"milestoneCount": {
"type": "number",
"description": "Milestone rewards: the person's reports of the milestone that count for this program now,\nthose at or after the referral minus reversed ones. Grizzlee updates it with every report,\nreversal, revocation and reinstatement for the person and milestone. Absent on rewards no\nmilestone event has touched since milestones were counted."
},
"milestoneRevoked": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
],
"description": "Milestone rewards: true while the milestone is revoked for the person. Updated with\nmilestoneCount. Absent when not revoked, and on rewards no milestone event has touched since\nmilestones were counted."
},
"programId": {
"type": "string"
},
"partnerId": {
"type": "string"
},
"customerId": {
"type": "string"
},
"currency": {
"anyOf": [
{
"type": "string",
"const": "CAD"
},
{
"type": "string",
"const": "USD"
},
{
"type": "string",
"const": "EUR"
},
{
"type": "string",
"const": "GBP"
}
]
},
"rewardType": {
"anyOf": [
{
"type": "string",
"const": "offer"
},
{
"type": "string",
"const": "cash"
},
{
"type": "string",
"const": "credit"
}
]
},
"offer": {
"type": "object",
"properties": {
"terms": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percent"
},
"rateBps": {
"type": "number"
},
"orders": {
"type": "number",
"description": "How many of the friend's orders get the incentive."
},
"expiresAfterDays": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
],
"description": "Days after the referral was captured, claimed or entered. null means it never expires."
},
"returnOnFullRefund": {
"type": "boolean",
"description": "true: a full refund gives the use back, so the customer can get the offer again."
},
"maxDiscountCents": {
"type": "number",
"description": "Largest discount for one order."
},
"minOrderCents": {
"type": "number",
"description": "The friend's order total before the discount must reach this amount. Checked by the merchant's checkout."
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"type": "string"
}
},
"exclude": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Order categories that get the discount. Checked apart from the program's own orderCategories,\nwhich decide rewards. Absent means every order qualifies."
}
},
"required": [
"type",
"rateBps",
"orders",
"expiresAfterDays",
"returnOnFullRefund"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"orders": {
"type": "number",
"description": "How many of the friend's orders get the incentive."
},
"expiresAfterDays": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
],
"description": "Days after the referral was captured, claimed or entered. null means it never expires."
},
"returnOnFullRefund": {
"type": "boolean",
"description": "true: a full refund gives the use back, so the customer can get the offer again."
},
"amountCents": {
"type": "number"
},
"minOrderCents": {
"type": "number",
"description": "The friend's order total before the discount must reach this amount. Checked by the merchant's checkout."
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"type": "string"
}
},
"exclude": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Order categories that get the discount. Checked apart from the program's own orderCategories,\nwhich decide rewards. Absent means every order qualifies."
}
},
"required": [
"type",
"orders",
"expiresAfterDays",
"returnOnFullRefund",
"amountCents"
]
}
]
},
"expiresAt": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
}
]
}
},
"required": [
"terms",
"expiresAt"
],
"description": "Offer rewards only. Terms copied when earned. Later program edits leave them alone."
},
"originalCents": {
"type": "number",
"description": "What the reward earned when it was created. Never changes."
},
"adjustedCents": {
"type": "number",
"description": "Signed total that order adjustments added to or removed from originalCents. Absent until the\norder is adjusted. The reward is worth originalCents + adjustedCents - reversedCents."
},
"reversedCents": {
"type": "number",
"description": "Reversed by refunds, a rejection or a milestone revocation."
},
"status": {
"anyOf": [
{
"type": "string",
"const": "pending"
},
{
"type": "string",
"const": "reversed"
},
{
"type": "string",
"const": "approved"
}
]
},
"selfReferral": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"const": "blocked"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "flagged"
}
]
},
"signals": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "email"
},
{
"type": "string",
"const": "phone"
},
{
"type": "string",
"const": "card"
},
{
"type": "string",
"const": "device"
},
{
"type": "string",
"const": "ip"
},
{
"type": "string",
"const": "customer_id"
}
]
}
}
},
"required": [
"action",
"signals"
],
"description": "Present when the customer's identity signals matched the partner's. With action review the\nreward started pending and waits for someone to approve or reject it, and automatic approval\nskips it. With action flagged it follows the program's usual approval."
},
"fraud": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"const": "blocked"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "flagged"
}
]
},
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"const": "blocked"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "flagged"
}
]
},
"rule": {
"anyOf": [
{
"type": "string",
"const": "duplicate_accounts"
},
{
"type": "string",
"const": "rapid_repeats"
},
{
"type": "string",
"const": "repeat_customer"
},
{
"type": "string",
"const": "disposable_email"
}
]
},
"signals": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "email"
},
{
"type": "string",
"const": "phone"
},
{
"type": "string",
"const": "card"
},
{
"type": "string",
"const": "device"
},
{
"type": "string",
"const": "ip"
}
]
},
"description": "Matching signal types, never values. Empty for disposable_email."
},
"count": {
"type": "number",
"description": "Customers counted, this one included when referred inside the window. Velocity rules only."
}
},
"required": [
"action",
"rule",
"signals"
]
}
}
},
"required": [
"action",
"rules"
],
"description": "Present when fraud rules fired. rules lists each rule ID with its signal types, never values.\nWith action review the reward started pending, waits for someone to approve or reject it, and\nautomatic approval skips it. With action flagged it follows the program's usual approval."
},
"rejectedAt": {
"type": "string",
"description": "When someone rejected the pending reward. A rejected reward is reversed for good."
},
"rejectionReason": {
"type": "string",
"description": "Why it was rejected, as entered."
},
"statusBeforeReversal": {
"anyOf": [
{
"type": "string",
"const": "pending"
},
{
"type": "string",
"const": "approved"
}
],
"description": "Status the reward had when a refund fully reversed it. A later restoration returns it to this status."
},
"deliveryMode": {
"anyOf": [
{
"type": "string",
"const": "grizzlee_wallet"
},
{
"type": "string",
"const": "merchant"
}
],
"description": "Delivery mode when earned. Absent on older money rewards, which use the Grizzlee wallet. Absent on offer rewards. Readers ignore delivery for offers."
},
"createdAt": {
"type": "string"
},
"availableAt": {
"type": "string",
"description": "Rewards no longer have a hold, so new rewards use createdAt. Older rewards keep their original date."
},
"programSnapshot": {
"type": "object",
"properties": {
"currency": {
"anyOf": [
{
"type": "string",
"const": "CAD"
},
{
"type": "string",
"const": "USD"
},
{
"type": "string",
"const": "EUR"
},
{
"type": "string",
"const": "GBP"
}
],
"description": "Must match the company currency."
},
"name": {
"type": "string"
},
"kind": {
"anyOf": [
{
"type": "string",
"const": "referral"
},
{
"type": "string",
"const": "affiliate"
},
{
"type": "string",
"const": "both"
}
]
},
"rewardType": {
"anyOf": [
{
"type": "string",
"const": "offer"
},
{
"type": "string",
"const": "cash"
},
{
"type": "string",
"const": "credit"
}
]
},
"attributionWindowDays": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
],
"description": "Days after a referral that a first purchase, or a milestone, still counts. The latest\nreferral always wins until one qualifies. Only milestone programs may use null, which means\nthe referral never expires."
},
"active": {
"type": "boolean"
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"type": "string"
}
},
"exclude": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Order categories that earn rewards. Order programs only. The friend incentive has its own\norderCategories. Absent means every order can earn."
},
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "number"
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rateBps": {
"type": "number"
},
"afterMonths": {
"type": "number"
}
},
"required": [
"rateBps",
"afterMonths"
]
}
}
},
"required": [
"type",
"rateBps"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "number"
}
},
"required": [
"type",
"amountCents"
]
}
]
},
"tracking": {
"type": "object",
"properties": {
"links": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
]
},
"qrCodes": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
]
},
"attributionCodes": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
]
},
"providerPromoCodes": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
]
}
},
"description": "Tracking methods are independent of kind. Provider discounts require a connected provider."
},
"destinationUrl": {
"type": "string",
"description": "The page partner links and QR codes open. A published signup page's destination takes\nprecedence. Without either, partners have no link."
},
"display": {
"type": "object",
"properties": {
"en": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"description": "The name partners and customers see. Falls back to the program name."
},
"headline": {
"type": "string",
"description": "Replaces the generated headline, such as \"Give 20%, get $10\"."
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string"
},
"other": {
"type": "string"
}
},
"required": [
"one",
"other"
],
"description": "Milestone programs only. What one report counts, such as one: \"lesson\", other: \"lessons\".\nIn Russian, other is the genitive plural, such as \"уроков\", which reward terms put after\n\"число\"."
}
}
},
"fr-CA": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"description": "The name partners and customers see. Falls back to the program name."
},
"headline": {
"type": "string",
"description": "Replaces the generated headline, such as \"Give 20%, get $10\"."
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string"
},
"other": {
"type": "string"
}
},
"required": [
"one",
"other"
],
"description": "Milestone programs only. What one report counts, such as one: \"lesson\", other: \"lessons\".\nIn Russian, other is the genitive plural, such as \"уроков\", which reward terms put after\n\"число\"."
}
}
},
"hy": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"description": "The name partners and customers see. Falls back to the program name."
},
"headline": {
"type": "string",
"description": "Replaces the generated headline, such as \"Give 20%, get $10\"."
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string"
},
"other": {
"type": "string"
}
},
"required": [
"one",
"other"
],
"description": "Milestone programs only. What one report counts, such as one: \"lesson\", other: \"lessons\".\nIn Russian, other is the genitive plural, such as \"уроков\", which reward terms put after\n\"число\"."
}
}
},
"ru": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"description": "The name partners and customers see. Falls back to the program name."
},
"headline": {
"type": "string",
"description": "Replaces the generated headline, such as \"Give 20%, get $10\"."
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string"
},
"other": {
"type": "string"
}
},
"required": [
"one",
"other"
],
"description": "Milestone programs only. What one report counts, such as one: \"lesson\", other: \"lessons\".\nIn Russian, other is the genitive plural, such as \"уроков\", which reward terms put after\n\"число\"."
}
}
}
},
"description": "Optional public name, headline and milestone label for partner and customer screens."
},
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "order"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "milestone"
},
"milestone": {
"type": "string"
}
},
"required": [
"type",
"milestone"
]
}
],
"description": "What earns a reward. Defaults to completed orders."
},
"milestoneRewards": {
"type": "object",
"properties": {
"eachReport": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "number"
}
},
"required": [
"type",
"amountCents"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "number"
}
},
"required": [
"type",
"rateBps"
]
}
]
},
"limit": {
"type": "number",
"description": "Absent means every counted report. Reversed reports do not count toward the limit."
}
},
"required": [
"compensation"
]
},
"atCount": {
"type": "object",
"properties": {
"amountCents": {
"type": "number"
},
"count": {
"type": "number"
}
},
"required": [
"amountCents",
"count"
]
}
}
},
"fixedRefundMode": {
"anyOf": [
{
"type": "string",
"const": "prorate"
},
{
"type": "string",
"const": "full_refund_only"
}
],
"description": "How fixed rewards change after a partial refund."
},
"duration": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "only_order"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "first_order"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "first_n_orders"
},
"count": {
"type": "number"
}
},
"required": [
"type",
"count"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "days"
},
"days": {
"type": "number"
}
},
"required": [
"type",
"days"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "months"
},
"months": {
"type": "number"
}
},
"required": [
"type",
"months"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "lifetime"
}
},
"required": [
"type"
]
}
]
},
"delivery": {
"type": "object",
"properties": {
"cash": {
"anyOf": [
{
"type": "string",
"const": "grizzlee_wallet"
},
{
"type": "string",
"const": "merchant"
}
]
},
"credit": {
"anyOf": [
{
"type": "string",
"const": "grizzlee_wallet"
},
{
"type": "string",
"const": "merchant"
}
]
}
},
"description": "Who delivers approved rewards of each type. Defaults to the Grizzlee wallet for both."
},
"reviewRewards": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
],
"description": "When true, new rewards wait as pending until someone approves them. Otherwise they start approved."
},
"fraudChecks": {
"type": "object",
"properties": {
"selfReferral": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
},
{
"type": "string",
"const": "flag"
},
{
"type": "string",
"const": "off"
}
]
}
}
},
"duplicateAccounts": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
},
{
"type": "string",
"const": "flag"
},
{
"type": "string",
"const": "off"
}
]
},
"accounts": {
"type": "number",
"description": "Customers sharing one card or device that trigger the rule. This one counts when referred inside the window."
},
"windowDays": {
"type": "number"
},
"ipAccounts": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
],
"description": "Customers sharing one IP address that trigger the rule. null leaves IP addresses out."
}
}
},
"rapidRepeats": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
},
{
"type": "string",
"const": "flag"
},
{
"type": "string",
"const": "off"
}
]
},
"referrals": {
"type": "number",
"description": "Referrals from one device that trigger the rule. This one counts when referred inside the window."
},
"windowMinutes": {
"type": "number"
},
"ipReferrals": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
],
"description": "Referrals from one IP address that trigger the rule. null leaves IP addresses out."
}
}
},
"repeatCustomer": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
},
{
"type": "string",
"const": "flag"
},
{
"type": "string",
"const": "off"
}
]
}
}
},
"disposableEmail": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "flag"
},
{
"type": "string",
"const": "off"
}
],
"description": "A disposable address does not show a second person, so this rule cannot block."
}
}
}
},
"description": "Self-referral and other fraud rules. Absent means every rule uses its default."
},
"performance": {
"type": "object",
"properties": {
"metric": {
"anyOf": [
{
"type": "string",
"const": "orders"
},
{
"type": "string",
"const": "new_customers"
}
]
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"minValue": {
"type": "number"
},
"bonusBps": {
"type": "number"
}
},
"required": [
"name",
"minValue",
"bonusBps"
]
}
},
"windowDays": {
"type": "number"
}
},
"required": [
"metric",
"tiers"
]
},
"limits": {
"type": "object",
"properties": {
"customerCapCents": {
"type": "number"
},
"partnerCapCents": {
"type": "number"
}
}
},
"customTerms": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"target": {
"type": "string",
"const": "partner"
},
"targetId": {
"type": "string"
},
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "number"
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rateBps": {
"type": "number"
},
"afterMonths": {
"type": "number"
}
},
"required": [
"rateBps",
"afterMonths"
]
}
}
},
"required": [
"type",
"rateBps"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "number"
}
},
"required": [
"type",
"amountCents"
]
}
]
},
"milestoneRewards": {
"type": "object",
"properties": {
"eachReport": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "number"
}
},
"required": [
"type",
"amountCents"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "number"
}
},
"required": [
"type",
"rateBps"
]
}
]
},
"limit": {
"type": "number",
"description": "Absent means every counted report. Reversed reports do not count toward the limit."
}
},
"required": [
"compensation"
]
},
"atCount": {
"type": "object",
"properties": {
"amountCents": {
"type": "number"
},
"count": {
"type": "number"
}
},
"required": [
"amountCents",
"count"
]
}
}
},
"customerCapCents": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
]
},
"partnerCapCents": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
]
}
},
"required": [
"target",
"targetId"
]
},
{
"type": "object",
"properties": {
"target": {
"type": "string",
"const": "customer"
},
"targetId": {
"type": "string"
},
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "number"
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rateBps": {
"type": "number"
},
"afterMonths": {
"type": "number"
}
},
"required": [
"rateBps",
"afterMonths"
]
}
}
},
"required": [
"type",
"rateBps"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "number"
}
},
"required": [
"type",
"amountCents"
]
}
]
},
"milestoneRewards": {
"type": "object",
"properties": {
"eachReport": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "number"
}
},
"required": [
"type",
"amountCents"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "number"
}
},
"required": [
"type",
"rateBps"
]
}
]
},
"limit": {
"type": "number",
"description": "Absent means every counted report. Reversed reports do not count toward the limit."
}
},
"required": [
"compensation"
]
},
"atCount": {
"type": "object",
"properties": {
"amountCents": {
"type": "number"
},
"count": {
"type": "number"
}
},
"required": [
"amountCents",
"count"
]
}
}
},
"customerCapCents": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
]
}
},
"required": [
"target",
"targetId"
]
}
]
}
},
"friendIncentive": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percent"
},
"rateBps": {
"type": "number"
},
"maxDiscountCents": {
"type": "number",
"description": "Largest discount for one order."
},
"minOrderCents": {
"type": "number",
"description": "The friend's order total before the discount must reach this amount. Checked by the merchant's checkout."
},
"orders": {
"type": "number",
"description": "How many of the friend's orders get the incentive."
},
"newCustomersOnly": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
],
"description": "true: use the merchant's newCustomer answer, or recorded purchases when omitted. false:\nreturning customers qualify too. A supplied answer uses the order limit after the referral."
},
"expiresAfterDays": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
],
"description": "Days after the referral was captured, claimed or entered. null means it never expires."
},
"returnOnFullRefund": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
],
"description": "true: a full refund gives the use back, so the customer can get the offer again."
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"type": "string"
}
},
"exclude": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Order categories that get the discount. Checked apart from the program's own orderCategories,\nwhich decide rewards. Absent means every order qualifies."
}
},
"required": [
"type",
"rateBps"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "number"
},
"minOrderCents": {
"type": "number",
"description": "The friend's order total before the discount must reach this amount. Checked by the merchant's checkout."
},
"orders": {
"type": "number",
"description": "How many of the friend's orders get the incentive."
},
"newCustomersOnly": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
],
"description": "true: use the merchant's newCustomer answer, or recorded purchases when omitted. false:\nreturning customers qualify too. A supplied answer uses the order limit after the referral."
},
"expiresAfterDays": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
],
"description": "Days after the referral was captured, claimed or entered. null means it never expires."
},
"returnOnFullRefund": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
],
"description": "true: a full refund gives the use back, so the customer can get the offer again."
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"type": "string"
}
},
"exclude": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Order categories that get the discount. Checked apart from the program's own orderCategories,\nwhich decide rewards. Absent means every order qualifies."
}
},
"required": [
"type",
"amountCents"
]
}
],
"description": "Optional offer for the referred customer."
},
"partnerOffer": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percent"
},
"rateBps": {
"type": "number"
},
"maxDiscountCents": {
"type": "number",
"description": "Largest discount for one order."
},
"minOrderCents": {
"type": "number",
"description": "The friend's order total before the discount must reach this amount. Checked by the merchant's checkout."
},
"orders": {
"type": "number",
"description": "How many of the friend's orders get the incentive."
},
"expiresAfterDays": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
],
"description": "Days after the referral was captured, claimed or entered. null means it never expires."
},
"returnOnFullRefund": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
],
"description": "true: a full refund gives the use back, so the customer can get the offer again."
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"type": "string"
}
},
"exclude": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Order categories that get the discount. Checked apart from the program's own orderCategories,\nwhich decide rewards. Absent means every order qualifies."
}
},
"required": [
"type",
"rateBps"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "number"
},
"minOrderCents": {
"type": "number",
"description": "The friend's order total before the discount must reach this amount. Checked by the merchant's checkout."
},
"orders": {
"type": "number",
"description": "How many of the friend's orders get the incentive."
},
"expiresAfterDays": {
"anyOf": [
{
"type": "null"
},
{
"type": "number"
}
],
"description": "Days after the referral was captured, claimed or entered. null means it never expires."
},
"returnOnFullRefund": {
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "boolean",
"const": true
}
],
"description": "true: a full refund gives the use back, so the customer can get the offer again."
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"type": "string"
}
},
"exclude": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Order categories that get the discount. Checked apart from the program's own orderCategories,\nwhich decide rewards. Absent means every order qualifies."
}
},
"required": [
"type",
"amountCents"
]
}
],
"description": "Offer programs only. What the partner earns per qualifying referred order."
}
},
"required": [
"currency",
"name",
"kind",
"rewardType",
"attributionWindowDays",
"active"
]
},
"programVersion": {
"type": "number",
"description": "The program version the reward was earned under. Absent on rewards earned before programs had\nversions. programSnapshot holds their rules either way."
},
"historicalBasis": {
"type": "string",
"const": "total",
"description": "Historical subtotal rewards keep their reporting-total basis for refunds and adjustments."
},
"basisCents": {
"type": "number"
},
"explanation": {
"type": "string"
},
"explanationParts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"anyOf": [
{
"type": "string",
"const": "fixed"
},
{
"type": "string",
"const": "percentage"
},
{
"type": "string",
"const": "offer"
},
{
"type": "string",
"const": "report"
},
{
"type": "string",
"const": "report_percentage"
},
{
"type": "string",
"const": "milestone_bonus"
},
{
"type": "string",
"const": "schedule_month"
},
{
"type": "string",
"const": "tier_bonus"
},
{
"type": "string",
"const": "custom_partner_terms"
},
{
"type": "string",
"const": "custom_customer_terms"
},
{
"type": "string",
"const": "capped"
}
]
},
"params": {
"type": "object",
"properties": {},
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
}
},
"required": [
"code"
]
},
"description": "explanation as codes. Absent on rewards earned before codes existed."
},
"calculation": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "number"
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rateBps": {
"type": "number"
},
"afterMonths": {
"type": "number"
}
},
"required": [
"rateBps",
"afterMonths"
]
}
}
},
"required": [
"type",
"rateBps"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "number"
}
},
"required": [
"type",
"amountCents"
]
}
]
},
"milestoneRewards": {
"type": "object",
"properties": {
"eachReport": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "number"
}
},
"required": [
"type",
"amountCents"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "number"
}
},
"required": [
"type",
"rateBps"
]
}
]
},
"limit": {
"type": "number",
"description": "Absent means every counted report. Reversed reports do not count toward the limit."
}
},
"required": [
"compensation"
]
},
"atCount": {
"type": "object",
"properties": {
"amountCents": {
"type": "number"
},
"count": {
"type": "number"
}
},
"required": [
"amountCents",
"count"
]
}
}
},
"fixedRefundMode": {
"anyOf": [
{
"type": "string",
"const": "prorate"
},
{
"type": "string",
"const": "full_refund_only"
}
],
"description": "Saved for fixed reward refunds. Older rewards default to prorate."
},
"phaseAfterMonths": {
"type": "number"
},
"tier": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"minValue": {
"type": "number"
},
"bonusBps": {
"type": "number"
},
"value": {
"type": "number"
}
},
"required": [
"name",
"minValue",
"bonusBps",
"value"
]
},
"customTerms": {
"type": "object",
"properties": {
"target": {
"anyOf": [
{
"type": "string",
"const": "partner"
},
{
"type": "string",
"const": "customer"
}
]
},
"targetId": {
"type": "string"
}
},
"required": [
"target",
"targetId"
]
},
"uncappedCents": {
"type": "number"
},
"customerCapCents": {
"type": "number"
},
"partnerCapCents": {
"type": "number"
}
},
"required": [
"compensation",
"uncappedCents"
]
}
},
"required": [
"id",
"companyId",
"programId",
"partnerId",
"customerId",
"currency",
"rewardType",
"originalCents",
"reversedCents",
"status",
"createdAt",
"availableAt",
"programSnapshot",
"explanation"
]
}
}
},
"required": [
"result",
"rewards"
]
}Errors
Failures return { "error": { "code": "...", "message": "...", "details": {} } }. Details are optional. See error statuses. Reuse an unchanged event payload when retrying.