Skip to content
Developer docs
⌘ K
Dashboard ↗

HTTP endpoints

getCompany

GET /api/v1/company

Requires read. Keep the Bearer key on your server.

SDK

ts
grizzlee.getCompany(options?: { page?: number | undefined; search?: string | undefined; rewardStatus?: "pending" | "reversed" | "review" | "all" | "approved" | undefined; } | undefined): Promise<CompanySnapshot>

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 GET \
  'https://app.grizzlee.ca/api/v1/company' \
  -H "Authorization: Bearer $GRIZZLEE_SERVER_KEY"

Query parameters

FieldTypeRequiredDetails
pagenumberNo
searchstringNo
rewardStatusunionNoreview lists rewards a self-referral match or fraud rule recorded, held or not.

rewardStatus

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

Variant 5

Type: string.

Response

HTTP responses wrap this value in data. The SDK returns the value directly unless the note above describes a wrapper.

FieldTypeRequiredDetails
companyobjectYes
programsarrayYes
placementsarrayNo
programVersionsarrayNoEvery saved version of the listed programs, oldest first.
programPagesarrayNo
partnersarrayYes
attributionsarrayYes
ordersarrayYes
rewardsarrayYes
ledgerarrayYes
auditarrayYes
deliveriesarrayNoDelivery and transfer reversal history for the listed rewards, oldest first.
reservationsarrayNoOpen friend incentive holds, oldest first.
paginationobjectNo
reportobjectNo
usageobjectYes

company

FieldTypeRequiredDetails
company.idstringYes
company.namestringYes
company.currencyunionYes
company.languagesarrayNoLanguages partners and customers see, in order. The first is the default. Companies saved before languages existed have none, which means English only. See companyLanguages.
company.deliveryobjectNoWho delivers approved cash and store credit rewards for programs created from the dashboard. Absent means the Grizzlee wallet for both. Programs keep their own delivery. This is only the default a new program starts with.
company.partnerFieldsarrayNo

company.currency

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

company.languages[]

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

company.delivery

FieldTypeRequiredDetails
company.delivery.cashunionYes
company.delivery.creditunionYes

company.delivery.cash

Variant 1

Type: string.

Variant 2

Type: string.

company.delivery.credit

Variant 1

Type: string.

Variant 2

Type: string.

company.partnerFields[]

FieldTypeRequiredDetails
company.partnerFields.typeunionYes
company.partnerFields.namestringYes
company.partnerFields.idstringYes
company.partnerFields.optionsarrayNo

company.partnerFields.type

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

programs[]

FieldTypeRequiredDetails
programs.idstringYes
programs.companyIdstringYes
programs.createdAtstringYes
programs.versionnumberYes1 when created. Every saved change except a rename adds 1. Rewards and incentive reservations record the version they were made under.
programs.updatedAtstringYesLast saved change, including renames.
programs.archivedAtstringNoWhen deleteProgram archived the program because it has history. An archived program stays inactive, has no placement keys and refuses changes. Its referrals, rewards and versions stay.
programs.currencyunionYesMust match the company currency.
programs.namestringYes
programs.kindunionYes
programs.rewardTypeunionYes
programs.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.
programs.activebooleanYes
programs.orderCategoriesobjectNoOrder categories that earn rewards. Order programs only. The friend incentive has its own orderCategories. Absent means every order can earn.
programs.compensationunionNo
programs.trackingobjectNoTracking methods are independent of kind. Provider discounts require a connected provider.
programs.destinationUrlstringNoThe page partner links and QR codes open. A published signup page's destination takes precedence. Without either, partners have no link.
programs.displayobjectNoOptional public name, headline and milestone label for partner and customer screens.
programs.triggerunionNoWhat earns a reward. Defaults to completed orders.
programs.milestoneRewardsobjectNo
programs.fixedRefundModeunionNoHow fixed rewards change after a partial refund.
programs.durationunionNo
programs.deliveryobjectNoWho delivers approved rewards of each type. Defaults to the Grizzlee wallet for both.
programs.reviewRewardsunionNoWhen true, new rewards wait as pending until someone approves them. Otherwise they start approved.
programs.fraudChecksobjectNoSelf-referral and other fraud rules. Absent means every rule uses its default.
programs.performanceobjectNo
programs.limitsobjectNo
programs.customTermsarrayNo
programs.friendIncentiveunionNoOptional offer for the referred customer.
programs.partnerOfferunionNoOffer programs only. What the partner earns per qualifying referred order.

programs.currency

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

programs.kind

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

programs.rewardType

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

programs.attributionWindowDays

Variant 1

Type: null.

Variant 2

Type: number.

programs.orderCategories

FieldTypeRequiredDetails
programs.orderCategories.includearrayNo
programs.orderCategories.excludearrayNo

programs.compensation

Variant 1

FieldTypeRequiredDetails
programs.compensation.type"percentage"Yes
programs.compensation.rateBpsnumberYes
programs.compensation.phasesarrayNo

programs.compensation.phases[]

FieldTypeRequiredDetails
programs.compensation.phases.rateBpsnumberYes
programs.compensation.phases.afterMonthsnumberYes

Variant 2

FieldTypeRequiredDetails
programs.compensation.type"fixed"Yes
programs.compensation.amountCentsnumberYes

programs.tracking

FieldTypeRequiredDetails
programs.tracking.linksunionNo
programs.tracking.qrCodesunionNo
programs.tracking.attributionCodesunionNo
programs.tracking.providerPromoCodesunionNo

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programs.tracking.qrCodes

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programs.tracking.attributionCodes

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programs.tracking.providerPromoCodes

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programs.display

FieldTypeRequiredDetails
programs.display.enobjectNo
programs.display.fr-CAobjectNo
programs.display.hyobjectNo
programs.display.ruobjectNo

programs.display.en

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

programs.display.en.milestoneLabel

FieldTypeRequiredDetails
programs.display.en.milestoneLabel.onestringYes
programs.display.en.milestoneLabel.otherstringYes

programs.display.fr-CA

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

programs.display.fr-CA.milestoneLabel

FieldTypeRequiredDetails
programs.display.fr-CA.milestoneLabel.onestringYes
programs.display.fr-CA.milestoneLabel.otherstringYes

programs.display.hy

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

programs.display.hy.milestoneLabel

FieldTypeRequiredDetails
programs.display.hy.milestoneLabel.onestringYes
programs.display.hy.milestoneLabel.otherstringYes

programs.display.ru

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

programs.display.ru.milestoneLabel

FieldTypeRequiredDetails
programs.display.ru.milestoneLabel.onestringYes
programs.display.ru.milestoneLabel.otherstringYes

programs.trigger

Variant 1

FieldTypeRequiredDetails
programs.trigger.type"order"Yes

Variant 2

FieldTypeRequiredDetails
programs.trigger.type"milestone"Yes
programs.trigger.milestonestringYes

programs.milestoneRewards

FieldTypeRequiredDetails
programs.milestoneRewards.eachReportobjectNo
programs.milestoneRewards.atCountobjectNo

programs.milestoneRewards.eachReport

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

programs.milestoneRewards.eachReport.compensation

Variant 1

FieldTypeRequiredDetails
programs.milestoneRewards.eachReport.compensation.type"fixed"Yes
programs.milestoneRewards.eachReport.compensation.amountCentsnumberYes

Variant 2

FieldTypeRequiredDetails
programs.milestoneRewards.eachReport.compensation.type"percentage"Yes
programs.milestoneRewards.eachReport.compensation.rateBpsnumberYes

programs.milestoneRewards.atCount

FieldTypeRequiredDetails
programs.milestoneRewards.atCount.amountCentsnumberYes
programs.milestoneRewards.atCount.countnumberYes

programs.fixedRefundMode

Variant 1

Type: string.

Variant 2

Type: string.

programs.duration

Variant 1

FieldTypeRequiredDetails
programs.duration.type"only_order"Yes

Variant 2

FieldTypeRequiredDetails
programs.duration.type"first_order"Yes

Variant 3

FieldTypeRequiredDetails
programs.duration.type"first_n_orders"Yes
programs.duration.countnumberYes

Variant 4

FieldTypeRequiredDetails
programs.duration.type"days"Yes
programs.duration.daysnumberYes

