Skip to content
Developer docs
⌘ K
Dashboard ↗

HTTP endpoints

simulate

POST /api/v1/simulate

Requires events:write. Keep the Bearer key on your server.

SDK

ts
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.

sh
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

FieldTypeRequiredDetails
eventunionYes
attributionobjectNo

event

Variant 1

FieldTypeRequiredDetails
event.type"order.completed"Yes
event.eventIdstringYes
event.orderIdstringYes
event.customerIdstringYes
event.customerDisplayNamestringNo
event.customerEmailstringNoemail
event.newCustomerbooleanNo
event.customerOrderNumberintegerNominimum 1. maximum 1000000
event.currency"CAD", "USD", "EUR", "GBP"Yes
event.totalCentsintegerNominimum 0. maximum 1000000000000
event.commissionableCentsintegerYesminimum 0. maximum 1000000000000
event.incentiveAppliedCentsintegerNominimum 0. maximum 1000000000000
event.categoriesarrayNo
event.occurredAtstringYesdate-time

event.categories[]

Type: string.

Type: string.

Variant 2

FieldTypeRequiredDetails
event.type"order.refunded"Yes
event.eventIdstringYes
event.orderIdstringYes
event.refundedTotalCentsintegerNominimum 0. maximum 1000000000000
event.refundedCommissionableCentsintegerNominimum 0. maximum 1000000000000
event.fullRefundbooleanNo
event.occurredAtstringYesdate-time

Variant 3

FieldTypeRequiredDetails
event.type"order.adjusted"Yes
event.eventIdstringYes
event.orderIdstringYes
event.totalCentsintegerNominimum 0. maximum 1000000000000
event.commissionableCentsintegerNominimum 0. maximum 1000000000000
event.reasonstringNo
event.occurredAtstringYesdate-time

attribution

FieldTypeRequiredDetails
attribution.programIdstringYes
attribution.customerIdstringYes
attribution.customerDisplayNamestringNo
attribution.orderIdstringNo
attribution.referralCodestringYes
attribution.providerPromoCodeIdstringNo
attribution.channel"link", "qr", "coupon", "in_app"Yes
attribution.occurredAtstringYesdate-time

Request schema

