MCP Control
Склад · Чтение

Склад · Списание · Просмотр · Операция

inventory_writeoff_get_operation
Посылки на упаковочном столе

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

Получить данные
  1. Вы указываетеОбъект
  2. ПомощникЧтение
  3. Вы получаетеПоля ответа
Запрос в чат
Для задачи «Склад / Списание / Просмотр / Операция» выполни чтение в текущей компании. Выведи кратко: статус, результат.
Что искать в ответе
status
Статус
result
Результат
Задать параметры
  1. Вы указываетеЗадача
  2. ПомощникСхема входа
  3. Вы получаетеУсловия чтения
Запрос в чат
Покажи, как получить «Склад / Списание / Просмотр / Операция» на учебном примере с values.reasonId = DEMO-101. Объясни, какие ещё данные нужны и как будет выглядеть ответ.
Фрагмент учебных параметров
values.reasonId
DEMO-101
values.comment
Проверено на учебной записи
Разобрать ответ
  1. Вы указываетеПолученный ответ
  2. ПомощникРазбор значений
  3. Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «Склад / Списание / Просмотр / Операция» объясни статус, результат. Отметь отсутствующие значения.
Поля для проверки
status
Статус
result
Результат
Как работает действие

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

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

Read the immutable result of the exact original write-off creation. Never repeats a stock change.

Параметры запроса
values
Значения для записи. Состав и вложенность указаны в схеме. обязательно по схеме · object
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
status
Whether this exact request has a durable result. обязательно по схеме · string · варианты completed, not_found
result
Original committed result, or null if not found. A missing result does not rule out an in-flight commit. обязательно по схеме · object / null
Поля и технические схемы
Входные поля и поля ответа inventory_writeoff_get_operation
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "values": {
      "type": "object",
      "properties": {
        "storage": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
          "description": "Exact existing inventory storage ID in the connected company and location scope."
        },
        "reasonId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
          "description": "Existing write-off reason ID from inventory_list_writeoff_reasons."
        },
        "comment": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1000,
          "description": "Why this physical write-off occurred."
        },
        "items": {
          "minItems": 1,
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "Product": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
                "description": "Distinct existing product ID. One line per product in this write-off."
              },
              "Gross": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1000000000,
                "description": "Quantity removed from posted stock in the native product unit."
              },
              "Price": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000,
                "description": "Explicit unit cost in the native currency; no valuation is inferred."
              },
              "amount": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000000,
                "description": "Explicit line value. No finance transaction or payment is created."
              },
              "postedStockBefore": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000000,
                "description": "Exact posted quantity for this product and storage from inventory_get_stock. A changed or insufficient quantity conflicts."
              }
            },
            "required": [
              "Product",
              "Gross",
              "Price",
              "amount",
              "postedStockBefore"
            ],
            "additionalProperties": false
          },
          "description": "One to 100 distinct product lines in the same storage."
        }
      },
      "required": [
        "storage",
        "reasonId",
        "comment",
        "items"
      ],
      "additionalProperties": false,
      "description": "Pure physical write-off; server controls identity, timestamp, actor and native Type."
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Stable ID for these exact arguments; reuse after an uncertain response."
    }
  },
  "required": [
    "values",
    "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 this exact request has a durable result."
    },
    "result": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "recordId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
              "description": "Created native write-off ID."
            },
            "revision": {
              "type": "string",
              "pattern": "^[a-f0-9]{32}$",
              "description": "Native revision at commit time."
            },
            "lineCount": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Number of committed write-off lines."
            },
            "amount": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000000000000000,
              "description": "Sum of explicit line values; no finance transaction is created."
            },
            "stockEffect": {
              "type": "string",
              "const": "decremented_by_native_trigger",
              "description": "The installed native trigger decremented posted stock in the same SQL transaction."
            }
          },
          "required": [
            "recordId",
            "revision",
            "lineCount",
            "amount",
            "stockEffect"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Original committed result, or null if not found. A missing result does not rule out an in-flight commit."
    }
  },
  "required": [
    "status",
    "result"
  ],
  "additionalProperties": false
}