Есть JSON формата
<category id="11" parentId="560">Спортивная одежда</category>
<category id="644" parentId="560">Футболки и топы</category>
<category id="622" parentId="560">Шорты и капры</category>
<offer id="74057" type="vendor.model" available="true" group_id="74056" >
<url>
site.com/product</url> <price>2999</price>
<currencyId>RUB</currencyId>
<categoryId>598</categoryId>
<typePrefix>Название товара</typePrefix>
<picture>
site.com/image.jpg</pictu... <vender>vendor_name</vender>
<model>Футболка-поло муж.</model>
<name>Футболка-поло муж.</name>
<description>description</description>
<param name="Картинки галереи">url1, url2, url3, url4</param>
</offer>
----------------------------------------------------------------- ----------------------------------
Необходимо получить
{"title":"Футболка-поло муж.", "description":"description", "price": 299900, "shopId": "?", "categoryId":? }
По изображениям:
1) загрузить имеющиеся изображение к нам, в замен будет получен UUID
2) добавить соответсвие url UUID
3) заменить все url'ы на наши uuid
для добавления изображения требуются права пользователя
curl '
site.com/api/beta/auth/ph... -i -X POST -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -d '{"phoneNumber":"{логин}", "password":"{пароль}"}' | grep sitekey
загрузить изображение можно следующим путем
curl -Ffile=@test.png -H 'Cookie: sitekey=[токен из предыдушего запроса]"' site.com/api/beta/upload