Variant 5

FieldTypeRequiredDetails
programs.duration.type"months"Yes
programs.duration.monthsnumberYes

Variant 6

FieldTypeRequiredDetails
programs.duration.type"lifetime"Yes

programs.delivery

FieldTypeRequiredDetails
programs.delivery.cashunionNo
programs.delivery.creditunionNo

programs.delivery.cash

Variant 1

Type: string.

Variant 2

Type: string.

programs.delivery.credit

Variant 1

Type: string.

Variant 2

Type: string.

programs.reviewRewards

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programs.fraudChecks

FieldTypeRequiredDetails
programs.fraudChecks.selfReferralobjectNo
programs.fraudChecks.duplicateAccountsobjectNo
programs.fraudChecks.rapidRepeatsobjectNo
programs.fraudChecks.repeatCustomerobjectNo
programs.fraudChecks.disposableEmailobjectNo

programs.fraudChecks.selfReferral

FieldTypeRequiredDetails
programs.fraudChecks.selfReferral.actionunionNo

programs.fraudChecks.selfReferral.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

programs.fraudChecks.duplicateAccounts

FieldTypeRequiredDetails
programs.fraudChecks.duplicateAccounts.actionunionNo
programs.fraudChecks.duplicateAccounts.accountsnumberNoCustomers sharing one card or device that trigger the rule. This one counts when referred inside the window.
programs.fraudChecks.duplicateAccounts.windowDaysnumberNo
programs.fraudChecks.duplicateAccounts.ipAccountsunionNoCustomers sharing one IP address that trigger the rule. null leaves IP addresses out.

programs.fraudChecks.duplicateAccounts.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

programs.fraudChecks.duplicateAccounts.ipAccounts

Variant 1

Type: null.

Variant 2

Type: number.

programs.fraudChecks.rapidRepeats

FieldTypeRequiredDetails
programs.fraudChecks.rapidRepeats.actionunionNo
programs.fraudChecks.rapidRepeats.referralsnumberNoReferrals from one device that trigger the rule. This one counts when referred inside the window.
programs.fraudChecks.rapidRepeats.windowMinutesnumberNo
programs.fraudChecks.rapidRepeats.ipReferralsunionNoReferrals from one IP address that trigger the rule. null leaves IP addresses out.

programs.fraudChecks.rapidRepeats.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

programs.fraudChecks.rapidRepeats.ipReferrals

Variant 1

Type: null.

Variant 2

Type: number.

programs.fraudChecks.repeatCustomer

FieldTypeRequiredDetails
programs.fraudChecks.repeatCustomer.actionunionNo

programs.fraudChecks.repeatCustomer.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

programs.fraudChecks.disposableEmail

FieldTypeRequiredDetails
programs.fraudChecks.disposableEmail.actionunionNoA disposable address does not show a second person, so this rule cannot block.

programs.fraudChecks.disposableEmail.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

programs.performance

FieldTypeRequiredDetails
programs.performance.metricunionYes
programs.performance.tiersarrayYes
programs.performance.windowDaysnumberNo

programs.performance.metric

Variant 1

Type: string.

Variant 2

Type: string.

programs.performance.tiers[]

FieldTypeRequiredDetails
programs.performance.tiers.namestringYes
programs.performance.tiers.minValuenumberYes
programs.performance.tiers.bonusBpsnumberYes

programs.limits

FieldTypeRequiredDetails
programs.limits.customerCapCentsnumberNo
programs.limits.partnerCapCentsnumberNo

programs.customTerms[]

Variant 1

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

programs.customTerms.compensation

Variant 1

FieldTypeRequiredDetails
programs.customTerms.compensation.type"percentage"Yes
programs.customTerms.compensation.rateBpsnumberYes
programs.customTerms.compensation.phasesarrayNo

programs.customTerms.compensation.phases[]

FieldTypeRequiredDetails
programs.customTerms.compensation.phases.rateBpsnumberYes
programs.customTerms.compensation.phases.afterMonthsnumberYes

Variant 2

FieldTypeRequiredDetails
programs.customTerms.compensation.type"fixed"Yes
programs.customTerms.compensation.amountCentsnumberYes

programs.customTerms.milestoneRewards

FieldTypeRequiredDetails
programs.customTerms.milestoneRewards.eachReportobjectNo
programs.customTerms.milestoneRewards.atCountobjectNo

programs.customTerms.milestoneRewards.eachReport

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

programs.customTerms.milestoneRewards.eachReport.compensation

Variant 1

FieldTypeRequiredDetails
programs.customTerms.milestoneRewards.eachReport.compensation.type"fixed"Yes
programs.customTerms.milestoneRewards.eachReport.compensation.amountCentsnumberYes

Variant 2

FieldTypeRequiredDetails
programs.customTerms.milestoneRewards.eachReport.compensation.type"percentage"Yes
programs.customTerms.milestoneRewards.eachReport.compensation.rateBpsnumberYes

programs.customTerms.milestoneRewards.atCount

FieldTypeRequiredDetails
programs.customTerms.milestoneRewards.atCount.amountCentsnumberYes
programs.customTerms.milestoneRewards.atCount.countnumberYes

programs.customTerms.customerCapCents

Variant 1

Type: null.

Variant 2

Type: number.

programs.customTerms.partnerCapCents

Variant 1

Type: null.

Variant 2

Type: number.

Variant 2

FieldTypeRequiredDetails
programs.customTerms.target"customer"Yes
programs.customTerms.targetIdstringYes
programs.customTerms.compensationunionNo
programs.customTerms.milestoneRewardsobjectNo
programs.customTerms.customerCapCentsunionNo

programs.customTerms.compensation

Variant 1

FieldTypeRequiredDetails
programs.customTerms.compensation.type"percentage"Yes
programs.customTerms.compensation.rateBpsnumberYes
programs.customTerms.compensation.phasesarrayNo

programs.customTerms.compensation.phases[]

FieldTypeRequiredDetails
programs.customTerms.compensation.phases.rateBpsnumberYes
programs.customTerms.compensation.phases.afterMonthsnumberYes

Variant 2

FieldTypeRequiredDetails
programs.customTerms.compensation.type"fixed"Yes
programs.customTerms.compensation.amountCentsnumberYes

programs.customTerms.milestoneRewards

FieldTypeRequiredDetails
programs.customTerms.milestoneRewards.eachReportobjectNo
programs.customTerms.milestoneRewards.atCountobjectNo

programs.customTerms.milestoneRewards.eachReport

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

programs.customTerms.milestoneRewards.eachReport.compensation

Variant 1

FieldTypeRequiredDetails
programs.customTerms.milestoneRewards.eachReport.compensation.type"fixed"Yes
programs.customTerms.milestoneRewards.eachReport.compensation.amountCentsnumberYes

Variant 2

FieldTypeRequiredDetails
programs.customTerms.milestoneRewards.eachReport.compensation.type"percentage"Yes
programs.customTerms.milestoneRewards.eachReport.compensation.rateBpsnumberYes

programs.customTerms.milestoneRewards.atCount

FieldTypeRequiredDetails
programs.customTerms.milestoneRewards.atCount.amountCentsnumberYes
programs.customTerms.milestoneRewards.atCount.countnumberYes

programs.customTerms.customerCapCents

Variant 1

Type: null.

Variant 2

Type: number.

programs.friendIncentive

Variant 1

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

programs.friendIncentive.newCustomersOnly

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programs.friendIncentive.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

programs.friendIncentive.returnOnFullRefund

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programs.friendIncentive.orderCategories

FieldTypeRequiredDetails
programs.friendIncentive.orderCategories.includearrayNo
programs.friendIncentive.orderCategories.excludearrayNo

Variant 2

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

programs.friendIncentive.newCustomersOnly

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programs.friendIncentive.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

programs.friendIncentive.returnOnFullRefund

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programs.friendIncentive.orderCategories

FieldTypeRequiredDetails
programs.friendIncentive.orderCategories.includearrayNo
programs.friendIncentive.orderCategories.excludearrayNo

programs.partnerOffer

Variant 1

