Лояльность · Чувствительное действие
Клиенты · Лояльность · Сторнирование
customer_loyalty_reverse
Попробуйте три запроса
Подготовить
- Вы указываетеКлиент
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Клиенты / Лояльность / Сторнирование». Для изменения нужны клиент, причина. Покажи объект и ожидаемый эффект до выполнения.
- customerId
- Клиент
- reason
- Причина
- comment
- Комментарий
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Клиенты / Лояльность / Сторнирование» с параметром customerId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- customerId
- DEMO-101
- reason
- Исправление учебной записи
- comment
- Проверено на учебной записи
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Клиенты / Лояльность / Сторнирование» по исходному ответу. Покажи клиент, groupId. Объясни, чем подтвердить эффект для выбранного объекта.
- До измененияПрочитать версию
- При записиПередать выбранную версию
- После ответаПеречитать объект
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.
Описание разработчика
Reverse a manual bonus operation (сторнировать начисление или списание) to zero, appending its exact remaining inverse once. Preserves original history. Automatic Order and referral rewards must use the Order cancellation/refund lifecycle. Recover an uncertain result with customer_loyalty_get_operation using this exact kind and unchanged arguments.
Параметры запроса
- customerId
- Идентификатор клиента, выбранного по результату поиска. обязательно по схеме · string
- expectedRevision
- Версия, прочитанная перед изменением. обязательно по схеме · string
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
- reason
- Business reason retained in the native bonus history. обязательно по схеме · string · до символов 300
- comment
- Optional native comment; no personal information or credentials are needed. обязательно по схеме · string · по умолчанию "" · до символов 2000
- sourceEntryId
- Exact manual source entry to reverse to zero. Automatic Order and referral entries are protected; use their Order lifecycle. обязательно по схеме · string
Что вернёт команда
- customerId
- Existing native company customer ID from customers_search. Self adjustments are forbidden. обязательно по схеме · string
- groupId
- Original native loyalty group. обязательно по схеме · string
- entryId
- Native bonus entry ID, or the native no-op amendment receipt ID when no ledger entry was needed. обязательно по схеме · string
- balancePoints
- Historical balance immediately after this operation; context provides the current balance. обязательно по схеме · number · минимум -1000000000 · максимум 1000000000
- deltaPoints
- Exact signed delta appended by this operation; zero is an amendment with no balance change. обязательно по схеме · number · минимум -1000000000 · максимум 1000000000
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"customerId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Existing native company customer ID from customers_search. Self adjustments are forbidden."
},
"expectedRevision": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "Exact current customer_loyalty_context revision, including the native ledger and group settings."
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable ID for this exact operation. Recover or retry unchanged after uncertainty."
},
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 300,
"description": "Business reason retained in the native bonus history."
},
"comment": {
"default": "",
"description": "Optional native comment; no personal information or credentials are needed.",
"type": "string",
"maxLength": 2000
},
"sourceEntryId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Exact manual source entry to reverse to zero. Automatic Order and referral entries are protected; use their Order lifecycle."
}
},
"required": [
"customerId",
"expectedRevision",
"requestId",
"reason",
"comment",
"sourceEntryId"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"customerId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Existing native company customer ID from customers_search. Self adjustments are forbidden."
},
"groupId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Original native loyalty group."
},
"entryId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Native bonus entry ID, or the native no-op amendment receipt ID when no ledger entry was needed."
},
"balancePoints": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"description": "Historical balance immediately after this operation; context provides the current balance."
},
"deltaPoints": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"description": "Exact signed delta appended by this operation; zero is an amendment with no balance change."
}
},
"required": [
"customerId",
"groupId",
"entryId",
"balancePoints",
"deltaPoints"
],
"additionalProperties": false
}