{"openapi":"3.1.0","info":{"title":"Документация по SelSup API","description":"API SelSup — программный интерфейс для работы с сервисом SelSup. Даёт возможность работать со всеми функциями SelSup из вашей системы. Для использования API добавьте новый токен на странице:https://selsup.ru/application/integration/api. Добавленный токен необходимо передавать во всех запросах к API SelSup, в заголовке Authorization.","contact":{"name":"Support Team","email":"admin@selsup.ru"},"license":{"name":"Apache 2.0","url":"https://selsup.ru/dogovor-offerta/"},"version":"1.0"},"servers":[{"url":"http://localhost:9050/"}],"tags":[{"name":"Конкуренты","description":"Работа с карточками конкурентов для моделей товаров"}],"paths":{"/api/competitor/{competitorId}":{"put":{"tags":["Конкуренты"],"summary":"Редактировать карточку конкурента","description":"Редактировать карточку конкурента по его id","operationId":"update","parameters":[{"name":"competitorId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Competitor"}}},"required":true},"responses":{"200":{"description":"OK"}}},"delete":{"tags":["Конкуренты"],"summary":"Удалить карточку конкурента","description":"Удалить карточку конкурента по его id","operationId":"delete","parameters":[{"name":"competitorId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}}}},"/api/competitor/{modelId}":{"get":{"tags":["Конкуренты"],"summary":"Получить список всех конкурентов для модели","description":"Получить список всех конкурентов для модели по ее id","operationId":"getAll","parameters":[{"name":"modelId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/hal+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Competitor"}}}}}}},"post":{"tags":["Конкуренты"],"summary":"Создать связь с карточкой конкурента","description":"Создать модель конкурента, связывая его с карточкой конкурента","operationId":"create","parameters":[{"name":"modelId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Competitor"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/Competitor"}}}}}}}},"components":{"schemas":{"Competitor":{"type":"object","description":"Карточка конкурента для модели товара","properties":{"id":{"type":"integer","format":"int64","description":"ID конкурента","readOnly":true},"modelId":{"type":"integer","format":"int64","description":"ID модели, для которой указывается конкурент"},"service":{"type":"string","description":"Маркетплейс конкурента","enum":["NONE","WILDBERRIES","OZON","YANDEX_MARKET","FAMILIYA","NATIONAL_CATALOG","ALIEXPRESS","OTHER","MOY_SKLAD","SBER_MEGA_MARKET","CISLINK","ONE_C","AVITO","LEROY_MERLIN","DETMIR","KAZAN_EXPRESS","EVOTOR","WEBASYST","AMAZON","EBAY","SIMALAND","INSALES","LAMODA","OZON_PERFORMANCE","WALMART","GOOGLE","YANDEX_DISC","EMAIL","WOOCOMMERCE","MAGNIT","OPENCART","M_VIDEO","TAKEALOT","UZUM","SHOPIFY","MAKRO","YANDEX_KIT","BOB_SHOP","KASPI","DIADOC"]},"url":{"type":"string","description":"URL карточки конкурента на маркетплейсе"},"serviceId":{"type":"string","description":"ID карточки конкурента на сайте маркетплейса"},"clientId":{"type":"integer","format":"int64","description":"ID клиента","readOnly":true}},"required":["service","url"]}},"securitySchemes":{"ApiKey":{"type":"apiKey","name":"Authorization","in":"header"}}}}