MCP Control
Финансы · Чувствительное действие

Касса · Сессии · Записи · Коллекции

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

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

Подготовить
  1. Вы указываетеCashshiftid
  2. ПомощникПодготовка
  3. Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Касса / Сессии / Записи / Коллекции». Для изменения нужны cashShiftId, collectedAmount. Покажи объект и ожидаемый эффект до выполнения.
Что входит в подготовку
cashShiftId
Параметр
collectedAmount
Параметр
comment
Комментарий
Применить
  1. Вы указываетеСогласованные значения
  2. ПомощникОдин вызов
  3. Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Касса / Сессии / Записи / Коллекции» с параметром cashShiftId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
Фрагмент учебных параметров
cashShiftId
DEMO-101
comment
Проверено на учебной записи
Проверить итог
  1. Вы указываетеИсходный ответ
  2. ПомощникСверка результата
  3. Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Касса / Сессии / Записи / Коллекции» по исходному ответу. Покажи collectionId, cashShiftId. Объясни, чем подтвердить эффект для выбранного объекта.
Как сверить изменение
  1. До измененияПрочитать версию
  2. При записиПередать выбранную версию
  3. После ответаПеречитать объект
Как работает действие

Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.

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

Record one already completed physical cash collection from a closed, unchanged session created through cash_sessions_open/close_count. The server resolves the establishment’s cash and safe accounts and verifies company, current location access, matching currency and amount≤observed closing cash. Atomically records a debit/credit pair and native collection amount. Does not call a bank/provider, compute expected cash, change the physical closing count, parse legacy monetary text or settle Orders. Requires current OAuth and employee permissions. The entire session and both bookkeeping entries become immutable; generic manual reversal cannot change them. After an uncertain response use cash_sessions_get_collection_result with the exact original arguments.

Параметры запроса
cashShiftId
Canonical session ID created by cash_sessions_open and closed by cash_sessions_close_count. The complete closed native record must still match its receipt. обязательно по схеме · string · до символов 128
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · string
collectedAmount
Cash the operator has already physically moved from the till to the establishment’s configured safe. Must be positive and no greater than the recorded physical closing count, in the same currency units. обязательно по схеме · number · максимум 1000000000000
comment
Business reason or operator note for the already completed physical cash collection. Do not include credentials. обязательно по схеме · string · до символов 1000
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string · до символов 128
Что вернёт команда
collectionId
Server-assigned identifier of the committed collection record. обязательно по схеме · string · до символов 128
cashShiftId
Native cash-session ID associated with this immutable collection record. обязательно по схеме · string · до символов 128
locationId
Current establishment verified from the session against company and location permissions. обязательно по схеме · string · до символов 128
collectedAmount
Recorded physical cash collection amount. The account debit and safe credit are committed atomically. обязательно по схеме · number
observedClosingCount
Physical closing count from the protected original close receipt. It is preserved; no expected ledger balance is substituted. обязательно по схеме · number · минимум 0
currency
Exact currency marker verified on the original session and both current company-owned accounts. Currency conversion is not supported. обязательно по схеме · string · до символов 32
recordedAt
Server timestamp when the already completed collection was recorded. обязательно по схеме · string
cashShiftRevision
Native session revision after writing its collection amount. The collected session and both ledger entries are protected from direct edits and deletion. обязательно по схеме · string
Поля и технические схемы
Входные поля и поля ответа cash_sessions_record_collection
Вход · 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": "Canonical session ID created by cash_sessions_open and closed by cash_sessions_close_count. The complete closed native record must still match its receipt."
    },
    "expectedRevision": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "description": "Current native revision returned by cash_sessions_close_count or cash_shifts_get. A changed record is rejected before any bookkeeping."
    },
    "collectedAmount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000000000,
      "description": "Cash the operator has already physically moved from the till to the establishment’s configured safe. Must be positive and no greater than the recorded physical closing count, in the same currency units."
    },
    "comment": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000,
      "description": "Business reason or operator note for the already completed physical cash collection. Do not include credentials."
    },
    "requestId": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$",
      "description": "Stable identifier for this exact collection record. Retain it and all original arguments for retries and recovery; never change it to bypass a conflict."
    }
  },
  "required": [
    "cashShiftId",
    "expectedRevision",
    "collectedAmount",
    "comment",
    "requestId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "collectionId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Server-assigned identifier of the committed collection record."
    },
    "cashShiftId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Native cash-session ID associated with this immutable collection record."
    },
    "locationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Current establishment verified from the session against company and location permissions."
    },
    "collectedAmount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Recorded physical cash collection amount. The account debit and safe credit are committed atomically."
    },
    "observedClosingCount": {
      "type": "number",
      "minimum": 0,
      "description": "Physical closing count from the protected original close receipt. It is preserved; no expected ledger balance is substituted."
    },
    "currency": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32,
      "description": "Exact currency marker verified on the original session and both current company-owned accounts. Currency conversion is not 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 when the already completed collection was recorded."
    },
    "cashShiftRevision": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "description": "Native session revision after writing its collection amount. The collected session and both ledger entries are protected from direct edits and deletion."
    }
  },
  "required": [
    "collectionId",
    "cashShiftId",
    "locationId",
    "collectedAmount",
    "observedClosingCount",
    "currency",
    "recordedAt",
    "cashShiftRevision"
  ],
  "additionalProperties": false
}