FieldTypeRequiredDetails
programs.partnerOffer.type"percent"Yes
programs.partnerOffer.rateBpsnumberYes
programs.partnerOffer.maxDiscountCentsnumberNoLargest discount for one order.
programs.partnerOffer.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
programs.partnerOffer.ordersnumberNoHow many of the friend's orders get the incentive.
programs.partnerOffer.expiresAfterDaysunionNoDays after the referral was captured, claimed or entered. null means it never expires.
programs.partnerOffer.returnOnFullRefundunionNotrue: a full refund gives the use back, so the customer can get the offer again.
programs.partnerOffer.orderCategoriesobjectNoOrder categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies.

programs.partnerOffer.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

programs.partnerOffer.returnOnFullRefund

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programs.partnerOffer.orderCategories

FieldTypeRequiredDetails
programs.partnerOffer.orderCategories.includearrayNo
programs.partnerOffer.orderCategories.excludearrayNo

Variant 2

FieldTypeRequiredDetails
programs.partnerOffer.type"fixed"Yes
programs.partnerOffer.amountCentsnumberYes
programs.partnerOffer.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
programs.partnerOffer.ordersnumberNoHow many of the friend's orders get the incentive.
programs.partnerOffer.expiresAfterDaysunionNoDays after the referral was captured, claimed or entered. null means it never expires.
programs.partnerOffer.returnOnFullRefundunionNotrue: a full refund gives the use back, so the customer can get the offer again.
programs.partnerOffer.orderCategoriesobjectNoOrder categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies.

programs.partnerOffer.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

programs.partnerOffer.returnOnFullRefund

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programs.partnerOffer.orderCategories

FieldTypeRequiredDetails
programs.partnerOffer.orderCategories.includearrayNo
programs.partnerOffer.orderCategories.excludearrayNo

placements[]

FieldTypeRequiredDetails
placements.keystringYes
placements.programIdstringYes
placements.createdAtstringYes
placements.updatedAtstringYes

programVersions[]

FieldTypeRequiredDetails
programVersions.companyIdstringYes
programVersions.programIdstringYes
programVersions.versionnumberYes
programVersions.programSnapshotobjectYes
programVersions.changedFieldsarrayYesTop-level program fields that differ from the previous version, such as compensation or friendIncentive. Empty for version 1.
programVersions.createdAtstringYesWhen this version took effect. Versions recorded when versioning started use the program's last saved change.

programVersions.programSnapshot

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

programVersions.programSnapshot.currency

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

programVersions.programSnapshot.kind

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

programVersions.programSnapshot.rewardType

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

programVersions.programSnapshot.attributionWindowDays

Variant 1

Type: null.

Variant 2

Type: number.

programVersions.programSnapshot.orderCategories

FieldTypeRequiredDetails
programVersions.programSnapshot.orderCategories.includearrayNo
programVersions.programSnapshot.orderCategories.excludearrayNo

programVersions.programSnapshot.compensation

Variant 1

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

programVersions.programSnapshot.compensation.phases[]

FieldTypeRequiredDetails
programVersions.programSnapshot.compensation.phases.rateBpsnumberYes
programVersions.programSnapshot.compensation.phases.afterMonthsnumberYes

Variant 2

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

programVersions.programSnapshot.tracking

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

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programVersions.programSnapshot.tracking.qrCodes

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programVersions.programSnapshot.tracking.attributionCodes

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programVersions.programSnapshot.tracking.providerPromoCodes

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programVersions.programSnapshot.display

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

programVersions.programSnapshot.display.en

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

programVersions.programSnapshot.display.en.milestoneLabel

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

programVersions.programSnapshot.display.fr-CA

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

programVersions.programSnapshot.display.fr-CA.milestoneLabel

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

programVersions.programSnapshot.display.hy

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

programVersions.programSnapshot.display.hy.milestoneLabel

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

programVersions.programSnapshot.display.ru

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

programVersions.programSnapshot.display.ru.milestoneLabel

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

programVersions.programSnapshot.trigger

Variant 1

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

Variant 2

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

programVersions.programSnapshot.milestoneRewards

FieldTypeRequiredDetails
programVersions.programSnapshot.milestoneRewards.eachReportobjectNo
programVersions.programSnapshot.milestoneRewards.atCountobjectNo

programVersions.programSnapshot.milestoneRewards.eachReport

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

programVersions.programSnapshot.milestoneRewards.eachReport.compensation

Variant 1

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

Variant 2

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

programVersions.programSnapshot.milestoneRewards.atCount

FieldTypeRequiredDetails
programVersions.programSnapshot.milestoneRewards.atCount.amountCentsnumberYes
programVersions.programSnapshot.milestoneRewards.atCount.countnumberYes

programVersions.programSnapshot.fixedRefundMode

Variant 1

Type: string.

Variant 2

Type: string.

programVersions.programSnapshot.duration

Variant 1

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

Variant 2

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

Variant 3

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

Variant 4

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

Variant 5

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

Variant 6

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

programVersions.programSnapshot.delivery

FieldTypeRequiredDetails
programVersions.programSnapshot.delivery.cashunionNo
programVersions.programSnapshot.delivery.creditunionNo

programVersions.programSnapshot.delivery.cash

Variant 1

Type: string.

Variant 2

Type: string.

programVersions.programSnapshot.delivery.credit

Variant 1

Type: string.

Variant 2

Type: string.

programVersions.programSnapshot.reviewRewards

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programVersions.programSnapshot.fraudChecks

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

programVersions.programSnapshot.fraudChecks.selfReferral

FieldTypeRequiredDetails
programVersions.programSnapshot.fraudChecks.selfReferral.actionunionNo

programVersions.programSnapshot.fraudChecks.selfReferral.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

programVersions.programSnapshot.fraudChecks.duplicateAccounts

FieldTypeRequiredDetails
programVersions.programSnapshot.fraudChecks.duplicateAccounts.actionunionNo
programVersions.programSnapshot.fraudChecks.duplicateAccounts.accountsnumberNoCustomers sharing one card or device that trigger the rule. This one counts when referred inside the window.
programVersions.programSnapshot.fraudChecks.duplicateAccounts.windowDaysnumberNo
programVersions.programSnapshot.fraudChecks.duplicateAccounts.ipAccountsunionNoCustomers sharing one IP address that trigger the rule. null leaves IP addresses out.

programVersions.programSnapshot.fraudChecks.duplicateAccounts.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

programVersions.programSnapshot.fraudChecks.duplicateAccounts.ipAccounts

Variant 1

Type: null.

Variant 2

Type: number.

programVersions.programSnapshot.fraudChecks.rapidRepeats

FieldTypeRequiredDetails
programVersions.programSnapshot.fraudChecks.rapidRepeats.actionunionNo
programVersions.programSnapshot.fraudChecks.rapidRepeats.referralsnumberNoReferrals from one device that trigger the rule. This one counts when referred inside the window.
programVersions.programSnapshot.fraudChecks.rapidRepeats.windowMinutesnumberNo
programVersions.programSnapshot.fraudChecks.rapidRepeats.ipReferralsunionNoReferrals from one IP address that trigger the rule. null leaves IP addresses out.

programVersions.programSnapshot.fraudChecks.rapidRepeats.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

programVersions.programSnapshot.fraudChecks.rapidRepeats.ipReferrals

Variant 1

Type: null.

Variant 2

Type: number.

programVersions.programSnapshot.fraudChecks.repeatCustomer

FieldTypeRequiredDetails
programVersions.programSnapshot.fraudChecks.repeatCustomer.actionunionNo

programVersions.programSnapshot.fraudChecks.repeatCustomer.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

programVersions.programSnapshot.fraudChecks.disposableEmail

FieldTypeRequiredDetails
programVersions.programSnapshot.fraudChecks.disposableEmail.actionunionNoA disposable address does not show a second person, so this rule cannot block.

programVersions.programSnapshot.fraudChecks.disposableEmail.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

programVersions.programSnapshot.performance

FieldTypeRequiredDetails
programVersions.programSnapshot.performance.metricunionYes
programVersions.programSnapshot.performance.tiersarrayYes
programVersions.programSnapshot.performance.windowDaysnumberNo

programVersions.programSnapshot.performance.metric

Variant 1

Type: string.

Variant 2

Type: string.

