Лояльность · Чтение
Клиенты · Лояльность · Просмотр · Операция
customer_loyalty_get_operation
Попробуйте три запроса
Получить данные
- Вы указываетеОбъект
- ПомощникЧтение
- Вы получаетеПоля ответа
Запрос в чат
Для задачи «Клиенты / Лояльность / Просмотр / Операция» выполни чтение в текущей компании. Выведи кратко: состояние, результат.
- state
- Состояние
- result
- Результат
Задать параметры
- Вы указываетеЗадача
- ПомощникСхема входа
- Вы получаетеУсловия чтения
Запрос в чат
Покажи, как получить «Клиенты / Лояльность / Просмотр / Операция» на учебном примере с kind = record. Объясни, какие ещё данные нужны и как будет выглядеть ответ.
- kind
- record
Разобрать ответ
- Вы указываетеПолученный ответ
- ПомощникРазбор значений
- Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «Клиенты / Лояльность / Просмотр / Операция» объясни состояние, результат. Отметь отсутствующие значения.
- state
- Состояние
- result
- Результат
Как работает действие
Это чтение. Выберите запись или задайте фильтры в доступной компании.
Описание разработчика
Recover the exact original record, amend, credit, debit or reverse command without writing or recalculating its historical acknowledgment. Rechecks current authority and immutable native ledger or no-op receipt. Later valid operations do not alter the original result.
Параметры запроса
- kind
- Exact original management command. обязательно по схеме · string · варианты record, amend, credit, debit, reverse
- input
- Unchanged arguments of that command, including requestId and expectedRevision. Credit and debit use the same positive points field. обязательно по схеме · object / object / object / object
Что вернёт команда
- state
- Whether the exact original native adjustment committed atomically. обязательно по схеме · string · варианты not_recorded, completed
- result
- Original historical acknowledgment, or null when no operation committed. обязательно по схеме · object / null
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"record",
"amend",
"credit",
"debit",
"reverse"
],
"description": "Exact original management command."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"customerId": {
"$ref": "#/$defs/_mcp0"
},
"expectedRevision": {
"$ref": "#/$defs/_mcp1"
},
"requestId": {
"$ref": "#/$defs/_mcp2"
},
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 300,
"description": "Business reason retained in the native bonus history."
},
"comment": {
"$ref": "#/$defs/_mcp3"
},
"signedPoints": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"description": "Positive accrual or negative adjustment in bonus points, with at most two decimal places. No money is transferred."
}
},
"required": [
"customerId",
"expectedRevision",
"requestId",
"reason",
"comment",
"signedPoints"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"customerId": {
"$ref": "#/$defs/_mcp0"
},
"expectedRevision": {
"$ref": "#/$defs/_mcp1"
},
"requestId": {
"$ref": "#/$defs/_mcp2"
},
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 300,
"description": "Business reason retained in the native bonus history."
},
"comment": {
"$ref": "#/$defs/_mcp3"
},
"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
},
{
"type": "object",
"properties": {
"customerId": {
"$ref": "#/$defs/_mcp0"
},
"expectedRevision": {
"$ref": "#/$defs/_mcp1"
},
"requestId": {
"$ref": "#/$defs/_mcp2"
},
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 300,
"description": "Business reason retained in the native bonus history."
},
"comment": {
"$ref": "#/$defs/_mcp3"
},
"points": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"description": "Positive bonus points for the requested credit or debit, with at most two decimals. No money transfer."
}
},
"required": [
"customerId",
"expectedRevision",
"requestId",
"reason",
"comment",
"points"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"customerId": {
"$ref": "#/$defs/_mcp0"
},
"expectedRevision": {
"$ref": "#/$defs/_mcp1"
},
"requestId": {
"$ref": "#/$defs/_mcp2"
},
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 300,
"description": "Business reason retained in the native bonus history."
},
"comment": {
"$ref": "#/$defs/_mcp3"
},
"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
}
],
"description": "Unchanged arguments of that command, including requestId and expectedRevision. Credit and debit use the same positive points field."
}
},
"required": [
"kind",
"input"
],
"additionalProperties": false,
"$defs": {
"_mcp0": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Existing native company customer ID from customers_search. Self adjustments are forbidden."
},
"_mcp1": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "Exact current customer_loyalty_context revision, including the native ledger and group settings."
},
"_mcp2": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable ID for this exact operation. Recover or retry unchanged after uncertainty."
},
"_mcp3": {
"default": "",
"description": "Optional native comment; no personal information or credentials are needed.",
"type": "string",
"maxLength": 2000
}
}
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"not_recorded",
"completed"
],
"description": "Whether the exact original native adjustment committed atomically."
},
"result": {
"anyOf": [
{
"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
},
{
"type": "null"
}
],
"description": "Original historical acknowledgment, or null when no operation committed."
}
},
"required": [
"state",
"result"
],
"additionalProperties": false
}