Лояльность · Чтение
Клиенты · Рефералы · Программа · Просмотр · Операция
customer_referral_program_get_operation
Попробуйте три запроса
Получить данные
- Вы указываетеОбъект
- ПомощникЧтение
- Вы получаетеПоля ответа
Запрос в чат
Для задачи «Клиенты / Рефералы / Программа / Просмотр / Операция» выполни чтение в текущей компании. Выведи кратко: состояние, результат.
- state
- Состояние
- result
- Результат
Задать параметры
- Вы указываетеЗадача
- ПомощникСхема входа
- Вы получаетеУсловия чтения
Запрос в чат
Покажи, как получить «Клиенты / Рефералы / Программа / Просмотр / Операция» на учебном примере с kind = create. Объясни, какие ещё данные нужны и как будет выглядеть ответ.
- kind
- create
- input.groupId
- DEMO-101
- input.expectedRevision
- 4
Разобрать ответ
- Вы указываетеПолученный ответ
- ПомощникРазбор значений
- Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «Клиенты / Рефералы / Программа / Просмотр / Операция» объясни состояние, результат. Отметь отсутствующие значения.
- state
- Состояние
- result
- Результат
Как работает действие
Это чтение. Выберите запись или задайте фильтры в доступной компании.
Описание разработчика
Recover the immutable result of the exact original referral program request without changing the policy.
Параметры запроса
- kind
- Exact original operation kind. обязательно по схеме · string · варианты create, update
- input
- Complete unchanged arguments of the original operation. обязательно по схеме · object
Что вернёт команда
- state
- Current verified processing or recovery state. обязательно по схеме · string · варианты not_recorded, completed
- result
- Immutable original operation result, or null when none was recorded. обязательно по схеме · object / null
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"create",
"update"
],
"description": "Exact original operation kind."
},
"input": {
"type": "object",
"properties": {
"groupId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Exact existing native customer group ID; this also identifies its referral program."
},
"expectedRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Exact current revision returned by the corresponding read action."
},
"program": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"description": "Owner-visible program name."
},
"enabled": {
"type": "boolean",
"description": "Permit new links and new Order attribution. Existing committed conditions retain their history."
},
"attributionDays": {
"default": 30,
"description": "Days from first captured visit during which an Order can bind this referral.",
"type": "integer",
"minimum": 1,
"maximum": 90
},
"startsAt": {
"default": null,
"description": "Optional UTC Unix milliseconds when new attribution begins; null has no lower bound.",
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"endsAt": {
"default": null,
"description": "Optional UTC Unix milliseconds when new attribution ends; null has no upper bound.",
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"rewardEvent": {
"default": "paid",
"description": "Require full native payment, or both full payment and a completed native status.",
"type": "string",
"enum": [
"paid",
"completed"
]
},
"frequency": {
"default": "oncePerCustomer",
"description": "Reward only the first qualifying Order for a customer/program pair, or explicitly reward each attributed Order.",
"type": "string",
"enum": [
"oncePerCustomer",
"eachOrder"
]
},
"minimumOrderAmount": {
"default": 0,
"description": "Minimum native Order total in the exact configured currency; no currency conversion.",
"type": "number",
"minimum": 0,
"maximum": 1000000000
},
"currency": {
"type": "string",
"minLength": 1,
"maxLength": 12,
"description": "Exact native Order currency marker, for example USD or $. Must match the Order."
},
"orderTypes": {
"minItems": 1,
"maxItems": 4,
"type": "array",
"items": {
"type": "string",
"enum": [
"pickup",
"delivery",
"atplace",
"catering"
]
},
"description": "Eligible native fulfillment types."
},
"locationIds": {
"default": [],
"description": "Eligible company establishment IDs; empty means all company establishments.",
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Exact native company-owned record identifier."
}
},
"referrerPoints": {
"default": 0,
"description": "Bonus points for the inviting customer after conditions qualify. Zero disables this side’s reward.",
"type": "number",
"minimum": 0,
"maximum": 1000000000
},
"referredPoints": {
"default": 0,
"description": "Bonus points for the referred customer. Both rewards may be zero for attribution only.",
"type": "number",
"minimum": 0,
"maximum": 1000000000
},
"referrerRewardType": {
"description": "Inviter reward: fixed bonus points (legacy default) or a percentage of the fully paid native Order total, credited as bonus points.",
"type": "string",
"enum": [
"fixed",
"percent"
]
},
"referrerPercent": {
"description": "Inviter percentage from 0 to 100, up to two decimals. Used only with referrerRewardType percent. Excludes tips; no money payout or currency conversion.",
"type": "number",
"minimum": 0,
"maximum": 100
},
"referredRewardType": {
"description": "Buyer reward: fixed bonus points (legacy default) or a percentage of the fully paid native Order total, credited as bonus points.",
"type": "string",
"enum": [
"fixed",
"percent"
]
},
"referredPercent": {
"description": "Buyer percentage from 0 to 100, up to two decimals. Used only with referredRewardType percent.",
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"required": [
"name",
"enabled",
"attributionDays",
"startsAt",
"endsAt",
"rewardEvent",
"frequency",
"minimumOrderAmount",
"currency",
"orderTypes",
"locationIds",
"referrerPoints",
"referredPoints"
],
"additionalProperties": false,
"description": "Complete referral conditions; existing group loyalty settings remain unchanged."
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable identifier for this exact request; retry or recover unchanged after uncertainty."
}
},
"required": [
"groupId",
"expectedRevision",
"program",
"requestId"
],
"additionalProperties": false,
"description": "Complete unchanged arguments of the original operation."
}
},
"required": [
"kind",
"input"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"not_recorded",
"completed"
],
"description": "Current verified processing or recovery state."
},
"result": {
"anyOf": [
{
"type": "object",
"properties": {
"groupId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Exact existing native customer group ID; this also identifies its referral program."
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Current native referral record revision."
},
"program": {
"anyOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"description": "Owner-visible program name."
},
"enabled": {
"type": "boolean",
"description": "Permit new links and new Order attribution. Existing committed conditions retain their history."
},
"attributionDays": {
"default": 30,
"description": "Days from first captured visit during which an Order can bind this referral.",
"type": "integer",
"minimum": 1,
"maximum": 90
},
"startsAt": {
"default": null,
"description": "Optional UTC Unix milliseconds when new attribution begins; null has no lower bound.",
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"endsAt": {
"default": null,
"description": "Optional UTC Unix milliseconds when new attribution ends; null has no upper bound.",
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"rewardEvent": {
"default": "paid",
"description": "Require full native payment, or both full payment and a completed native status.",
"type": "string",
"enum": [
"paid",
"completed"
]
},
"frequency": {
"default": "oncePerCustomer",
"description": "Reward only the first qualifying Order for a customer/program pair, or explicitly reward each attributed Order.",
"type": "string",
"enum": [
"oncePerCustomer",
"eachOrder"
]
},
"minimumOrderAmount": {
"default": 0,
"description": "Minimum native Order total in the exact configured currency; no currency conversion.",
"type": "number",
"minimum": 0,
"maximum": 1000000000
},
"currency": {
"type": "string",
"minLength": 1,
"maxLength": 12,
"description": "Exact native Order currency marker, for example USD or $. Must match the Order."
},
"orderTypes": {
"minItems": 1,
"maxItems": 4,
"type": "array",
"items": {
"type": "string",
"enum": [
"pickup",
"delivery",
"atplace",
"catering"
]
},
"description": "Eligible native fulfillment types."
},
"locationIds": {
"default": [],
"description": "Eligible company establishment IDs; empty means all company establishments.",
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Exact native company-owned record identifier."
}
},
"referrerPoints": {
"default": 0,
"description": "Bonus points for the inviting customer after conditions qualify. Zero disables this side’s reward.",
"type": "number",
"minimum": 0,
"maximum": 1000000000
},
"referredPoints": {
"default": 0,
"description": "Bonus points for the referred customer. Both rewards may be zero for attribution only.",
"type": "number",
"minimum": 0,
"maximum": 1000000000
},
"referrerRewardType": {
"description": "Inviter reward: fixed bonus points (legacy default) or a percentage of the fully paid native Order total, credited as bonus points.",
"type": "string",
"enum": [
"fixed",
"percent"
]
},
"referrerPercent": {
"description": "Inviter percentage from 0 to 100, up to two decimals. Used only with referrerRewardType percent. Excludes tips; no money payout or currency conversion.",
"type": "number",
"minimum": 0,
"maximum": 100
},
"referredRewardType": {
"description": "Buyer reward: fixed bonus points (legacy default) or a percentage of the fully paid native Order total, credited as bonus points.",
"type": "string",
"enum": [
"fixed",
"percent"
]
},
"referredPercent": {
"description": "Buyer percentage from 0 to 100, up to two decimals. Used only with referredRewardType percent.",
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"required": [
"name",
"enabled",
"attributionDays",
"startsAt",
"endsAt",
"rewardEvent",
"frequency",
"minimumOrderAmount",
"currency",
"orderTypes",
"locationIds",
"referrerPoints",
"referredPoints"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Complete referral conditions; existing group loyalty settings remain unchanged."
},
"legacyRecommendationPoints": {
"description": "Existing group recomendbonus setting, or null. It is preserved by these operations.",
"type": [
"number",
"null"
]
}
},
"required": [
"groupId",
"revision",
"program",
"legacyRecommendationPoints"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Immutable original operation result, or null when none was recorded."
}
},
"required": [
"state",
"result"
],
"additionalProperties": false
}