programVersions.programSnapshot.performance.tiers[]

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

programVersions.programSnapshot.limits

FieldTypeRequiredDetails
programVersions.programSnapshot.limits.customerCapCentsnumberNo
programVersions.programSnapshot.limits.partnerCapCentsnumberNo

programVersions.programSnapshot.customTerms[]

Variant 1

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

programVersions.programSnapshot.customTerms.compensation

Variant 1

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

programVersions.programSnapshot.customTerms.compensation.phases[]

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

Variant 2

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

programVersions.programSnapshot.customTerms.milestoneRewards

FieldTypeRequiredDetails
programVersions.programSnapshot.customTerms.milestoneRewards.eachReportobjectNo
programVersions.programSnapshot.customTerms.milestoneRewards.atCountobjectNo

programVersions.programSnapshot.customTerms.milestoneRewards.eachReport

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

programVersions.programSnapshot.customTerms.milestoneRewards.eachReport.compensation

programVersions.programSnapshot.customTerms.milestoneRewards.atCount

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

programVersions.programSnapshot.customTerms.customerCapCents

Variant 1

Type: null.

Variant 2

Type: number.

programVersions.programSnapshot.customTerms.partnerCapCents

Variant 1

Type: null.

Variant 2

Type: number.

Variant 2

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

programVersions.programSnapshot.customTerms.compensation

Variant 1

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

programVersions.programSnapshot.customTerms.compensation.phases[]

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

Variant 2

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

programVersions.programSnapshot.customTerms.milestoneRewards

FieldTypeRequiredDetails
programVersions.programSnapshot.customTerms.milestoneRewards.eachReportobjectNo
programVersions.programSnapshot.customTerms.milestoneRewards.atCountobjectNo

programVersions.programSnapshot.customTerms.milestoneRewards.eachReport

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

programVersions.programSnapshot.customTerms.milestoneRewards.eachReport.compensation

programVersions.programSnapshot.customTerms.milestoneRewards.atCount

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

programVersions.programSnapshot.customTerms.customerCapCents

Variant 1

Type: null.

Variant 2

Type: number.

programVersions.programSnapshot.friendIncentive

Variant 1

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

programVersions.programSnapshot.friendIncentive.newCustomersOnly

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programVersions.programSnapshot.friendIncentive.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

programVersions.programSnapshot.friendIncentive.returnOnFullRefund

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programVersions.programSnapshot.friendIncentive.orderCategories

FieldTypeRequiredDetails
programVersions.programSnapshot.friendIncentive.orderCategories.includearrayNo
programVersions.programSnapshot.friendIncentive.orderCategories.excludearrayNo

Variant 2

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

programVersions.programSnapshot.friendIncentive.newCustomersOnly

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programVersions.programSnapshot.friendIncentive.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

programVersions.programSnapshot.friendIncentive.returnOnFullRefund

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programVersions.programSnapshot.friendIncentive.orderCategories

FieldTypeRequiredDetails
programVersions.programSnapshot.friendIncentive.orderCategories.includearrayNo
programVersions.programSnapshot.friendIncentive.orderCategories.excludearrayNo

programVersions.programSnapshot.partnerOffer

Variant 1

FieldTypeRequiredDetails
programVersions.programSnapshot.partnerOffer.type"percent"Yes
programVersions.programSnapshot.partnerOffer.rateBpsnumberYes
programVersions.programSnapshot.partnerOffer.maxDiscountCentsnumberNoLargest discount for one order.
programVersions.programSnapshot.partnerOffer.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
programVersions.programSnapshot.partnerOffer.ordersnumberNoHow many of the friend's orders get the incentive.
programVersions.programSnapshot.partnerOffer.expiresAfterDaysunionNoDays after the referral was captured, claimed or entered. null means it never expires.
programVersions.programSnapshot.partnerOffer.returnOnFullRefundunionNotrue: a full refund gives the use back, so the customer can get the offer again.
programVersions.programSnapshot.partnerOffer.orderCategoriesobjectNoOrder categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies.

programVersions.programSnapshot.partnerOffer.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

programVersions.programSnapshot.partnerOffer.returnOnFullRefund

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programVersions.programSnapshot.partnerOffer.orderCategories

FieldTypeRequiredDetails
programVersions.programSnapshot.partnerOffer.orderCategories.includearrayNo
programVersions.programSnapshot.partnerOffer.orderCategories.excludearrayNo

Variant 2

FieldTypeRequiredDetails
programVersions.programSnapshot.partnerOffer.type"fixed"Yes
programVersions.programSnapshot.partnerOffer.amountCentsnumberYes
programVersions.programSnapshot.partnerOffer.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
programVersions.programSnapshot.partnerOffer.ordersnumberNoHow many of the friend's orders get the incentive.
programVersions.programSnapshot.partnerOffer.expiresAfterDaysunionNoDays after the referral was captured, claimed or entered. null means it never expires.
programVersions.programSnapshot.partnerOffer.returnOnFullRefundunionNotrue: a full refund gives the use back, so the customer can get the offer again.
programVersions.programSnapshot.partnerOffer.orderCategoriesobjectNoOrder categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies.

programVersions.programSnapshot.partnerOffer.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

programVersions.programSnapshot.partnerOffer.returnOnFullRefund

Variant 1

Type: boolean.

Variant 2

Type: boolean.

programVersions.programSnapshot.partnerOffer.orderCategories

FieldTypeRequiredDetails
programVersions.programSnapshot.partnerOffer.orderCategories.includearrayNo
programVersions.programSnapshot.partnerOffer.orderCategories.excludearrayNo

programPages[]

FieldTypeRequiredDetails
programPages.programIdstringYes
programPages.destinationstringYes

partners[]

FieldTypeRequiredDetails
partners.programIdsarrayYes
partners.idstringYes
partners.companyIdstringYes
partners.referralCodestringYes
partners.aliasstringYesThe partner's short code, such as KARL7Q. Unique in the company and accepted wherever referralCode is, in any case. It never changes after creation, except that erasure replaces it with the uppercase referralCode.
partners.activebooleanYes
partners.createdAtstringYes
partners.erasedAtstringNoWhen the merchant erased the partner's personal data. An erased partner is named ERASED_PARTNER_NAME, has an empty email and no customer links, labels or properties. It stays inactive and its external ID cannot be registered again.
partners.emailstringYes
partners.namestringYes
partners.externalIdstringYes
partners.customerIdsarrayNoMerchant customer IDs belonging to this partner. Supplied lists replace the links.
partners.labelsarrayNo
partners.propertiesobjectNo
partners.stripeAccountIdunionNoThe partner's Stripe connected account on the merchant's Stripe platform. Scheduled payouts send Stripe transfers here when the payout schedule names a Stripe connection. Setting it needs payouts:write. Null removes it.
partners.localeunionNoThe partner's language: en, fr-CA, hy or ru. Emails, the embedded dashboard and the partner portal use it when the company uses it, and the company's default otherwise. Null removes it.

partners.properties

Type: object.

partners.stripeAccountId

Variant 1

Type: null.

Variant 2

Type: string.

partners.locale

Variant 1

Type: null.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

Variant 5

Type: string.

attributions[]

FieldTypeRequiredDetails
attributions.idstringYes
attributions.companyIdstringYes
attributions.partnerIdstringYes
attributions.qualifiedAtstringNo
attributions.qualifiedOrderNumbernumberNo
attributions.programIdstringYes
attributions.referralCodestringYes
attributions.customerIdstringYes
attributions.occurredAtstringYes
attributions.channelunionYes
attributions.providerPromoCodeIdstringNo
attributions.customerDisplayNamestringNo
attributions.orderIdstringNo

attributions.channel

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

orders[]