json
{
  "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.

FieldTypeRequiredDetails
resultobjectYes
rewardsarrayYes

result

FieldTypeRequiredDetails
result.eventIdstringYes
result.orderIdstringYes
result.duplicatebooleanYes
result.customerOrderNumbernumberNoCompletions only. The purchase number Grizzlee gave the order.
result.incentiveFlagobjectNoCompletions only. Present when incentiveAppliedCents did not match the reservation.
result.decisionsarrayYes
result.rewardIdsarrayYes
result.reversalCentsnumberYes
result.restoredCentsnumberNoReward amount given back because the order's cumulative refund total went down.
result.increasedCentsnumberNoAdjustments only. Reward value a higher order total added. Lower totals report reversalCents.
result.staleunionNoTrue when a refund or adjustment event was older than the latest applied one of its kind for the order and changed nothing.
result.referralSelectionobjectNo

result.incentiveFlag

FieldTypeRequiredDetails
result.incentiveFlag.reasonunionYes
result.incentiveFlag.rewardIdstringNo
result.incentiveFlag.programIdstringNoProgram of the reservation or referral checked. Absent for no_referral.
result.incentiveFlag.reservationIdstringNoThe reservation sent with the order, when there was one.
result.incentiveFlag.maxCentsunionYesLargest discount the terms allow on one order. Null when they set no cap or there are no terms.
result.incentiveFlag.reportedCentsnumberYesincentiveAppliedCents 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[]

FieldTypeRequiredDetails
result.decisions.programIdstringYes
result.decisions.programNamestringYes
result.decisions.partnerIdstringNo
result.decisions.outcomeunionYes
result.decisions.reasonstringYes
result.decisions.reasonPartsarrayNoreason as codes. Absent on decisions made before codes existed.
result.decisions.amountCentsnumberYes
result.decisions.selfReferralobjectNoPresent 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.fraudobjectNoPresent 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.milestoneCountnumberNoMilestone 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.milestoneThresholdnumberNoThe effective bonus count, or 1 for each-report-only programs.

result.decisions.outcome

Variant 1

Type: string.

Variant 2

Type: string.

result.decisions.reasonParts[]

FieldTypeRequiredDetails
result.decisions.reasonParts.codeunionYes
result.decisions.reasonParts.paramsobjectNo

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

FieldTypeRequiredDetails
result.decisions.selfReferral.actionunionYes
result.decisions.selfReferral.signalsarrayYes

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

FieldTypeRequiredDetails
result.decisions.fraud.actionunionYes
result.decisions.fraud.rulesarrayYes

result.decisions.fraud.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

result.decisions.fraud.rules[]

FieldTypeRequiredDetails
result.decisions.fraud.rules.actionunionYes
result.decisions.fraud.rules.ruleunionYes
result.decisions.fraud.rules.signalsarrayYesMatching signal types, never values. Empty for disposable_email.
result.decisions.fraud.rules.countnumberNoCustomers 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

FieldTypeRequiredDetails
result.referralSelection.winnerunionYes
result.referralSelection.skippedarrayYes

result.referralSelection.winner

Variant 1

Type: null.

Variant 2

FieldTypeRequiredDetails
result.referralSelection.winner.programIdstringYes
result.referralSelection.winner.partnerIdstringYes
result.referralSelection.winner.occurredAtstringYes
result.referralSelection.winner.typeunionNo
result.referralSelection.winner.providerPromoCodeIdstringNo
result.referralSelection.winner.indexnumberNoAbsent when the customer's recorded attribution is retained.

result.referralSelection.winner.type

Variant 1

Type: string.

Variant 2

Type: string.

result.referralSelection.skipped[]

FieldTypeRequiredDetails
result.referralSelection.skipped.indexnumberYes
result.referralSelection.skipped.reasonunionYes

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[]

FieldTypeRequiredDetails
rewards.idstringYes
rewards.companyIdstringYes
rewards.orderIdstringNoThe order that earned the reward. Absent on milestone rewards.
rewards.milestonestringNoThe milestone that earned the reward. Absent on order rewards. Exactly one of the two is set.
rewards.reportEventIdstringNoEach-report rewards name their source. Absent on at-count bonuses.
rewards.milestoneReportReversedunionNo
rewards.valueCentsnumberNo
rewards.milestoneCountnumberNoMilestone 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.milestoneRevokedunionNoMilestone 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.programIdstringYes
rewards.partnerIdstringYes
rewards.customerIdstringYes
rewards.currencyunionYes
rewards.rewardTypeunionYes
rewards.offerobjectNoOffer rewards only. Terms copied when earned. Later program edits leave them alone.
rewards.originalCentsnumberYesWhat the reward earned when it was created. Never changes.
rewards.adjustedCentsnumberNoSigned total that order adjustments added to or removed from originalCents. Absent until the order is adjusted. The reward is worth originalCents + adjustedCents - reversedCents.
rewards.reversedCentsnumberYesReversed by refunds, a rejection or a milestone revocation.
rewards.statusunionYes
rewards.selfReferralobjectNoPresent 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.fraudobjectNoPresent 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.rejectedAtstringNoWhen someone rejected the pending reward. A rejected reward is reversed for good.
rewards.rejectionReasonstringNoWhy it was rejected, as entered.
rewards.statusBeforeReversalunionNoStatus the reward had when a refund fully reversed it. A later restoration returns it to this status.
rewards.deliveryModeunionNoDelivery mode when earned. Absent on older money rewards, which use the Grizzlee wallet. Absent on offer rewards. Readers ignore delivery for offers.
rewards.createdAtstringYes
rewards.availableAtstringYesRewards no longer have a hold, so new rewards use createdAt. Older rewards keep their original date.
rewards.programSnapshotobjectYes
rewards.programVersionnumberNoThe program version the reward was earned under. Absent on rewards earned before programs had versions. programSnapshot holds their rules either way.
rewards.historicalBasis"total"NoHistorical subtotal rewards keep their reporting-total basis for refunds and adjustments.
rewards.basisCentsnumberNo
rewards.explanationstringYes
rewards.explanationPartsarrayNoexplanation as codes. Absent on rewards earned before codes existed.
rewards.calculationobjectNo

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

FieldTypeRequiredDetails
rewards.offer.termsunionYes
rewards.offer.expiresAtunionYes

rewards.offer.terms

Variant 1

FieldTypeRequiredDetails
rewards.offer.terms.type"percent"Yes
rewards.offer.terms.rateBpsnumberYes
rewards.offer.terms.ordersnumberYesHow many of the friend's orders get the incentive.
rewards.offer.terms.expiresAfterDaysunionYesDays after the referral was captured, claimed or entered. null means it never expires.
rewards.offer.terms.returnOnFullRefundbooleanYestrue: a full refund gives the use back, so the customer can get the offer again.
rewards.offer.terms.maxDiscountCentsnumberNoLargest discount for one order.
rewards.offer.terms.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
rewards.offer.terms.orderCategoriesobjectNoOrder 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

FieldTypeRequiredDetails
rewards.offer.terms.orderCategories.includearrayNo
rewards.offer.terms.orderCategories.excludearrayNo

Variant 2

FieldTypeRequiredDetails
rewards.offer.terms.type"fixed"Yes
rewards.offer.terms.ordersnumberYesHow many of the friend's orders get the incentive.
rewards.offer.terms.expiresAfterDaysunionYesDays after the referral was captured, claimed or entered. null means it never expires.
rewards.offer.terms.returnOnFullRefundbooleanYestrue: a full refund gives the use back, so the customer can get the offer again.
rewards.offer.terms.amountCentsnumberYes
rewards.offer.terms.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
rewards.offer.terms.orderCategoriesobjectNoOrder 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

FieldTypeRequiredDetails
rewards.offer.terms.orderCategories.includearrayNo
rewards.offer.terms.orderCategories.excludearrayNo

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

FieldTypeRequiredDetails
rewards.selfReferral.actionunionYes
rewards.selfReferral.signalsarrayYes

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

FieldTypeRequiredDetails
rewards.fraud.actionunionYes
rewards.fraud.rulesarrayYes

rewards.fraud.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

rewards.fraud.rules[]

FieldTypeRequiredDetails
rewards.fraud.rules.actionunionYes
rewards.fraud.rules.ruleunionYes
rewards.fraud.rules.signalsarrayYesMatching signal types, never values. Empty for disposable_email.
rewards.fraud.rules.countnumberNoCustomers 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

FieldTypeRequiredDetails
rewards.programSnapshot.currencyunionYesMust match the company currency.
rewards.programSnapshot.namestringYes
rewards.programSnapshot.kindunionYes
rewards.programSnapshot.rewardTypeunionYes
rewards.programSnapshot.attributionWindowDaysunionYesDays 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.activebooleanYes
rewards.programSnapshot.orderCategoriesobjectNoOrder categories that earn rewards. Order programs only. The friend incentive has its own orderCategories. Absent means every order can earn.
rewards.programSnapshot.compensationunionNo
rewards.programSnapshot.trackingobjectNoTracking methods are independent of kind. Provider discounts require a connected provider.
rewards.programSnapshot.destinationUrlstringNoThe page partner links and QR codes open. A published signup page's destination takes precedence. Without either, partners have no link.
rewards.programSnapshot.displayobjectNoOptional public name, headline and milestone label for partner and customer screens.
rewards.programSnapshot.triggerunionNoWhat earns a reward. Defaults to completed orders.
rewards.programSnapshot.milestoneRewardsobjectNo
rewards.programSnapshot.fixedRefundModeunionNoHow fixed rewards change after a partial refund.
rewards.programSnapshot.durationunionNo
rewards.programSnapshot.deliveryobjectNoWho delivers approved rewards of each type. Defaults to the Grizzlee wallet for both.
rewards.programSnapshot.reviewRewardsunionNoWhen true, new rewards wait as pending until someone approves them. Otherwise they start approved.
rewards.programSnapshot.fraudChecksobjectNoSelf-referral and other fraud rules. Absent means every rule uses its default.
rewards.programSnapshot.performanceobjectNo
rewards.programSnapshot.limitsobjectNo
rewards.programSnapshot.customTermsarrayNo
rewards.programSnapshot.friendIncentiveunionNoOptional offer for the referred customer.
rewards.programSnapshot.partnerOfferunionNoOffer 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

FieldTypeRequiredDetails
rewards.programSnapshot.orderCategories.includearrayNo
rewards.programSnapshot.orderCategories.excludearrayNo

rewards.programSnapshot.compensation

Variant 1

FieldTypeRequiredDetails
rewards.programSnapshot.compensation.type"percentage"Yes
rewards.programSnapshot.compensation.rateBpsnumberYes
rewards.programSnapshot.compensation.phasesarrayNo

rewards.programSnapshot.compensation.phases[]

FieldTypeRequiredDetails
rewards.programSnapshot.compensation.phases.rateBpsnumberYes
rewards.programSnapshot.compensation.phases.afterMonthsnumberYes

Variant 2

FieldTypeRequiredDetails
rewards.programSnapshot.compensation.type"fixed"Yes
rewards.programSnapshot.compensation.amountCentsnumberYes

rewards.programSnapshot.tracking

FieldTypeRequiredDetails
rewards.programSnapshot.tracking.linksunionNo
rewards.programSnapshot.tracking.qrCodesunionNo
rewards.programSnapshot.tracking.attributionCodesunionNo
rewards.programSnapshot.tracking.providerPromoCodesunionNo

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

FieldTypeRequiredDetails
rewards.programSnapshot.display.enobjectNo
rewards.programSnapshot.display.fr-CAobjectNo
rewards.programSnapshot.display.hyobjectNo
rewards.programSnapshot.display.ruobjectNo

rewards.programSnapshot.display.en

FieldTypeRequiredDetails
rewards.programSnapshot.display.en.publicNamestringNoThe name partners and customers see. Falls back to the program name.
rewards.programSnapshot.display.en.headlinestringNoReplaces the generated headline, such as "Give 20%, get $10".
rewards.programSnapshot.display.en.milestoneLabelobjectNoMilestone 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

FieldTypeRequiredDetails
rewards.programSnapshot.display.en.milestoneLabel.onestringYes
rewards.programSnapshot.display.en.milestoneLabel.otherstringYes

rewards.programSnapshot.display.fr-CA

FieldTypeRequiredDetails
rewards.programSnapshot.display.fr-CA.publicNamestringNoThe name partners and customers see. Falls back to the program name.
rewards.programSnapshot.display.fr-CA.headlinestringNoReplaces the generated headline, such as "Give 20%, get $10".
rewards.programSnapshot.display.fr-CA.milestoneLabelobjectNoMilestone 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

FieldTypeRequiredDetails
rewards.programSnapshot.display.fr-CA.milestoneLabel.onestringYes
rewards.programSnapshot.display.fr-CA.milestoneLabel.otherstringYes

rewards.programSnapshot.display.hy

FieldTypeRequiredDetails
rewards.programSnapshot.display.hy.publicNamestringNoThe name partners and customers see. Falls back to the program name.
rewards.programSnapshot.display.hy.headlinestringNoReplaces the generated headline, such as "Give 20%, get $10".
rewards.programSnapshot.display.hy.milestoneLabelobjectNoMilestone 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

FieldTypeRequiredDetails
rewards.programSnapshot.display.hy.milestoneLabel.onestringYes
rewards.programSnapshot.display.hy.milestoneLabel.otherstringYes

rewards.programSnapshot.display.ru

FieldTypeRequiredDetails
rewards.programSnapshot.display.ru.publicNamestringNoThe name partners and customers see. Falls back to the program name.
rewards.programSnapshot.display.ru.headlinestringNoReplaces the generated headline, such as "Give 20%, get $10".
rewards.programSnapshot.display.ru.milestoneLabelobjectNoMilestone 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

FieldTypeRequiredDetails
rewards.programSnapshot.display.ru.milestoneLabel.onestringYes
rewards.programSnapshot.display.ru.milestoneLabel.otherstringYes

rewards.programSnapshot.trigger

Variant 1

FieldTypeRequiredDetails
rewards.programSnapshot.trigger.type"order"Yes

Variant 2

FieldTypeRequiredDetails
rewards.programSnapshot.trigger.type"milestone"Yes
rewards.programSnapshot.trigger.milestonestringYes

rewards.programSnapshot.milestoneRewards

FieldTypeRequiredDetails
rewards.programSnapshot.milestoneRewards.eachReportobjectNo
rewards.programSnapshot.milestoneRewards.atCountobjectNo

rewards.programSnapshot.milestoneRewards.eachReport

FieldTypeRequiredDetails
rewards.programSnapshot.milestoneRewards.eachReport.compensationunionYes
rewards.programSnapshot.milestoneRewards.eachReport.limitnumberNoAbsent means every counted report. Reversed reports do not count toward the limit.

rewards.programSnapshot.milestoneRewards.eachReport.compensation

Variant 1

FieldTypeRequiredDetails
rewards.programSnapshot.milestoneRewards.eachReport.compensation.type"fixed"Yes
rewards.programSnapshot.milestoneRewards.eachReport.compensation.amountCentsnumberYes

Variant 2

FieldTypeRequiredDetails
rewards.programSnapshot.milestoneRewards.eachReport.compensation.type"percentage"Yes
rewards.programSnapshot.milestoneRewards.eachReport.compensation.rateBpsnumberYes

rewards.programSnapshot.milestoneRewards.atCount

FieldTypeRequiredDetails
rewards.programSnapshot.milestoneRewards.atCount.amountCentsnumberYes
rewards.programSnapshot.milestoneRewards.atCount.countnumberYes

rewards.programSnapshot.fixedRefundMode

Variant 1

Type: string.

Variant 2

Type: string.

rewards.programSnapshot.duration

Variant 1

FieldTypeRequiredDetails
rewards.programSnapshot.duration.type"only_order"Yes

Variant 2

FieldTypeRequiredDetails
rewards.programSnapshot.duration.type"first_order"Yes

Variant 3

FieldTypeRequiredDetails
rewards.programSnapshot.duration.type"first_n_orders"Yes
rewards.programSnapshot.duration.countnumberYes

Variant 4

FieldTypeRequiredDetails
rewards.programSnapshot.duration.type"days"Yes
rewards.programSnapshot.duration.daysnumberYes

Variant 5

FieldTypeRequiredDetails
rewards.programSnapshot.duration.type"months"Yes
rewards.programSnapshot.duration.monthsnumberYes

Variant 6

FieldTypeRequiredDetails
rewards.programSnapshot.duration.type"lifetime"Yes

rewards.programSnapshot.delivery

FieldTypeRequiredDetails
rewards.programSnapshot.delivery.cashunionNo
rewards.programSnapshot.delivery.creditunionNo

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

FieldTypeRequiredDetails
rewards.programSnapshot.fraudChecks.selfReferralobjectNo
rewards.programSnapshot.fraudChecks.duplicateAccountsobjectNo
rewards.programSnapshot.fraudChecks.rapidRepeatsobjectNo
rewards.programSnapshot.fraudChecks.repeatCustomerobjectNo
rewards.programSnapshot.fraudChecks.disposableEmailobjectNo

rewards.programSnapshot.fraudChecks.selfReferral

FieldTypeRequiredDetails
rewards.programSnapshot.fraudChecks.selfReferral.actionunionNo

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

FieldTypeRequiredDetails
rewards.programSnapshot.fraudChecks.duplicateAccounts.actionunionNo
rewards.programSnapshot.fraudChecks.duplicateAccounts.accountsnumberNoCustomers sharing one card or device that trigger the rule. This one counts when referred inside the window.
rewards.programSnapshot.fraudChecks.duplicateAccounts.windowDaysnumberNo
rewards.programSnapshot.fraudChecks.duplicateAccounts.ipAccountsunionNoCustomers 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

FieldTypeRequiredDetails
rewards.programSnapshot.fraudChecks.rapidRepeats.actionunionNo
rewards.programSnapshot.fraudChecks.rapidRepeats.referralsnumberNoReferrals from one device that trigger the rule. This one counts when referred inside the window.
rewards.programSnapshot.fraudChecks.rapidRepeats.windowMinutesnumberNo
rewards.programSnapshot.fraudChecks.rapidRepeats.ipReferralsunionNoReferrals 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

FieldTypeRequiredDetails
rewards.programSnapshot.fraudChecks.repeatCustomer.actionunionNo

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

FieldTypeRequiredDetails
rewards.programSnapshot.fraudChecks.disposableEmail.actionunionNoA 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

FieldTypeRequiredDetails
rewards.programSnapshot.performance.metricunionYes
rewards.programSnapshot.performance.tiersarrayYes
rewards.programSnapshot.performance.windowDaysnumberNo

rewards.programSnapshot.performance.metric

Variant 1

Type: string.

Variant 2

Type: string.

rewards.programSnapshot.performance.tiers[]

FieldTypeRequiredDetails
rewards.programSnapshot.performance.tiers.namestringYes
rewards.programSnapshot.performance.tiers.minValuenumberYes
rewards.programSnapshot.performance.tiers.bonusBpsnumberYes

rewards.programSnapshot.limits

FieldTypeRequiredDetails
rewards.programSnapshot.limits.customerCapCentsnumberNo
rewards.programSnapshot.limits.partnerCapCentsnumberNo

rewards.programSnapshot.customTerms[]

Variant 1

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.target"partner"Yes
rewards.programSnapshot.customTerms.targetIdstringYes
rewards.programSnapshot.customTerms.compensationunionNo
rewards.programSnapshot.customTerms.milestoneRewardsobjectNo
rewards.programSnapshot.customTerms.customerCapCentsunionNo
rewards.programSnapshot.customTerms.partnerCapCentsunionNo

rewards.programSnapshot.customTerms.compensation

Variant 1

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.compensation.type"percentage"Yes
rewards.programSnapshot.customTerms.compensation.rateBpsnumberYes
rewards.programSnapshot.customTerms.compensation.phasesarrayNo

rewards.programSnapshot.customTerms.compensation.phases[]

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.compensation.phases.rateBpsnumberYes
rewards.programSnapshot.customTerms.compensation.phases.afterMonthsnumberYes

Variant 2

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.compensation.type"fixed"Yes
rewards.programSnapshot.customTerms.compensation.amountCentsnumberYes

rewards.programSnapshot.customTerms.milestoneRewards

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.milestoneRewards.eachReportobjectNo
rewards.programSnapshot.customTerms.milestoneRewards.atCountobjectNo

rewards.programSnapshot.customTerms.milestoneRewards.eachReport

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensationunionYes
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.limitnumberNoAbsent means every counted report. Reversed reports do not count toward the limit.

rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensation

rewards.programSnapshot.customTerms.milestoneRewards.atCount

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.milestoneRewards.atCount.amountCentsnumberYes
rewards.programSnapshot.customTerms.milestoneRewards.atCount.countnumberYes

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

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.target"customer"Yes
rewards.programSnapshot.customTerms.targetIdstringYes
rewards.programSnapshot.customTerms.compensationunionNo
rewards.programSnapshot.customTerms.milestoneRewardsobjectNo
rewards.programSnapshot.customTerms.customerCapCentsunionNo

rewards.programSnapshot.customTerms.compensation

Variant 1

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.compensation.type"percentage"Yes
rewards.programSnapshot.customTerms.compensation.rateBpsnumberYes
rewards.programSnapshot.customTerms.compensation.phasesarrayNo

rewards.programSnapshot.customTerms.compensation.phases[]

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.compensation.phases.rateBpsnumberYes
rewards.programSnapshot.customTerms.compensation.phases.afterMonthsnumberYes

Variant 2

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.compensation.type"fixed"Yes
rewards.programSnapshot.customTerms.compensation.amountCentsnumberYes

rewards.programSnapshot.customTerms.milestoneRewards

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.milestoneRewards.eachReportobjectNo
rewards.programSnapshot.customTerms.milestoneRewards.atCountobjectNo

rewards.programSnapshot.customTerms.milestoneRewards.eachReport

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensationunionYes
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.limitnumberNoAbsent means every counted report. Reversed reports do not count toward the limit.

rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensation

rewards.programSnapshot.customTerms.milestoneRewards.atCount

FieldTypeRequiredDetails
rewards.programSnapshot.customTerms.milestoneRewards.atCount.amountCentsnumberYes
rewards.programSnapshot.customTerms.milestoneRewards.atCount.countnumberYes

rewards.programSnapshot.customTerms.customerCapCents

Variant 1

Type: null.

Variant 2

Type: number.

rewards.programSnapshot.friendIncentive

Variant 1

FieldTypeRequiredDetails
rewards.programSnapshot.friendIncentive.type"percent"Yes
rewards.programSnapshot.friendIncentive.rateBpsnumberYes
rewards.programSnapshot.friendIncentive.maxDiscountCentsnumberNoLargest discount for one order.
rewards.programSnapshot.friendIncentive.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
rewards.programSnapshot.friendIncentive.ordersnumberNoHow many of the friend's orders get the incentive.
rewards.programSnapshot.friendIncentive.newCustomersOnlyunionNotrue: 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.expiresAfterDaysunionNoDays after the referral was captured, claimed or entered. null means it never expires.
rewards.programSnapshot.friendIncentive.returnOnFullRefundunionNotrue: a full refund gives the use back, so the customer can get the offer again.
rewards.programSnapshot.friendIncentive.orderCategoriesobjectNoOrder 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

FieldTypeRequiredDetails
rewards.programSnapshot.friendIncentive.orderCategories.includearrayNo
rewards.programSnapshot.friendIncentive.orderCategories.excludearrayNo

Variant 2

FieldTypeRequiredDetails
rewards.programSnapshot.friendIncentive.type"fixed"Yes
rewards.programSnapshot.friendIncentive.amountCentsnumberYes
rewards.programSnapshot.friendIncentive.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
rewards.programSnapshot.friendIncentive.ordersnumberNoHow many of the friend's orders get the incentive.
rewards.programSnapshot.friendIncentive.newCustomersOnlyunionNotrue: 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.expiresAfterDaysunionNoDays after the referral was captured, claimed or entered. null means it never expires.
rewards.programSnapshot.friendIncentive.returnOnFullRefundunionNotrue: a full refund gives the use back, so the customer can get the offer again.
rewards.programSnapshot.friendIncentive.orderCategoriesobjectNoOrder 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

FieldTypeRequiredDetails
rewards.programSnapshot.friendIncentive.orderCategories.includearrayNo
rewards.programSnapshot.friendIncentive.orderCategories.excludearrayNo

rewards.programSnapshot.partnerOffer

Variant 1

FieldTypeRequiredDetails
rewards.programSnapshot.partnerOffer.type"percent"Yes
rewards.programSnapshot.partnerOffer.rateBpsnumberYes
rewards.programSnapshot.partnerOffer.maxDiscountCentsnumberNoLargest discount for one order.
rewards.programSnapshot.partnerOffer.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
rewards.programSnapshot.partnerOffer.ordersnumberNoHow many of the friend's orders get the incentive.
rewards.programSnapshot.partnerOffer.expiresAfterDaysunionNoDays after the referral was captured, claimed or entered. null means it never expires.
rewards.programSnapshot.partnerOffer.returnOnFullRefundunionNotrue: a full refund gives the use back, so the customer can get the offer again.
rewards.programSnapshot.partnerOffer.orderCategoriesobjectNoOrder 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

FieldTypeRequiredDetails
rewards.programSnapshot.partnerOffer.orderCategories.includearrayNo
rewards.programSnapshot.partnerOffer.orderCategories.excludearrayNo

Variant 2

FieldTypeRequiredDetails
rewards.programSnapshot.partnerOffer.type"fixed"Yes
rewards.programSnapshot.partnerOffer.amountCentsnumberYes
rewards.programSnapshot.partnerOffer.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
rewards.programSnapshot.partnerOffer.ordersnumberNoHow many of the friend's orders get the incentive.
rewards.programSnapshot.partnerOffer.expiresAfterDaysunionNoDays after the referral was captured, claimed or entered. null means it never expires.
rewards.programSnapshot.partnerOffer.returnOnFullRefundunionNotrue: a full refund gives the use back, so the customer can get the offer again.
rewards.programSnapshot.partnerOffer.orderCategoriesobjectNoOrder 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

FieldTypeRequiredDetails
rewards.programSnapshot.partnerOffer.orderCategories.includearrayNo
rewards.programSnapshot.partnerOffer.orderCategories.excludearrayNo

rewards.explanationParts[]

FieldTypeRequiredDetails
rewards.explanationParts.codeunionYes
rewards.explanationParts.paramsobjectNo

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

FieldTypeRequiredDetails
rewards.calculation.compensationunionYes
rewards.calculation.milestoneRewardsobjectNo
rewards.calculation.fixedRefundModeunionNoSaved for fixed reward refunds. Older rewards default to prorate.
rewards.calculation.phaseAfterMonthsnumberNo
rewards.calculation.tierobjectNo
rewards.calculation.customTermsobjectNo
rewards.calculation.uncappedCentsnumberYes
rewards.calculation.customerCapCentsnumberNo
rewards.calculation.partnerCapCentsnumberNo

rewards.calculation.compensation

Variant 1

FieldTypeRequiredDetails
rewards.calculation.compensation.type"percentage"Yes
rewards.calculation.compensation.rateBpsnumberYes
rewards.calculation.compensation.phasesarrayNo

rewards.calculation.compensation.phases[]

FieldTypeRequiredDetails
rewards.calculation.compensation.phases.rateBpsnumberYes
rewards.calculation.compensation.phases.afterMonthsnumberYes

Variant 2

FieldTypeRequiredDetails
rewards.calculation.compensation.type"fixed"Yes
rewards.calculation.compensation.amountCentsnumberYes

rewards.calculation.milestoneRewards

FieldTypeRequiredDetails
rewards.calculation.milestoneRewards.eachReportobjectNo
rewards.calculation.milestoneRewards.atCountobjectNo

rewards.calculation.milestoneRewards.eachReport

FieldTypeRequiredDetails
rewards.calculation.milestoneRewards.eachReport.compensationunionYes
rewards.calculation.milestoneRewards.eachReport.limitnumberNoAbsent means every counted report. Reversed reports do not count toward the limit.

rewards.calculation.milestoneRewards.eachReport.compensation

Variant 1

FieldTypeRequiredDetails
rewards.calculation.milestoneRewards.eachReport.compensation.type"fixed"Yes
rewards.calculation.milestoneRewards.eachReport.compensation.amountCentsnumberYes

Variant 2

FieldTypeRequiredDetails
rewards.calculation.milestoneRewards.eachReport.compensation.type"percentage"Yes
rewards.calculation.milestoneRewards.eachReport.compensation.rateBpsnumberYes

rewards.calculation.milestoneRewards.atCount

FieldTypeRequiredDetails
rewards.calculation.milestoneRewards.atCount.amountCentsnumberYes
rewards.calculation.milestoneRewards.atCount.countnumberYes

rewards.calculation.fixedRefundMode

Variant 1

Type: string.

Variant 2

Type: string.

rewards.calculation.tier

FieldTypeRequiredDetails
rewards.calculation.tier.namestringYes
rewards.calculation.tier.minValuenumberYes
rewards.calculation.tier.bonusBpsnumberYes
rewards.calculation.tier.valuenumberYes

rewards.calculation.customTerms

FieldTypeRequiredDetails
rewards.calculation.customTerms.targetunionYes
rewards.calculation.customTerms.targetIdstringYes

rewards.calculation.customTerms.target

Variant 1

Type: string.

Variant 2

Type: string.

Response schema

json
{
  "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.