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

Касса · Сессии · Закрытие · Количество

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

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

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

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

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

Close an unchanged session created by cash_sessions_open by recording the operator’s physical closing count. Requires its current revision, current OAuth and employee permissions, current establishment access and unchanged cash account/currency. Preserves opening data and native cash collection/difference text fields. Does not settle Orders, reconcile ledger cash or move money. After an uncertain response use cash_sessions_get_close_result with the exact original arguments.

Параметры запроса
cashShiftId
Canonical cash-shift ID returned by cash_sessions_open. Only an unchanged session created by that Action can be closed here; legacy or already closed sessions are rejected. обязательно по схеме · string · до символов 128
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · string
closingCount
Cash physically counted by the operator at the end, in the same account currency as the opening observation. No expected balance, shortage, overage or collection transfer is inferred. обязательно по схеме · number · минимум 0 · максимум 1000000000000
comment
Optional closing note, appended to the opening note without replacing it. обязательно по схеме · string · по умолчанию "" · до символов 1000
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string · до символов 128
Что вернёт команда
cashShiftId
Canonical native cash-shift ID. Use cash_shifts_get with key.id to inspect its current record. обязательно по схеме · string · до символов 128
locationId
Establishment verified by the server against current company and location permissions. обязательно по схеме · string · до символов 128
number
Server-assigned native display number. Legacy clients may have their own numbering, so use cashShiftId as identity. обязательно по схеме · integer · максимум 9007199254740991
state
Whether this observed cash session is open or has a recorded closing count. This is not financial reconciliation or settlement. обязательно по схеме · string · варианты open, closed
currency
Currency marker verified from the cash account at opening and checked again before closing. No conversion occurs. обязательно по схеме · string · до символов 32
openingCount
Operator-declared opening cash count preserved from the opening request. обязательно по схеме · number · минимум 0 · максимум 1000000000000
closingCount
Operator-declared closing count, or null while open. обязательно по схеме · number / null
openedAt
Server-assigned native opening timestamp. обязательно по схеме · string
closedAt
Server-assigned closing timestamp, or null while open. обязательно по схеме · string / null
revision
Exact native cash-shift revision returned by this Action or cash_shifts_get. Concurrent changes are rejected rather than overwritten. обязательно по схеме · string
Поля и технические схемы
Входные поля и поля ответа cash_sessions_close_count
Вход · 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 cash-shift ID returned by cash_sessions_open. Only an unchanged session created by that Action can be closed here; legacy or already closed sessions are rejected."
    },
    "expectedRevision": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "description": "Exact native cash-shift revision returned by this Action or cash_shifts_get. Concurrent changes are rejected rather than overwritten."
    },
    "closingCount": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000,
      "description": "Cash physically counted by the operator at the end, in the same account currency as the opening observation. No expected balance, shortage, overage or collection transfer is inferred."
    },
    "comment": {
      "default": "",
      "description": "Optional closing note, appended to the opening note without replacing it.",
      "type": "string",
      "maxLength": 1000
    },
    "requestId": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$",
      "description": "Stable identifier for this exact operation. Preserve it and every argument for retries and recovery."
    }
  },
  "required": [
    "cashShiftId",
    "expectedRevision",
    "closingCount",
    "comment",
    "requestId"
  ],
  "additionalProperties": false
}
Выход · 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 native cash-shift ID. Use cash_shifts_get with key.id to inspect its current record."
    },
    "locationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Establishment verified by the server against current company and location permissions."
    },
    "number": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Server-assigned native display number. Legacy clients may have their own numbering, so use cashShiftId as identity."
    },
    "state": {
      "type": "string",
      "enum": [
        "open",
        "closed"
      ],
      "description": "Whether this observed cash session is open or has a recorded closing count. This is not financial reconciliation or settlement."
    },
    "currency": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32,
      "description": "Currency marker verified from the cash account at opening and checked again before closing. No conversion occurs."
    },
    "openingCount": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000,
      "description": "Operator-declared opening cash count preserved from the opening request."
    },
    "closingCount": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        {
          "type": "null"
        }
      ],
      "description": "Operator-declared closing count, or null while open."
    },
    "openedAt": {
      "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-assigned native opening timestamp."
    },
    "closedAt": {
      "anyOf": [
        {
          "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)))$"
        },
        {
          "type": "null"
        }
      ],
      "description": "Server-assigned closing timestamp, or null while open."
    },
    "revision": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "description": "Exact native cash-shift revision returned by this Action or cash_shifts_get. Concurrent changes are rejected rather than overwritten."
    }
  },
  "required": [
    "cashShiftId",
    "locationId",
    "number",
    "state",
    "currency",
    "openingCount",
    "closingCount",
    "openedAt",
    "closedAt",
    "revision"
  ],
  "additionalProperties": false
}