FieldTypeRequiredDetails
orders.companyIdstringYes
orders.customerOrderNumbernumberYesGrizzlee's count of the customer's purchases, including this one. Never renumbered.
orders.reportedCustomerOrderNumbernumberNoThe merchant's customerOrderNumber when it disagreed with Grizzlee's.
orders.decisionsarrayYes
orders.rewardedbooleanYes
orders.refundedTotalCentsnumberYes
orders.refundedCommissionableCentsnumberYes
orders.fullyRefundedunionNo
orders.lastRefundAtstringNooccurredAt of the latest refund event applied to this order. Older refund events are ignored.
orders.incentiveFlagobjectNoPresent when incentiveAppliedCents did not match the referral's friend incentive.
orders.adjustedTotalCentsnumberNoThe reporting total after the latest adjustment. totalCents keeps the completed value.
orders.adjustedCommissionableCentsnumberNoThe commissionable amount after the latest adjustment. commissionableCents keeps the completed value.
orders.lastAdjustedAtstringNooccurredAt of the latest adjustment applied to this order. Older adjustments are ignored.
orders.adjustmentsarrayNoEvery applied adjustment, oldest first.
orders.referralSelectionobjectNo
orders.type"order.completed"Yes
orders.customerIdstringYes
orders.orderIdstringYes
orders.occurredAtstringYes
orders.eventIdstringYes
orders.commissionableCentsnumberYesMerchant-selected amount for percentage rewards and fixed-reward refund proration.
orders.currencyunionYes
orders.customerDisplayNamestringNo
orders.newCustomerunionNoThe merchant's answer from its own order history. Omitted, Grizzlee uses recorded purchases.
orders.categoriesarrayNoThe order's categories, such as its product or service types. Programs and friend incentives can include or exclude them. Lowercased, sorted and deduplicated. An order without them still counts as a purchase.
orders.totalCentsnumberNoWhat the customer paid. Used only for reporting.
orders.customerEmailstringNo
orders.incentiveAppliedCentsnumberNoFriend incentive discount the merchant's checkout applied to this order. Merchant servers only. Grizzlee stores it as reported and flags the order when it does not match the terms of the reservation sent with it. It never rejects the order over it.

orders.decisions[]

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

orders.decisions.outcome

Variant 1

Type: string.

Variant 2

Type: string.

orders.decisions.reasonParts[]

FieldTypeRequiredDetails
orders.decisions.reasonParts.codeunionYes
orders.decisions.reasonParts.paramsobjectNo

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

orders.decisions.reasonParts.params

Type: object.

orders.decisions.selfReferral

FieldTypeRequiredDetails
orders.decisions.selfReferral.actionunionYes
orders.decisions.selfReferral.signalsarrayYes

orders.decisions.selfReferral.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

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

orders.decisions.fraud

FieldTypeRequiredDetails
orders.decisions.fraud.actionunionYes
orders.decisions.fraud.rulesarrayYes

orders.decisions.fraud.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

orders.decisions.fraud.rules[]

FieldTypeRequiredDetails
orders.decisions.fraud.rules.actionunionYes
orders.decisions.fraud.rules.ruleunionYes
orders.decisions.fraud.rules.signalsarrayYesMatching signal types, never values. Empty for disposable_email.
orders.decisions.fraud.rules.countnumberNoCustomers counted, this one included when referred inside the window. Velocity rules only.

orders.decisions.fraud.rules.action

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

orders.decisions.fraud.rules.rule

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

orders.decisions.fraud.rules.signals[]

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

Variant 5

Type: string.

orders.fullyRefunded

Variant 1

Type: boolean.

Variant 2

Type: boolean.

orders.incentiveFlag

FieldTypeRequiredDetails
orders.incentiveFlag.reasonunionYes
orders.incentiveFlag.rewardIdstringNo
orders.incentiveFlag.programIdstringNoProgram of the reservation or referral checked. Absent for no_referral.
orders.incentiveFlag.reservationIdstringNoThe reservation sent with the order, when there was one.
orders.incentiveFlag.maxCentsunionYesLargest discount the terms allow on one order. Null when they set no cap or there are no terms.
orders.incentiveFlag.reportedCentsnumberYesincentiveAppliedCents as the merchant reported it.

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

orders.incentiveFlag.maxCents

Variant 1

Type: null.

Variant 2

Type: number.

orders.adjustments[]

FieldTypeRequiredDetails
orders.adjustments.eventIdstringYes
orders.adjustments.totalCentsnumberNo
orders.adjustments.previousTotalCentsnumberNo
orders.adjustments.commissionableCentsnumberNo
orders.adjustments.previousCommissionableCentsnumberNo
orders.adjustments.reasonstringNo
orders.adjustments.occurredAtstringYes
orders.adjustments.rewardChangeCentsnumberYesSigned change to the value of the order's rewards.

orders.referralSelection

FieldTypeRequiredDetails
orders.referralSelection.winnerunionYes
orders.referralSelection.skippedarrayYes

orders.referralSelection.winner

Variant 1

Type: null.

Variant 2

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

orders.referralSelection.winner.type

Variant 1

Type: string.

Variant 2

Type: string.

orders.referralSelection.skipped[]

FieldTypeRequiredDetails
orders.referralSelection.skipped.indexnumberYes
orders.referralSelection.skipped.reasonunionYes

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

orders.currency

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

orders.newCustomer

Variant 1

Type: boolean.

Variant 2

Type: boolean.

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.

ledger[]

FieldTypeRequiredDetails
ledger.idstringYes
ledger.companyIdstringYes
ledger.rewardIdstringYes
ledger.eventIdstringYes
ledger.kindunionYesearned is positive, refund is negative, and restoration is positive after a refund total goes down. revocation is negative and reverses what remains of a milestone reward. reversal is negative and reverses a milestone reward after a reversed report dropped the person's count below the reward's threshold. rejection is negative and reverses what remains of a pending reward someone rejected. adjustment is the signed change to the reward's value after an order adjustment.
ledger.amountCentsnumberYes
ledger.currencyunionYes
ledger.createdAtstringYes

ledger.kind

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.

ledger.currency

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

audit[]

FieldTypeRequiredDetails
audit.idstringYes
audit.companyIdstringYes
audit.entityIdstringYes
audit.actionstringYes
audit.detailstringYes
audit.createdAtstringYes

deliveries[]

FieldTypeRequiredDetails
deliveries.idstringYes
deliveries.companyIdstringYes
deliveries.rewardIdstringYes
deliveries.partnerIdstringYes
deliveries.statusunionYes
deliveries.externalReferencestringNoNew attempts require a reference. Older failures may have none.
deliveries.amountCentsnumberYesGross amount delivered, amount owed for a failure, or cash returned by a transfer reversal.
deliveries.currencyunionYes
deliveries.rewardTypeunionYes
deliveries.deliveredAtstringNoPresent when delivered.
deliveries.failureReasonstringNoPresent when failed.
deliveries.nettedDebtCentsnumberNoPresent when a delivery settled part of the partner's earlier delivery debt.
deliveries.payoutIdstringNoPresent when a paid merchant payout recorded this delivery.
deliveries.reversalOfIdstringNoOriginal delivery this append-only transfer reversal reduces.
deliveries.createdAtstringYes

deliveries.status

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

deliveries.currency

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

deliveries.rewardType

Variant 1

Type: string.

Variant 2

Type: string.

reservations[]

FieldTypeRequiredDetails
reservations.idstringYes
reservations.companyIdstringYes
reservations.orderIdstringNoThe placed order. Absent only on historical quote holds released by migration.
reservations.customerIdstringYes
reservations.programIdstringYes
reservations.partnerIdstringYes
reservations.statusunionYes
reservations.termsunionYesTerms when the reservation was made. Later program edits leave them alone.
reservations.incentiveKindunionNoAbsent on historical friend holds.
reservations.rewardIdstringNo
reservations.programVersionnumberNoThe program version the terms come from. Absent on reservations made before programs had versions.
reservations.currencyunionYes
reservations.incentiveExpiresAtunionYesWhen the offer itself stops applying. Earned holds keep the reward's offer expiry. Null when it never expires.
reservations.referredAtstringYesEarned holds use the reward's createdAt, when the offer was earned.
reservations.customerOrderNumbernumberYesThe purchase number Grizzlee expected for the order when it reserved.
reservations.newCustomerunionNoThe merchant's answer when this hold was made. Omitted, eligibility used recorded purchases.
reservations.baseCentsnumberNo
reservations.suggestedDiscountCentsnumberNo
reservations.categoriesarrayNoThe categories the order sent when it reserved. The order's own categories are checked again when it completes.
reservations.createdAtstringYes
reservations.updatedAtstringYes
reservations.referralSelectionobjectNo

