MCP Control
Финансы · Чтение

Касса · Сессии · Результат операции «сторнирование»

cash_sessions_get_collection_reversal_result
Кассовый чек, калькулятор и монеты

Попробуйте три запроса

Получить данные
  1. Вы указываетеCashshiftid
  2. ПомощникЧтение
  3. Вы получаетеПоля ответа
Запрос в чат
Для задачи «Касса / Сессии / Результат операции «сторнирование»» выполни чтение по выбранной записи (cashShiftId). Выведи кратко: статус, результат.
Что искать в ответе
status
Статус
result
Результат
После обрыва
  1. Вы указываетеПервоначальный ключ
  2. ПомощникПоиск квитанции
  3. Вы получаетеСостояние операции
Запрос в чат
Найди результат «Касса / Сессии / Результат операции «сторнирование»» по ключу первоначальной попытки. Покажи состояние операции и раздели подтверждённые и пока неизвестные данные.
Порядок проверки
1
Взять исходный ключ
2
Проверить квитанцию
Разобрать ответ
  1. Вы указываетеПолученный ответ
  2. ПомощникРазбор значений
  3. Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «Касса / Сессии / Результат операции «сторнирование»» объясни статус, результат. Отметь отсутствующие значения.
Поля для проверки
status
Статус
result
Результат
Как работает действие

Это чтение. Выберите запись или задайте фильтры в доступной компании. Для поиска результата возьмите идентификатор из первоначальной попытки. Сохраните исходные аргументы. Прочитайте актуальную версию записи перед подготовкой запроса.

Описание разработчика

Recover the committed result of cash_sessions_reverse_collection using its exact original arguments and unchanged authorization. This read-only lookup never repeats correction or changes collection records.

Параметры запроса
cashShiftId
Session ID from the original successful cash_sessions_record_collection receipt. Only that exact unchanged session is supported. обязательно по схеме · string · до символов 128
collectionId
Original collection identifier returned by cash_sessions_record_collection; other manual financial movements and legacy collections are not accepted. обязательно по схеме · string · до символов 128
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · string
alreadyReturnedAmount
Cash already physically returned from the original safe to the original till, in the original currency units. Without returnMode this must equal the entire original collection, exactly as before. With returnMode=partial this is the amount of this distinct completed return, not a cumulative total, and must not exceed the remaining collected amount. Does not move cash or call a bank. обязательно по схеме · number · максимум 1000000000000
returnMode
Explicitly opt into recording a partial physical return. Omit to retain the original one-time full-original-amount correction. Each subsequent partial return requires a new requestId and the latest cashShiftRevision; retain this field unchanged for retry/recovery. Partial mode also accepts the exact final remainder. необязательно · string
reason
Reason for reversing this already returned collection. The original receipt and financial effects remain as immutable history. обязательно по схеме · string · до символов 1000
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string · до символов 128
Что вернёт команда
status
Exact-request committed receipt status. A missing receipt can coexist with an in-flight request; keep its original requestId. обязательно по схеме · string · варианты completed, not_found
result
Original committed correction, or null when its receipt is absent. обязательно по схеме · object / null
Поля и технические схемы
Входные поля и поля ответа cash_sessions_get_collection_reversal_result
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cashShiftId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Session ID from the original successful cash_sessions_record_collection receipt. Only that exact unchanged session is supported."
    },
    "collectionId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Original collection identifier returned by cash_sessions_record_collection; other manual financial movements and legacy collections are not accepted."
    },
    "expectedRevision": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "description": "Current session revision returned by the original collection or cash_shifts_get. Concurrent changes reject the correction."
    },
    "alreadyReturnedAmount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000000000,
      "description": "Cash already physically returned from the original safe to the original till, in the original currency units. Without returnMode this must equal the entire original collection, exactly as before. With returnMode=partial this is the amount of this distinct completed return, not a cumulative total, and must not exceed the remaining collected amount. Does not move cash or call a bank."
    },
    "returnMode": {
      "description": "Explicitly opt into recording a partial physical return. Omit to retain the original one-time full-original-amount correction. Each subsequent partial return requires a new requestId and the latest cashShiftRevision; retain this field unchanged for retry/recovery. Partial mode also accepts the exact final remainder.",
      "type": "string",
      "const": "partial"
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000,
      "description": "Reason for reversing this already returned collection. The original receipt and financial effects remain as immutable history."
    },
    "requestId": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$",
      "description": "Stable identifier for this exact correction. Retain all original arguments for retries and recovery after an uncertain response."
    }
  },
  "required": [
    "cashShiftId",
    "collectionId",
    "expectedRevision",
    "alreadyReturnedAmount",
    "reason",
    "requestId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "completed",
        "not_found"
      ],
      "description": "Exact-request committed receipt status. A missing receipt can coexist with an in-flight request; keep its original requestId."
    },
    "result": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "reversalId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_~:@+.-]+$",
              "description": "Server-assigned identifier of the committed correction receipt."
            },
            "collectionId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_~:@+.-]+$",
              "description": "Original protected MCP collection associated with this immutable return receipt."
            },
            "cashShiftId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_~:@+.-]+$",
              "description": "Original native cash session whose collected remainder was updated."
            },
            "locationId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_~:@+.-]+$",
              "description": "Server-verified current establishment within the authenticated company and location scope."
            },
            "state": {
              "type": "string",
              "enum": [
                "reversed",
                "partially_reversed"
              ],
              "description": "The inverse pair and collected remainder committed atomically: reversed means no amount remains; partially_reversed means a positive amount still remains collected."
            },
            "returnedAmount": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 1000000000000,
              "description": "Amount of this distinct physical return recorded by this receipt. It is not a cumulative return total."
            },
            "remainingCollectedAmount": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000000,
              "description": "Native collected remainder at this commit: zero for a full return, positive after a partial return. Physical opening and closing observations remain unchanged. Recovery returns this historical committed value."
            },
            "currency": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32,
              "description": "Original currency verified against both current company-owned accounts. No conversion is supported."
            },
            "recordedAt": {
              "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 timestamp of the atomic correction."
            },
            "cashShiftRevision": {
              "type": "string",
              "pattern": "^[a-f0-9]{32}$",
              "description": "Native revision after this committed return. Use it for the next distinct partial return. Original and inverse ledger entries remain protected."
            }
          },
          "required": [
            "reversalId",
            "collectionId",
            "cashShiftId",
            "locationId",
            "state",
            "returnedAmount",
            "remainingCollectedAmount",
            "currency",
            "recordedAt",
            "cashShiftRevision"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Original committed correction, or null when its receipt is absent."
    }
  },
  "required": [
    "status",
    "result"
  ],
  "additionalProperties": false
}