Финансы · Чтение
Касса · Сессии · Результат операции «закрытие»
cash_sessions_get_close_result
Попробуйте три запроса
Получить данные
- Вы указываетеCashshiftid
- ПомощникЧтение
- Вы получаетеПоля ответа
Запрос в чат
Для задачи «Касса / Сессии / Результат операции «закрытие»» выполни чтение по выбранной записи (cashShiftId). Выведи кратко: статус, результат.
- status
- Статус
- result
- Результат
После обрыва
- Вы указываетеПервоначальный ключ
- ПомощникПоиск квитанции
- Вы получаетеСостояние операции
Запрос в чат
Найди результат «Касса / Сессии / Результат операции «закрытие»» по ключу первоначальной попытки. Покажи состояние операции и раздели подтверждённые и пока неизвестные данные.
- 1
- Взять исходный ключ
- 2
- Проверить квитанцию
Разобрать ответ
- Вы указываетеПолученный ответ
- ПомощникРазбор значений
- Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «Касса / Сессии / Результат операции «закрытие»» объясни статус, результат. Отметь отсутствующие значения.
- status
- Статус
- result
- Результат
Как работает действие
Это чтение. Выберите запись или задайте фильтры в доступной компании. Для поиска результата возьмите идентификатор из первоначальной попытки. Сохраните исходные аргументы. Прочитайте актуальную версию записи перед подготовкой запроса.
Описание разработчика
Read the exact committed result of cash_sessions_close_count without repeating a change. Pass the original arguments and retain their requestId. The server rechecks company, actor, permissions and the same location scope.
Параметры запроса
- 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
Что вернёт команда
- status
- Whether the exact operation has a committed receipt. not_found may coexist with an in-flight operation; preserve the requestId. обязательно по схеме · string · варианты completed, not_found
- result
- Committed original result, or null when no exact receipt exists. обязательно по схеме · object / null
Поля и технические схемы

Вход · 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": {
"status": {
"type": "string",
"enum": [
"completed",
"not_found"
],
"description": "Whether the exact operation has a committed receipt. not_found may coexist with an in-flight operation; preserve the requestId."
},
"result": {
"anyOf": [
{
"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
},
{
"type": "null"
}
],
"description": "Committed original result, or null when no exact receipt exists."
}
},
"required": [
"status",
"result"
],
"additionalProperties": false
}