reservations.status

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

reservations.terms

Variant 1

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

reservations.terms.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

reservations.terms.orderCategories

FieldTypeRequiredDetails
reservations.terms.orderCategories.includearrayNo
reservations.terms.orderCategories.excludearrayNo

Variant 2

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

reservations.terms.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

reservations.terms.orderCategories

FieldTypeRequiredDetails
reservations.terms.orderCategories.includearrayNo
reservations.terms.orderCategories.excludearrayNo

Variant 3

FieldTypeRequiredDetails
reservations.terms.type"percent"Yes
reservations.terms.rateBpsnumberYes
reservations.terms.ordersnumberYesHow many of the friend's orders get the incentive.
reservations.terms.expiresAfterDaysunionYesDays after the referral was captured, claimed or entered. null means it never expires.
reservations.terms.returnOnFullRefundbooleanYestrue: a full refund gives the use back, so the customer can get the offer again.
reservations.terms.maxDiscountCentsnumberNoLargest discount for one order.
reservations.terms.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
reservations.terms.orderCategoriesobjectNoOrder categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies.

reservations.terms.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

reservations.terms.orderCategories

FieldTypeRequiredDetails
reservations.terms.orderCategories.includearrayNo
reservations.terms.orderCategories.excludearrayNo

Variant 4

FieldTypeRequiredDetails
reservations.terms.type"fixed"Yes
reservations.terms.ordersnumberYesHow many of the friend's orders get the incentive.
reservations.terms.expiresAfterDaysunionYesDays after the referral was captured, claimed or entered. null means it never expires.
reservations.terms.returnOnFullRefundbooleanYestrue: a full refund gives the use back, so the customer can get the offer again.
reservations.terms.amountCentsnumberYes
reservations.terms.minOrderCentsnumberNoThe friend's order total before the discount must reach this amount. Checked by the merchant's checkout.
reservations.terms.orderCategoriesobjectNoOrder categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies.

reservations.terms.expiresAfterDays

Variant 1

Type: null.

Variant 2

Type: number.

reservations.terms.orderCategories

FieldTypeRequiredDetails
reservations.terms.orderCategories.includearrayNo
reservations.terms.orderCategories.excludearrayNo

reservations.incentiveKind

Variant 1

Type: string.

Variant 2

Type: string.

reservations.currency

Variant 1

Type: string.

Variant 2

Type: string.

Variant 3

Type: string.

Variant 4

Type: string.

reservations.incentiveExpiresAt

Variant 1

Type: null.

Variant 2

Type: string.

reservations.newCustomer

Variant 1

Type: boolean.

Variant 2

Type: boolean.

reservations.referralSelection

FieldTypeRequiredDetails
reservations.referralSelection.winnerunionYes
reservations.referralSelection.skippedarrayYes

reservations.referralSelection.winner

Variant 1

Type: null.

Variant 2

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

reservations.referralSelection.winner.type

Variant 1

Type: string.

Variant 2

Type: string.

reservations.referralSelection.skipped[]

FieldTypeRequiredDetails
reservations.referralSelection.skipped.indexnumberYes
reservations.referralSelection.skipped.reasonunionYes

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

pagination

FieldTypeRequiredDetails
pagination.numbernumberYes
pagination.sizenumberYes
pagination.hasNextbooleanYes
pagination.partnersHasNextunionNo
pagination.rewardsHasNextunionNo
pagination.partnerIdsarrayYes

pagination.partnersHasNext

Variant 1

Type: boolean.

Variant 2

Type: boolean.

pagination.rewardsHasNext

Variant 1

Type: boolean.

Variant 2

Type: boolean.

report

FieldTypeRequiredDetails
report.rewardedOrdersnumberYes
report.reportedOrdersnumberYes
report.purchaseRevenueCentsnumberYes
report.earningsCentsnumberYes
report.pendingCentsnumberYes
report.activePartnersnumberYes
report.partnersTotalnumberYes
report.rewardsTotalnumberYes
report.filteredRewardsTotalnumberNo
report.pendingRewardsnumberYes
report.heldRewardsnumberNoPending rewards a self-referral match or fraud rule held for a person to approve or reject.
report.dailyarrayYes
report.partnersobjectYes
report.programsobjectYes
report.leadersarrayNo

report.daily[]

FieldTypeRequiredDetails
report.daily.daystringYes
report.daily.purchaseRevenueCentsnumberYes
report.daily.unreportedOrdersnumberYes

report.partners

Type: object.

report.programs

Type: object.

report.leaders[]

FieldTypeRequiredDetails
report.leaders.partnerobjectYes
report.leaders.earningsCentsnumberYes
report.leaders.rewardedOrdersnumberYes

report.leaders.partner

FieldTypeRequiredDetails
report.leaders.partner.namestringYes
report.leaders.partner.labelsarrayNo
report.leaders.partner.idstringYes

usage

FieldTypeRequiredDetails
usage.rewardedTransactionsnumberYesRewarded orders plus rewarded milestone reports recorded this month.
usage.rewardedMilestonesnumberNoThe part of rewardedTransactions that came from milestone reports.
usage.estimatedFeeUsdstringYes
usage.monthstringYes

Response schema

