Каталог · Чтение
Каталог · Товары · Импорт · Предпросмотр
catalog_products_import_preview
Попробуйте три запроса
Получить данные
- Вы указываетеОбъект
- ПомощникЧтение
- Вы получаетеПоля ответа
Запрос в чат
Для задачи «Каталог / Товары / Импорт / Предпросмотр» выполни чтение в текущей компании. Выведи кратко: режим, строки.
- mode
- Режим
- rows
- Строки
- sample
- Поле ответа
Задать параметры
- Вы указываетеЗадача
- ПомощникСхема входа
- Вы получаетеУсловия чтения
Запрос в чат
Покажи, как получить «Каталог / Товары / Импорт / Предпросмотр» на учебном примере с itemType = product. Объясни, какие ещё данные нужны и как будет выглядеть ответ.
- itemType
- product
Разобрать ответ
- Вы указываетеПолученный ответ
- ПомощникРазбор значений
- Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «Каталог / Товары / Импорт / Предпросмотр» объясни режим, строки. Отметь отсутствующие значения.
- mode
- Режим
- rows
- Строки
- sample
- Поле ответа
Как работает действие
Это чтение. Выберите запись или задайте фильтры в доступной компании.
Описание разработчика
Validate a reviewed field mapping and preview native draft products from this company file. No product is written. Compare the returned fileHash and planHash before commit.
Параметры запроса
- 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
Что вернёт команда
- mode
- Read-only mapped preview mode. обязательно по схеме · string
- rows
- Number of native product candidates. обязательно по схеме · integer · максимум 1000
- sample
- At most three native product candidates before writing. обязательно по схеме · array · до элементов 3
- fileHash
- SHA-256 of the source file used for this preview. обязательно по схеме · string
- planHash
- SHA-256 of the validated mapping used for this preview. обязательно по схеме · string
Поля и технические схемы

Вход · 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."
}
},
"required": [
"fileUrl",
"itemType",
"mapping"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "preview",
"description": "Read-only mapped preview mode."
},
"rows": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 1000,
"description": "Number of native product candidates."
},
"sample": {
"maxItems": 3,
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"description": "At most three native product candidates before writing."
},
"fileHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "SHA-256 of the source file used for this preview."
},
"planHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "SHA-256 of the validated mapping used for this preview."
}
},
"required": [
"mode",
"rows",
"sample",
"fileHash",
"planHash"
],
"additionalProperties": false
}