Касса · Касса · Сессии · Открытие
pos_cash_session_open
Попробуйте три запроса
- Вы указываетеФилиал
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Подготовь «Касса / Касса / Сессии / Открытие». Для изменения нужны филиал, openingCount. Покажи объект и ожидаемый эффект до выполнения.
- locationId
- Филиал
- openingCount
- Параметр
- number
- Параметр
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
На учебной записи подготовь «Касса / Касса / Сессии / Открытие» с параметром locationId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- locationId
- DEMO-101
- comment
- Проверено на учебной записи
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Проверь результат «Касса / Касса / Сессии / Открытие» по исходному ответу. Покажи shiftId, филиал. Объясни, чем подтвердить эффект для выбранного объекта.
- ЗапросСохранить исходный ключ
- ОтветПроверить статус
- ПроверкаСверить эффект операции
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения.
Описание разработчика
Open a native active POS shift in Firestore with the current employee and server time, after company cash-account validation. Atomically rejects an existing active shift at the establishment and saves an immutable receipt. Orders can bind to the returned shiftId; close it using pos_cash_session_context and pos_cash_session_close. The native display number is optional and not unique. Opening observes cash and does not post money or run external Flow/webhook actions. Exact historical retries return their opening receipt even after closure, without reopening.
Параметры запроса
- locationId
- Идентификатор точки из текущего подключения. обязательно по схеме · string
- openingCount
- Operator-declared cash count at opening. No ledger posting or provider payment occurs. обязательно по схеме · number · минимум 0 · максимум 1000000000000
- number
- Optional native display number; 0 is the current POS default. It is not a unique identifier. обязательно по схеме · integer · по умолчанию 0 · минимум 0 · максимум 9007199254740991
- comment
- Opening note without credentials. обязательно по схеме · string · по умолчанию "" · до символов 1000
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
- shiftId
- Created active Firestore POS shift ID, usable by native Orders and pos_cash_session_context/close. обязательно по схеме · string
- locationId
- Verified company establishment. обязательно по схеме · string
- openedAt
- Immutable server-assigned opening timestamp. обязательно по схеме · string
- openingCount
- Opening cash observation. обязательно по схеме · number · минимум 0 · максимум 1000000000000
- number
- Native display number; use shiftId for identity. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
- openWorker
- Current grant-bound native employee; never supplied by the caller. обязательно по схеме · string
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"locationId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Company establishment for this native POS shift. Must have a company cash account and currency."
},
"openingCount": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Operator-declared cash count at opening. No ledger posting or provider payment occurs."
},
"number": {
"default": 0,
"description": "Optional native display number; 0 is the current POS default. It is not a unique identifier.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"comment": {
"default": "",
"description": "Opening note without credentials.",
"type": "string",
"maxLength": 1000
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable ID for these exact opening arguments; retain it for recovery and retries."
}
},
"required": [
"locationId",
"openingCount",
"number",
"comment",
"requestId"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"shiftId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Created active Firestore POS shift ID, usable by native Orders and pos_cash_session_context/close."
},
"locationId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Verified company establishment."
},
"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))$",
"description": "Immutable server-assigned opening timestamp."
},
"openingCount": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Opening cash observation."
},
"number": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Native display number; use shiftId for identity."
},
"openWorker": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Current grant-bound native employee; never supplied by the caller."
}
},
"required": [
"shiftId",
"locationId",
"openedAt",
"openingCount",
"number",
"openWorker"
],
"additionalProperties": false
}