HTTP endpoints
getCompany
GET /api/v1/company
Requires read. Keep the Bearer key on your server.
SDK
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.
curl --fail-with-body --request GET \
'https://app.grizzlee.ca/api/v1/company' \
-H "Authorization: Bearer $GRIZZLEE_SERVER_KEY"Query parameters
| Field | Type | Required | Details |
|---|---|---|---|
page | number | No | |
search | string | No | |
rewardStatus | union | No | review 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.
| Field | Type | Required | Details |
|---|---|---|---|
company | object | Yes | |
programs | array | Yes | |
placements | array | No | |
programVersions | array | No | Every saved version of the listed programs, oldest first. |
programPages | array | No | |
partners | array | Yes | |
attributions | array | Yes | |
orders | array | Yes | |
rewards | array | Yes | |
ledger | array | Yes | |
audit | array | Yes | |
deliveries | array | No | Delivery and transfer reversal history for the listed rewards, oldest first. |
reservations | array | No | Open friend incentive holds, oldest first. |
pagination | object | No | |
report | object | No | |
usage | object | Yes |
company
| Field | Type | Required | Details |
|---|---|---|---|
company.id | string | Yes | |
company.name | string | Yes | |
company.currency | union | Yes | |
company.languages | array | No | Languages 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.delivery | object | No | Who 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.partnerFields | array | No |
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
| Field | Type | Required | Details |
|---|---|---|---|
company.delivery.cash | union | Yes | |
company.delivery.credit | union | Yes |
company.delivery.cash
Variant 1
Type: string.
Variant 2
Type: string.
company.delivery.credit
Variant 1
Type: string.
Variant 2
Type: string.
company.partnerFields[]
| Field | Type | Required | Details |
|---|---|---|---|
company.partnerFields.type | union | Yes | |
company.partnerFields.name | string | Yes | |
company.partnerFields.id | string | Yes | |
company.partnerFields.options | array | No |
company.partnerFields.type
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
programs[]
| Field | Type | Required | Details |
|---|---|---|---|
programs.id | string | Yes | |
programs.companyId | string | Yes | |
programs.createdAt | string | Yes | |
programs.version | number | Yes | 1 when created. Every saved change except a rename adds 1. Rewards and incentive reservations record the version they were made under. |
programs.updatedAt | string | Yes | Last saved change, including renames. |
programs.archivedAt | string | No | When 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.currency | union | Yes | Must match the company currency. |
programs.name | string | Yes | |
programs.kind | union | Yes | |
programs.rewardType | union | Yes | |
programs.attributionWindowDays | union | Yes | Days after a referral that a first purchase, or a milestone, still counts. The latest referral always wins until one qualifies. Only milestone programs may use null, which means the referral never expires. |
programs.active | boolean | Yes | |
programs.orderCategories | object | No | Order categories that earn rewards. Order programs only. The friend incentive has its own orderCategories. Absent means every order can earn. |
programs.compensation | union | No | |
programs.tracking | object | No | Tracking methods are independent of kind. Provider discounts require a connected provider. |
programs.destinationUrl | string | No | The page partner links and QR codes open. A published signup page's destination takes precedence. Without either, partners have no link. |
programs.display | object | No | Optional public name, headline and milestone label for partner and customer screens. |
programs.trigger | union | No | What earns a reward. Defaults to completed orders. |
programs.milestoneRewards | object | No | |
programs.fixedRefundMode | union | No | How fixed rewards change after a partial refund. |
programs.duration | union | No | |
programs.delivery | object | No | Who delivers approved rewards of each type. Defaults to the Grizzlee wallet for both. |
programs.reviewRewards | union | No | When true, new rewards wait as pending until someone approves them. Otherwise they start approved. |
programs.fraudChecks | object | No | Self-referral and other fraud rules. Absent means every rule uses its default. |
programs.performance | object | No | |
programs.limits | object | No | |
programs.customTerms | array | No | |
programs.friendIncentive | union | No | Optional offer for the referred customer. |
programs.partnerOffer | union | No | Offer 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
| Field | Type | Required | Details |
|---|---|---|---|
programs.orderCategories.include | array | No | |
programs.orderCategories.exclude | array | No |
programs.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programs.compensation.type | "percentage" | Yes | |
programs.compensation.rateBps | number | Yes | |
programs.compensation.phases | array | No |
programs.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
programs.compensation.phases.rateBps | number | Yes | |
programs.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programs.compensation.type | "fixed" | Yes | |
programs.compensation.amountCents | number | Yes |
programs.tracking
| Field | Type | Required | Details |
|---|---|---|---|
programs.tracking.links | union | No | |
programs.tracking.qrCodes | union | No | |
programs.tracking.attributionCodes | union | No | |
programs.tracking.providerPromoCodes | union | No |
programs.tracking.links
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
| Field | Type | Required | Details |
|---|---|---|---|
programs.display.en | object | No | |
programs.display.fr-CA | object | No | |
programs.display.hy | object | No | |
programs.display.ru | object | No |
programs.display.en
| Field | Type | Required | Details |
|---|---|---|---|
programs.display.en.publicName | string | No | The name partners and customers see. Falls back to the program name. |
programs.display.en.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
programs.display.en.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
programs.display.en.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
programs.display.en.milestoneLabel.one | string | Yes | |
programs.display.en.milestoneLabel.other | string | Yes |
programs.display.fr-CA
| Field | Type | Required | Details |
|---|---|---|---|
programs.display.fr-CA.publicName | string | No | The name partners and customers see. Falls back to the program name. |
programs.display.fr-CA.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
programs.display.fr-CA.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
programs.display.fr-CA.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
programs.display.fr-CA.milestoneLabel.one | string | Yes | |
programs.display.fr-CA.milestoneLabel.other | string | Yes |
programs.display.hy
| Field | Type | Required | Details |
|---|---|---|---|
programs.display.hy.publicName | string | No | The name partners and customers see. Falls back to the program name. |
programs.display.hy.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
programs.display.hy.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
programs.display.hy.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
programs.display.hy.milestoneLabel.one | string | Yes | |
programs.display.hy.milestoneLabel.other | string | Yes |
programs.display.ru
| Field | Type | Required | Details |
|---|---|---|---|
programs.display.ru.publicName | string | No | The name partners and customers see. Falls back to the program name. |
programs.display.ru.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
programs.display.ru.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
programs.display.ru.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
programs.display.ru.milestoneLabel.one | string | Yes | |
programs.display.ru.milestoneLabel.other | string | Yes |
programs.trigger
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programs.trigger.type | "order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programs.trigger.type | "milestone" | Yes | |
programs.trigger.milestone | string | Yes |
programs.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
programs.milestoneRewards.eachReport | object | No | |
programs.milestoneRewards.atCount | object | No |
programs.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
programs.milestoneRewards.eachReport.compensation | union | Yes | |
programs.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
programs.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programs.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
programs.milestoneRewards.eachReport.compensation.amountCents | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programs.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
programs.milestoneRewards.eachReport.compensation.rateBps | number | Yes |
programs.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
programs.milestoneRewards.atCount.amountCents | number | Yes | |
programs.milestoneRewards.atCount.count | number | Yes |
programs.fixedRefundMode
Variant 1
Type: string.
Variant 2
Type: string.
programs.duration
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programs.duration.type | "only_order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programs.duration.type | "first_order" | Yes |
Variant 3
| Field | Type | Required | Details |
|---|---|---|---|
programs.duration.type | "first_n_orders" | Yes | |
programs.duration.count | number | Yes |
Variant 4
| Field | Type | Required | Details |
|---|---|---|---|
programs.duration.type | "days" | Yes | |
programs.duration.days | number | Yes |
Variant 5
| Field | Type | Required | Details |
|---|---|---|---|
programs.duration.type | "months" | Yes | |
programs.duration.months | number | Yes |
Variant 6
| Field | Type | Required | Details |
|---|---|---|---|
programs.duration.type | "lifetime" | Yes |
programs.delivery
| Field | Type | Required | Details |
|---|---|---|---|
programs.delivery.cash | union | No | |
programs.delivery.credit | union | No |
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
| Field | Type | Required | Details |
|---|---|---|---|
programs.fraudChecks.selfReferral | object | No | |
programs.fraudChecks.duplicateAccounts | object | No | |
programs.fraudChecks.rapidRepeats | object | No | |
programs.fraudChecks.repeatCustomer | object | No | |
programs.fraudChecks.disposableEmail | object | No |
programs.fraudChecks.selfReferral
| Field | Type | Required | Details |
|---|---|---|---|
programs.fraudChecks.selfReferral.action | union | No |
programs.fraudChecks.selfReferral.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
programs.fraudChecks.duplicateAccounts
| Field | Type | Required | Details |
|---|---|---|---|
programs.fraudChecks.duplicateAccounts.action | union | No | |
programs.fraudChecks.duplicateAccounts.accounts | number | No | Customers sharing one card or device that trigger the rule. This one counts when referred inside the window. |
programs.fraudChecks.duplicateAccounts.windowDays | number | No | |
programs.fraudChecks.duplicateAccounts.ipAccounts | union | No | Customers 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
| Field | Type | Required | Details |
|---|---|---|---|
programs.fraudChecks.rapidRepeats.action | union | No | |
programs.fraudChecks.rapidRepeats.referrals | number | No | Referrals from one device that trigger the rule. This one counts when referred inside the window. |
programs.fraudChecks.rapidRepeats.windowMinutes | number | No | |
programs.fraudChecks.rapidRepeats.ipReferrals | union | No | Referrals 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
| Field | Type | Required | Details |
|---|---|---|---|
programs.fraudChecks.repeatCustomer.action | union | No |
programs.fraudChecks.repeatCustomer.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
programs.fraudChecks.disposableEmail
| Field | Type | Required | Details |
|---|---|---|---|
programs.fraudChecks.disposableEmail.action | union | No | A 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
| Field | Type | Required | Details |
|---|---|---|---|
programs.performance.metric | union | Yes | |
programs.performance.tiers | array | Yes | |
programs.performance.windowDays | number | No |
programs.performance.metric
Variant 1
Type: string.
Variant 2
Type: string.
programs.performance.tiers[]
| Field | Type | Required | Details |
|---|---|---|---|
programs.performance.tiers.name | string | Yes | |
programs.performance.tiers.minValue | number | Yes | |
programs.performance.tiers.bonusBps | number | Yes |
programs.limits
| Field | Type | Required | Details |
|---|---|---|---|
programs.limits.customerCapCents | number | No | |
programs.limits.partnerCapCents | number | No |
programs.customTerms[]
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.target | "partner" | Yes | |
programs.customTerms.targetId | string | Yes | |
programs.customTerms.compensation | union | No | |
programs.customTerms.milestoneRewards | object | No | |
programs.customTerms.customerCapCents | union | No | |
programs.customTerms.partnerCapCents | union | No |
programs.customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.compensation.type | "percentage" | Yes | |
programs.customTerms.compensation.rateBps | number | Yes | |
programs.customTerms.compensation.phases | array | No |
programs.customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.compensation.phases.rateBps | number | Yes | |
programs.customTerms.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.compensation.type | "fixed" | Yes | |
programs.customTerms.compensation.amountCents | number | Yes |
programs.customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.milestoneRewards.eachReport | object | No | |
programs.customTerms.milestoneRewards.atCount | object | No |
programs.customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
programs.customTerms.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
programs.customTerms.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
programs.customTerms.milestoneRewards.eachReport.compensation.amountCents | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
programs.customTerms.milestoneRewards.eachReport.compensation.rateBps | number | Yes |
programs.customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.milestoneRewards.atCount.amountCents | number | Yes | |
programs.customTerms.milestoneRewards.atCount.count | number | Yes |
programs.customTerms.customerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
programs.customTerms.partnerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.target | "customer" | Yes | |
programs.customTerms.targetId | string | Yes | |
programs.customTerms.compensation | union | No | |
programs.customTerms.milestoneRewards | object | No | |
programs.customTerms.customerCapCents | union | No |
programs.customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.compensation.type | "percentage" | Yes | |
programs.customTerms.compensation.rateBps | number | Yes | |
programs.customTerms.compensation.phases | array | No |
programs.customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.compensation.phases.rateBps | number | Yes | |
programs.customTerms.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.compensation.type | "fixed" | Yes | |
programs.customTerms.compensation.amountCents | number | Yes |
programs.customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.milestoneRewards.eachReport | object | No | |
programs.customTerms.milestoneRewards.atCount | object | No |
programs.customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
programs.customTerms.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
programs.customTerms.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
programs.customTerms.milestoneRewards.eachReport.compensation.amountCents | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
programs.customTerms.milestoneRewards.eachReport.compensation.rateBps | number | Yes |
programs.customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
programs.customTerms.milestoneRewards.atCount.amountCents | number | Yes | |
programs.customTerms.milestoneRewards.atCount.count | number | Yes |
programs.customTerms.customerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
programs.friendIncentive
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programs.friendIncentive.type | "percent" | Yes | |
programs.friendIncentive.rateBps | number | Yes | |
programs.friendIncentive.maxDiscountCents | number | No | Largest discount for one order. |
programs.friendIncentive.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
programs.friendIncentive.orders | number | No | How many of the friend's orders get the incentive. |
programs.friendIncentive.newCustomersOnly | union | No | true: use the merchant's newCustomer answer, or recorded purchases when omitted. false: returning customers qualify too. A supplied answer uses the order limit after the referral. |
programs.friendIncentive.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
programs.friendIncentive.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
programs.friendIncentive.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
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
| Field | Type | Required | Details |
|---|---|---|---|
programs.friendIncentive.orderCategories.include | array | No | |
programs.friendIncentive.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programs.friendIncentive.type | "fixed" | Yes | |
programs.friendIncentive.amountCents | number | Yes | |
programs.friendIncentive.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
programs.friendIncentive.orders | number | No | How many of the friend's orders get the incentive. |
programs.friendIncentive.newCustomersOnly | union | No | true: use the merchant's newCustomer answer, or recorded purchases when omitted. false: returning customers qualify too. A supplied answer uses the order limit after the referral. |
programs.friendIncentive.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
programs.friendIncentive.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
programs.friendIncentive.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
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
| Field | Type | Required | Details |
|---|---|---|---|
programs.friendIncentive.orderCategories.include | array | No | |
programs.friendIncentive.orderCategories.exclude | array | No |
programs.partnerOffer
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programs.partnerOffer.type | "percent" | Yes | |
programs.partnerOffer.rateBps | number | Yes | |
programs.partnerOffer.maxDiscountCents | number | No | Largest discount for one order. |
programs.partnerOffer.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
programs.partnerOffer.orders | number | No | How many of the friend's orders get the incentive. |
programs.partnerOffer.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
programs.partnerOffer.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
programs.partnerOffer.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
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
| Field | Type | Required | Details |
|---|---|---|---|
programs.partnerOffer.orderCategories.include | array | No | |
programs.partnerOffer.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programs.partnerOffer.type | "fixed" | Yes | |
programs.partnerOffer.amountCents | number | Yes | |
programs.partnerOffer.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
programs.partnerOffer.orders | number | No | How many of the friend's orders get the incentive. |
programs.partnerOffer.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
programs.partnerOffer.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
programs.partnerOffer.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
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
| Field | Type | Required | Details |
|---|---|---|---|
programs.partnerOffer.orderCategories.include | array | No | |
programs.partnerOffer.orderCategories.exclude | array | No |
placements[]
| Field | Type | Required | Details |
|---|---|---|---|
placements.key | string | Yes | |
placements.programId | string | Yes | |
placements.createdAt | string | Yes | |
placements.updatedAt | string | Yes |
programVersions[]
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.companyId | string | Yes | |
programVersions.programId | string | Yes | |
programVersions.version | number | Yes | |
programVersions.programSnapshot | object | Yes | |
programVersions.changedFields | array | Yes | Top-level program fields that differ from the previous version, such as compensation or friendIncentive. Empty for version 1. |
programVersions.createdAt | string | Yes | When this version took effect. Versions recorded when versioning started use the program's last saved change. |
programVersions.programSnapshot
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.currency | union | Yes | Must match the company currency. |
programVersions.programSnapshot.name | string | Yes | |
programVersions.programSnapshot.kind | union | Yes | |
programVersions.programSnapshot.rewardType | union | Yes | |
programVersions.programSnapshot.attributionWindowDays | union | Yes | Days after a referral that a first purchase, or a milestone, still counts. The latest referral always wins until one qualifies. Only milestone programs may use null, which means the referral never expires. |
programVersions.programSnapshot.active | boolean | Yes | |
programVersions.programSnapshot.orderCategories | object | No | Order categories that earn rewards. Order programs only. The friend incentive has its own orderCategories. Absent means every order can earn. |
programVersions.programSnapshot.compensation | union | No | |
programVersions.programSnapshot.tracking | object | No | Tracking methods are independent of kind. Provider discounts require a connected provider. |
programVersions.programSnapshot.destinationUrl | string | No | The page partner links and QR codes open. A published signup page's destination takes precedence. Without either, partners have no link. |
programVersions.programSnapshot.display | object | No | Optional public name, headline and milestone label for partner and customer screens. |
programVersions.programSnapshot.trigger | union | No | What earns a reward. Defaults to completed orders. |
programVersions.programSnapshot.milestoneRewards | object | No | |
programVersions.programSnapshot.fixedRefundMode | union | No | How fixed rewards change after a partial refund. |
programVersions.programSnapshot.duration | union | No | |
programVersions.programSnapshot.delivery | object | No | Who delivers approved rewards of each type. Defaults to the Grizzlee wallet for both. |
programVersions.programSnapshot.reviewRewards | union | No | When true, new rewards wait as pending until someone approves them. Otherwise they start approved. |
programVersions.programSnapshot.fraudChecks | object | No | Self-referral and other fraud rules. Absent means every rule uses its default. |
programVersions.programSnapshot.performance | object | No | |
programVersions.programSnapshot.limits | object | No | |
programVersions.programSnapshot.customTerms | array | No | |
programVersions.programSnapshot.friendIncentive | union | No | Optional offer for the referred customer. |
programVersions.programSnapshot.partnerOffer | union | No | Offer 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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.orderCategories.include | array | No | |
programVersions.programSnapshot.orderCategories.exclude | array | No |
programVersions.programSnapshot.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.compensation.type | "percentage" | Yes | |
programVersions.programSnapshot.compensation.rateBps | number | Yes | |
programVersions.programSnapshot.compensation.phases | array | No |
programVersions.programSnapshot.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.compensation.phases.rateBps | number | Yes | |
programVersions.programSnapshot.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.compensation.type | "fixed" | Yes | |
programVersions.programSnapshot.compensation.amountCents | number | Yes |
programVersions.programSnapshot.tracking
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.tracking.links | union | No | |
programVersions.programSnapshot.tracking.qrCodes | union | No | |
programVersions.programSnapshot.tracking.attributionCodes | union | No | |
programVersions.programSnapshot.tracking.providerPromoCodes | union | No |
programVersions.programSnapshot.tracking.links
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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.display.en | object | No | |
programVersions.programSnapshot.display.fr-CA | object | No | |
programVersions.programSnapshot.display.hy | object | No | |
programVersions.programSnapshot.display.ru | object | No |
programVersions.programSnapshot.display.en
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.display.en.publicName | string | No | The name partners and customers see. Falls back to the program name. |
programVersions.programSnapshot.display.en.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
programVersions.programSnapshot.display.en.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
programVersions.programSnapshot.display.en.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.display.en.milestoneLabel.one | string | Yes | |
programVersions.programSnapshot.display.en.milestoneLabel.other | string | Yes |
programVersions.programSnapshot.display.fr-CA
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.display.fr-CA.publicName | string | No | The name partners and customers see. Falls back to the program name. |
programVersions.programSnapshot.display.fr-CA.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
programVersions.programSnapshot.display.fr-CA.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
programVersions.programSnapshot.display.fr-CA.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.display.fr-CA.milestoneLabel.one | string | Yes | |
programVersions.programSnapshot.display.fr-CA.milestoneLabel.other | string | Yes |
programVersions.programSnapshot.display.hy
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.display.hy.publicName | string | No | The name partners and customers see. Falls back to the program name. |
programVersions.programSnapshot.display.hy.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
programVersions.programSnapshot.display.hy.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
programVersions.programSnapshot.display.hy.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.display.hy.milestoneLabel.one | string | Yes | |
programVersions.programSnapshot.display.hy.milestoneLabel.other | string | Yes |
programVersions.programSnapshot.display.ru
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.display.ru.publicName | string | No | The name partners and customers see. Falls back to the program name. |
programVersions.programSnapshot.display.ru.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
programVersions.programSnapshot.display.ru.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
programVersions.programSnapshot.display.ru.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.display.ru.milestoneLabel.one | string | Yes | |
programVersions.programSnapshot.display.ru.milestoneLabel.other | string | Yes |
programVersions.programSnapshot.trigger
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.trigger.type | "order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.trigger.type | "milestone" | Yes | |
programVersions.programSnapshot.trigger.milestone | string | Yes |
programVersions.programSnapshot.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.milestoneRewards.eachReport | object | No | |
programVersions.programSnapshot.milestoneRewards.atCount | object | No |
programVersions.programSnapshot.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.milestoneRewards.eachReport.compensation | union | Yes | |
programVersions.programSnapshot.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
programVersions.programSnapshot.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
programVersions.programSnapshot.milestoneRewards.eachReport.compensation.amountCents | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
programVersions.programSnapshot.milestoneRewards.eachReport.compensation.rateBps | number | Yes |
programVersions.programSnapshot.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.milestoneRewards.atCount.amountCents | number | Yes | |
programVersions.programSnapshot.milestoneRewards.atCount.count | number | Yes |
programVersions.programSnapshot.fixedRefundMode
Variant 1
Type: string.
Variant 2
Type: string.
programVersions.programSnapshot.duration
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.duration.type | "only_order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.duration.type | "first_order" | Yes |
Variant 3
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.duration.type | "first_n_orders" | Yes | |
programVersions.programSnapshot.duration.count | number | Yes |
Variant 4
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.duration.type | "days" | Yes | |
programVersions.programSnapshot.duration.days | number | Yes |
Variant 5
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.duration.type | "months" | Yes | |
programVersions.programSnapshot.duration.months | number | Yes |
Variant 6
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.duration.type | "lifetime" | Yes |
programVersions.programSnapshot.delivery
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.delivery.cash | union | No | |
programVersions.programSnapshot.delivery.credit | union | No |
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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.fraudChecks.selfReferral | object | No | |
programVersions.programSnapshot.fraudChecks.duplicateAccounts | object | No | |
programVersions.programSnapshot.fraudChecks.rapidRepeats | object | No | |
programVersions.programSnapshot.fraudChecks.repeatCustomer | object | No | |
programVersions.programSnapshot.fraudChecks.disposableEmail | object | No |
programVersions.programSnapshot.fraudChecks.selfReferral
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.fraudChecks.selfReferral.action | union | No |
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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.fraudChecks.duplicateAccounts.action | union | No | |
programVersions.programSnapshot.fraudChecks.duplicateAccounts.accounts | number | No | Customers sharing one card or device that trigger the rule. This one counts when referred inside the window. |
programVersions.programSnapshot.fraudChecks.duplicateAccounts.windowDays | number | No | |
programVersions.programSnapshot.fraudChecks.duplicateAccounts.ipAccounts | union | No | Customers 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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.fraudChecks.rapidRepeats.action | union | No | |
programVersions.programSnapshot.fraudChecks.rapidRepeats.referrals | number | No | Referrals from one device that trigger the rule. This one counts when referred inside the window. |
programVersions.programSnapshot.fraudChecks.rapidRepeats.windowMinutes | number | No | |
programVersions.programSnapshot.fraudChecks.rapidRepeats.ipReferrals | union | No | Referrals 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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.fraudChecks.repeatCustomer.action | union | No |
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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.fraudChecks.disposableEmail.action | union | No | A 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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.performance.metric | union | Yes | |
programVersions.programSnapshot.performance.tiers | array | Yes | |
programVersions.programSnapshot.performance.windowDays | number | No |
programVersions.programSnapshot.performance.metric
Variant 1
Type: string.
Variant 2
Type: string.
programVersions.programSnapshot.performance.tiers[]
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.performance.tiers.name | string | Yes | |
programVersions.programSnapshot.performance.tiers.minValue | number | Yes | |
programVersions.programSnapshot.performance.tiers.bonusBps | number | Yes |
programVersions.programSnapshot.limits
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.limits.customerCapCents | number | No | |
programVersions.programSnapshot.limits.partnerCapCents | number | No |
programVersions.programSnapshot.customTerms[]
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.target | "partner" | Yes | |
programVersions.programSnapshot.customTerms.targetId | string | Yes | |
programVersions.programSnapshot.customTerms.compensation | union | No | |
programVersions.programSnapshot.customTerms.milestoneRewards | object | No | |
programVersions.programSnapshot.customTerms.customerCapCents | union | No | |
programVersions.programSnapshot.customTerms.partnerCapCents | union | No |
programVersions.programSnapshot.customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.compensation.type | "percentage" | Yes | |
programVersions.programSnapshot.customTerms.compensation.rateBps | number | Yes | |
programVersions.programSnapshot.customTerms.compensation.phases | array | No |
programVersions.programSnapshot.customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.compensation.phases.rateBps | number | Yes | |
programVersions.programSnapshot.customTerms.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.compensation.type | "fixed" | Yes | |
programVersions.programSnapshot.customTerms.compensation.amountCents | number | Yes |
programVersions.programSnapshot.customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.milestoneRewards.eachReport | object | No | |
programVersions.programSnapshot.customTerms.milestoneRewards.atCount | object | No |
programVersions.programSnapshot.customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
programVersions.programSnapshot.customTerms.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
programVersions.programSnapshot.customTerms.milestoneRewards.eachReport.compensation
programVersions.programSnapshot.customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.milestoneRewards.atCount.amountCents | number | Yes | |
programVersions.programSnapshot.customTerms.milestoneRewards.atCount.count | number | Yes |
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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.target | "customer" | Yes | |
programVersions.programSnapshot.customTerms.targetId | string | Yes | |
programVersions.programSnapshot.customTerms.compensation | union | No | |
programVersions.programSnapshot.customTerms.milestoneRewards | object | No | |
programVersions.programSnapshot.customTerms.customerCapCents | union | No |
programVersions.programSnapshot.customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.compensation.type | "percentage" | Yes | |
programVersions.programSnapshot.customTerms.compensation.rateBps | number | Yes | |
programVersions.programSnapshot.customTerms.compensation.phases | array | No |
programVersions.programSnapshot.customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.compensation.phases.rateBps | number | Yes | |
programVersions.programSnapshot.customTerms.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.compensation.type | "fixed" | Yes | |
programVersions.programSnapshot.customTerms.compensation.amountCents | number | Yes |
programVersions.programSnapshot.customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.milestoneRewards.eachReport | object | No | |
programVersions.programSnapshot.customTerms.milestoneRewards.atCount | object | No |
programVersions.programSnapshot.customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
programVersions.programSnapshot.customTerms.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
programVersions.programSnapshot.customTerms.milestoneRewards.eachReport.compensation
programVersions.programSnapshot.customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.customTerms.milestoneRewards.atCount.amountCents | number | Yes | |
programVersions.programSnapshot.customTerms.milestoneRewards.atCount.count | number | Yes |
programVersions.programSnapshot.customTerms.customerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
programVersions.programSnapshot.friendIncentive
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.friendIncentive.type | "percent" | Yes | |
programVersions.programSnapshot.friendIncentive.rateBps | number | Yes | |
programVersions.programSnapshot.friendIncentive.maxDiscountCents | number | No | Largest discount for one order. |
programVersions.programSnapshot.friendIncentive.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
programVersions.programSnapshot.friendIncentive.orders | number | No | How many of the friend's orders get the incentive. |
programVersions.programSnapshot.friendIncentive.newCustomersOnly | union | No | true: use the merchant's newCustomer answer, or recorded purchases when omitted. false: returning customers qualify too. A supplied answer uses the order limit after the referral. |
programVersions.programSnapshot.friendIncentive.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
programVersions.programSnapshot.friendIncentive.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
programVersions.programSnapshot.friendIncentive.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.friendIncentive.orderCategories.include | array | No | |
programVersions.programSnapshot.friendIncentive.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.friendIncentive.type | "fixed" | Yes | |
programVersions.programSnapshot.friendIncentive.amountCents | number | Yes | |
programVersions.programSnapshot.friendIncentive.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
programVersions.programSnapshot.friendIncentive.orders | number | No | How many of the friend's orders get the incentive. |
programVersions.programSnapshot.friendIncentive.newCustomersOnly | union | No | true: use the merchant's newCustomer answer, or recorded purchases when omitted. false: returning customers qualify too. A supplied answer uses the order limit after the referral. |
programVersions.programSnapshot.friendIncentive.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
programVersions.programSnapshot.friendIncentive.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
programVersions.programSnapshot.friendIncentive.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.friendIncentive.orderCategories.include | array | No | |
programVersions.programSnapshot.friendIncentive.orderCategories.exclude | array | No |
programVersions.programSnapshot.partnerOffer
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.partnerOffer.type | "percent" | Yes | |
programVersions.programSnapshot.partnerOffer.rateBps | number | Yes | |
programVersions.programSnapshot.partnerOffer.maxDiscountCents | number | No | Largest discount for one order. |
programVersions.programSnapshot.partnerOffer.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
programVersions.programSnapshot.partnerOffer.orders | number | No | How many of the friend's orders get the incentive. |
programVersions.programSnapshot.partnerOffer.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
programVersions.programSnapshot.partnerOffer.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
programVersions.programSnapshot.partnerOffer.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.partnerOffer.orderCategories.include | array | No | |
programVersions.programSnapshot.partnerOffer.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.partnerOffer.type | "fixed" | Yes | |
programVersions.programSnapshot.partnerOffer.amountCents | number | Yes | |
programVersions.programSnapshot.partnerOffer.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
programVersions.programSnapshot.partnerOffer.orders | number | No | How many of the friend's orders get the incentive. |
programVersions.programSnapshot.partnerOffer.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
programVersions.programSnapshot.partnerOffer.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
programVersions.programSnapshot.partnerOffer.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
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
| Field | Type | Required | Details |
|---|---|---|---|
programVersions.programSnapshot.partnerOffer.orderCategories.include | array | No | |
programVersions.programSnapshot.partnerOffer.orderCategories.exclude | array | No |
programPages[]
| Field | Type | Required | Details |
|---|---|---|---|
programPages.programId | string | Yes | |
programPages.destination | string | Yes |
partners[]
| Field | Type | Required | Details |
|---|---|---|---|
partners.programIds | array | Yes | |
partners.id | string | Yes | |
partners.companyId | string | Yes | |
partners.referralCode | string | Yes | |
partners.alias | string | Yes | The 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.active | boolean | Yes | |
partners.createdAt | string | Yes | |
partners.erasedAt | string | No | When 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.email | string | Yes | |
partners.name | string | Yes | |
partners.externalId | string | Yes | |
partners.customerIds | array | No | Merchant customer IDs belonging to this partner. Supplied lists replace the links. |
partners.labels | array | No | |
partners.properties | object | No | |
partners.stripeAccountId | union | No | The 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.locale | union | No | The 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[]
| Field | Type | Required | Details |
|---|---|---|---|
attributions.id | string | Yes | |
attributions.companyId | string | Yes | |
attributions.partnerId | string | Yes | |
attributions.qualifiedAt | string | No | |
attributions.qualifiedOrderNumber | number | No | |
attributions.programId | string | Yes | |
attributions.referralCode | string | Yes | |
attributions.customerId | string | Yes | |
attributions.occurredAt | string | Yes | |
attributions.channel | union | Yes | |
attributions.providerPromoCodeId | string | No | |
attributions.customerDisplayName | string | No | |
attributions.orderId | string | No |
attributions.channel
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
orders[]
| Field | Type | Required | Details |
|---|---|---|---|
orders.companyId | string | Yes | |
orders.customerOrderNumber | number | Yes | Grizzlee's count of the customer's purchases, including this one. Never renumbered. |
orders.reportedCustomerOrderNumber | number | No | The merchant's customerOrderNumber when it disagreed with Grizzlee's. |
orders.decisions | array | Yes | |
orders.rewarded | boolean | Yes | |
orders.refundedTotalCents | number | Yes | |
orders.refundedCommissionableCents | number | Yes | |
orders.fullyRefunded | union | No | |
orders.lastRefundAt | string | No | occurredAt of the latest refund event applied to this order. Older refund events are ignored. |
orders.incentiveFlag | object | No | Present when incentiveAppliedCents did not match the referral's friend incentive. |
orders.adjustedTotalCents | number | No | The reporting total after the latest adjustment. totalCents keeps the completed value. |
orders.adjustedCommissionableCents | number | No | The commissionable amount after the latest adjustment. commissionableCents keeps the completed value. |
orders.lastAdjustedAt | string | No | occurredAt of the latest adjustment applied to this order. Older adjustments are ignored. |
orders.adjustments | array | No | Every applied adjustment, oldest first. |
orders.referralSelection | object | No | |
orders.type | "order.completed" | Yes | |
orders.customerId | string | Yes | |
orders.orderId | string | Yes | |
orders.occurredAt | string | Yes | |
orders.eventId | string | Yes | |
orders.commissionableCents | number | Yes | Merchant-selected amount for percentage rewards and fixed-reward refund proration. |
orders.currency | union | Yes | |
orders.customerDisplayName | string | No | |
orders.newCustomer | union | No | The merchant's answer from its own order history. Omitted, Grizzlee uses recorded purchases. |
orders.categories | array | No | The 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.totalCents | number | No | What the customer paid. Used only for reporting. |
orders.customerEmail | string | No | |
orders.incentiveAppliedCents | number | No | Friend 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[]
| Field | Type | Required | Details |
|---|---|---|---|
orders.decisions.programId | string | Yes | |
orders.decisions.programName | string | Yes | |
orders.decisions.partnerId | string | No | |
orders.decisions.outcome | union | Yes | |
orders.decisions.reason | string | Yes | |
orders.decisions.reasonParts | array | No | reason as codes. Absent on decisions made before codes existed. |
orders.decisions.amountCents | number | Yes | |
orders.decisions.selfReferral | object | No | Present when the customer's identity signals matched the partner's. blocked comes with a skipped outcome. review comes with a reward held as pending. flagged comes with a reward that follows the program's usual approval. |
orders.decisions.fraud | object | No | Present when fraud rules fired. blocked comes with a skipped outcome. review comes with a reward held as pending. flagged comes with a reward that follows the program's usual approval. |
orders.decisions.milestoneCount | number | No | Milestone decisions that reached the count check: the person's reports that count for this program, at or after the referral and not reversed, this report included. |
orders.decisions.milestoneThreshold | number | No | The effective bonus count, or 1 for each-report-only programs. |
orders.decisions.outcome
Variant 1
Type: string.
Variant 2
Type: string.
orders.decisions.reasonParts[]
| Field | Type | Required | Details |
|---|---|---|---|
orders.decisions.reasonParts.code | union | Yes | |
orders.decisions.reasonParts.params | object | No |
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
| Field | Type | Required | Details |
|---|---|---|---|
orders.decisions.selfReferral.action | union | Yes | |
orders.decisions.selfReferral.signals | array | Yes |
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
| Field | Type | Required | Details |
|---|---|---|---|
orders.decisions.fraud.action | union | Yes | |
orders.decisions.fraud.rules | array | Yes |
orders.decisions.fraud.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
orders.decisions.fraud.rules[]
| Field | Type | Required | Details |
|---|---|---|---|
orders.decisions.fraud.rules.action | union | Yes | |
orders.decisions.fraud.rules.rule | union | Yes | |
orders.decisions.fraud.rules.signals | array | Yes | Matching signal types, never values. Empty for disposable_email. |
orders.decisions.fraud.rules.count | number | No | Customers 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
| Field | Type | Required | Details |
|---|---|---|---|
orders.incentiveFlag.reason | union | Yes | |
orders.incentiveFlag.rewardId | string | No | |
orders.incentiveFlag.programId | string | No | Program of the reservation or referral checked. Absent for no_referral. |
orders.incentiveFlag.reservationId | string | No | The reservation sent with the order, when there was one. |
orders.incentiveFlag.maxCents | union | Yes | Largest discount the terms allow on one order. Null when they set no cap or there are no terms. |
orders.incentiveFlag.reportedCents | number | Yes | incentiveAppliedCents 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[]
| Field | Type | Required | Details |
|---|---|---|---|
orders.adjustments.eventId | string | Yes | |
orders.adjustments.totalCents | number | No | |
orders.adjustments.previousTotalCents | number | No | |
orders.adjustments.commissionableCents | number | No | |
orders.adjustments.previousCommissionableCents | number | No | |
orders.adjustments.reason | string | No | |
orders.adjustments.occurredAt | string | Yes | |
orders.adjustments.rewardChangeCents | number | Yes | Signed change to the value of the order's rewards. |
orders.referralSelection
| Field | Type | Required | Details |
|---|---|---|---|
orders.referralSelection.winner | union | Yes | |
orders.referralSelection.skipped | array | Yes |
orders.referralSelection.winner
Variant 1
Type: null.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
orders.referralSelection.winner.programId | string | Yes | |
orders.referralSelection.winner.partnerId | string | Yes | |
orders.referralSelection.winner.occurredAt | string | Yes | |
orders.referralSelection.winner.type | union | No | |
orders.referralSelection.winner.providerPromoCodeId | string | No | |
orders.referralSelection.winner.index | number | No | Absent when the customer's recorded attribution is retained. |
orders.referralSelection.winner.type
Variant 1
Type: string.
Variant 2
Type: string.
orders.referralSelection.skipped[]
| Field | Type | Required | Details |
|---|---|---|---|
orders.referralSelection.skipped.index | number | Yes | |
orders.referralSelection.skipped.reason | union | Yes |
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[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.id | string | Yes | |
rewards.companyId | string | Yes | |
rewards.orderId | string | No | The order that earned the reward. Absent on milestone rewards. |
rewards.milestone | string | No | The milestone that earned the reward. Absent on order rewards. Exactly one of the two is set. |
rewards.reportEventId | string | No | Each-report rewards name their source. Absent on at-count bonuses. |
rewards.milestoneReportReversed | union | No | |
rewards.valueCents | number | No | |
rewards.milestoneCount | number | No | Milestone rewards: the person's reports of the milestone that count for this program now, those at or after the referral minus reversed ones. Grizzlee updates it with every report, reversal, revocation and reinstatement for the person and milestone. Absent on rewards no milestone event has touched since milestones were counted. |
rewards.milestoneRevoked | union | No | Milestone rewards: true while the milestone is revoked for the person. Updated with milestoneCount. Absent when not revoked, and on rewards no milestone event has touched since milestones were counted. |
rewards.programId | string | Yes | |
rewards.partnerId | string | Yes | |
rewards.customerId | string | Yes | |
rewards.currency | union | Yes | |
rewards.rewardType | union | Yes | |
rewards.offer | object | No | Offer rewards only. Terms copied when earned. Later program edits leave them alone. |
rewards.originalCents | number | Yes | What the reward earned when it was created. Never changes. |
rewards.adjustedCents | number | No | Signed total that order adjustments added to or removed from originalCents. Absent until the order is adjusted. The reward is worth originalCents + adjustedCents - reversedCents. |
rewards.reversedCents | number | Yes | Reversed by refunds, a rejection or a milestone revocation. |
rewards.status | union | Yes | |
rewards.selfReferral | object | No | Present when the customer's identity signals matched the partner's. With action review the reward started pending and waits for someone to approve or reject it, and automatic approval skips it. With action flagged it follows the program's usual approval. |
rewards.fraud | object | No | Present when fraud rules fired. rules lists each rule ID with its signal types, never values. With action review the reward started pending, waits for someone to approve or reject it, and automatic approval skips it. With action flagged it follows the program's usual approval. |
rewards.rejectedAt | string | No | When someone rejected the pending reward. A rejected reward is reversed for good. |
rewards.rejectionReason | string | No | Why it was rejected, as entered. |
rewards.statusBeforeReversal | union | No | Status the reward had when a refund fully reversed it. A later restoration returns it to this status. |
rewards.deliveryMode | union | No | Delivery mode when earned. Absent on older money rewards, which use the Grizzlee wallet. Absent on offer rewards. Readers ignore delivery for offers. |
rewards.createdAt | string | Yes | |
rewards.availableAt | string | Yes | Rewards no longer have a hold, so new rewards use createdAt. Older rewards keep their original date. |
rewards.programSnapshot | object | Yes | |
rewards.programVersion | number | No | The program version the reward was earned under. Absent on rewards earned before programs had versions. programSnapshot holds their rules either way. |
rewards.historicalBasis | "total" | No | Historical subtotal rewards keep their reporting-total basis for refunds and adjustments. |
rewards.basisCents | number | No | |
rewards.explanation | string | Yes | |
rewards.explanationParts | array | No | explanation as codes. Absent on rewards earned before codes existed. |
rewards.calculation | object | No |
rewards.milestoneReportReversed
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.milestoneRevoked
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.currency
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.rewardType
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.offer
| Field | Type | Required | Details |
|---|---|---|---|
rewards.offer.terms | union | Yes | |
rewards.offer.expiresAt | union | Yes |
rewards.offer.terms
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.offer.terms.type | "percent" | Yes | |
rewards.offer.terms.rateBps | number | Yes | |
rewards.offer.terms.orders | number | Yes | How many of the friend's orders get the incentive. |
rewards.offer.terms.expiresAfterDays | union | Yes | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.offer.terms.returnOnFullRefund | boolean | Yes | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.offer.terms.maxDiscountCents | number | No | Largest discount for one order. |
rewards.offer.terms.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.offer.terms.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.offer.terms.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.offer.terms.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.offer.terms.orderCategories.include | array | No | |
rewards.offer.terms.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.offer.terms.type | "fixed" | Yes | |
rewards.offer.terms.orders | number | Yes | How many of the friend's orders get the incentive. |
rewards.offer.terms.expiresAfterDays | union | Yes | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.offer.terms.returnOnFullRefund | boolean | Yes | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.offer.terms.amountCents | number | Yes | |
rewards.offer.terms.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.offer.terms.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.offer.terms.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.offer.terms.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.offer.terms.orderCategories.include | array | No | |
rewards.offer.terms.orderCategories.exclude | array | No |
rewards.offer.expiresAt
Variant 1
Type: null.
Variant 2
Type: string.
rewards.status
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.selfReferral
| Field | Type | Required | Details |
|---|---|---|---|
rewards.selfReferral.action | union | Yes | |
rewards.selfReferral.signals | array | Yes |
rewards.selfReferral.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.selfReferral.signals[]
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
Variant 6
Type: string.
rewards.fraud
| Field | Type | Required | Details |
|---|---|---|---|
rewards.fraud.action | union | Yes | |
rewards.fraud.rules | array | Yes |
rewards.fraud.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.fraud.rules[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.fraud.rules.action | union | Yes | |
rewards.fraud.rules.rule | union | Yes | |
rewards.fraud.rules.signals | array | Yes | Matching signal types, never values. Empty for disposable_email. |
rewards.fraud.rules.count | number | No | Customers counted, this one included when referred inside the window. Velocity rules only. |
rewards.fraud.rules.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.fraud.rules.rule
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.fraud.rules.signals[]
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
rewards.statusBeforeReversal
Variant 1
Type: string.
Variant 2
Type: string.
rewards.deliveryMode
Variant 1
Type: string.
Variant 2
Type: string.
rewards.programSnapshot
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.currency | union | Yes | Must match the company currency. |
rewards.programSnapshot.name | string | Yes | |
rewards.programSnapshot.kind | union | Yes | |
rewards.programSnapshot.rewardType | union | Yes | |
rewards.programSnapshot.attributionWindowDays | union | Yes | Days after a referral that a first purchase, or a milestone, still counts. The latest referral always wins until one qualifies. Only milestone programs may use null, which means the referral never expires. |
rewards.programSnapshot.active | boolean | Yes | |
rewards.programSnapshot.orderCategories | object | No | Order categories that earn rewards. Order programs only. The friend incentive has its own orderCategories. Absent means every order can earn. |
rewards.programSnapshot.compensation | union | No | |
rewards.programSnapshot.tracking | object | No | Tracking methods are independent of kind. Provider discounts require a connected provider. |
rewards.programSnapshot.destinationUrl | string | No | The page partner links and QR codes open. A published signup page's destination takes precedence. Without either, partners have no link. |
rewards.programSnapshot.display | object | No | Optional public name, headline and milestone label for partner and customer screens. |
rewards.programSnapshot.trigger | union | No | What earns a reward. Defaults to completed orders. |
rewards.programSnapshot.milestoneRewards | object | No | |
rewards.programSnapshot.fixedRefundMode | union | No | How fixed rewards change after a partial refund. |
rewards.programSnapshot.duration | union | No | |
rewards.programSnapshot.delivery | object | No | Who delivers approved rewards of each type. Defaults to the Grizzlee wallet for both. |
rewards.programSnapshot.reviewRewards | union | No | When true, new rewards wait as pending until someone approves them. Otherwise they start approved. |
rewards.programSnapshot.fraudChecks | object | No | Self-referral and other fraud rules. Absent means every rule uses its default. |
rewards.programSnapshot.performance | object | No | |
rewards.programSnapshot.limits | object | No | |
rewards.programSnapshot.customTerms | array | No | |
rewards.programSnapshot.friendIncentive | union | No | Optional offer for the referred customer. |
rewards.programSnapshot.partnerOffer | union | No | Offer programs only. What the partner earns per qualifying referred order. |
rewards.programSnapshot.currency
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.programSnapshot.kind
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.programSnapshot.rewardType
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.programSnapshot.attributionWindowDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.orderCategories.include | array | No | |
rewards.programSnapshot.orderCategories.exclude | array | No |
rewards.programSnapshot.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.compensation.type | "percentage" | Yes | |
rewards.programSnapshot.compensation.rateBps | number | Yes | |
rewards.programSnapshot.compensation.phases | array | No |
rewards.programSnapshot.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.compensation.phases.rateBps | number | Yes | |
rewards.programSnapshot.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.compensation.type | "fixed" | Yes | |
rewards.programSnapshot.compensation.amountCents | number | Yes |
rewards.programSnapshot.tracking
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.tracking.links | union | No | |
rewards.programSnapshot.tracking.qrCodes | union | No | |
rewards.programSnapshot.tracking.attributionCodes | union | No | |
rewards.programSnapshot.tracking.providerPromoCodes | union | No |
rewards.programSnapshot.tracking.links
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.tracking.qrCodes
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.tracking.attributionCodes
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.tracking.providerPromoCodes
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.display
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.en | object | No | |
rewards.programSnapshot.display.fr-CA | object | No | |
rewards.programSnapshot.display.hy | object | No | |
rewards.programSnapshot.display.ru | object | No |
rewards.programSnapshot.display.en
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.en.publicName | string | No | The name partners and customers see. Falls back to the program name. |
rewards.programSnapshot.display.en.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
rewards.programSnapshot.display.en.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
rewards.programSnapshot.display.en.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.en.milestoneLabel.one | string | Yes | |
rewards.programSnapshot.display.en.milestoneLabel.other | string | Yes |
rewards.programSnapshot.display.fr-CA
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.fr-CA.publicName | string | No | The name partners and customers see. Falls back to the program name. |
rewards.programSnapshot.display.fr-CA.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
rewards.programSnapshot.display.fr-CA.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
rewards.programSnapshot.display.fr-CA.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.fr-CA.milestoneLabel.one | string | Yes | |
rewards.programSnapshot.display.fr-CA.milestoneLabel.other | string | Yes |
rewards.programSnapshot.display.hy
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.hy.publicName | string | No | The name partners and customers see. Falls back to the program name. |
rewards.programSnapshot.display.hy.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
rewards.programSnapshot.display.hy.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
rewards.programSnapshot.display.hy.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.hy.milestoneLabel.one | string | Yes | |
rewards.programSnapshot.display.hy.milestoneLabel.other | string | Yes |
rewards.programSnapshot.display.ru
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.ru.publicName | string | No | The name partners and customers see. Falls back to the program name. |
rewards.programSnapshot.display.ru.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
rewards.programSnapshot.display.ru.milestoneLabel | object | No | Milestone programs only. What one report counts, such as one: "lesson", other: "lessons". In Russian, other is the genitive plural, such as "уроков", which reward terms put after "число". |
rewards.programSnapshot.display.ru.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.display.ru.milestoneLabel.one | string | Yes | |
rewards.programSnapshot.display.ru.milestoneLabel.other | string | Yes |
rewards.programSnapshot.trigger
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.trigger.type | "order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.trigger.type | "milestone" | Yes | |
rewards.programSnapshot.trigger.milestone | string | Yes |
rewards.programSnapshot.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.milestoneRewards.eachReport | object | No | |
rewards.programSnapshot.milestoneRewards.atCount | object | No |
rewards.programSnapshot.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.milestoneRewards.eachReport.compensation | union | Yes | |
rewards.programSnapshot.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
rewards.programSnapshot.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
rewards.programSnapshot.milestoneRewards.eachReport.compensation.amountCents | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
rewards.programSnapshot.milestoneRewards.eachReport.compensation.rateBps | number | Yes |
rewards.programSnapshot.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.milestoneRewards.atCount.amountCents | number | Yes | |
rewards.programSnapshot.milestoneRewards.atCount.count | number | Yes |
rewards.programSnapshot.fixedRefundMode
Variant 1
Type: string.
Variant 2
Type: string.
rewards.programSnapshot.duration
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "only_order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "first_order" | Yes |
Variant 3
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "first_n_orders" | Yes | |
rewards.programSnapshot.duration.count | number | Yes |
Variant 4
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "days" | Yes | |
rewards.programSnapshot.duration.days | number | Yes |
Variant 5
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "months" | Yes | |
rewards.programSnapshot.duration.months | number | Yes |
Variant 6
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.duration.type | "lifetime" | Yes |
rewards.programSnapshot.delivery
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.delivery.cash | union | No | |
rewards.programSnapshot.delivery.credit | union | No |
rewards.programSnapshot.delivery.cash
Variant 1
Type: string.
Variant 2
Type: string.
rewards.programSnapshot.delivery.credit
Variant 1
Type: string.
Variant 2
Type: string.
rewards.programSnapshot.reviewRewards
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.fraudChecks
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.selfReferral | object | No | |
rewards.programSnapshot.fraudChecks.duplicateAccounts | object | No | |
rewards.programSnapshot.fraudChecks.rapidRepeats | object | No | |
rewards.programSnapshot.fraudChecks.repeatCustomer | object | No | |
rewards.programSnapshot.fraudChecks.disposableEmail | object | No |
rewards.programSnapshot.fraudChecks.selfReferral
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.selfReferral.action | union | No |
rewards.programSnapshot.fraudChecks.selfReferral.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.programSnapshot.fraudChecks.duplicateAccounts
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.duplicateAccounts.action | union | No | |
rewards.programSnapshot.fraudChecks.duplicateAccounts.accounts | number | No | Customers sharing one card or device that trigger the rule. This one counts when referred inside the window. |
rewards.programSnapshot.fraudChecks.duplicateAccounts.windowDays | number | No | |
rewards.programSnapshot.fraudChecks.duplicateAccounts.ipAccounts | union | No | Customers sharing one IP address that trigger the rule. null leaves IP addresses out. |
rewards.programSnapshot.fraudChecks.duplicateAccounts.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.programSnapshot.fraudChecks.duplicateAccounts.ipAccounts
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.fraudChecks.rapidRepeats
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.rapidRepeats.action | union | No | |
rewards.programSnapshot.fraudChecks.rapidRepeats.referrals | number | No | Referrals from one device that trigger the rule. This one counts when referred inside the window. |
rewards.programSnapshot.fraudChecks.rapidRepeats.windowMinutes | number | No | |
rewards.programSnapshot.fraudChecks.rapidRepeats.ipReferrals | union | No | Referrals from one IP address that trigger the rule. null leaves IP addresses out. |
rewards.programSnapshot.fraudChecks.rapidRepeats.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.programSnapshot.fraudChecks.rapidRepeats.ipReferrals
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.fraudChecks.repeatCustomer
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.repeatCustomer.action | union | No |
rewards.programSnapshot.fraudChecks.repeatCustomer.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
rewards.programSnapshot.fraudChecks.disposableEmail
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.fraudChecks.disposableEmail.action | union | No | A disposable address does not show a second person, so this rule cannot block. |
rewards.programSnapshot.fraudChecks.disposableEmail.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewards.programSnapshot.performance
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.performance.metric | union | Yes | |
rewards.programSnapshot.performance.tiers | array | Yes | |
rewards.programSnapshot.performance.windowDays | number | No |
rewards.programSnapshot.performance.metric
Variant 1
Type: string.
Variant 2
Type: string.
rewards.programSnapshot.performance.tiers[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.performance.tiers.name | string | Yes | |
rewards.programSnapshot.performance.tiers.minValue | number | Yes | |
rewards.programSnapshot.performance.tiers.bonusBps | number | Yes |
rewards.programSnapshot.limits
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.limits.customerCapCents | number | No | |
rewards.programSnapshot.limits.partnerCapCents | number | No |
rewards.programSnapshot.customTerms[]
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.target | "partner" | Yes | |
rewards.programSnapshot.customTerms.targetId | string | Yes | |
rewards.programSnapshot.customTerms.compensation | union | No | |
rewards.programSnapshot.customTerms.milestoneRewards | object | No | |
rewards.programSnapshot.customTerms.customerCapCents | union | No | |
rewards.programSnapshot.customTerms.partnerCapCents | union | No |
rewards.programSnapshot.customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.type | "percentage" | Yes | |
rewards.programSnapshot.customTerms.compensation.rateBps | number | Yes | |
rewards.programSnapshot.customTerms.compensation.phases | array | No |
rewards.programSnapshot.customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.phases.rateBps | number | Yes | |
rewards.programSnapshot.customTerms.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.type | "fixed" | Yes | |
rewards.programSnapshot.customTerms.compensation.amountCents | number | Yes |
rewards.programSnapshot.customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.eachReport | object | No | |
rewards.programSnapshot.customTerms.milestoneRewards.atCount | object | No |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensation
rewards.programSnapshot.customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.atCount.amountCents | number | Yes | |
rewards.programSnapshot.customTerms.milestoneRewards.atCount.count | number | Yes |
rewards.programSnapshot.customTerms.customerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.customTerms.partnerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.target | "customer" | Yes | |
rewards.programSnapshot.customTerms.targetId | string | Yes | |
rewards.programSnapshot.customTerms.compensation | union | No | |
rewards.programSnapshot.customTerms.milestoneRewards | object | No | |
rewards.programSnapshot.customTerms.customerCapCents | union | No |
rewards.programSnapshot.customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.type | "percentage" | Yes | |
rewards.programSnapshot.customTerms.compensation.rateBps | number | Yes | |
rewards.programSnapshot.customTerms.compensation.phases | array | No |
rewards.programSnapshot.customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.phases.rateBps | number | Yes | |
rewards.programSnapshot.customTerms.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.compensation.type | "fixed" | Yes | |
rewards.programSnapshot.customTerms.compensation.amountCents | number | Yes |
rewards.programSnapshot.customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.eachReport | object | No | |
rewards.programSnapshot.customTerms.milestoneRewards.atCount | object | No |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
rewards.programSnapshot.customTerms.milestoneRewards.eachReport.compensation
rewards.programSnapshot.customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.customTerms.milestoneRewards.atCount.amountCents | number | Yes | |
rewards.programSnapshot.customTerms.milestoneRewards.atCount.count | number | Yes |
rewards.programSnapshot.customTerms.customerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.friendIncentive
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.friendIncentive.type | "percent" | Yes | |
rewards.programSnapshot.friendIncentive.rateBps | number | Yes | |
rewards.programSnapshot.friendIncentive.maxDiscountCents | number | No | Largest discount for one order. |
rewards.programSnapshot.friendIncentive.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.programSnapshot.friendIncentive.orders | number | No | How many of the friend's orders get the incentive. |
rewards.programSnapshot.friendIncentive.newCustomersOnly | union | No | true: use the merchant's newCustomer answer, or recorded purchases when omitted. false: returning customers qualify too. A supplied answer uses the order limit after the referral. |
rewards.programSnapshot.friendIncentive.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.programSnapshot.friendIncentive.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.programSnapshot.friendIncentive.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.programSnapshot.friendIncentive.newCustomersOnly
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.friendIncentive.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.friendIncentive.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.friendIncentive.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.friendIncentive.orderCategories.include | array | No | |
rewards.programSnapshot.friendIncentive.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.friendIncentive.type | "fixed" | Yes | |
rewards.programSnapshot.friendIncentive.amountCents | number | Yes | |
rewards.programSnapshot.friendIncentive.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.programSnapshot.friendIncentive.orders | number | No | How many of the friend's orders get the incentive. |
rewards.programSnapshot.friendIncentive.newCustomersOnly | union | No | true: use the merchant's newCustomer answer, or recorded purchases when omitted. false: returning customers qualify too. A supplied answer uses the order limit after the referral. |
rewards.programSnapshot.friendIncentive.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.programSnapshot.friendIncentive.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.programSnapshot.friendIncentive.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.programSnapshot.friendIncentive.newCustomersOnly
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.friendIncentive.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.friendIncentive.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.friendIncentive.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.friendIncentive.orderCategories.include | array | No | |
rewards.programSnapshot.friendIncentive.orderCategories.exclude | array | No |
rewards.programSnapshot.partnerOffer
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.partnerOffer.type | "percent" | Yes | |
rewards.programSnapshot.partnerOffer.rateBps | number | Yes | |
rewards.programSnapshot.partnerOffer.maxDiscountCents | number | No | Largest discount for one order. |
rewards.programSnapshot.partnerOffer.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.programSnapshot.partnerOffer.orders | number | No | How many of the friend's orders get the incentive. |
rewards.programSnapshot.partnerOffer.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.programSnapshot.partnerOffer.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.programSnapshot.partnerOffer.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.programSnapshot.partnerOffer.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.partnerOffer.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.partnerOffer.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.partnerOffer.orderCategories.include | array | No | |
rewards.programSnapshot.partnerOffer.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.partnerOffer.type | "fixed" | Yes | |
rewards.programSnapshot.partnerOffer.amountCents | number | Yes | |
rewards.programSnapshot.partnerOffer.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
rewards.programSnapshot.partnerOffer.orders | number | No | How many of the friend's orders get the incentive. |
rewards.programSnapshot.partnerOffer.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
rewards.programSnapshot.partnerOffer.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
rewards.programSnapshot.partnerOffer.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
rewards.programSnapshot.partnerOffer.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
rewards.programSnapshot.partnerOffer.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
rewards.programSnapshot.partnerOffer.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
rewards.programSnapshot.partnerOffer.orderCategories.include | array | No | |
rewards.programSnapshot.partnerOffer.orderCategories.exclude | array | No |
rewards.explanationParts[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.explanationParts.code | union | Yes | |
rewards.explanationParts.params | object | No |
rewards.explanationParts.code
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
Variant 5
Type: string.
Variant 6
Type: string.
Variant 7
Type: string.
Variant 8
Type: string.
Variant 9
Type: string.
Variant 10
Type: string.
Variant 11
Type: string.
rewards.explanationParts.params
Type: object.
rewards.calculation
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.compensation | union | Yes | |
rewards.calculation.milestoneRewards | object | No | |
rewards.calculation.fixedRefundMode | union | No | Saved for fixed reward refunds. Older rewards default to prorate. |
rewards.calculation.phaseAfterMonths | number | No | |
rewards.calculation.tier | object | No | |
rewards.calculation.customTerms | object | No | |
rewards.calculation.uncappedCents | number | Yes | |
rewards.calculation.customerCapCents | number | No | |
rewards.calculation.partnerCapCents | number | No |
rewards.calculation.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.compensation.type | "percentage" | Yes | |
rewards.calculation.compensation.rateBps | number | Yes | |
rewards.calculation.compensation.phases | array | No |
rewards.calculation.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.compensation.phases.rateBps | number | Yes | |
rewards.calculation.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.compensation.type | "fixed" | Yes | |
rewards.calculation.compensation.amountCents | number | Yes |
rewards.calculation.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.milestoneRewards.eachReport | object | No | |
rewards.calculation.milestoneRewards.atCount | object | No |
rewards.calculation.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.milestoneRewards.eachReport.compensation | union | Yes | |
rewards.calculation.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
rewards.calculation.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
rewards.calculation.milestoneRewards.eachReport.compensation.amountCents | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
rewards.calculation.milestoneRewards.eachReport.compensation.rateBps | number | Yes |
rewards.calculation.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.milestoneRewards.atCount.amountCents | number | Yes | |
rewards.calculation.milestoneRewards.atCount.count | number | Yes |
rewards.calculation.fixedRefundMode
Variant 1
Type: string.
Variant 2
Type: string.
rewards.calculation.tier
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.tier.name | string | Yes | |
rewards.calculation.tier.minValue | number | Yes | |
rewards.calculation.tier.bonusBps | number | Yes | |
rewards.calculation.tier.value | number | Yes |
rewards.calculation.customTerms
| Field | Type | Required | Details |
|---|---|---|---|
rewards.calculation.customTerms.target | union | Yes | |
rewards.calculation.customTerms.targetId | string | Yes |
rewards.calculation.customTerms.target
Variant 1
Type: string.
Variant 2
Type: string.
ledger[]
| Field | Type | Required | Details |
|---|---|---|---|
ledger.id | string | Yes | |
ledger.companyId | string | Yes | |
ledger.rewardId | string | Yes | |
ledger.eventId | string | Yes | |
ledger.kind | union | Yes | earned 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.amountCents | number | Yes | |
ledger.currency | union | Yes | |
ledger.createdAt | string | Yes |
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[]
| Field | Type | Required | Details |
|---|---|---|---|
audit.id | string | Yes | |
audit.companyId | string | Yes | |
audit.entityId | string | Yes | |
audit.action | string | Yes | |
audit.detail | string | Yes | |
audit.createdAt | string | Yes |
deliveries[]
| Field | Type | Required | Details |
|---|---|---|---|
deliveries.id | string | Yes | |
deliveries.companyId | string | Yes | |
deliveries.rewardId | string | Yes | |
deliveries.partnerId | string | Yes | |
deliveries.status | union | Yes | |
deliveries.externalReference | string | No | New attempts require a reference. Older failures may have none. |
deliveries.amountCents | number | Yes | Gross amount delivered, amount owed for a failure, or cash returned by a transfer reversal. |
deliveries.currency | union | Yes | |
deliveries.rewardType | union | Yes | |
deliveries.deliveredAt | string | No | Present when delivered. |
deliveries.failureReason | string | No | Present when failed. |
deliveries.nettedDebtCents | number | No | Present when a delivery settled part of the partner's earlier delivery debt. |
deliveries.payoutId | string | No | Present when a paid merchant payout recorded this delivery. |
deliveries.reversalOfId | string | No | Original delivery this append-only transfer reversal reduces. |
deliveries.createdAt | string | Yes |
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[]
| Field | Type | Required | Details |
|---|---|---|---|
reservations.id | string | Yes | |
reservations.companyId | string | Yes | |
reservations.orderId | string | No | The placed order. Absent only on historical quote holds released by migration. |
reservations.customerId | string | Yes | |
reservations.programId | string | Yes | |
reservations.partnerId | string | Yes | |
reservations.status | union | Yes | |
reservations.terms | union | Yes | Terms when the reservation was made. Later program edits leave them alone. |
reservations.incentiveKind | union | No | Absent on historical friend holds. |
reservations.rewardId | string | No | |
reservations.programVersion | number | No | The program version the terms come from. Absent on reservations made before programs had versions. |
reservations.currency | union | Yes | |
reservations.incentiveExpiresAt | union | Yes | When the offer itself stops applying. Earned holds keep the reward's offer expiry. Null when it never expires. |
reservations.referredAt | string | Yes | Earned holds use the reward's createdAt, when the offer was earned. |
reservations.customerOrderNumber | number | Yes | The purchase number Grizzlee expected for the order when it reserved. |
reservations.newCustomer | union | No | The merchant's answer when this hold was made. Omitted, eligibility used recorded purchases. |
reservations.baseCents | number | No | |
reservations.suggestedDiscountCents | number | No | |
reservations.categories | array | No | The categories the order sent when it reserved. The order's own categories are checked again when it completes. |
reservations.createdAt | string | Yes | |
reservations.updatedAt | string | Yes | |
reservations.referralSelection | object | No |
reservations.status
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
reservations.terms
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
reservations.terms.type | "percent" | Yes | |
reservations.terms.rateBps | number | Yes | |
reservations.terms.orders | number | Yes | How many of the friend's orders get the incentive. |
reservations.terms.newCustomersOnly | boolean | Yes | true: use the merchant's newCustomer answer, or recorded purchases when omitted. false: returning customers qualify too. A supplied answer uses the order limit after the referral. |
reservations.terms.expiresAfterDays | union | Yes | Days after the referral was captured, claimed or entered. null means it never expires. |
reservations.terms.returnOnFullRefund | boolean | Yes | true: a full refund gives the use back, so the customer can get the offer again. |
reservations.terms.maxDiscountCents | number | No | Largest discount for one order. |
reservations.terms.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
reservations.terms.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
reservations.terms.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
reservations.terms.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
reservations.terms.orderCategories.include | array | No | |
reservations.terms.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
reservations.terms.type | "fixed" | Yes | |
reservations.terms.orders | number | Yes | How many of the friend's orders get the incentive. |
reservations.terms.newCustomersOnly | boolean | Yes | true: use the merchant's newCustomer answer, or recorded purchases when omitted. false: returning customers qualify too. A supplied answer uses the order limit after the referral. |
reservations.terms.expiresAfterDays | union | Yes | Days after the referral was captured, claimed or entered. null means it never expires. |
reservations.terms.returnOnFullRefund | boolean | Yes | true: a full refund gives the use back, so the customer can get the offer again. |
reservations.terms.amountCents | number | Yes | |
reservations.terms.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
reservations.terms.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
reservations.terms.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
reservations.terms.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
reservations.terms.orderCategories.include | array | No | |
reservations.terms.orderCategories.exclude | array | No |
Variant 3
| Field | Type | Required | Details |
|---|---|---|---|
reservations.terms.type | "percent" | Yes | |
reservations.terms.rateBps | number | Yes | |
reservations.terms.orders | number | Yes | How many of the friend's orders get the incentive. |
reservations.terms.expiresAfterDays | union | Yes | Days after the referral was captured, claimed or entered. null means it never expires. |
reservations.terms.returnOnFullRefund | boolean | Yes | true: a full refund gives the use back, so the customer can get the offer again. |
reservations.terms.maxDiscountCents | number | No | Largest discount for one order. |
reservations.terms.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
reservations.terms.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
reservations.terms.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
reservations.terms.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
reservations.terms.orderCategories.include | array | No | |
reservations.terms.orderCategories.exclude | array | No |
Variant 4
| Field | Type | Required | Details |
|---|---|---|---|
reservations.terms.type | "fixed" | Yes | |
reservations.terms.orders | number | Yes | How many of the friend's orders get the incentive. |
reservations.terms.expiresAfterDays | union | Yes | Days after the referral was captured, claimed or entered. null means it never expires. |
reservations.terms.returnOnFullRefund | boolean | Yes | true: a full refund gives the use back, so the customer can get the offer again. |
reservations.terms.amountCents | number | Yes | |
reservations.terms.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
reservations.terms.orderCategories | object | No | Order categories that get the discount. Checked apart from the program's own orderCategories, which decide rewards. Absent means every order qualifies. |
reservations.terms.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
reservations.terms.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
reservations.terms.orderCategories.include | array | No | |
reservations.terms.orderCategories.exclude | array | No |
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
| Field | Type | Required | Details |
|---|---|---|---|
reservations.referralSelection.winner | union | Yes | |
reservations.referralSelection.skipped | array | Yes |
reservations.referralSelection.winner
Variant 1
Type: null.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
reservations.referralSelection.winner.programId | string | Yes | |
reservations.referralSelection.winner.partnerId | string | Yes | |
reservations.referralSelection.winner.occurredAt | string | Yes | |
reservations.referralSelection.winner.type | union | No | |
reservations.referralSelection.winner.providerPromoCodeId | string | No | |
reservations.referralSelection.winner.index | number | No | Absent when the customer's recorded attribution is retained. |
reservations.referralSelection.winner.type
Variant 1
Type: string.
Variant 2
Type: string.
reservations.referralSelection.skipped[]
| Field | Type | Required | Details |
|---|---|---|---|
reservations.referralSelection.skipped.index | number | Yes | |
reservations.referralSelection.skipped.reason | union | Yes |
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
| Field | Type | Required | Details |
|---|---|---|---|
pagination.number | number | Yes | |
pagination.size | number | Yes | |
pagination.hasNext | boolean | Yes | |
pagination.partnersHasNext | union | No | |
pagination.rewardsHasNext | union | No | |
pagination.partnerIds | array | Yes |
pagination.partnersHasNext
Variant 1
Type: boolean.
Variant 2
Type: boolean.
pagination.rewardsHasNext
Variant 1
Type: boolean.
Variant 2
Type: boolean.
report
| Field | Type | Required | Details |
|---|---|---|---|
report.rewardedOrders | number | Yes | |
report.reportedOrders | number | Yes | |
report.purchaseRevenueCents | number | Yes | |
report.earningsCents | number | Yes | |
report.pendingCents | number | Yes | |
report.activePartners | number | Yes | |
report.partnersTotal | number | Yes | |
report.rewardsTotal | number | Yes | |
report.filteredRewardsTotal | number | No | |
report.pendingRewards | number | Yes | |
report.heldRewards | number | No | Pending rewards a self-referral match or fraud rule held for a person to approve or reject. |
report.daily | array | Yes | |
report.partners | object | Yes | |
report.programs | object | Yes | |
report.leaders | array | No |
report.daily[]
| Field | Type | Required | Details |
|---|---|---|---|
report.daily.day | string | Yes | |
report.daily.purchaseRevenueCents | number | Yes | |
report.daily.unreportedOrders | number | Yes |
report.partners
Type: object.
report.programs
Type: object.
report.leaders[]
| Field | Type | Required | Details |
|---|---|---|---|
report.leaders.partner | object | Yes | |
report.leaders.earningsCents | number | Yes | |
report.leaders.rewardedOrders | number | Yes |
report.leaders.partner
| Field | Type | Required | Details |
|---|---|---|---|
report.leaders.partner.name | string | Yes | |
report.leaders.partner.labels | array | No | |
report.leaders.partner.id | string | Yes |
usage
| Field | Type | Required | Details |
|---|---|---|---|
usage.rewardedTransactions | number | Yes | Rewarded orders plus rewarded milestone reports recorded this month. |
usage.rewardedMilestones | number | No | The part of rewardedTransactions that came from milestone reports. |
usage.estimatedFeeUsd | string | Yes | |
usage.month | string | Yes |
Response schema
{
"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.