Лояльность · Чувствительное действие
Клиенты · Лояльность · Корректировка
customer_loyalty_amend
Попробуйте три запроса
Подготовить
- Вы указываетеКлиент
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Клиенты / Лояльность / Корректировка». Для изменения нужны клиент, причина. Покажи объект и ожидаемый эффект до выполнения.
- customerId
- Клиент
- reason
- Причина
- comment
- Комментарий
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Клиенты / Лояльность / Корректировка» с параметром customerId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- customerId
- DEMO-101
- reason
- Исправление учебной записи
- comment
- Проверено на учебной записи
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Клиенты / Лояльность / Корректировка» по исходному ответу. Покажи клиент, groupId. Объясни, чем подтвердить эффект для выбранного объекта.
- До измененияПрочитать версию
- При записиПередать выбранную версию
- После ответаПеречитать объект
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.
Описание разработчика
Amend an existing manual bonus source using the native correction service. Appends only the difference to the ledger, preserves the source, and records an immutable acknowledgment even for a zero difference. Set targetSignedPoints to zero to reverse the source. Order-generated entries are protected. Requires current staff rights and exact source revision.
Параметры запроса
- 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 existing manual bonus entry ID. Order-generated entries cannot be amended. обязательно по схеме · string
- targetSignedPoints
- New effective signed amount for this manual source entry. Zero reverses it; the original history is preserved and only the difference is appended. обязательно по схеме · number · минимум -1000000000 · максимум 1000000000
Что вернёт команда
- 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 existing manual bonus entry ID. Order-generated entries cannot be amended."
},
"targetSignedPoints": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"description": "New effective signed amount for this manual source entry. Zero reverses it; the original history is preserved and only the difference is appended."
}
},
"required": [
"customerId",
"expectedRevision",
"requestId",
"reason",
"comment",
"sourceEntryId",
"targetSignedPoints"
],
"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
}