MCP Control
Документы · Чтение

Документы · Просмотр · Заказы · Документы

documents_get_order_document
Папки документов

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

Получить данные
  1. Вы указываетеДокумент
  2. ПомощникЧтение
  3. Вы получаетеПоля ответа
Запрос в чат
Для задачи «Документы / Просмотр / Заказы / Документы» выполни чтение по выбранной записи (документ). Выведи кратко: metadata, заказ.
Что искать в ответе
metadata
Поле ответа
orderId
Заказ
document
Поле ответа
Задать параметры
  1. Вы указываетеДокумент
  2. ПомощникСверка выбора
  3. Вы получаетеТочный объект
Запрос в чат
Покажи, как получить «Документы / Просмотр / Заказы / Документы» на учебном примере с documentId = DEMO-101. Объясни, какие ещё данные нужны и как будет выглядеть ответ.
Фрагмент учебных параметров
documentId
DEMO-101
Разобрать ответ
  1. Вы указываетеПолученный ответ
  2. ПомощникРазбор значений
  3. Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «Документы / Просмотр / Заказы / Документы» объясни metadata, заказ. Отметь отсутствующие значения.
Поля для проверки
metadata
Поле ответа
orderId
Заказ
document
Поле ответа
Как работает действие

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

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

Read the native editable layout of one document linked to an accessible active order. Use an ID returned by documents_create_for_order or existing document discovery. The order relationship and establishment are verified; native printdata repeat-path configuration is included. No changes. If the full response exceeds the document read budget, use documents_read_order_document_chunk to read the complete layout without truncation.

Параметры запроса
documentId
Canonical existing order-linked Documents identifier. обязательно по схеме · string · до символов 128
Что вернёт команда
metadata
Document identity and current revision. обязательно по схеме · object
orderId
Verified linked active order identifier. обязательно по схеме · string
document
Existing native document layout and repeat-data path. обязательно по схеме · object
Поля и технические схемы
Входные поля и поля ответа documents_get_order_document
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "documentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Canonical existing order-linked Documents identifier."
    }
  },
  "required": [
    "documentId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "metadata": {
      "type": "object",
      "properties": {
        "documentId": {
          "type": "string",
          "description": "Canonical Companies/{company}/Documents document identifier."
        },
        "names": {
          "maxItems": 3,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "language": {
                "type": "string",
                "maxLength": 20,
                "description": "Stored language code preview."
              },
              "name": {
                "type": "string",
                "maxLength": 300,
                "description": "Stored localized template name preview."
              }
            },
            "required": [
              "language",
              "name"
            ],
            "additionalProperties": false
          },
          "description": "Preview of up to three existing document names; the complete name array is available in native layout reads."
        },
        "namesTruncated": {
          "type": "boolean",
          "description": "True when names or their preview strings were shortened; read the native layout chunks for complete names."
        },
        "totalNameCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991,
          "description": "Total number of stored localized names before preview limits."
        },
        "itemCount": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Number of native layout items."
        },
        "template": {
          "type": "boolean",
          "description": "True when this record is not linked to an order or task."
        },
        "revision": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$",
          "description": "Content revision token. Pass unchanged when updating or deleting to detect concurrent edits."
        }
      },
      "required": [
        "documentId",
        "names",
        "namesTruncated",
        "totalNameCount",
        "itemCount",
        "template",
        "revision"
      ],
      "additionalProperties": false,
      "description": "Document identity and current revision."
    },
    "orderId": {
      "type": "string",
      "description": "Verified linked active order identifier."
    },
    "document": {
      "type": "object",
      "properties": {
        "name": {
          "minItems": 1,
          "maxItems": 78,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "Language": {
                "type": "string",
                "minLength": 2,
                "maxLength": 20,
                "description": "Stored language code, preserving native casing."
              },
              "Text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "description": "Human-readable document template name in this language."
              }
            },
            "required": [
              "Language",
              "Text"
            ],
            "additionalProperties": false
          },
          "description": "Native Namesjson localized template names."
        },
        "width": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10000,
          "description": "Native document.width layout dimension; use values from the existing editor or a template."
        },
        "higth": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 100000,
          "description": "Native misspelled document.higth layout dimension; preserve its existing unit."
        },
        "color": {
          "description": "Native document background color value.",
          "type": "string",
          "maxLength": 60
        },
        "items": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "description": "Existing native document item id field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "type": {
                "description": "Existing native document item type field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "title": {
                "description": "Existing native document item title field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "value": {
                "description": "Existing native document item value field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 8000
              },
              "typedata": {
                "description": "Existing native document item typedata field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "field": {
                "description": "Existing native document item field field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "typebold": {
                "description": "Existing native document item typebold field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "color": {
                "description": "Existing native document item color field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "colorBackround": {
                "description": "Existing native document item colorBackround field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "colorframe": {
                "description": "Existing native document item colorframe field. Preserve the value used by the document editor.",
                "type": "string",
                "maxLength": 2000
              },
              "size": {
                "description": "Existing native document item size layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "frame": {
                "description": "Existing native document item frame layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "left": {
                "description": "Existing native document item left layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "top": {
                "description": "Existing native document item top layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "right": {
                "description": "Existing native document item right layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "bottom": {
                "description": "Existing native document item bottom layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "radius": {
                "description": "Existing native document item radius layout value in editor units. Preserve the native unit and meaning.",
                "type": "number",
                "minimum": -100000,
                "maximum": 100000
              },
              "row": {
                "description": "Existing native integer itemdocument.row layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "alignment": {
                "description": "Existing native integer itemdocument.alignment layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "alignmentVertical": {
                "description": "Existing native integer itemdocument.alignmentVertical layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "lyer": {
                "description": "Existing native integer itemdocument.lyer layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "place": {
                "description": "Existing native integer itemdocument.place layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "placeheight": {
                "description": "Existing native integer itemdocument.placeheight layout field.",
                "type": "integer",
                "minimum": -100000,
                "maximum": 100000
              },
              "list": {
                "description": "Native itemdocument.list values.",
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 2000,
                  "description": "Existing native list entry."
                }
              },
              "paddings": {
                "description": "Native itemdocument.paddings array; retain the editor ordering.",
                "maxItems": 4,
                "type": "array",
                "items": {
                  "type": "number",
                  "minimum": -10000,
                  "maximum": 10000,
                  "description": "Native editor padding value."
                }
              },
              "edite": {
                "description": "Native itemdocument.edite flag used by the existing editor.",
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "description": "Native itemdocument layout elements. Field names match the existing document editor."
        },
        "backround": {
          "description": "Existing document.backround image reference. Only a previously authorized media reference should be used.",
          "type": "string",
          "maxLength": 2000
        },
        "reguest": {
          "description": "Native document.reguest field list; preserve existing editor semantics.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 500,
            "description": "Existing native requested field identifier."
          }
        },
        "printdata": {
          "description": "Native repeat-data path used by preparePrintJob, for example @order.Items. This is a data path, not a JSON printer payload. Omit or use an empty value for one document.",
          "type": "string",
          "maxLength": 500,
          "pattern": "^(?:@?[A-Za-z_][A-Za-z0-9_.\\[\\]*/-]*)?$"
        }
      },
      "required": [
        "name",
        "width",
        "higth",
        "items"
      ],
      "additionalProperties": false,
      "description": "Existing native document layout and repeat-data path."
    }
  },
  "required": [
    "metadata",
    "orderId",
    "document"
  ],
  "additionalProperties": false
}