{"openapi":"3.1.0","info":{"title":"Мерксалис — API интеграций","description":"# Мерксалис — API интеграций v1\n\n**Мерксалис — облачная платформа для управления товарными и складскими процессами в электронной торговле.**\n\nAPI предназначен для подключения внешних учётных, складских и аналитических систем к платформе Мерксалис.\nВнешние системы могут передавать в Мерксалис каталог товаров, коды, штрихкоды, дополнительные идентификаторы\nи связи с маркетплейсами, а также получать из Мерксалис нормализованные операционные данные электронной торговли\nи складской обработки заказов.\n\n**Базовый адрес:** `https://merxalis.ru/integration/v1`  \n**Протокол:** HTTPS  \n**Формат:** JSON  \n**Версия:** v1\n\nПолное пошаговое руководство находится на `/integration/guide`. Эта страница Swagger является интерактивным\nсправочником методов и схем.\n\n## Быстрый старт\n\n1. Создайте API-ключ в настройках Мерксалис.\n2. Проверьте ключ через `GET /context`.\n3. Для передачи каталога используйте `POST /catalog/products/upsert`.\n4. Для получения операционных данных используйте `GET /operations`.\n5. Для чтения изменений каталога используйте `GET /catalog/changes`.\n\nМинимальный товар:\n\n```json\n{\n  \"items\": [{\n    \"internal_code\": \"00125\",\n    \"name\": \"Фартук кухонный\",\n    \"barcodes\": [\"4673752160115\", \"4601234567890\"]\n  }]\n}\n```\n\n`internal_code` — внутренний бизнес-код товара организации. Все коды, идентификаторы и штрихкоды\nпередаются строками; ведущие нули сохраняются.\n\n## Идентификаторы и распознавание\n\nИдентификатор хранит смысл (`type`, необязательный `namespace`, `value`) отдельно от права использовать значение для\nскладского распознавания (`resolvable`). `internal_code` и `barcode` всегда распознаваемы. Дополнительный идентификатор\nпо умолчанию `resolvable=false`.\n\nОдно распознаваемое значение может вести только к одному `product_id`. Одинаковое значение может иметь несколько ролей\nу одного товара — это не конфликт. Неоднозначность между разными товарами всегда возвращается как ошибка и никогда не\nразрешается догадкой.\n\n## Синхронизация\n\nОбычный bulk upsert имеет merge-семантику: отсутствие старого штрихкода или связи в новом пакете их не удаляет.\nДля полной синхронизации используется отдельный двухфазный сценарий: открыть `/catalog/sync-runs` с точным\n`expected_items`, передать пакеты с `sync_id`, затем явно вызвать `/complete` с `confirm_full_snapshot=true`. Сервер считает\nуникальные канонические товары и не применяет отсутствие товаров, если фактическое количество отличается от `expected_items`.\nДо успешного `/complete` отсутствие записи не применяется. Даже полный снимок не удаляет вложенные штрихкоды,\nдополнительные идентификаторы или связи с маркетплейсами только потому, что они отсутствуют в следующем пакете.\n\nДля чтения изменений используйте `/catalog/changes` и сохраняйте непрозрачный `sync_cursor`. Cursor нельзя разбирать\nили формировать самостоятельно.\n\n## Конкурентные изменения\n\nОдин товар имеет `version` и ETag. Одиночные изменяющие операции требуют `If-Match` с ранее полученным ETag.\nЭто предотвращает случайную перезапись изменений другого клиента. Bulk upsert поддерживает `expected_version` на уровне строки.\n\n## Безопасные повторы\n\nИзменяющие POST поддерживают `Idempotency-Key`. Повтор того же запроса с тем же ключом возвращает тот же логический\nрезультат; повтор ключа с другим содержимым даёт `409 IDEMPOTENCY_KEY_REUSED`.\n\nАвтоматический retry уместен для `408`, `429`, `500`, `502`, `503`, `504` с увеличивающейся задержкой. Для write-запросов\nпри retry используйте тот же `Idempotency-Key`. Если присутствует `Retry-After`, он имеет приоритет.\n\n## Связи с маркетплейсами\n\nAPI работает со стабильным `account_id` подключённого кабинета и хранит связь товара организации с представлением товара\nна маркетплейсе. Внешние идентификаторы передаются как типизированный массив `external_identifiers[]`: публичный контракт\nне навязывает универсальную пару «товар + вариант», а обязательные типы определяет адаптер конкретной площадки. Например,\nдля текущего адаптера Wildberries используются `nm_id` и `chrt_id`. Эти методы **не отправляют изменения в API\nWildberries, Ozon или Яндекс Маркета**. Операции, реально изменяющие внешний маркетплейс, будут отдельными бизнес-методами\nи отдельными правами.\n\n## API-ключи\n\nAPI-ключ используется только для авторизации и проверки прав доступа к данным организации. Организация может создавать\nнеобходимое ей количество API-ключей и использовать их в своих системах по собственным правилам. Максимальный срок действия\nключа — 365 дней. Открытое значение токена показывается один раз.\n\n## Ошибки\n\nФорма ошибки стабильна:\n\n```json\n{\n  \"error\": {\n    \"code\": \"RESOLUTION_CONFLICT\",\n    \"message\": \"Распознаваемое значение уже ведёт к другому товару\",\n    \"details\": {}\n  },\n  \"request_id\": \"...\"\n}\n```\n\nПрограммная интеграция должна ориентироваться на `error.code`. При обращении в поддержку передавайте `request_id`.","version":"1.0.0"},"paths":{"/integration/v1/context":{"get":{"tags":["Начало работы"],"summary":"Проверить API-ключ и организацию","description":"Проверяет Bearer API-ключ и возвращает организацию, права ключа, возможности API и действующие лимиты. Организация определяется сервером по API-ключу и не передаётся клиентом.","operationId":"integration_v1_context_integration_v1_context_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextResponse"},"example":{"api_version":"v1","organization":{"slug":"example-company","name":"Пример организации"},"credential":{"name":"Основная ERP","scopes":["catalog:read","catalog:write","marketplaces:read"],"expires_at":"2027-09-04T00:00:00Z"},"capabilities":{"catalog":true,"bulk_upsert":true,"full_sync":true,"change_cursor":true,"marketplace_links":true,"marketplace_write":false,"warehouse_write":false},"limits":{"bulk_upsert_items":1000,"request_body_bytes":10485760,"barcodes_per_item":500,"identifiers_per_item":200,"marketplace_links_per_item":100,"marketplace_external_identifiers_per_link":50,"identifiers_per_bulk_request":20000,"read_requests_per_minute":120,"write_requests_per_minute":30,"full_sync_hours":24}}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}],"parameters":[]}},"/integration/v1/marketplace-accounts":{"get":{"tags":["Маркетплейсы"],"summary":"Получить подключённые кабинеты маркетплейсов","description":"Возвращает стабильный account_id и безопасные данные подключений организации. Токены и другие секреты маркетплейсов никогда не публикуются.","operationId":"integration_v1_marketplace_accounts_integration_v1_marketplace_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceAccountsEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}],"parameters":[]}},"/integration/v1/operations":{"get":{"tags":["Операционные данные"],"summary":"Получить операционные данные Мерксалис","description":"Возвращает сохранённое текущее состояние заказов, товаров, складов, поставок, рейсов, маркировки и связанных операций организации. Запрос не запускает синхронизацию с маркетплейсом и не выполняет изменяющих операций. Требуемое право API-ключа: operations:read.","operationId":"integration_v1_operations_integration_v1_operations_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"Начальная дата заказа YYYY-MM-DD","title":"Date From"},"description":"Начальная дата заказа YYYY-MM-DD"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"Конечная дата заказа YYYY-MM-DD","title":"Date To"},"description":"Конечная дата заказа YYYY-MM-DD"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationsResponse"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}}},"x-required-scope":"operations:read","security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/products":{"get":{"tags":["Каталог"],"summary":"Получить каталог товаров организации","description":"Возвращает товары каталога. Для гарантированной инкрементальной синхронизации используйте /catalog/changes; обычный cursor этого метода предназначен только для пагинации списка.","operationId":"integration_v1_catalog_products_integration_v1_catalog_products_get","parameters":[{"name":"internal_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Internal Code"}},{"name":"barcode","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Barcode"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","pattern":"^(active|archived|all)$","default":"active","title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Непрозрачный cursor из page.next_cursor","title":"Cursor"},"description":"Непрозрачный cursor из page.next_cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]},"post":{"tags":["Каталог"],"summary":"Создать товар каталога","description":"Создаёт канонический товар Мерксалис. Требуется хотя бы один стабильный идентификатор. Для массовой интеграции рекомендуется /catalog/products/upsert. Idempotency-Key поддерживается и рекомендуется.","operationId":"integration_v1_catalog_product_create_integration_v1_catalog_products_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RESOLUTION_CONFLICT":{"summary":"Распознаваемое значение уже ведёт к другому товару","value":{"error":{"code":"RESOLUTION_CONFLICT","message":"Распознаваемое значение уже ведёт к другому товару","details":{}},"request_id":"01JEXAMPLE"}},"MARKETPLACE_LINK_CONFLICT":{"summary":"Товар маркетплейса уже связан с другим товаром","value":{"error":{"code":"MARKETPLACE_LINK_CONFLICT","message":"Товар маркетплейса уже связан с другим товаром","details":{}},"request_id":"01JEXAMPLE"}},"MARKETPLACE_LINK_IDENTIFIER_CONFLICT":{"summary":"Идентификатор существующей связи нельзя заменить неявно","value":{"error":{"code":"MARKETPLACE_LINK_IDENTIFIER_CONFLICT","message":"Идентификатор существующей связи нельзя заменить неявно","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}}},"security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}]}},"/integration/v1/catalog/changes":{"get":{"tags":["Синхронизация"],"summary":"Получить изменения каталога по курсору","description":"Надёжный механизм инкрементальной синхронизации. Cursor непрозрачен: не разбирайте и не формируйте его самостоятельно. Пока page.next_cursor не пуст, продолжайте чтение страниц. На последней странице сохраните sync_cursor для следующего запуска.","operationId":"integration_v1_catalog_changes_integration_v1_catalog_changes_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangesResponse"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/products/{product_id}":{"get":{"tags":["Каталог"],"summary":"Получить один товар каталога","operationId":"integration_v1_catalog_product_get_integration_v1_catalog_products__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]},"patch":{"tags":["Каталог"],"summary":"Изменить товар каталога","description":"Меняет только переданные поля. Массивы имеют merge-семантику и не удаляют отсутствующие значения. Обязательно передайте If-Match с ETag ранее прочитанной версии товара.","operationId":"integration_v1_catalog_product_patch_integration_v1_catalog_products__product_id__patch","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","example":"\"17\""},"description":"ETag ранее прочитанной версии товара."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RESOLUTION_CONFLICT":{"summary":"Распознаваемое значение уже ведёт к другому товару","value":{"error":{"code":"RESOLUTION_CONFLICT","message":"Распознаваемое значение уже ведёт к другому товару","details":{}},"request_id":"01JEXAMPLE"}},"MARKETPLACE_LINK_CONFLICT":{"summary":"Товар маркетплейса уже связан с другим товаром","value":{"error":{"code":"MARKETPLACE_LINK_CONFLICT","message":"Товар маркетплейса уже связан с другим товаром","details":{}},"request_id":"01JEXAMPLE"}},"MARKETPLACE_LINK_IDENTIFIER_CONFLICT":{"summary":"Идентификатор существующей связи нельзя заменить неявно","value":{"error":{"code":"MARKETPLACE_LINK_IDENTIFIER_CONFLICT","message":"Идентификатор существующей связи нельзя заменить неявно","details":{}},"request_id":"01JEXAMPLE"}}}}}},"412":{"description":"Товар был изменён после его чтения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VERSION_MISMATCH","message":"Товар был изменён после его чтения","details":{}},"request_id":"01JEXAMPLE"}}}},"428":{"description":"Для изменения товара требуется If-Match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PRECONDITION_REQUIRED","message":"Для изменения товара требуется If-Match","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/products/{product_id}/archive":{"post":{"tags":["Каталог"],"summary":"Архивировать товар","description":"Архивирует канонический товар без удаления исторической идентичности product_id. Требуется If-Match.","operationId":"integration_v1_catalog_product_archive_integration_v1_catalog_products__product_id__archive_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","example":"\"17\""},"description":"ETag ранее прочитанной версии товара."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}},"412":{"description":"Товар был изменён после его чтения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VERSION_MISMATCH","message":"Товар был изменён после его чтения","details":{}},"request_id":"01JEXAMPLE"}}}},"428":{"description":"Для изменения товара требуется If-Match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PRECONDITION_REQUIRED","message":"Для изменения товара требуется If-Match","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/products/{product_id}/restore":{"post":{"tags":["Каталог"],"summary":"Восстановить товар из архива","description":"Возвращает товар в активный каталог. Требуется If-Match.","operationId":"integration_v1_catalog_product_restore_integration_v1_catalog_products__product_id__restore_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","example":"\"17\""},"description":"ETag ранее прочитанной версии товара."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RESOLUTION_CONFLICT":{"summary":"Распознаваемое значение уже ведёт к другому товару","value":{"error":{"code":"RESOLUTION_CONFLICT","message":"Распознаваемое значение уже ведёт к другому товару","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}},"412":{"description":"Товар был изменён после его чтения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VERSION_MISMATCH","message":"Товар был изменён после его чтения","details":{}},"request_id":"01JEXAMPLE"}}}},"428":{"description":"Для изменения товара требуется If-Match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PRECONDITION_REQUIRED","message":"Для изменения товара требуется If-Match","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/products/upsert":{"post":{"tags":["Синхронизация"],"summary":"Массово синхронизировать товары","description":"Рекомендуемый способ регулярной интеграции каталога: до 1000 товаров за запрос. Повтор одинаковых данных не создаёт дублей. Для полной синхронизации сначала откройте sync-run и передавайте его sync_id.","operationId":"integration_v1_catalog_products_upsert_integration_v1_catalog_products_upsert_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertResponse"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"SYNC_NOT_RUNNING":{"summary":"Синхронизация уже не принимает пакеты","value":{"error":{"code":"SYNC_NOT_RUNNING","message":"Синхронизация уже не принимает пакеты","details":{}},"request_id":"01JEXAMPLE"}},"SYNC_EXPIRED":{"summary":"Полная синхронизация истекла и не принимает пакеты","value":{"error":{"code":"SYNC_EXPIRED","message":"Полная синхронизация истекла и не принимает пакеты","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}}},"security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}]}},"/integration/v1/catalog/products/{product_id}/barcodes":{"post":{"tags":["Идентификаторы"],"summary":"Добавить штрихкоды товару","description":"Добавляет 1..500 штрихкодов. Требуется If-Match.","operationId":"integration_v1_catalog_barcodes_add_integration_v1_catalog_products__product_id__barcodes_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","example":"\"17\""},"description":"ETag ранее прочитанной версии товара."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeAddBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RESOLUTION_CONFLICT":{"summary":"Распознаваемое значение уже ведёт к другому товару","value":{"error":{"code":"RESOLUTION_CONFLICT","message":"Распознаваемое значение уже ведёт к другому товару","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}},"412":{"description":"Товар был изменён после его чтения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VERSION_MISMATCH","message":"Товар был изменён после его чтения","details":{}},"request_id":"01JEXAMPLE"}}}},"428":{"description":"Для изменения товара требуется If-Match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PRECONDITION_REQUIRED","message":"Для изменения товара требуется If-Match","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"tags":["Идентификаторы"],"summary":"Удалить штрихкод товара","description":"Удаление всегда явное; bulk upsert не удаляет отсутствующие штрихкоды. Требуется If-Match.","operationId":"integration_v1_catalog_barcode_delete_integration_v1_catalog_products__product_id__barcodes_delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"barcode","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"title":"Barcode"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","example":"\"17\""},"description":"ETag ранее прочитанной версии товара."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"412":{"description":"Товар был изменён после его чтения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VERSION_MISMATCH","message":"Товар был изменён после его чтения","details":{}},"request_id":"01JEXAMPLE"}}}},"428":{"description":"Для изменения товара требуется If-Match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PRECONDITION_REQUIRED","message":"Для изменения товара требуется If-Match","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/products/{product_id}/identifiers":{"post":{"tags":["Идентификаторы"],"summary":"Добавить дополнительные идентификаторы","description":"Дополнительный идентификатор хранит смысл и namespace отдельно от возможности складского распознавания. resolvable=false по умолчанию. Требуется If-Match.","operationId":"integration_v1_catalog_identifiers_add_integration_v1_catalog_products__product_id__identifiers_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","example":"\"17\""},"description":"ETag ранее прочитанной версии товара."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifierAddBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"RESOLUTION_CONFLICT":{"summary":"Распознаваемое значение уже ведёт к другому товару","value":{"error":{"code":"RESOLUTION_CONFLICT","message":"Распознаваемое значение уже ведёт к другому товару","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}},"412":{"description":"Товар был изменён после его чтения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VERSION_MISMATCH","message":"Товар был изменён после его чтения","details":{}},"request_id":"01JEXAMPLE"}}}},"428":{"description":"Для изменения товара требуется If-Match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PRECONDITION_REQUIRED","message":"Для изменения товара требуется If-Match","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/products/{product_id}/identifiers/{identifier_id}":{"delete":{"tags":["Идентификаторы"],"summary":"Удалить дополнительный идентификатор","description":"Требуется If-Match.","operationId":"integration_v1_catalog_identifier_delete_integration_v1_catalog_products__product_id__identifiers__identifier_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"identifier_id","in":"path","required":true,"schema":{"type":"string","title":"Identifier Id"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","example":"\"17\""},"description":"ETag ранее прочитанной версии товара."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"412":{"description":"Товар был изменён после его чтения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VERSION_MISMATCH","message":"Товар был изменён после его чтения","details":{}},"request_id":"01JEXAMPLE"}}}},"428":{"description":"Для изменения товара требуется If-Match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PRECONDITION_REQUIRED","message":"Для изменения товара требуется If-Match","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/products/{product_id}/marketplace-links":{"post":{"tags":["Маркетплейсы"],"summary":"Связать товар с товаром маркетплейса","description":"Используйте стабильный account_id из /marketplace-accounts. API записывает только связь в каталоге Мерксалис и не изменяет данные маркетплейса. Требуется If-Match.","operationId":"integration_v1_catalog_marketplace_link_add_integration_v1_catalog_products__product_id__marketplace_links_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","example":"\"17\""},"description":"ETag ранее прочитанной версии товара."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceLinkInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"MARKETPLACE_LINK_CONFLICT":{"summary":"Товар маркетплейса уже связан с другим товаром","value":{"error":{"code":"MARKETPLACE_LINK_CONFLICT","message":"Товар маркетплейса уже связан с другим товаром","details":{}},"request_id":"01JEXAMPLE"}},"MARKETPLACE_LINK_IDENTIFIER_CONFLICT":{"summary":"Идентификатор существующей связи нельзя заменить неявно","value":{"error":{"code":"MARKETPLACE_LINK_IDENTIFIER_CONFLICT","message":"Идентификатор существующей связи нельзя заменить неявно","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}},"412":{"description":"Товар был изменён после его чтения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VERSION_MISMATCH","message":"Товар был изменён после его чтения","details":{}},"request_id":"01JEXAMPLE"}}}},"428":{"description":"Для изменения товара требуется If-Match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PRECONDITION_REQUIRED","message":"Для изменения товара требуется If-Match","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/products/{product_id}/marketplace-links/{link_id}":{"patch":{"tags":["Маркетплейсы"],"summary":"Изменить бизнес-атрибут связи с маркетплейсом","description":"PATCH не меняет идентичность marketplace link. Ошибочную идентичность архивируйте и создайте новую связь. Требуется If-Match.","operationId":"integration_v1_catalog_marketplace_link_patch_integration_v1_catalog_products__product_id__marketplace_links__link_id__patch","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","example":"\"17\""},"description":"ETag ранее прочитанной версии товара."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceLinkPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"412":{"description":"Товар был изменён после его чтения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VERSION_MISMATCH","message":"Товар был изменён после его чтения","details":{}},"request_id":"01JEXAMPLE"}}}},"428":{"description":"Для изменения товара требуется If-Match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PRECONDITION_REQUIRED","message":"Для изменения товара требуется If-Match","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/products/{product_id}/marketplace-links/{link_id}/archive":{"post":{"tags":["Маркетплейсы"],"summary":"Архивировать связь с маркетплейсом","description":"Архивирует неверную или больше не актуальную связь без переписывания её идентичности. Требуется If-Match.","operationId":"integration_v1_catalog_marketplace_link_archive_integration_v1_catalog_products__product_id__marketplace_links__link_id__archive_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","example":"\"17\""},"description":"ETag ранее прочитанной версии товара."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}},"412":{"description":"Товар был изменён после его чтения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VERSION_MISMATCH","message":"Товар был изменён после его чтения","details":{}},"request_id":"01JEXAMPLE"}}}},"428":{"description":"Для изменения товара требуется If-Match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PRECONDITION_REQUIRED","message":"Для изменения товара требуется If-Match","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/products/{product_id}/marketplace-links/{link_id}/restore":{"post":{"tags":["Маркетплейсы"],"summary":"Восстановить связь с маркетплейсом","description":"Восстанавливает архивную связь, если активная идентичность не занята другим товаром. Требуется If-Match.","operationId":"integration_v1_catalog_marketplace_link_restore_integration_v1_catalog_products__product_id__marketplace_links__link_id__restore_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","example":"\"17\""},"description":"ETag ранее прочитанной версии товара."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."},"ETag":{"schema":{"type":"string","example":"\"17\""},"description":"Версия товара для последующего If-Match."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"MARKETPLACE_LINK_CONFLICT":{"summary":"Товар маркетплейса уже связан с другим товаром","value":{"error":{"code":"MARKETPLACE_LINK_CONFLICT","message":"Товар маркетплейса уже связан с другим товаром","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}},"412":{"description":"Товар был изменён после его чтения","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VERSION_MISMATCH","message":"Товар был изменён после его чтения","details":{}},"request_id":"01JEXAMPLE"}}}},"428":{"description":"Для изменения товара требуется If-Match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PRECONDITION_REQUIRED","message":"Для изменения товара требуется If-Match","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/resolve":{"get":{"tags":["Идентификаторы"],"summary":"Проверить распознавание идентификатора","description":"Ищет только значения, явно разрешённые для однозначного распознавания. internal_code и barcode разрешены всегда; дополнительные identifiers — только при resolvable=true. Метод не выполняет складскую операцию.","operationId":"integration_v1_catalog_resolve_integration_v1_catalog_resolve_get","parameters":[{"name":"value","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"title":"Value"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveResponse"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/sync-runs":{"post":{"tags":["Синхронизация"],"summary":"Начать полную синхронизацию каталога","description":"Открывает безопасную двухфазную полную синхронизацию на 24 часа. Отсутствующие записи не архивируются, пока интегратор явно не вызовет /complete. Idempotency-Key поддерживается и рекомендуется.","operationId":"integration_v1_catalog_sync_start_integration_v1_catalog_sync_runs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRunCreateBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRunEnvelope"},"example":{"api_version":"v1","sync":{"sync_id":"68abe3dc-d602-48c4-9a06-f14458006364","mode":"full","status":"running","started_at":"2026-09-04T06:00:00Z","completed_at":null,"expires_at":"2026-09-05T06:00:00Z","expected_items":50000,"received_unique_items":0,"summary":{"received":0,"created":0,"updated":0,"unchanged":0,"conflicts":0,"invalid":0,"archived":0}}}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"FULL_SYNC_IN_PROGRESS":{"summary":"Для этой организации уже выполняется полная синхронизация","value":{"error":{"code":"FULL_SYNC_IN_PROGRESS","message":"Для этой организации уже выполняется полная синхронизация","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}}},"security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}]}},"/integration/v1/catalog/sync-runs/{sync_id}":{"get":{"tags":["Синхронизация"],"summary":"Получить состояние синхронизации","operationId":"integration_v1_catalog_sync_get_integration_v1_catalog_sync_runs__sync_id__get","parameters":[{"name":"sync_id","in":"path","required":true,"schema":{"type":"string","title":"Sync Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRunEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/sync-runs/{sync_id}/complete":{"post":{"tags":["Синхронизация"],"summary":"Завершить полную синхронизацию","description":"Только после этого шага источник считается полностью просмотренным. Записи текущей интеграции, отсутствовавшие во всех пакетах этого sync-run, деактивируются; канонический товар архивируется только если у него больше нет активных источников.","operationId":"integration_v1_catalog_sync_complete_integration_v1_catalog_sync_runs__sync_id__complete_post","parameters":[{"name":"sync_id","in":"path","required":true,"schema":{"type":"string","title":"Sync Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRunCompleteBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRunEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"SYNC_MODE_INVALID":{"summary":"Операция доступна только для полной синхронизации","value":{"error":{"code":"SYNC_MODE_INVALID","message":"Операция доступна только для полной синхронизации","details":{}},"request_id":"01JEXAMPLE"}},"SYNC_FAILED":{"summary":"Полная синхронизация содержит ошибочные строки","value":{"error":{"code":"SYNC_FAILED","message":"Полная синхронизация содержит ошибочные строки","details":{}},"request_id":"01JEXAMPLE"}},"SYNC_CANCELLED":{"summary":"Полная синхронизация была прервана","value":{"error":{"code":"SYNC_CANCELLED","message":"Полная синхронизация была прервана","details":{}},"request_id":"01JEXAMPLE"}},"SYNC_EXPIRED":{"summary":"Полная синхронизация истекла","value":{"error":{"code":"SYNC_EXPIRED","message":"Полная синхронизация истекла","details":{}},"request_id":"01JEXAMPLE"}},"FULL_SYNC_INCOMPLETE":{"summary":"Количество записей не совпадает с expected_items","value":{"error":{"code":"FULL_SYNC_INCOMPLETE","message":"Количество записей не совпадает с expected_items","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}},"/integration/v1/catalog/sync-runs/{sync_id}/abort":{"post":{"tags":["Синхронизация"],"summary":"Прервать полную синхронизацию","description":"Безопасно завершает незавершённый full sync без применения отсутствующих записей. После прерывания для нового полного снимка создайте новый sync-run.","operationId":"integration_v1_catalog_sync_abort_integration_v1_catalog_sync_runs__sync_id__abort_post","parameters":[{"name":"sync_id","in":"path","required":true,"schema":{"type":"string","title":"Sync Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200,"example":"8a91584c-470d-4f44-b985-2a3d16432e54"},"description":"Рекомендуемый уникальный ключ безопасного повтора изменяющего POST. Хранится 24 часа."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRunEnvelope"}}},"headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Идентификатор запроса для диагностики и поддержки."}}},"422":{"description":"Параметры запроса не прошли проверку","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"VALIDATION_ERROR","message":"Параметры запроса не прошли проверку","details":{}},"request_id":"01JEXAMPLE"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_REQUEST","message":"Некорректный запрос","details":{}},"request_id":"01JEXAMPLE"}}}},"401":{"description":"API-ключ недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INVALID_API_KEY","message":"API-ключ недействителен","details":{}},"request_id":"01JEXAMPLE"}}}},"403":{"description":"API-ключ не имеет необходимого права","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"API-ключ не имеет необходимого права","details":{}},"request_id":"01JEXAMPLE"}}}},"429":{"description":"Превышена допустимая частота запросов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Превышена допустимая частота запросов","details":{}},"request_id":"01JEXAMPLE"}}}},"503":{"description":"Сервис временно недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"SERVICE_UNAVAILABLE","message":"Сервис временно недоступен","details":{}},"request_id":"01JEXAMPLE"}}}},"413":{"description":"Тело запроса превышает допустимый размер","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Тело запроса превышает допустимый размер","details":{}},"request_id":"01JEXAMPLE"}}}},"409":{"description":"Конфликт состояния или идентичности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"examples":{"SYNC_MODE_INVALID":{"summary":"Операция доступна только для полной синхронизации","value":{"error":{"code":"SYNC_MODE_INVALID","message":"Операция доступна только для полной синхронизации","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_KEY_REUSED":{"summary":"Idempotency-Key уже использован для другого запроса","value":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"Idempotency-Key уже использован для другого запроса","details":{}},"request_id":"01JEXAMPLE"}},"IDEMPOTENCY_IN_PROGRESS":{"summary":"Запрос с этим Idempotency-Key уже выполняется","value":{"error":{"code":"IDEMPOTENCY_IN_PROGRESS","message":"Запрос с этим Idempotency-Key уже выполняется","details":{}},"request_id":"01JEXAMPLE"}}}}}},"404":{"description":"Запрошенный ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationError"},"example":{"error":{"code":"RESOURCE_NOT_FOUND","message":"Запрошенный ресурс не найден","details":{}},"request_id":"01JEXAMPLE"}}}}},"security":[{"BearerAuth":[]}]}}},"components":{"schemas":{"APILimitsResponse":{"properties":{"bulk_upsert_items":{"type":"integer","title":"Bulk Upsert Items"},"request_body_bytes":{"type":"integer","title":"Request Body Bytes"},"barcodes_per_item":{"type":"integer","title":"Barcodes Per Item"},"identifiers_per_item":{"type":"integer","title":"Identifiers Per Item"},"marketplace_links_per_item":{"type":"integer","title":"Marketplace Links Per Item"},"marketplace_external_identifiers_per_link":{"type":"integer","title":"Marketplace External Identifiers Per Link"},"identifiers_per_bulk_request":{"type":"integer","title":"Identifiers Per Bulk Request"},"read_requests_per_minute":{"type":"integer","title":"Read Requests Per Minute"},"write_requests_per_minute":{"type":"integer","title":"Write Requests Per Minute"},"full_sync_hours":{"type":"integer","title":"Full Sync Hours"}},"additionalProperties":false,"type":"object","required":["bulk_upsert_items","request_body_bytes","barcodes_per_item","identifiers_per_item","marketplace_links_per_item","marketplace_external_identifiers_per_link","identifiers_per_bulk_request","read_requests_per_minute","write_requests_per_minute","full_sync_hours"],"title":"APILimitsResponse"},"AccountValue":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"seller_legal_entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seller Legal Entity"}},"additionalProperties":false,"type":"object","title":"AccountValue"},"BarcodeAddBody":{"properties":{"barcodes":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Barcodes"}},"additionalProperties":false,"type":"object","required":["barcodes"],"title":"BarcodeAddBody"},"BulkMatchBy":{"properties":{"type":{"type":"string","maxLength":64,"minLength":1,"title":"Type","description":"internal_code, barcode либо пользовательский тип идентификатора"},"namespace":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Namespace"},"value":{"type":"string","maxLength":512,"minLength":1,"title":"Value"}},"additionalProperties":false,"type":"object","required":["type","value"],"title":"BulkMatchBy"},"BulkMatchedByResponse":{"properties":{"type":{"type":"string","title":"Type"},"value":{"type":"string","title":"Value"},"namespace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Namespace"}},"additionalProperties":false,"type":"object","required":["type","value"],"title":"BulkMatchedByResponse"},"BulkSummaryResponse":{"properties":{"received":{"type":"integer","title":"Received"},"created":{"type":"integer","title":"Created"},"updated":{"type":"integer","title":"Updated"},"unchanged":{"type":"integer","title":"Unchanged"},"conflicts":{"type":"integer","title":"Conflicts"},"invalid":{"type":"integer","title":"Invalid"}},"additionalProperties":false,"type":"object","required":["received","created","updated","unchanged","conflicts","invalid"],"title":"BulkSummaryResponse"},"BulkUpsertBody":{"properties":{"sync_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sync Id","description":"ID заранее открытой полной синхронизации; для обычного upsert создаётся автоматически"},"items":{"items":{"properties":{"client_ref":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Client Ref","description":"Необязательная ссылка строки клиента; возвращается в ответе и не является идентичностью товара"},"product_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Product Id"},"match_by":{"anyOf":[{"$ref":"#/components/schemas/BulkMatchBy"},{"type":"null"}],"description":"Необязательный явный способ найти существующий товар. match_by не создаёт идентификатор: для записи значения передайте его также в internal_code, barcodes или identifiers."},"expected_version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Expected Version","description":"Необязательная ожидаемая версия товара для защиты от конкурентного изменения"},"internal_code":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Internal Code"},"name":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Name"},"barcodes":{"items":{"type":"string"},"type":"array","maxItems":500,"title":"Barcodes"},"identifiers":{"items":{"$ref":"#/components/schemas/CatalogIdentifierInput"},"type":"array","maxItems":200,"title":"Identifiers"},"marketplace_links":{"items":{"$ref":"#/components/schemas/MarketplaceLinkInput"},"type":"array","maxItems":100,"title":"Marketplace Links"}},"additionalProperties":false,"type":"object","title":"BulkUpsertItem"},"type":"array","maxItems":1000,"minItems":1,"title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"BulkUpsertBody","example":{"items":[{"barcodes":["4673752160115","4601234567890"],"internal_code":"00125","name":"Фартук кухонный"}]}},"BulkUpsertItemResult":{"properties":{"index":{"type":"integer","title":"Index"},"product_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Product Id"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"status":{"type":"string","enum":["created","updated","unchanged","conflict","invalid"],"title":"Status"},"matched_by":{"anyOf":[{"$ref":"#/components/schemas/BulkMatchedByResponse"},{"type":"null"}]},"client_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Ref"},"error":{"anyOf":[{"$ref":"#/components/schemas/IntegrationErrorDetail"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["index","status"],"title":"BulkUpsertItemResult"},"BulkUpsertResponse":{"properties":{"api_version":{"type":"string","const":"v1","title":"Api Version"},"sync_id":{"type":"string","format":"uuid","title":"Sync Id"},"status":{"type":"string","enum":["completed","completed_with_errors","running","failed"],"title":"Status"},"summary":{"$ref":"#/components/schemas/BulkSummaryResponse"},"items":{"items":{"$ref":"#/components/schemas/BulkUpsertItemResult"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["api_version","sync_id","status","summary","items"],"title":"BulkUpsertResponse"},"BuyerValue":{"properties":{"is_business":{"type":"boolean","title":"Is Business"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"legal_entity_sale":{"type":"boolean","title":"Legal Entity Sale"}},"additionalProperties":false,"type":"object","required":["is_business","legal_entity_sale"],"title":"BuyerValue"},"CatalogIdentifierInput":{"properties":{"type":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_.-]{0,63}$","title":"Type","description":"Тип идентификатора, например supplier_code или warehouse_code"},"namespace":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Namespace","description":"Необязательное пространство идентификатора, например supplier:42"},"value":{"type":"string","maxLength":512,"minLength":1,"title":"Value","description":"Значение как строка; ведущие нули сохраняются"},"resolvable":{"type":"boolean","title":"Resolvable","description":"Можно ли использовать значение для однозначного распознавания физического товара","default":false}},"additionalProperties":false,"type":"object","required":["type","value"],"title":"CatalogIdentifierInput"},"ChangesResponse":{"properties":{"api_version":{"type":"string","const":"v1","title":"Api Version"},"items":{"items":{"$ref":"#/components/schemas/ProductResponse"},"type":"array","title":"Items"},"page":{"$ref":"#/components/schemas/PageResponse"},"sync_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Cursor"}},"additionalProperties":false,"type":"object","required":["api_version","items","page"],"title":"ChangesResponse"},"ContextResponse":{"properties":{"api_version":{"type":"string","const":"v1","title":"Api Version"},"organization":{"$ref":"#/components/schemas/OrganizationResponse"},"credential":{"$ref":"#/components/schemas/CredentialResponse"},"capabilities":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Capabilities"},"limits":{"$ref":"#/components/schemas/APILimitsResponse"}},"additionalProperties":false,"type":"object","required":["api_version","organization","credential","capabilities","limits"],"title":"ContextResponse"},"CredentialResponse":{"properties":{"name":{"type":"string","title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"additionalProperties":false,"type":"object","required":["name","scopes"],"title":"CredentialResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IdentifierAddBody":{"properties":{"identifiers":{"items":{"$ref":"#/components/schemas/CatalogIdentifierInput"},"type":"array","maxItems":200,"minItems":1,"title":"Identifiers"}},"additionalProperties":false,"type":"object","required":["identifiers"],"title":"IdentifierAddBody"},"IdentifierResponse":{"properties":{"identifier_id":{"type":"string","format":"uuid","title":"Identifier Id"},"type":{"type":"string","title":"Type"},"namespace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Namespace"},"value":{"type":"string","title":"Value"},"resolvable":{"type":"boolean","title":"Resolvable"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["identifier_id","type","value","resolvable","created_at","updated_at"],"title":"IdentifierResponse"},"IntegrationErrorDetail":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"additionalProperties":true,"type":"object","title":"Details"}},"additionalProperties":false,"type":"object","required":["code","message"],"title":"IntegrationErrorDetail"},"KizValidationValue":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","title":"KizValidationValue"},"KizValue":{"properties":{"raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw"},"display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display"},"without_gs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Without Gs"},"base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base64"},"scanned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scanned At"},"entered_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entered By Name"},"validation":{"$ref":"#/components/schemas/KizValidationValue"}},"additionalProperties":false,"type":"object","required":["validation"],"title":"KizValue"},"MarketplaceAccountResponse":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"marketplace":{"type":"string","title":"Marketplace"},"account_code":{"type":"string","title":"Account Code"},"name":{"type":"string","title":"Name"},"active":{"type":"boolean","title":"Active"}},"additionalProperties":false,"type":"object","required":["account_id","marketplace","account_code","name","active"],"title":"MarketplaceAccountResponse"},"MarketplaceAccountsEnvelope":{"properties":{"api_version":{"type":"string","const":"v1","title":"Api Version"},"items":{"items":{"$ref":"#/components/schemas/MarketplaceAccountResponse"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["api_version","items"],"title":"MarketplaceAccountsEnvelope"},"MarketplaceExternalIdentifierInput":{"properties":{"type":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_.-]{0,63}$","title":"Type","description":"Тип идентификатора в конкретном маркетплейсе. Набор обязательных типов определяет адаптер маркетплейса; например для Wildberries используются nm_id и chrt_id."},"value":{"type":"string","maxLength":300,"minLength":1,"title":"Value","description":"Значение идентификатора маркетплейса как строка; ведущие нули сохраняются"}},"additionalProperties":false,"type":"object","required":["type","value"],"title":"MarketplaceExternalIdentifierInput"},"MarketplaceExternalIdentifierResponse":{"properties":{"type":{"type":"string","title":"Type"},"value":{"type":"string","title":"Value"}},"additionalProperties":false,"type":"object","required":["type","value"],"title":"MarketplaceExternalIdentifierResponse"},"MarketplaceExternalIdentifiers":{"properties":{"rid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rid"},"srid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Srid"},"order_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Uid"}},"additionalProperties":false,"type":"object","title":"MarketplaceExternalIdentifiers"},"MarketplaceIdentifierValue":{"properties":{"type":{"type":"string","title":"Type"},"value":{"type":"string","title":"Value"}},"additionalProperties":false,"type":"object","required":["type","value"],"title":"MarketplaceIdentifierValue"},"MarketplaceLinkInput":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id","description":"Стабильный UUID подключённого кабинета Мерксалис из /marketplace-accounts"},"seller_sku":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Seller Sku","description":"Артикул/SKU продавца в конкретном кабинете маркетплейса"},"external_identifiers":{"items":{"$ref":"#/components/schemas/MarketplaceExternalIdentifierInput"},"type":"array","maxItems":50,"title":"External Identifiers","description":"Идентификаторы товара внутри маркетплейса. Публичный контракт не навязывает универсальную пару product/variant: обязательные типы определяет адаптер конкретной площадки."}},"additionalProperties":false,"type":"object","required":["account_id"],"title":"MarketplaceLinkInput"},"MarketplaceLinkPatch":{"properties":{"seller_sku":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Seller Sku","description":"Изменяемый бизнес-артикул/SKU. Идентичность связи и external_identifiers через PATCH не меняются; неверную связь архивируйте и создайте заново."}},"additionalProperties":false,"type":"object","title":"MarketplaceLinkPatch"},"MarketplaceLinkResponse":{"properties":{"link_id":{"type":"string","format":"uuid","title":"Link Id"},"account_id":{"type":"string","format":"uuid","title":"Account Id"},"marketplace":{"type":"string","title":"Marketplace"},"account_code":{"type":"string","title":"Account Code"},"account_name":{"type":"string","title":"Account Name"},"seller_sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seller Sku"},"external_identifiers":{"items":{"$ref":"#/components/schemas/MarketplaceExternalIdentifierResponse"},"type":"array","title":"External Identifiers"},"status":{"type":"string","enum":["active","archived"],"title":"Status"},"origin":{"type":"string","enum":["manual","integration","automatic"],"title":"Origin"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"additionalProperties":false,"type":"object","required":["link_id","account_id","marketplace","account_code","account_name","external_identifiers","status","origin","created_at","updated_at"],"title":"MarketplaceLinkResponse"},"MarketplaceOperationValue":{"properties":{"found":{"type":"boolean","title":"Found"},"type_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type Id"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"},"fiscal_document_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fiscal Document Number"},"excise_short":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excise Short"},"match":{"$ref":"#/components/schemas/OperationMatchValue"}},"additionalProperties":false,"type":"object","required":["found","match"],"title":"MarketplaceOperationValue"},"MarketplaceValue":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"account":{"$ref":"#/components/schemas/AccountValue"},"warehouse":{"$ref":"#/components/schemas/WarehouseValue"},"external_identifiers":{"$ref":"#/components/schemas/MarketplaceExternalIdentifiers"}},"additionalProperties":false,"type":"object","required":["account","warehouse","external_identifiers"],"title":"MarketplaceValue"},"MarkingIdentifiersValue":{"properties":{"uin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uin"},"imei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imei"},"gtin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gtin"},"expiration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration"},"customs_declaration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customs Declaration"}},"additionalProperties":false,"type":"object","title":"MarkingIdentifiersValue"},"MarkingProcessingValue":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"additionalProperties":false,"type":"object","title":"MarkingProcessingValue"},"MarkingValue":{"properties":{"present":{"type":"boolean","title":"Present"},"kiz":{"$ref":"#/components/schemas/KizValue"},"processing":{"$ref":"#/components/schemas/MarkingProcessingValue"},"identifiers":{"$ref":"#/components/schemas/MarkingIdentifiersValue"}},"additionalProperties":false,"type":"object","required":["present","kiz","processing","identifiers"],"title":"MarkingValue"},"OperationMatchValue":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"rid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rid"},"srid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Srid"}},"additionalProperties":false,"type":"object","title":"OperationMatchValue"},"OperationalRecord":{"properties":{"record_id":{"type":"string","title":"Record Id"},"marketplace":{"$ref":"#/components/schemas/MarketplaceValue"},"order":{"$ref":"#/components/schemas/OrderValue"},"product":{"$ref":"#/components/schemas/ProductValue"},"buyer":{"$ref":"#/components/schemas/BuyerValue"},"supply":{"$ref":"#/components/schemas/SupplyValue"},"shipment":{"$ref":"#/components/schemas/ShipmentValue"},"marking":{"$ref":"#/components/schemas/MarkingValue"},"marketplace_operation":{"$ref":"#/components/schemas/MarketplaceOperationValue"},"technical":{"$ref":"#/components/schemas/TechnicalValue"}},"additionalProperties":false,"type":"object","required":["record_id","marketplace","order","product","buyer","supply","shipment","marking","marketplace_operation","technical"],"title":"OperationalRecord"},"OperationsDataState":{"properties":{"source":{"type":"string","title":"Source"},"marketplace_refresh_performed":{"type":"boolean","title":"Marketplace Refresh Performed"}},"additionalProperties":false,"type":"object","required":["source","marketplace_refresh_performed"],"title":"OperationsDataState"},"OperationsPage":{"properties":{"limit":{"type":"integer","title":"Limit"},"returned":{"type":"integer","title":"Returned"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["limit","returned"],"title":"OperationsPage"},"OperationsResponse":{"properties":{"api_version":{"type":"string","title":"Api Version"},"resource":{"type":"string","title":"Resource"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"organization":{"additionalProperties":true,"type":"object","title":"Organization"},"data_state":{"$ref":"#/components/schemas/OperationsDataState"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"},"summary":{"$ref":"#/components/schemas/OperationsSummary"},"items":{"items":{"$ref":"#/components/schemas/OperationalRecord"},"type":"array","title":"Items"},"page":{"$ref":"#/components/schemas/OperationsPage"}},"additionalProperties":false,"type":"object","required":["api_version","resource","generated_at","organization","data_state","filters","summary","items","page"],"title":"OperationsResponse"},"OperationsSummary":{"properties":{"orders":{"type":"integer","title":"Orders"},"records":{"type":"integer","title":"Records"},"with_marking":{"type":"integer","title":"With Marking"},"without_marking":{"type":"integer","title":"Without Marking"}},"additionalProperties":false,"type":"object","required":["orders","records","with_marking","without_marking"],"title":"OperationsSummary"},"OrderLifecycleValue":{"properties":{"picked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Picked At"},"sticker_printed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sticker Printed At"},"sticker_verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sticker Verified At"},"packed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Packed At"},"completed_detected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed Detected At"},"cancelled_detected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled Detected At"}},"additionalProperties":false,"type":"object","title":"OrderLifecycleValue"},"OrderStatusValue":{"properties":{"local":{"$ref":"#/components/schemas/StatusValue"},"seller":{"$ref":"#/components/schemas/StatusValue"},"marketplace":{"$ref":"#/components/schemas/StatusValue"},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked At"}},"additionalProperties":false,"type":"object","required":["local","seller","marketplace"],"title":"OrderStatusValue"},"OrderValue":{"properties":{"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"status":{"$ref":"#/components/schemas/OrderStatusValue"},"lifecycle":{"$ref":"#/components/schemas/OrderLifecycleValue"},"sticker":{"$ref":"#/components/schemas/StickerValue"}},"additionalProperties":false,"type":"object","required":["status","lifecycle","sticker"],"title":"OrderValue"},"OrganizationResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"}},"additionalProperties":false,"type":"object","required":["slug","name"],"title":"OrganizationResponse"},"PageResponse":{"properties":{"limit":{"type":"integer","title":"Limit"},"returned":{"type":"integer","title":"Returned"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["limit","returned"],"title":"PageResponse"},"ProductAttributesValue":{"properties":{"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size"}},"additionalProperties":false,"type":"object","title":"ProductAttributesValue"},"ProductCreate":{"properties":{"internal_code":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Internal Code","description":"Необязательный внутренний код товара в системе организации"},"name":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Name"},"barcodes":{"items":{"type":"string"},"type":"array","maxItems":500,"title":"Barcodes","description":"Штрихкоды товара; все значения передаются строками"},"identifiers":{"items":{"$ref":"#/components/schemas/CatalogIdentifierInput"},"type":"array","maxItems":200,"title":"Identifiers"},"marketplace_links":{"items":{"$ref":"#/components/schemas/MarketplaceLinkInput"},"type":"array","maxItems":100,"title":"Marketplace Links"}},"additionalProperties":false,"type":"object","title":"ProductCreate","example":{"barcodes":["4673752160115","4601234567890"],"internal_code":"00125","name":"Фартук кухонный"}},"ProductEnvelope":{"properties":{"api_version":{"type":"string","const":"v1","title":"Api Version"},"product":{"$ref":"#/components/schemas/ProductResponse"}},"additionalProperties":false,"type":"object","required":["api_version","product"],"title":"ProductEnvelope"},"ProductListResponse":{"properties":{"api_version":{"type":"string","const":"v1","title":"Api Version"},"items":{"items":{"$ref":"#/components/schemas/ProductResponse"},"type":"array","title":"Items"},"page":{"$ref":"#/components/schemas/PageResponse"}},"additionalProperties":false,"type":"object","required":["api_version","items","page"],"title":"ProductListResponse"},"ProductPatch":{"properties":{"internal_code":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Internal Code"},"name":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Name"},"barcodes":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":500},{"type":"null"}],"title":"Barcodes"},"identifiers":{"anyOf":[{"items":{"$ref":"#/components/schemas/CatalogIdentifierInput"},"type":"array","maxItems":200},{"type":"null"}],"title":"Identifiers"},"marketplace_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/MarketplaceLinkInput"},"type":"array","maxItems":100},{"type":"null"}],"title":"Marketplace Links"}},"additionalProperties":false,"type":"object","title":"ProductPatch"},"ProductResponse":{"properties":{"product_id":{"type":"string","format":"uuid","title":"Product Id"},"version":{"type":"integer","title":"Version"},"change_seq":{"type":"integer","title":"Change Seq"},"status":{"type":"string","enum":["active","archived"],"title":"Status"},"internal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Code"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"barcodes":{"items":{"type":"string"},"type":"array","title":"Barcodes"},"identifiers":{"items":{"$ref":"#/components/schemas/IdentifierResponse"},"type":"array","title":"Identifiers"},"marketplace_links":{"items":{"$ref":"#/components/schemas/MarketplaceLinkResponse"},"type":"array","title":"Marketplace Links"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"additionalProperties":false,"type":"object","required":["product_id","version","change_seq","status","barcodes","identifiers","marketplace_links","created_at","updated_at"],"title":"ProductResponse"},"ProductValue":{"properties":{"internal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Code"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"seller_article":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seller Article"},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Barcode"},"marketplace_identifiers":{"items":{"$ref":"#/components/schemas/MarketplaceIdentifierValue"},"type":"array","title":"Marketplace Identifiers"},"attributes":{"$ref":"#/components/schemas/ProductAttributesValue"}},"additionalProperties":false,"type":"object","required":["marketplace_identifiers","attributes"],"title":"ProductValue"},"ResolveResponse":{"properties":{"api_version":{"type":"string","const":"v1","title":"Api Version"},"matched":{"type":"boolean","title":"Matched"},"value":{"type":"string","title":"Value"},"normalized_value":{"type":"string","title":"Normalized Value"},"match_types":{"items":{"type":"string"},"type":"array","title":"Match Types"},"product":{"anyOf":[{"$ref":"#/components/schemas/ProductResponse"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["api_version","matched","value","normalized_value"],"title":"ResolveResponse"},"ShipmentRouteValue":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","title":"ShipmentRouteValue"},"ShipmentValue":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"route":{"$ref":"#/components/schemas/ShipmentRouteValue"}},"additionalProperties":false,"type":"object","required":["route"],"title":"ShipmentValue"},"StatusValue":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","title":"StatusValue"},"StickerValue":{"properties":{"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Barcode"}},"additionalProperties":false,"type":"object","title":"StickerValue"},"SupplyMarketplaceValue":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"scan_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scan At"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"}},"additionalProperties":false,"type":"object","title":"SupplyMarketplaceValue"},"SupplyStatusValue":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","title":"SupplyStatusValue"},"SupplyValue":{"properties":{"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"$ref":"#/components/schemas/SupplyStatusValue"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"marketplace":{"$ref":"#/components/schemas/SupplyMarketplaceValue"}},"additionalProperties":false,"type":"object","required":["status","marketplace"],"title":"SupplyValue"},"SyncRunCompleteBody":{"properties":{"confirm_full_snapshot":{"type":"boolean","title":"Confirm Full Snapshot","description":"Явное подтверждение, что все записи полного снимка переданы. Значение должно быть true."}},"additionalProperties":false,"type":"object","required":["confirm_full_snapshot"],"title":"SyncRunCompleteBody"},"SyncRunCreateBody":{"properties":{"mode":{"type":"string","const":"full","title":"Mode","description":"Полный снимок каталога организации с безопасным двухфазным завершением","default":"full"},"expected_items":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Expected Items","description":"Ожидаемое количество уникальных канонических товаров в полном снимке. /complete запрещён, если фактически получено другое количество."}},"additionalProperties":false,"type":"object","required":["expected_items"],"title":"SyncRunCreateBody"},"SyncRunEnvelope":{"properties":{"api_version":{"type":"string","const":"v1","title":"Api Version"},"sync":{"$ref":"#/components/schemas/SyncRunResponse"}},"additionalProperties":false,"type":"object","required":["api_version","sync"],"title":"SyncRunEnvelope"},"SyncRunResponse":{"properties":{"sync_id":{"type":"string","format":"uuid","title":"Sync Id"},"mode":{"type":"string","enum":["bulk","full"],"title":"Mode"},"status":{"type":"string","enum":["running","completed","completed_with_errors","expired","failed","cancelled"],"title":"Status"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"expected_items":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Items"},"received_unique_items":{"type":"integer","title":"Received Unique Items","default":0},"summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Summary"}},"additionalProperties":false,"type":"object","required":["sync_id","mode","status","started_at","expires_at","summary"],"title":"SyncRunResponse"},"TechnicalValue":{"properties":{"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"additionalProperties":false,"type":"object","title":"TechnicalValue"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WarehouseValue":{"properties":{"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","title":"WarehouseValue"},"IntegrationError":{"type":"object","required":["error","request_id"],"properties":{"error":{"type":"object","required":["code","message","details"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}},"request_id":{"type":"string"}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"mrx_v1_...","description":"API-ключ создаётся администратором организации. Организация и права доступа определяются сервером по API-ключу."}}},"tags":[{"name":"Начало работы","description":"Проверка API-ключа, организации, прав и лимитов."},{"name":"Каталог","description":"Канонические товары организации и их жизненный цикл."},{"name":"Синхронизация","description":"Bulk upsert, полная синхронизация и курсор изменений."},{"name":"Идентификаторы","description":"Штрихкоды, дополнительные идентификаторы и безопасное распознавание."},{"name":"Маркетплейсы","description":"Подключённые кабинеты и связи товаров без публикации секретов."}]}