HTTP endpoints
createProgram
POST /api/v1/programs
Requires programs:write. Keep the Bearer key on your server.
SDK
grizzlee.createProgram(input: { name: string; kind: "referral" | "affiliate" | "both"; rewardType: "offer" | "cash" | "credit"; attributionWindowDays: number | null; active: boolean; orderCategories?: { include?: string[] | undefined; exclude?: string[] | undefined; } | undefined; compensation?: { type: "percentage"; rateBps: number; phases?: { rateBps: number; afterMonths: number; }[] | undefined; } | { type: "fixed"; amountCents: number; } | undefined; currency?: "CAD" | "USD" | "EUR" | "GBP" | undefined; tracking?: { links?: boolean | undefined; qrCodes?: boolean | undefined; attributionCodes?: boolean | undefined; providerPromoCodes?: boolean | undefined; } | undefined; destinationUrl?: string | undefined; display?: { en?: { publicName?: string | undefined; headline?: string | undefined; milestoneLabel?: { one: string; other: string; } | undefined; } | undefined; "fr-CA"?: { publicName?: string | undefined; headline?: string | undefined; milestoneLabel?: { one: string; other: string; } | undefined; } | undefined; hy?: { publicName?: string | undefined; headline?: string | undefined; milestoneLabel?: { one: string; other: string; } | undefined; } | undefined; ru?: { publicName?: string | undefined; headline?: string | undefined; milestoneLabel?: { one: string; other: string; } | undefined; } | undefined; } | undefined; trigger?: { type: "order"; } | { type: "milestone"; milestone: string; } | undefined; milestoneRewards?: { eachReport?: { compensation: { type: "fixed"; amountCents: number; } | { type: "percentage"; rateBps: number; }; limit?: number | undefined; } | undefined; atCount?: { amountCents: number; count: number; } | undefined; } | undefined; fixedRefundMode?: "prorate" | "full_refund_only" | undefined; duration?: { type: "only_order"; } | { type: "first_order"; } | { type: "first_n_orders"; count: number; } | { type: "days"; days: number; } | { type: "months"; months: number; } | { type: "lifetime"; } | undefined; delivery?: { cash?: "grizzlee_wallet" | "merchant" | undefined; credit?: "grizzlee_wallet" | "merchant" | undefined; } | undefined; reviewRewards?: boolean | undefined; fraudChecks?: { selfReferral?: { action?: "review" | "block" | "flag" | "off" | undefined; } | undefined; duplicateAccounts?: { action?: "review" | "block" | "flag" | "off" | undefined; accounts?: number | undefined; windowDays?: number | undefined; ipAccounts?: number | null | undefined; } | undefined; rapidRepeats?: { action?: "review" | "block" | "flag" | "off" | undefined; referrals?: number | undefined; windowMinutes?: number | undefined; ipReferrals?: number | null | undefined; } | undefined; repeatCustomer?: { action?: "review" | "block" | "flag" | "off" | undefined; } | undefined; disposableEmail?: { action?: "review" | "flag" | "off" | undefined; } | undefined; } | undefined; performance?: { metric: "orders" | "new_customers"; tiers: { name: string; minValue: number; bonusBps: number; }[]; windowDays?: number | undefined; } | undefined; limits?: { customerCapCents?: number | undefined; partnerCapCents?: number | undefined; } | undefined; customTerms?: ({ target: "partner"; targetId: string; compensation?: { type: "percentage"; rateBps: number; phases?: { rateBps: number; afterMonths: number; }[] | undefined; } | { type: "fixed"; amountCents: number; } | undefined; milestoneRewards?: { eachReport?: { compensation: { type: "fixed"; amountCents: number; } | { type: "percentage"; rateBps: number; }; limit?: number | undefined; } | undefined; atCount?: { amountCents: number; count: number; } | undefined; } | undefined; customerCapCents?: number | null | undefined; partnerCapCents?: number | null | undefined; } | { target: "customer"; targetId: string; compensation?: { type: "percentage"; rateBps: number; phases?: { rateBps: number; afterMonths: number; }[] | undefined; } | { type: "fixed"; amountCents: number; } | undefined; milestoneRewards?: { eachReport?: { compensation: { type: "fixed"; amountCents: number; } | { type: "percentage"; rateBps: number; }; limit?: number | undefined; } | undefined; atCount?: { amountCents: number; count: number; } | undefined; } | undefined; customerCapCents?: number | null | undefined; })[] | undefined; friendIncentive?: { type: "percent"; rateBps: number; maxDiscountCents?: number | undefined; minOrderCents?: number | undefined; orders?: number | undefined; newCustomersOnly?: boolean | undefined; expiresAfterDays?: number | null | undefined; returnOnFullRefund?: boolean | undefined; orderCategories?: { include?: string[] | undefined; exclude?: string[] | undefined; } | undefined; } | { type: "fixed"; amountCents: number; minOrderCents?: number | undefined; orders?: number | undefined; newCustomersOnly?: boolean | undefined; expiresAfterDays?: number | null | undefined; returnOnFullRefund?: boolean | undefined; orderCategories?: { include?: string[] | undefined; exclude?: string[] | undefined; } | undefined; } | undefined; partnerOffer?: { type: "percent"; rateBps: number; maxDiscountCents?: number | undefined; minOrderCents?: number | undefined; orders?: number | undefined; expiresAfterDays?: number | null | undefined; returnOnFullRefund?: boolean | undefined; orderCategories?: { include?: string[] | undefined; exclude?: string[] | undefined; } | undefined; } | { type: "fixed"; amountCents: number; minOrderCents?: number | undefined; orders?: number | undefined; expiresAfterDays?: number | null | undefined; returnOnFullRefund?: boolean | undefined; orderCategories?: { include?: string[] | undefined; exclude?: string[] | undefined; } | undefined; } | undefined; }): Promise<Program>HTTP
Use your backend's HTTP client. The cURL request shows the wire format. Replace path parameters and example values.
curl --fail-with-body --request POST \
'https://app.grizzlee.ca/api/v1/programs' \
-H "Authorization: Bearer $GRIZZLEE_SERVER_KEY" \
-H 'Content-Type: application/json' \
--data '{"name":"Example referral program","kind":"referral","trigger":{"type":"order"},"rewardType":"cash","attributionWindowDays":1,"active":true,"compensation":{"type":"fixed","amountCents":1000},"duration":{"type":"first_order"}}'Request body
| Field | Type | Required | Details |
|---|---|---|---|
name | string | Yes | |
kind | "referral", "affiliate", "both" | Yes | |
tracking | object | No | default {} |
currency | "CAD", "USD", "EUR", "GBP" | No | |
destinationUrl | string | No | uri |
display | object | No | |
trigger | union | No | default {"type":"order"} |
compensation | union | No | |
milestoneRewards | object | No | |
fixedRefundMode | "prorate", "full_refund_only" | No | default "prorate" |
duration | union | No | |
rewardType | "cash", "credit", "offer" | Yes | |
delivery | object | No | default {} |
attributionWindowDays | union | Yes | |
reviewRewards | boolean | No | |
fraudChecks | object | No | |
active | boolean | Yes | |
performance | object | No | |
limits | object | No | |
customTerms | array | No | |
friendIncentive | union | No | |
partnerOffer | union | No | |
orderCategories | object | No |
tracking
| Field | Type | Required | Details |
|---|---|---|---|
tracking.links | boolean | No | default true |
tracking.qrCodes | boolean | No | default true |
tracking.attributionCodes | boolean | No | default true |
tracking.providerPromoCodes | boolean | No | default false |
display
| Field | Type | Required | Details |
|---|---|---|---|
display.en | object | No | |
display.fr-CA | object | No | |
display.hy | object | No | |
display.ru | object | No |
display.en
| Field | Type | Required | Details |
|---|---|---|---|
display.en.publicName | string | No | |
display.en.headline | string | No | |
display.en.milestoneLabel | object | No |
display.en.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
display.en.milestoneLabel.one | string | Yes | |
display.en.milestoneLabel.other | string | Yes |
display.fr-CA
| Field | Type | Required | Details |
|---|---|---|---|
display.fr-CA.publicName | string | No | |
display.fr-CA.headline | string | No | |
display.fr-CA.milestoneLabel | object | No |
display.fr-CA.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
display.fr-CA.milestoneLabel.one | string | Yes | |
display.fr-CA.milestoneLabel.other | string | Yes |
display.hy
| Field | Type | Required | Details |
|---|---|---|---|
display.hy.publicName | string | No | |
display.hy.headline | string | No | |
display.hy.milestoneLabel | object | No |
display.hy.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
display.hy.milestoneLabel.one | string | Yes | |
display.hy.milestoneLabel.other | string | Yes |
display.ru
| Field | Type | Required | Details |
|---|---|---|---|
display.ru.publicName | string | No | |
display.ru.headline | string | No | |
display.ru.milestoneLabel | object | No |
display.ru.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
display.ru.milestoneLabel.one | string | Yes | |
display.ru.milestoneLabel.other | string | Yes |
trigger
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
trigger.type | "order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
trigger.type | "milestone" | Yes | |
trigger.milestone | string | Yes |
compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
compensation.type | "percentage" | Yes | |
compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
compensation.phases | array | No |
compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
compensation.phases.afterMonths | integer | Yes | minimum 1. maximum 1200 |
compensation.phases.rateBps | integer | Yes | minimum 0. maximum 10000 |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
compensation.type | "fixed" | Yes | |
compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
milestoneRewards.eachReport | object | No | |
milestoneRewards.atCount | object | No |
milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
milestoneRewards.eachReport.compensation | union | Yes | |
milestoneRewards.eachReport.limit | integer | No | minimum 1. maximum 10000 |
milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
milestoneRewards.eachReport.compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
milestoneRewards.eachReport.compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
milestoneRewards.atCount.count | integer | Yes | minimum 1. maximum 10000 |
milestoneRewards.atCount.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
duration
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "only_order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "first_order" | Yes |
Variant 3
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "first_n_orders" | Yes | |
duration.count | integer | Yes | minimum 1. maximum 10000 |
Variant 4
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "days" | Yes | |
duration.days | integer | Yes | minimum 1. maximum 36500 |
Variant 5
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "months" | Yes | |
duration.months | integer | Yes | minimum 1. maximum 1200 |
Variant 6
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "lifetime" | Yes |
delivery
| Field | Type | Required | Details |
|---|---|---|---|
delivery.cash | "grizzlee_wallet", "merchant" | No | default "grizzlee_wallet" |
delivery.credit | "grizzlee_wallet", "merchant" | No | default "grizzlee_wallet" |
attributionWindowDays
Variant 1
Type: integer.
Variant 2
Type: null.
fraudChecks
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.selfReferral | object | No | default {} |
fraudChecks.duplicateAccounts | object | No | default {} |
fraudChecks.rapidRepeats | object | No | default {} |
fraudChecks.repeatCustomer | object | No | default {} |
fraudChecks.disposableEmail | object | No | default {} |
fraudChecks.selfReferral
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.selfReferral.action | "block", "review", "flag", "off" | No | default "block" |
fraudChecks.duplicateAccounts
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.duplicateAccounts.action | "block", "review", "flag", "off" | No | default "flag" |
fraudChecks.duplicateAccounts.accounts | integer | No | minimum 2. maximum 200. default 3 |
fraudChecks.duplicateAccounts.windowDays | integer | No | minimum 1. maximum 365. default 30 |
fraudChecks.duplicateAccounts.ipAccounts | union | No | default null |
fraudChecks.duplicateAccounts.ipAccounts
Variant 1
Type: integer.
Variant 2
Type: null.
fraudChecks.rapidRepeats
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.rapidRepeats.action | "block", "review", "flag", "off" | No | default "flag" |
fraudChecks.rapidRepeats.referrals | integer | No | minimum 2. maximum 200. default 3 |
fraudChecks.rapidRepeats.windowMinutes | integer | No | minimum 1. maximum 10080. default 60 |
fraudChecks.rapidRepeats.ipReferrals | union | No | default null |
fraudChecks.rapidRepeats.ipReferrals
Variant 1
Type: integer.
Variant 2
Type: null.
fraudChecks.repeatCustomer
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.repeatCustomer.action | "block", "review", "flag", "off" | No | default "flag" |
fraudChecks.disposableEmail
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.disposableEmail.action | "review", "flag", "off" | No | default "flag" |
performance
| Field | Type | Required | Details |
|---|---|---|---|
performance.metric | "new_customers", "orders" | Yes | |
performance.windowDays | integer | No | minimum 1. maximum 3650 |
performance.tiers | array | Yes |
performance.tiers[]
| Field | Type | Required | Details |
|---|---|---|---|
performance.tiers.name | string | Yes | |
performance.tiers.minValue | integer | Yes | minimum 1. maximum 1000000 |
performance.tiers.bonusBps | integer | Yes | minimum 0. maximum 10000 |
limits
| Field | Type | Required | Details |
|---|---|---|---|
limits.customerCapCents | integer | No | minimum 0. maximum 1000000000000 |
limits.partnerCapCents | integer | No | minimum 0. maximum 1000000000000 |
customTerms[]
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.target | "partner" | Yes | |
customTerms.targetId | string | Yes | |
customTerms.compensation | union | No | |
customTerms.milestoneRewards | object | No | |
customTerms.customerCapCents | union | No | |
customTerms.partnerCapCents | union | No |
customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.type | "percentage" | Yes | |
customTerms.compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
customTerms.compensation.phases | array | No |
customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.phases.afterMonths | integer | Yes | minimum 1. maximum 1200 |
customTerms.compensation.phases.rateBps | integer | Yes | minimum 0. maximum 10000 |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.type | "fixed" | Yes | |
customTerms.compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport | object | No | |
customTerms.milestoneRewards.atCount | object | No |
customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
customTerms.milestoneRewards.eachReport.limit | integer | No | minimum 1. maximum 10000 |
customTerms.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
customTerms.milestoneRewards.eachReport.compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
customTerms.milestoneRewards.eachReport.compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.atCount.count | integer | Yes | minimum 1. maximum 10000 |
customTerms.milestoneRewards.atCount.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
customTerms.customerCapCents
Variant 1
Type: integer.
Variant 2
Type: null.
customTerms.partnerCapCents
Variant 1
Type: integer.
Variant 2
Type: null.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.target | "customer" | Yes | |
customTerms.targetId | string | Yes | |
customTerms.compensation | union | No | |
customTerms.milestoneRewards | object | No | |
customTerms.customerCapCents | union | No |
customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.type | "percentage" | Yes | |
customTerms.compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
customTerms.compensation.phases | array | No |
customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.phases.afterMonths | integer | Yes | minimum 1. maximum 1200 |
customTerms.compensation.phases.rateBps | integer | Yes | minimum 0. maximum 10000 |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.type | "fixed" | Yes | |
customTerms.compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport | object | No | |
customTerms.milestoneRewards.atCount | object | No |
customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
customTerms.milestoneRewards.eachReport.limit | integer | No | minimum 1. maximum 10000 |
customTerms.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
customTerms.milestoneRewards.eachReport.compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
customTerms.milestoneRewards.eachReport.compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.atCount.count | integer | Yes | minimum 1. maximum 10000 |
customTerms.milestoneRewards.atCount.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
customTerms.customerCapCents
Variant 1
Type: integer.
Variant 2
Type: null.
friendIncentive
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
friendIncentive.type | "percent" | Yes | |
friendIncentive.rateBps | integer | Yes | minimum 1. maximum 10000 |
friendIncentive.maxDiscountCents | integer | No | minimum 0. maximum 1000000000000 |
friendIncentive.minOrderCents | integer | No | minimum 0. maximum 1000000000000 |
friendIncentive.orders | integer | No | minimum 1. maximum 1000. default 1 |
friendIncentive.newCustomersOnly | boolean | No | default true |
friendIncentive.expiresAfterDays | union | No | default null |
friendIncentive.returnOnFullRefund | boolean | No | default false |
friendIncentive.orderCategories | object | No |
friendIncentive.expiresAfterDays
Variant 1
Type: integer.
Variant 2
Type: null.
friendIncentive.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
friendIncentive.orderCategories.include | array | No | |
friendIncentive.orderCategories.exclude | array | No |
friendIncentive.orderCategories.include[]
Type: string.
Type: string.
friendIncentive.orderCategories.exclude[]
Type: string.
Type: string.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
friendIncentive.type | "fixed" | Yes | |
friendIncentive.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
friendIncentive.minOrderCents | integer | No | minimum 0. maximum 1000000000000 |
friendIncentive.orders | integer | No | minimum 1. maximum 1000. default 1 |
friendIncentive.newCustomersOnly | boolean | No | default true |
friendIncentive.expiresAfterDays | union | No | default null |
friendIncentive.returnOnFullRefund | boolean | No | default false |
friendIncentive.orderCategories | object | No |
friendIncentive.expiresAfterDays
Variant 1
Type: integer.
Variant 2
Type: null.
friendIncentive.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
friendIncentive.orderCategories.include | array | No | |
friendIncentive.orderCategories.exclude | array | No |
friendIncentive.orderCategories.include[]
Type: string.
Type: string.
friendIncentive.orderCategories.exclude[]
Type: string.
Type: string.
partnerOffer
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
partnerOffer.type | "percent" | Yes | |
partnerOffer.rateBps | integer | Yes | minimum 1. maximum 10000 |
partnerOffer.maxDiscountCents | integer | No | minimum 0. maximum 1000000000000 |
partnerOffer.minOrderCents | integer | No | minimum 0. maximum 1000000000000 |
partnerOffer.orders | integer | No | minimum 1. maximum 1000. default 1 |
partnerOffer.expiresAfterDays | union | No | default null |
partnerOffer.returnOnFullRefund | boolean | No | default false |
partnerOffer.orderCategories | object | No |
partnerOffer.expiresAfterDays
Variant 1
Type: integer.
Variant 2
Type: null.
partnerOffer.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
partnerOffer.orderCategories.include | array | No | |
partnerOffer.orderCategories.exclude | array | No |
partnerOffer.orderCategories.include[]
Type: string.
Type: string.
partnerOffer.orderCategories.exclude[]
Type: string.
Type: string.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
partnerOffer.type | "fixed" | Yes | |
partnerOffer.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
partnerOffer.minOrderCents | integer | No | minimum 0. maximum 1000000000000 |
partnerOffer.orders | integer | No | minimum 1. maximum 1000. default 1 |
partnerOffer.expiresAfterDays | union | No | default null |
partnerOffer.returnOnFullRefund | boolean | No | default false |
partnerOffer.orderCategories | object | No |
partnerOffer.expiresAfterDays
Variant 1
Type: integer.
Variant 2
Type: null.
partnerOffer.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
partnerOffer.orderCategories.include | array | No | |
partnerOffer.orderCategories.exclude | array | No |
partnerOffer.orderCategories.include[]
Type: string.
Type: string.
partnerOffer.orderCategories.exclude[]
Type: string.
Type: string.
orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
orderCategories.include | array | No | |
orderCategories.exclude | array | No |
orderCategories.include[]
Type: string.
Type: string.
orderCategories.exclude[]
Type: string.
Type: string.
Request schema
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 100
},
"kind": {
"type": "string",
"enum": [
"referral",
"affiliate",
"both"
]
},
"tracking": {
"type": "object",
"properties": {
"links": {
"type": "boolean",
"default": true
},
"qrCodes": {
"type": "boolean",
"default": true
},
"attributionCodes": {
"type": "boolean",
"default": true
},
"providerPromoCodes": {
"type": "boolean",
"default": false
}
},
"additionalProperties": false,
"default": {}
},
"currency": {
"type": "string",
"enum": [
"CAD",
"USD",
"EUR",
"GBP"
]
},
"destinationUrl": {
"type": "string",
"maxLength": 2000,
"format": "uri"
},
"display": {
"type": "object",
"properties": {
"en": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"headline": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"other": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"required": [
"one",
"other"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"fr-CA": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"headline": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"other": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"required": [
"one",
"other"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"hy": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"headline": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"other": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"required": [
"one",
"other"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"ru": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"headline": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"other": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"required": [
"one",
"other"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "order"
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "milestone"
},
"milestone": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,79}$"
}
},
"required": [
"type",
"milestone"
],
"additionalProperties": false
}
],
"default": {
"type": "order"
}
},
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"afterMonths": {
"type": "integer",
"minimum": 1,
"maximum": 1200
},
"rateBps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"afterMonths",
"rateBps"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 12
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
}
]
},
"milestoneRewards": {
"type": "object",
"properties": {
"eachReport": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
}
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"compensation"
],
"additionalProperties": false
},
"atCount": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"count",
"amountCents"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"fixedRefundMode": {
"type": "string",
"enum": [
"prorate",
"full_refund_only"
],
"default": "prorate"
},
"duration": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "only_order"
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "first_order"
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "first_n_orders"
},
"count": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"type",
"count"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "days"
},
"days": {
"type": "integer",
"minimum": 1,
"maximum": 36500
}
},
"required": [
"type",
"days"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "months"
},
"months": {
"type": "integer",
"minimum": 1,
"maximum": 1200
}
},
"required": [
"type",
"months"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "lifetime"
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
},
"rewardType": {
"type": "string",
"enum": [
"cash",
"credit",
"offer"
]
},
"delivery": {
"type": "object",
"properties": {
"cash": {
"type": "string",
"enum": [
"grizzlee_wallet",
"merchant"
],
"default": "grizzlee_wallet"
},
"credit": {
"type": "string",
"enum": [
"grizzlee_wallet",
"merchant"
],
"default": "grizzlee_wallet"
}
},
"additionalProperties": false,
"default": {}
},
"attributionWindowDays": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 365
},
{
"type": "null"
}
]
},
"reviewRewards": {
"type": "boolean"
},
"fraudChecks": {
"type": "object",
"properties": {
"selfReferral": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"block",
"review",
"flag",
"off"
],
"default": "block"
}
},
"additionalProperties": false,
"default": {}
},
"duplicateAccounts": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"block",
"review",
"flag",
"off"
],
"default": "flag"
},
"accounts": {
"type": "integer",
"minimum": 2,
"maximum": 200,
"default": 3
},
"windowDays": {
"type": "integer",
"minimum": 1,
"maximum": 365,
"default": 30
},
"ipAccounts": {
"anyOf": [
{
"type": "integer",
"minimum": 2,
"maximum": 200
},
{
"type": "null"
}
],
"default": null
}
},
"additionalProperties": false,
"default": {}
},
"rapidRepeats": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"block",
"review",
"flag",
"off"
],
"default": "flag"
},
"referrals": {
"type": "integer",
"minimum": 2,
"maximum": 200,
"default": 3
},
"windowMinutes": {
"type": "integer",
"minimum": 1,
"maximum": 10080,
"default": 60
},
"ipReferrals": {
"anyOf": [
{
"type": "integer",
"minimum": 2,
"maximum": 200
},
{
"type": "null"
}
],
"default": null
}
},
"additionalProperties": false,
"default": {}
},
"repeatCustomer": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"block",
"review",
"flag",
"off"
],
"default": "flag"
}
},
"additionalProperties": false,
"default": {}
},
"disposableEmail": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"review",
"flag",
"off"
],
"default": "flag"
}
},
"additionalProperties": false,
"default": {}
}
},
"additionalProperties": false
},
"active": {
"type": "boolean"
},
"performance": {
"type": "object",
"properties": {
"metric": {
"type": "string",
"enum": [
"new_customers",
"orders"
]
},
"windowDays": {
"type": "integer",
"minimum": 1,
"maximum": 3650
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"minValue": {
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
"bonusBps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"name",
"minValue",
"bonusBps"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 10
}
},
"required": [
"metric",
"tiers"
],
"additionalProperties": false
},
"limits": {
"type": "object",
"properties": {
"customerCapCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"partnerCapCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"additionalProperties": false
},
"customTerms": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"target": {
"type": "string",
"const": "partner"
},
"targetId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"afterMonths": {
"type": "integer",
"minimum": 1,
"maximum": 1200
},
"rateBps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"afterMonths",
"rateBps"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 12
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
}
]
},
"milestoneRewards": {
"type": "object",
"properties": {
"eachReport": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
}
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"compensation"
],
"additionalProperties": false
},
"atCount": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"count",
"amountCents"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"customerCapCents": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
{
"type": "null"
}
]
},
"partnerCapCents": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
{
"type": "null"
}
]
}
},
"required": [
"target",
"targetId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"target": {
"type": "string",
"const": "customer"
},
"targetId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"afterMonths": {
"type": "integer",
"minimum": 1,
"maximum": 1200
},
"rateBps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"afterMonths",
"rateBps"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 12
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
}
]
},
"milestoneRewards": {
"type": "object",
"properties": {
"eachReport": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
}
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"compensation"
],
"additionalProperties": false
},
"atCount": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"count",
"amountCents"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"customerCapCents": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
{
"type": "null"
}
]
}
},
"required": [
"target",
"targetId"
],
"additionalProperties": false
}
]
},
"minItems": 1,
"maxItems": 100
},
"friendIncentive": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percent"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"maxDiscountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"minOrderCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"orders": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"default": 1
},
"newCustomersOnly": {
"type": "boolean",
"default": true
},
"expiresAfterDays": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 3650
},
{
"type": "null"
}
],
"default": null
},
"returnOnFullRefund": {
"type": "boolean",
"default": false
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,39}$"
}
]
},
"minItems": 1,
"maxItems": 50
},
"exclude": {
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,39}$"
}
]
},
"minItems": 1,
"maxItems": 50
}
},
"additionalProperties": false
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"minOrderCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"orders": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"default": 1
},
"newCustomersOnly": {
"type": "boolean",
"default": true
},
"expiresAfterDays": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 3650
},
{
"type": "null"
}
],
"default": null
},
"returnOnFullRefund": {
"type": "boolean",
"default": false
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,39}$"
}
]
},
"minItems": 1,
"maxItems": 50
},
"exclude": {
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,39}$"
}
]
},
"minItems": 1,
"maxItems": 50
}
},
"additionalProperties": false
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
}
]
},
"partnerOffer": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percent"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"maxDiscountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"minOrderCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"orders": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"default": 1
},
"expiresAfterDays": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 3650
},
{
"type": "null"
}
],
"default": null
},
"returnOnFullRefund": {
"type": "boolean",
"default": false
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,39}$"
}
]
},
"minItems": 1,
"maxItems": 50
},
"exclude": {
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,39}$"
}
]
},
"minItems": 1,
"maxItems": 50
}
},
"additionalProperties": false
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"minOrderCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"orders": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"default": 1
},
"expiresAfterDays": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 3650
},
{
"type": "null"
}
],
"default": null
},
"returnOnFullRefund": {
"type": "boolean",
"default": false
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,39}$"
}
]
},
"minItems": 1,
"maxItems": 50
},
"exclude": {
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,39}$"
}
]
},
"minItems": 1,
"maxItems": 50
}
},
"additionalProperties": false
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
}
]
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,39}$"
}
]
},
"minItems": 1,
"maxItems": 50
},
"exclude": {
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"type": "string",
"pattern": "^[a-z0-9][a-z0-9_-]{0,39}$"
}
]
},
"minItems": 1,
"maxItems": 50
}
},
"additionalProperties": false
}
},
"required": [
"name",
"kind",
"rewardType",
"attributionWindowDays",
"active"
],
"additionalProperties": false
}Response
HTTP responses wrap this value in data. The SDK returns the value directly unless the note above describes a wrapper.
| Field | Type | Required | Details |
|---|---|---|---|
id | string | Yes | |
companyId | string | Yes | |
createdAt | string | Yes | |
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. |
updatedAt | string | Yes | Last saved change, including renames. |
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. |
currency | union | Yes | Must match the company currency. |
name | string | Yes | |
kind | union | Yes | |
rewardType | union | Yes | |
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. |
active | boolean | Yes | |
orderCategories | object | No | Order categories that earn rewards. Order programs only. The friend incentive has its own orderCategories. Absent means every order can earn. |
compensation | union | No | |
tracking | object | No | Tracking methods are independent of kind. Provider discounts require a connected provider. |
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. |
display | object | No | Optional public name, headline and milestone label for partner and customer screens. |
trigger | union | No | What earns a reward. Defaults to completed orders. |
milestoneRewards | object | No | |
fixedRefundMode | union | No | How fixed rewards change after a partial refund. |
duration | union | No | |
delivery | object | No | Who delivers approved rewards of each type. Defaults to the Grizzlee wallet for both. |
reviewRewards | union | No | When true, new rewards wait as pending until someone approves them. Otherwise they start approved. |
fraudChecks | object | No | Self-referral and other fraud rules. Absent means every rule uses its default. |
performance | object | No | |
limits | object | No | |
customTerms | array | No | |
friendIncentive | union | No | Optional offer for the referred customer. |
partnerOffer | union | No | Offer programs only. What the partner earns per qualifying referred order. |
currency
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
kind
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
rewardType
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
attributionWindowDays
Variant 1
Type: null.
Variant 2
Type: number.
orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
orderCategories.include | array | No | |
orderCategories.exclude | array | No |
compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
compensation.type | "percentage" | Yes | |
compensation.rateBps | number | Yes | |
compensation.phases | array | No |
compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
compensation.phases.rateBps | number | Yes | |
compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
compensation.type | "fixed" | Yes | |
compensation.amountCents | number | Yes |
tracking
| Field | Type | Required | Details |
|---|---|---|---|
tracking.links | union | No | |
tracking.qrCodes | union | No | |
tracking.attributionCodes | union | No | |
tracking.providerPromoCodes | union | No |
tracking.links
Variant 1
Type: boolean.
Variant 2
Type: boolean.
tracking.qrCodes
Variant 1
Type: boolean.
Variant 2
Type: boolean.
tracking.attributionCodes
Variant 1
Type: boolean.
Variant 2
Type: boolean.
tracking.providerPromoCodes
Variant 1
Type: boolean.
Variant 2
Type: boolean.
display
| Field | Type | Required | Details |
|---|---|---|---|
display.en | object | No | |
display.fr-CA | object | No | |
display.hy | object | No | |
display.ru | object | No |
display.en
| Field | Type | Required | Details |
|---|---|---|---|
display.en.publicName | string | No | The name partners and customers see. Falls back to the program name. |
display.en.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
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 "число". |
display.en.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
display.en.milestoneLabel.one | string | Yes | |
display.en.milestoneLabel.other | string | Yes |
display.fr-CA
| Field | Type | Required | Details |
|---|---|---|---|
display.fr-CA.publicName | string | No | The name partners and customers see. Falls back to the program name. |
display.fr-CA.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
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 "число". |
display.fr-CA.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
display.fr-CA.milestoneLabel.one | string | Yes | |
display.fr-CA.milestoneLabel.other | string | Yes |
display.hy
| Field | Type | Required | Details |
|---|---|---|---|
display.hy.publicName | string | No | The name partners and customers see. Falls back to the program name. |
display.hy.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
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 "число". |
display.hy.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
display.hy.milestoneLabel.one | string | Yes | |
display.hy.milestoneLabel.other | string | Yes |
display.ru
| Field | Type | Required | Details |
|---|---|---|---|
display.ru.publicName | string | No | The name partners and customers see. Falls back to the program name. |
display.ru.headline | string | No | Replaces the generated headline, such as "Give 20%, get $10". |
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 "число". |
display.ru.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
display.ru.milestoneLabel.one | string | Yes | |
display.ru.milestoneLabel.other | string | Yes |
trigger
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
trigger.type | "order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
trigger.type | "milestone" | Yes | |
trigger.milestone | string | Yes |
milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
milestoneRewards.eachReport | object | No | |
milestoneRewards.atCount | object | No |
milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
milestoneRewards.eachReport.compensation | union | Yes | |
milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
milestoneRewards.eachReport.compensation.amountCents | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
milestoneRewards.eachReport.compensation.rateBps | number | Yes |
milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
milestoneRewards.atCount.amountCents | number | Yes | |
milestoneRewards.atCount.count | number | Yes |
fixedRefundMode
Variant 1
Type: string.
Variant 2
Type: string.
duration
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "only_order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "first_order" | Yes |
Variant 3
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "first_n_orders" | Yes | |
duration.count | number | Yes |
Variant 4
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "days" | Yes | |
duration.days | number | Yes |
Variant 5
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "months" | Yes | |
duration.months | number | Yes |
Variant 6
| Field | Type | Required | Details |
|---|---|---|---|
duration.type | "lifetime" | Yes |
delivery
| Field | Type | Required | Details |
|---|---|---|---|
delivery.cash | union | No | |
delivery.credit | union | No |
delivery.cash
Variant 1
Type: string.
Variant 2
Type: string.
delivery.credit
Variant 1
Type: string.
Variant 2
Type: string.
reviewRewards
Variant 1
Type: boolean.
Variant 2
Type: boolean.
fraudChecks
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.selfReferral | object | No | |
fraudChecks.duplicateAccounts | object | No | |
fraudChecks.rapidRepeats | object | No | |
fraudChecks.repeatCustomer | object | No | |
fraudChecks.disposableEmail | object | No |
fraudChecks.selfReferral
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.selfReferral.action | union | No |
fraudChecks.selfReferral.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
fraudChecks.duplicateAccounts
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.duplicateAccounts.action | union | No | |
fraudChecks.duplicateAccounts.accounts | number | No | Customers sharing one card or device that trigger the rule. This one counts when referred inside the window. |
fraudChecks.duplicateAccounts.windowDays | number | No | |
fraudChecks.duplicateAccounts.ipAccounts | union | No | Customers sharing one IP address that trigger the rule. null leaves IP addresses out. |
fraudChecks.duplicateAccounts.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
fraudChecks.duplicateAccounts.ipAccounts
Variant 1
Type: null.
Variant 2
Type: number.
fraudChecks.rapidRepeats
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.rapidRepeats.action | union | No | |
fraudChecks.rapidRepeats.referrals | number | No | Referrals from one device that trigger the rule. This one counts when referred inside the window. |
fraudChecks.rapidRepeats.windowMinutes | number | No | |
fraudChecks.rapidRepeats.ipReferrals | union | No | Referrals from one IP address that trigger the rule. null leaves IP addresses out. |
fraudChecks.rapidRepeats.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
fraudChecks.rapidRepeats.ipReferrals
Variant 1
Type: null.
Variant 2
Type: number.
fraudChecks.repeatCustomer
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.repeatCustomer.action | union | No |
fraudChecks.repeatCustomer.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
Variant 4
Type: string.
fraudChecks.disposableEmail
| Field | Type | Required | Details |
|---|---|---|---|
fraudChecks.disposableEmail.action | union | No | A disposable address does not show a second person, so this rule cannot block. |
fraudChecks.disposableEmail.action
Variant 1
Type: string.
Variant 2
Type: string.
Variant 3
Type: string.
performance
| Field | Type | Required | Details |
|---|---|---|---|
performance.metric | union | Yes | |
performance.tiers | array | Yes | |
performance.windowDays | number | No |
performance.metric
Variant 1
Type: string.
Variant 2
Type: string.
performance.tiers[]
| Field | Type | Required | Details |
|---|---|---|---|
performance.tiers.name | string | Yes | |
performance.tiers.minValue | number | Yes | |
performance.tiers.bonusBps | number | Yes |
limits
| Field | Type | Required | Details |
|---|---|---|---|
limits.customerCapCents | number | No | |
limits.partnerCapCents | number | No |
customTerms[]
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.target | "partner" | Yes | |
customTerms.targetId | string | Yes | |
customTerms.compensation | union | No | |
customTerms.milestoneRewards | object | No | |
customTerms.customerCapCents | union | No | |
customTerms.partnerCapCents | union | No |
customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.type | "percentage" | Yes | |
customTerms.compensation.rateBps | number | Yes | |
customTerms.compensation.phases | array | No |
customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.phases.rateBps | number | Yes | |
customTerms.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.type | "fixed" | Yes | |
customTerms.compensation.amountCents | number | Yes |
customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport | object | No | |
customTerms.milestoneRewards.atCount | object | No |
customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
customTerms.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
customTerms.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
customTerms.milestoneRewards.eachReport.compensation.amountCents | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
customTerms.milestoneRewards.eachReport.compensation.rateBps | number | Yes |
customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.atCount.amountCents | number | Yes | |
customTerms.milestoneRewards.atCount.count | number | Yes |
customTerms.customerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
customTerms.partnerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.target | "customer" | Yes | |
customTerms.targetId | string | Yes | |
customTerms.compensation | union | No | |
customTerms.milestoneRewards | object | No | |
customTerms.customerCapCents | union | No |
customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.type | "percentage" | Yes | |
customTerms.compensation.rateBps | number | Yes | |
customTerms.compensation.phases | array | No |
customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.phases.rateBps | number | Yes | |
customTerms.compensation.phases.afterMonths | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.compensation.type | "fixed" | Yes | |
customTerms.compensation.amountCents | number | Yes |
customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport | object | No | |
customTerms.milestoneRewards.atCount | object | No |
customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
customTerms.milestoneRewards.eachReport.limit | number | No | Absent means every counted report. Reversed reports do not count toward the limit. |
customTerms.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
customTerms.milestoneRewards.eachReport.compensation.amountCents | number | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
customTerms.milestoneRewards.eachReport.compensation.rateBps | number | Yes |
customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
customTerms.milestoneRewards.atCount.amountCents | number | Yes | |
customTerms.milestoneRewards.atCount.count | number | Yes |
customTerms.customerCapCents
Variant 1
Type: null.
Variant 2
Type: number.
friendIncentive
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
friendIncentive.type | "percent" | Yes | |
friendIncentive.rateBps | number | Yes | |
friendIncentive.maxDiscountCents | number | No | Largest discount for one order. |
friendIncentive.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
friendIncentive.orders | number | No | How many of the friend's orders get the incentive. |
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. |
friendIncentive.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
friendIncentive.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
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. |
friendIncentive.newCustomersOnly
Variant 1
Type: boolean.
Variant 2
Type: boolean.
friendIncentive.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
friendIncentive.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
friendIncentive.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
friendIncentive.orderCategories.include | array | No | |
friendIncentive.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
friendIncentive.type | "fixed" | Yes | |
friendIncentive.amountCents | number | Yes | |
friendIncentive.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
friendIncentive.orders | number | No | How many of the friend's orders get the incentive. |
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. |
friendIncentive.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
friendIncentive.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
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. |
friendIncentive.newCustomersOnly
Variant 1
Type: boolean.
Variant 2
Type: boolean.
friendIncentive.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
friendIncentive.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
friendIncentive.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
friendIncentive.orderCategories.include | array | No | |
friendIncentive.orderCategories.exclude | array | No |
partnerOffer
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
partnerOffer.type | "percent" | Yes | |
partnerOffer.rateBps | number | Yes | |
partnerOffer.maxDiscountCents | number | No | Largest discount for one order. |
partnerOffer.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
partnerOffer.orders | number | No | How many of the friend's orders get the incentive. |
partnerOffer.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
partnerOffer.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
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. |
partnerOffer.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
partnerOffer.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
partnerOffer.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
partnerOffer.orderCategories.include | array | No | |
partnerOffer.orderCategories.exclude | array | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
partnerOffer.type | "fixed" | Yes | |
partnerOffer.amountCents | number | Yes | |
partnerOffer.minOrderCents | number | No | The friend's order total before the discount must reach this amount. Checked by the merchant's checkout. |
partnerOffer.orders | number | No | How many of the friend's orders get the incentive. |
partnerOffer.expiresAfterDays | union | No | Days after the referral was captured, claimed or entered. null means it never expires. |
partnerOffer.returnOnFullRefund | union | No | true: a full refund gives the use back, so the customer can get the offer again. |
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. |
partnerOffer.expiresAfterDays
Variant 1
Type: null.
Variant 2
Type: number.
partnerOffer.returnOnFullRefund
Variant 1
Type: boolean.
Variant 2
Type: boolean.
partnerOffer.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
partnerOffer.orderCategories.include | array | No | |
partnerOffer.orderCategories.exclude | array | No |
Response schema
{
"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"
]
}Errors
Failures return { "error": { "code": "...", "message": "...", "details": {} } }. Details are optional. See error statuses. Reuse an unchanged event payload when retrying.