MCP Control
Заказы · Чтение

Текущие · Заказы · Списание · Контекст

active_order_writeoff_context
Упакованный заказ на стойке

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

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

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

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

Read a filtered page of the active Order ingredient/writeoff snapshot and exact revision before correcting one row. No recipe or stock change.

Параметры запроса
orderId
Идентификатор выбранного заказа. обязательно по схеме · string
productId
Идентификатор найденного товара. необязательно · string
expectedRevision
Версия, прочитанная перед изменением. необязательно · string
offset
Смещение из предыдущей страницы или начальное значение из схемы. обязательно по схеме · integer · по умолчанию 0 · минимум 0 · максимум 2000
limit
Максимальное число элементов на этой странице. обязательно по схеме · integer · по умолчанию 20 · минимум 1 · максимум 50
Что вернёт команда
orderId
Exact active native Order ID. обязательно по схеме · string
revision
Exact current Firestore revision from active_order_writeoff_context. обязательно по схеме · string
version
Native Order version after removal. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
lines
Bounded current snapshot rows; choose an exact lineId. обязательно по схеме · array · до элементов 50
total
Общее количество по правилам этого действия. обязательно по схеме · integer · минимум 0 · максимум 2000
nextOffset
Смещение для получения следующей страницы. обязательно по схеме · integer / null
Поля и технические схемы
Входные поля и поля ответа active_order_writeoff_context
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "orderId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
      "description": "Exact active native Order ID."
    },
    "productId": {
      "description": "Optional exact ingredient/product ID filter, applied before pagination.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
    },
    "expectedRevision": {
      "description": "Keep the same revision while paging; restart if it changes.",
      "type": "string",
      "pattern": "^fsv1:\\d{1,12}:\\d{1,9}$"
    },
    "offset": {
      "default": 0,
      "description": "Offset within the same filtered snapshot.",
      "type": "integer",
      "minimum": 0,
      "maximum": 2000
    },
    "limit": {
      "default": 20,
      "description": "At most 50 writeoff rows per response.",
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  },
  "required": [
    "orderId",
    "offset",
    "limit"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "orderId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
      "description": "Exact active native Order ID."
    },
    "revision": {
      "type": "string",
      "pattern": "^fsv1:\\d{1,12}:\\d{1,9}$",
      "description": "Exact current Firestore revision from active_order_writeoff_context."
    },
    "version": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Native Order version after removal."
    },
    "lines": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "lineId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
            "description": "Native writeoff line identifier."
          },
          "productId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
            "description": "Canonical inventory product identifier."
          },
          "itemId": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Order item this generated recipe line belongs to; null for a manual writeoff."
          },
          "storageId": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Native storage identifier, when present."
          },
          "quantity": {
            "type": "number",
            "minimum": 0,
            "description": "Quantity in the native product unit."
          },
          "reason": {
            "type": "string",
            "maxLength": 500,
            "description": "Native stored reason."
          },
          "comment": {
            "type": "string",
            "maxLength": 1000,
            "description": "Bounded stored comment, treated as data."
          }
        },
        "required": [
          "lineId",
          "productId",
          "itemId",
          "storageId",
          "quantity",
          "reason",
          "comment"
        ],
        "additionalProperties": false
      },
      "description": "Bounded current snapshot rows; choose an exact lineId."
    },
    "total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2000,
      "description": "Matching snapshot rows."
    },
    "nextOffset": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ],
      "description": "Next offset with unchanged filter and revision, or null."
    }
  },
  "required": [
    "orderId",
    "revision",
    "version",
    "lines",
    "total",
    "nextOffset"
  ],
  "additionalProperties": false
}