json
{
  "type": "object",
  "properties": {
    "company": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "currency": {
          "anyOf": [
            {
              "type": "string",
              "const": "CAD"
            },
            {
              "type": "string",
              "const": "USD"
            },
            {
              "type": "string",
              "const": "EUR"
            },
            {
              "type": "string",
              "const": "GBP"
            }
          ]
        },
        "languages": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string",
                "const": "en"
              },
              {
                "type": "string",
                "const": "fr-CA"
              },
              {
                "type": "string",
                "const": "hy"
              },
              {
                "type": "string",
                "const": "ru"
              }
            ]
          },
          "description": "Languages partners and customers see, in order. The first is the default. Companies saved\nbefore languages existed have none, which means English only. See companyLanguages."
        },
        "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"
                }
              ]
            }
          },
          "required": [
            "cash",
            "credit"
          ],
          "description": "Who delivers approved cash and store credit rewards for programs created from the dashboard.\nAbsent means the Grizzlee wallet for both. Programs keep their own delivery. This is only the\ndefault a new program starts with."
        },
        "partnerFields": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "anyOf": [
                  {
                    "type": "string",
                    "const": "number"
                  },
                  {
                    "type": "string",
                    "const": "boolean"
                  },
                  {
                    "type": "string",
                    "const": "text"
                  },
                  {
                    "type": "string",
                    "const": "select"
                  }
                ]
              },
              "name": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "type",
              "name",
              "id"
            ]
          }
        }
      },
      "required": [
        "id",
        "name",
        "currency"
      ]
    },
    "programs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "version": {
            "type": "number",
            "description": "1 when created. Every saved change except a rename adds 1. Rewards and incentive reservations\nrecord the version they were made under."
          },
          "updatedAt": {
            "type": "string",
            "description": "Last saved change, including renames."
          },
          "archivedAt": {
            "type": "string",
            "description": "When deleteProgram archived the program because it has history. An archived program stays\ninactive, has no placement keys and refuses changes. Its referrals, rewards and versions stay."
          },
          "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": [
          "id",
          "companyId",
          "createdAt",
          "version",
          "updatedAt",
          "currency",
          "name",
          "kind",
          "rewardType",
          "attributionWindowDays",
          "active"
        ]
      }
    },
    "placements": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "programId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "programId",
          "createdAt",
          "updatedAt"
        ]
      }
    },
    "programVersions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "programId": {
            "type": "string"
          },
          "version": {
            "type": "number"
          },
          "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"
            ]
          },
          "changedFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Top-level program fields that differ from the previous version, such as compensation or\nfriendIncentive. Empty for version 1."
          },
          "createdAt": {
            "type": "string",
            "description": "When this version took effect. Versions recorded when versioning started use the program's last saved change."
          }
        },
        "required": [
          "companyId",
          "programId",
          "version",
          "programSnapshot",
          "changedFields",
          "createdAt"
        ]
      },
      "description": "Every saved version of the listed programs, oldest first."
    },
    "programPages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "programId": {
            "type": "string"
          },
          "destination": {
            "type": "string"
          }
        },
        "required": [
          "programId",
          "destination"
        ]
      }
    },
    "partners": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "programIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "referralCode": {
            "type": "string"
          },
          "alias": {
            "type": "string",
            "description": "The partner's short code, such as KARL7Q. Unique in the company and accepted wherever\nreferralCode is, in any case. It never changes after creation, except that erasure replaces it\nwith the uppercase referralCode."
          },
          "active": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "erasedAt": {
            "type": "string",
            "description": "When the merchant erased the partner's personal data. An erased partner is named\nERASED_PARTNER_NAME, has an empty email and no customer links, labels or properties. It stays\ninactive and its external ID cannot be registered again."
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "customerIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Merchant customer IDs belonging to this partner. Supplied lists replace the links."
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "properties": {
            "type": "object",
            "properties": {},
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "boolean",
                  "const": true
                }
              ]
            }
          },
          "stripeAccountId": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "The partner's Stripe connected account on the merchant's Stripe platform. Scheduled payouts\nsend Stripe transfers here when the payout schedule names a Stripe connection. Setting it\nneeds payouts:write. Null removes it."
          },
          "locale": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "const": "en"
              },
              {
                "type": "string",
                "const": "fr-CA"
              },
              {
                "type": "string",
                "const": "hy"
              },
              {
                "type": "string",
                "const": "ru"
              }
            ],
            "description": "The partner's language: en, fr-CA, hy or ru. Emails, the embedded dashboard and the partner\nportal use it when the company uses it, and the company's default otherwise. Null\nremoves it."
          }
        },
        "required": [
          "programIds",
          "id",
          "companyId",
          "referralCode",
          "alias",
          "active",
          "createdAt",
          "email",
          "name",
          "externalId"
        ]
      }
    },
    "attributions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "partnerId": {
            "type": "string"
          },
          "qualifiedAt": {
            "type": "string"
          },
          "qualifiedOrderNumber": {
            "type": "number"
          },
          "programId": {
            "type": "string"
          },
          "referralCode": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string"
          },
          "channel": {
            "anyOf": [
              {
                "type": "string",
                "const": "link"
              },
              {
                "type": "string",
                "const": "qr"
              },
              {
                "type": "string",
                "const": "coupon"
              },
              {
                "type": "string",
                "const": "in_app"
              }
            ]
          },
          "providerPromoCodeId": {
            "type": "string"
          },
          "customerDisplayName": {
            "type": "string"
          },
          "orderId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "companyId",
          "partnerId",
          "programId",
          "referralCode",
          "customerId",
          "occurredAt",
          "channel"
        ]
      }
    },
    "orders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "customerOrderNumber": {
            "type": "number",
            "description": "Grizzlee's count of the customer's purchases, including this one. Never renumbered."
          },
          "reportedCustomerOrderNumber": {
            "type": "number",
            "description": "The merchant's customerOrderNumber when it disagreed with Grizzlee's."
          },
          "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"
              ]
            }
          },
          "rewarded": {
            "type": "boolean"
          },
          "refundedTotalCents": {
            "type": "number"
          },
          "refundedCommissionableCents": {
            "type": "number"
          },
          "fullyRefunded": {
            "anyOf": [
              {
                "type": "boolean",
                "const": false
              },
              {
                "type": "boolean",
                "const": true
              }
            ]
          },
          "lastRefundAt": {
            "type": "string",
            "description": "occurredAt of the latest refund event applied to this order. Older refund events are ignored."
          },
          "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": "Present when incentiveAppliedCents did not match the referral's friend incentive."
          },
          "adjustedTotalCents": {
            "type": "number",
            "description": "The reporting total after the latest adjustment. totalCents keeps the completed value."
          },
          "adjustedCommissionableCents": {
            "type": "number",
            "description": "The commissionable amount after the latest adjustment. commissionableCents keeps the completed value."
          },
          "lastAdjustedAt": {
            "type": "string",
            "description": "occurredAt of the latest adjustment applied to this order. Older adjustments are ignored."
          },
          "adjustments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "eventId": {
                  "type": "string"
                },
                "totalCents": {
                  "type": "number"
                },
                "previousTotalCents": {
                  "type": "number"
                },
                "commissionableCents": {
                  "type": "number"
                },
                "previousCommissionableCents": {
                  "type": "number"
                },
                "reason": {
                  "type": "string"
                },
                "occurredAt": {
                  "type": "string"
                },
                "rewardChangeCents": {
                  "type": "number",
                  "description": "Signed change to the value of the order's rewards."
                }
              },
              "required": [
                "eventId",
                "occurredAt",
                "rewardChangeCents"
              ]
            },
            "description": "Every applied adjustment, oldest first."
          },
          "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"
            ]
          },
          "type": {
            "type": "string",
            "const": "order.completed"
          },
          "customerId": {
            "type": "string"
          },
          "orderId": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "commissionableCents": {
            "type": "number",
            "description": "Merchant-selected amount for percentage rewards and fixed-reward refund proration."
          },
          "currency": {
            "anyOf": [
              {
                "type": "string",
                "const": "CAD"
              },
              {
                "type": "string",
                "const": "USD"
              },
              {
                "type": "string",
                "const": "EUR"
              },
              {
                "type": "string",
                "const": "GBP"
              }
            ]
          },
          "customerDisplayName": {
            "type": "string"
          },
          "newCustomer": {
            "anyOf": [
              {
                "type": "boolean",
                "const": false
              },
              {
                "type": "boolean",
                "const": true
              }
            ],
            "description": "The merchant's answer from its own order history. Omitted, Grizzlee uses recorded purchases."
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The order's categories, such as its product or service types. Programs and friend incentives\ncan include or exclude them. Lowercased, sorted and deduplicated. An order without them\nstill counts as a purchase."
          },
          "totalCents": {
            "type": "number",
            "description": "What the customer paid. Used only for reporting."
          },
          "customerEmail": {
            "type": "string"
          },
          "incentiveAppliedCents": {
            "type": "number",
            "description": "Friend incentive discount the merchant's checkout applied to this order. Merchant servers\nonly. Grizzlee stores it as reported and flags the order when it does not match the terms\nof the reservation sent with it. It never rejects the order over it."
          }
        },
        "required": [
          "companyId",
          "customerOrderNumber",
          "decisions",
          "rewarded",
          "refundedTotalCents",
          "refundedCommissionableCents",
          "type",
          "customerId",
          "orderId",
          "occurredAt",
          "eventId",
          "commissionableCents",
          "currency"
        ]
      }
    },
    "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"
        ]
      }
    },
    "ledger": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "rewardId": {
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string",
                "const": "earned"
              },
              {
                "type": "string",
                "const": "refund"
              },
              {
                "type": "string",
                "const": "restoration"
              },
              {
                "type": "string",
                "const": "revocation"
              },
              {
                "type": "string",
                "const": "reversal"
              },
              {
                "type": "string",
                "const": "rejection"
              },
              {
                "type": "string",
                "const": "adjustment"
              }
            ],
            "description": "earned is positive, refund is negative, and restoration is positive after a refund total goes\ndown. revocation is negative and reverses what remains of a milestone reward. reversal is\nnegative and reverses a milestone reward after a reversed report dropped the person's count\nbelow the reward's threshold. rejection is negative and reverses what remains of a pending\nreward someone rejected. adjustment is the signed change to the reward's value after an order\nadjustment."
          },
          "amountCents": {
            "type": "number"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string",
                "const": "CAD"
              },
              {
                "type": "string",
                "const": "USD"
              },
              {
                "type": "string",
                "const": "EUR"
              },
              {
                "type": "string",
                "const": "GBP"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "companyId",
          "rewardId",
          "eventId",
          "kind",
          "amountCents",
          "currency",
          "createdAt"
        ]
      }
    },
    "audit": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "companyId",
          "entityId",
          "action",
          "detail",
          "createdAt"
        ]
      }
    },
    "deliveries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "rewardId": {
            "type": "string"
          },
          "partnerId": {
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "const": "reversed"
              },
              {
                "type": "string",
                "const": "delivered"
              },
              {
                "type": "string",
                "const": "failed"
              }
            ]
          },
          "externalReference": {
            "type": "string",
            "description": "New attempts require a reference. Older failures may have none."
          },
          "amountCents": {
            "type": "number",
            "description": "Gross amount delivered, amount owed for a failure, or cash returned by a transfer reversal."
          },
          "currency": {
            "anyOf": [
              {
                "type": "string",
                "const": "CAD"
              },
              {
                "type": "string",
                "const": "USD"
              },
              {
                "type": "string",
                "const": "EUR"
              },
              {
                "type": "string",
                "const": "GBP"
              }
            ]
          },
          "rewardType": {
            "anyOf": [
              {
                "type": "string",
                "const": "cash"
              },
              {
                "type": "string",
                "const": "credit"
              }
            ]
          },
          "deliveredAt": {
            "type": "string",
            "description": "Present when delivered."
          },
          "failureReason": {
            "type": "string",
            "description": "Present when failed."
          },
          "nettedDebtCents": {
            "type": "number",
            "description": "Present when a delivery settled part of the partner's earlier delivery debt."
          },
          "payoutId": {
            "type": "string",
            "description": "Present when a paid merchant payout recorded this delivery."
          },
          "reversalOfId": {
            "type": "string",
            "description": "Original delivery this append-only transfer reversal reduces."
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "companyId",
          "rewardId",
          "partnerId",
          "status",
          "amountCents",
          "currency",
          "rewardType",
          "createdAt"
        ]
      },
      "description": "Delivery and transfer reversal history for the listed rewards, oldest first."
    },
    "reservations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "orderId": {
            "type": "string",
            "description": "The placed order. Absent only on historical quote holds released by migration."
          },
          "customerId": {
            "type": "string"
          },
          "programId": {
            "type": "string"
          },
          "partnerId": {
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "const": "open"
              },
              {
                "type": "string",
                "const": "consumed"
              },
              {
                "type": "string",
                "const": "released"
              }
            ]
          },
          "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."
                  },
                  "newCustomersOnly": {
                    "type": "boolean",
                    "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": {
                    "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",
                  "newCustomersOnly",
                  "expiresAfterDays",
                  "returnOnFullRefund"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "fixed"
                  },
                  "orders": {
                    "type": "number",
                    "description": "How many of the friend's orders get the incentive."
                  },
                  "newCustomersOnly": {
                    "type": "boolean",
                    "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": {
                    "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",
                  "newCustomersOnly",
                  "expiresAfterDays",
                  "returnOnFullRefund",
                  "amountCents"
                ]
              },
              {
                "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"
                ]
              }
            ],
            "description": "Terms when the reservation was made. Later program edits leave them alone."
          },
          "incentiveKind": {
            "anyOf": [
              {
                "type": "string",
                "const": "friend"
              },
              {
                "type": "string",
                "const": "earned"
              }
            ],
            "description": "Absent on historical friend holds."
          },
          "rewardId": {
            "type": "string"
          },
          "programVersion": {
            "type": "number",
            "description": "The program version the terms come from. Absent on reservations made before programs had versions."
          },
          "currency": {
            "anyOf": [
              {
                "type": "string",
                "const": "CAD"
              },
              {
                "type": "string",
                "const": "USD"
              },
              {
                "type": "string",
                "const": "EUR"
              },
              {
                "type": "string",
                "const": "GBP"
              }
            ]
          },
          "incentiveExpiresAt": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "When the offer itself stops applying. Earned holds keep the reward's offer expiry. Null when it never expires."
          },
          "referredAt": {
            "type": "string",
            "description": "Earned holds use the reward's createdAt, when the offer was earned."
          },
          "customerOrderNumber": {
            "type": "number",
            "description": "The purchase number Grizzlee expected for the order when it reserved."
          },
          "newCustomer": {
            "anyOf": [
              {
                "type": "boolean",
                "const": false
              },
              {
                "type": "boolean",
                "const": true
              }
            ],
            "description": "The merchant's answer when this hold was made. Omitted, eligibility used recorded purchases."
          },
          "baseCents": {
            "type": "number"
          },
          "suggestedDiscountCents": {
            "type": "number"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The categories the order sent when it reserved. The order's own categories are checked again when it completes."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "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": [
          "id",
          "companyId",
          "customerId",
          "programId",
          "partnerId",
          "status",
          "terms",
          "currency",
          "incentiveExpiresAt",
          "referredAt",
          "customerOrderNumber",
          "createdAt",
          "updatedAt"
        ]
      },
      "description": "Open friend incentive holds, oldest first."
    },
    "pagination": {
      "type": "object",
      "properties": {
        "number": {
          "type": "number"
        },
        "size": {
          "type": "number"
        },
        "hasNext": {
          "type": "boolean"
        },
        "partnersHasNext": {
          "anyOf": [
            {
              "type": "boolean",
              "const": false
            },
            {
              "type": "boolean",
              "const": true
            }
          ]
        },
        "rewardsHasNext": {
          "anyOf": [
            {
              "type": "boolean",
              "const": false
            },
            {
              "type": "boolean",
              "const": true
            }
          ]
        },
        "partnerIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "number",
        "size",
        "hasNext",
        "partnerIds"
      ]
    },
    "report": {
      "type": "object",
      "properties": {
        "rewardedOrders": {
          "type": "number"
        },
        "reportedOrders": {
          "type": "number"
        },
        "purchaseRevenueCents": {
          "type": "number"
        },
        "earningsCents": {
          "type": "number"
        },
        "pendingCents": {
          "type": "number"
        },
        "activePartners": {
          "type": "number"
        },
        "partnersTotal": {
          "type": "number"
        },
        "rewardsTotal": {
          "type": "number"
        },
        "filteredRewardsTotal": {
          "type": "number"
        },
        "pendingRewards": {
          "type": "number"
        },
        "heldRewards": {
          "type": "number",
          "description": "Pending rewards a self-referral match or fraud rule held for a person to approve or reject."
        },
        "daily": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string"
              },
              "purchaseRevenueCents": {
                "type": "number"
              },
              "unreportedOrders": {
                "type": "number"
              }
            },
            "required": [
              "day",
              "purchaseRevenueCents",
              "unreportedOrders"
            ]
          }
        },
        "partners": {
          "type": "object",
          "properties": {},
          "additionalProperties": {
            "type": "object",
            "properties": {
              "earningsCents": {
                "type": "number"
              },
              "referredCustomers": {
                "type": "number"
              },
              "rewardedOrders": {
                "type": "number"
              }
            },
            "required": [
              "earningsCents",
              "referredCustomers",
              "rewardedOrders"
            ]
          }
        },
        "programs": {
          "type": "object",
          "properties": {},
          "additionalProperties": {
            "type": "object",
            "properties": {
              "rewards": {
                "type": "number"
              }
            },
            "required": [
              "rewards"
            ]
          }
        },
        "leaders": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "partner": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "id"
                ]
              },
              "earningsCents": {
                "type": "number"
              },
              "rewardedOrders": {
                "type": "number"
              }
            },
            "required": [
              "partner",
              "earningsCents",
              "rewardedOrders"
            ]
          }
        }
      },
      "required": [
        "rewardedOrders",
        "reportedOrders",
        "purchaseRevenueCents",
        "earningsCents",
        "pendingCents",
        "activePartners",
        "partnersTotal",
        "rewardsTotal",
        "pendingRewards",
        "daily",
        "partners",
        "programs"
      ]
    },
    "usage": {
      "type": "object",
      "properties": {
        "rewardedTransactions": {
          "type": "number",
          "description": "Rewarded orders plus rewarded milestone reports recorded this month."
        },
        "rewardedMilestones": {
          "type": "number",
          "description": "The part of rewardedTransactions that came from milestone reports."
        },
        "estimatedFeeUsd": {
          "type": "string"
        },
        "month": {
          "type": "string"
        }
      },
      "required": [
        "rewardedTransactions",
        "estimatedFeeUsd",
        "month"
      ]
    }
  },
  "required": [
    "company",
    "programs",
    "partners",
    "attributions",
    "orders",
    "rewards",
    "ledger",
    "audit",
    "usage"
  ]
}

Errors

Failures return { "error": { "code": "...", "message": "...", "details": {} } }. Details are optional. See error statuses. Reuse an unchanged event payload when retrying.