CRM · Чтение
Клиенты · Предложения · Просмотр · Использование · Операция
customer_offers_get_use_operation
Попробуйте три запроса
Получить данные
- Вы указываетеОбъект
- ПомощникЧтение
- Вы получаетеПоля ответа
Запрос в чат
Для задачи «Клиенты / Предложения / Просмотр / Использование / Операция» выполни чтение в текущей компании. Выведи кратко: статус, результат.
- status
- Статус
- result
- Результат
Задать параметры
- Вы указываетеЗадача
- ПомощникСхема входа
- Вы получаетеУсловия чтения
Запрос в чат
Покажи, как получить «Клиенты / Предложения / Просмотр / Использование / Операция» на учебном примере с operation = record. Объясни, какие ещё данные нужны и как будет выглядеть ответ.
- operation
- record
Разобрать ответ
- Вы указываетеПолученный ответ
- ПомощникРазбор значений
- Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «Клиенты / Предложения / Просмотр / Использование / Операция» объясни статус, результат. Отметь отсутствующие значения.
- status
- Статус
- result
- Результат
Как работает действие
Это чтение. Выберите запись или задайте фильтры в доступной компании.
Описание разработчика
Read the immutable receipt of one exact customer_offers_record_use or customer_offers_reverse_use call without changing usage counters. Current protected customer and Position access are rechecked. If no receipt is found, retry only unchanged original arguments and requestId; a new requestId must not be used to bypass uncertainty.
Параметры запроса
- operation
- Выберите вариант операции из контракта. обязательно по схеме · string · варианты record, reverse
- input
- Exact original record or reverse arguments, including requestId. обязательно по схеме · object / object
Что вернёт команда
- status
- Whether the exact usage operation committed. обязательно по схеме · string · варианты committed, not_committed
- result
- Historical committed counter result, or null if no receipt is recorded. обязательно по схеме · object / null
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"record",
"reverse"
],
"description": "Original usage operation to recover."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"customerId": {
"$ref": "#/$defs/_mcp0"
},
"offerId": {
"$ref": "#/$defs/_mcp1"
},
"sourceId": {
"$ref": "#/$defs/_mcp2"
},
"productId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Actual product from the completed sale; must equal the offer product."
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Confirmed eligible product units consumed from this offer. For unlimited quantity the usage count still advances once."
},
"establishment": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Actual existing company establishment of the completed sale."
},
"orderType": {
"type": "string",
"enum": [
"atplace",
"pickup",
"delivery",
"catering"
],
"description": "Actual native order type of the completed sale."
},
"promocode": {
"description": "Personal activation code used on this completed sale, when the offer requires one.",
"type": "string",
"maxLength": 100
},
"itemId": {
"default": "",
"type": "string",
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]*$",
"description": "Exact optional native item or variant ID; empty means the whole product. It cannot be changed after creation."
},
"requestId": {
"$ref": "#/$defs/_mcp3"
}
},
"required": [
"customerId",
"offerId",
"sourceId",
"productId",
"quantity",
"establishment",
"orderType",
"itemId",
"requestId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"customerId": {
"$ref": "#/$defs/_mcp0"
},
"offerId": {
"$ref": "#/$defs/_mcp1"
},
"sourceId": {
"$ref": "#/$defs/_mcp2"
},
"reason": {
"type": "string",
"enum": [
"canceled",
"failed",
"correction"
],
"description": "Why the previously recorded use must be undone. Only use after the sale was canceled, failed, or corrected."
},
"requestId": {
"$ref": "#/$defs/_mcp3"
}
},
"required": [
"customerId",
"offerId",
"sourceId",
"reason",
"requestId"
],
"additionalProperties": false
}
],
"description": "Exact original record or reverse arguments, including requestId."
}
},
"required": [
"operation",
"input"
],
"additionalProperties": false,
"$defs": {
"_mcp0": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Existing users document ID. The server verifies its company and allowed location."
},
"_mcp1": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Exact users/{customerId}/offers document ID returned by a create or list action."
},
"_mcp2": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Stable identifier of the confirmed sale or other completed use. The caller supplies the actual business event ID; this Action does not create or check out an order. One source may consume one offer only once."
},
"_mcp3": {
"type": "string",
"minLength": 8,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "Stable ID for exactly this mutation and arguments. Retry the same request after uncertainty."
}
}
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"committed",
"not_committed"
],
"description": "Whether the exact usage operation committed."
},
"result": {
"anyOf": [
{
"type": "object",
"properties": {
"customerId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Existing users document ID. The server verifies its company and allowed location."
},
"offerId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Exact users/{customerId}/offers document ID returned by a create or list action."
},
"sourceId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Stable identifier of the confirmed sale or other completed use. The caller supplies the actual business event ID; this Action does not create or check out an order. One source may consume one offer only once."
},
"operation": {
"type": "string",
"enum": [
"record",
"reverse"
],
"description": "Committed usage counter operation."
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Units recorded or returned by this exact operation."
},
"usageCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Server maintained integer count of completed customer_offers_record_use events. Created as zero; quotes and failed sales do not increment it. Reversed events decrement it."
},
"remainingQuantity": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
],
"description": "Server maintained eligible units left when quantity > 0; record_use consumes units and reverse_use restores them. Ignored for unlimited quantity."
},
"status": {
"type": "string",
"enum": [
"active",
"inactive",
"expired",
"used"
],
"description": "Offer status after the committed counter change."
},
"at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "Server time when this exact usage operation committed."
}
},
"required": [
"customerId",
"offerId",
"sourceId",
"operation",
"quantity",
"usageCount",
"remainingQuantity",
"status",
"at"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Historical committed counter result, or null if no receipt is recorded."
}
},
"required": [
"status",
"result"
],
"additionalProperties": false
}