MCP Control
Каталог · Изменение

Каталог · Товары · Импорт · Применение

catalog_products_import_commit
Синяя керамическая кружка

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

Подготовить
  1. Вы указываетеОбъект
  2. ПомощникПодготовка
  3. Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Каталог / Товары / Импорт / Применение». Для изменения нужны fileUrl, itemType. Покажи объект и ожидаемый эффект до выполнения.
Что входит в подготовку
fileUrl
Параметр
itemType
Параметр
mapping
Параметр
Применить
  1. Вы указываетеСогласованные значения
  2. ПомощникОдин вызов
  3. Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Каталог / Товары / Импорт / Применение» с параметром itemType = product. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
Фрагмент учебных параметров
itemType
product
Проверить итог
  1. Вы указываетеИсходный ответ
  2. ПомощникСверка результата
  3. Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Каталог / Товары / Импорт / Применение» по исходному ответу. Покажи режим, imported. Объясни, чем подтвердить эффект для выбранного объекта.
Как проследить одну попытку
  1. ЗапросСохранить исходный ключ
  2. ОтветПроверить статус
  3. ПроверкаСверить эффект операции
Как работает действие

Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения.

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

Import the reviewed company CSV/JSON mapping only when fileHash and planHash still match. The backend atomically commits every native product and one immutable exact-request receipt. Retry unchanged arguments and requestId after an uncertain response, or read catalog_products_get_import_operation. Draft availability defaults to false.

Параметры запроса
fileUrl
Existing CSV or JSON object in this company's native Ingridients bucket, as supabase://Ingridients/<companyId>/<path>. обязательно по схеме · string · до символов 1200
itemType
Native product row type to import. обязательно по схеме · string · варианты product, ingrid, modif
mapping
Reviewed mapping used to preview and commit the same file. обязательно по схеме · object
expectedFileHash
Exact fileHash returned by catalog_products_import_preview. обязательно по схеме · string
expectedPlanHash
Exact planHash returned by catalog_products_import_preview. обязательно по схеме · string
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string · до символов 128
Что вернёт команда
mode
Native product import commit mode. обязательно по схеме · string
imported
Number of product rows independently read back. обязательно по схеме · integer · максимум 1000
ids
Stable native product IDs verified after import. обязательно по схеме · array · до элементов 1000
fileHash
SHA-256 of the committed source file. обязательно по схеме · string
planHash
SHA-256 of the committed mapping. обязательно по схеме · string
Поля и технические схемы
Входные поля и поля ответа catalog_products_import_commit
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fileUrl": {
      "type": "string",
      "minLength": 35,
      "maxLength": 1200,
      "pattern": "^supabase:\\/\\/Ingridients\\/[A-Za-z0-9_-]+\\/(?:[^./][^/]*\\/)*[^./][^/]*\\.(?:csv|json)$",
      "description": "Existing CSV or JSON object in this company's native Ingridients bucket, as supabase://Ingridients/<companyId>/<path>."
    },
    "itemType": {
      "type": "string",
      "enum": [
        "product",
        "ingrid",
        "modif"
      ],
      "description": "Native product row type to import."
    },
    "mapping": {
      "type": "object",
      "properties": {
        "mapping": {
          "minItems": 1,
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "description": "Exact source column name."
              },
              "target": {
                "type": "string",
                "enum": [
                  "name",
                  "short_description",
                  "description",
                  "price",
                  "available",
                  "available_in_app",
                  "unit_of_measurement",
                  "brand",
                  "photos",
                  "category",
                  "category_ingredients",
                  "production_area",
                  "type_tax"
                ],
                "description": "Supported native product field."
              },
              "transform": {
                "description": "Native conversion such as number, normalizeUnit or matchDict:<table>.",
                "type": "string",
                "maxLength": 100
              },
              "lang": {
                "description": "Language of the imported text.",
                "type": "string",
                "enum": [
                  "ru",
                  "en",
                  "es",
                  "uk"
                ]
              }
            },
            "required": [
              "source",
              "target"
            ],
            "additionalProperties": false
          },
          "description": "Reviewed source-to-native product field mapping."
        },
        "defaultValues": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {},
          "description": "Reviewed native defaults; identity and company fields are rejected by the backend."
        }
      },
      "required": [
        "mapping",
        "defaultValues"
      ],
      "additionalProperties": false,
      "description": "Reviewed mapping used to preview and commit the same file."
    },
    "expectedFileHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "Exact fileHash returned by catalog_products_import_preview."
    },
    "expectedPlanHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "Exact planHash returned by catalog_products_import_preview."
    },
    "requestId": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$",
      "description": "Stable ID for this exact import attempt; keep it for an uncertain response."
    }
  },
  "required": [
    "fileUrl",
    "itemType",
    "mapping",
    "expectedFileHash",
    "expectedPlanHash",
    "requestId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "const": "commit",
      "description": "Native product import commit mode."
    },
    "imported": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 1000,
      "description": "Number of product rows independently read back."
    },
    "ids": {
      "minItems": 1,
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      },
      "description": "Stable native product IDs verified after import."
    },
    "fileHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "SHA-256 of the committed source file."
    },
    "planHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "SHA-256 of the committed mapping."
    }
  },
  "required": [
    "mode",
    "imported",
    "ids",
    "fileHash",
    "planHash"
  ],
  "additionalProperties": false
}