#xml #ebay-api
#xml #ebay-api
Вопрос:
Я хочу создать бота для автоматизации процедуры листинга на eBay.in . Я тестирую различные вызовы для разработки шаблона для моего бота, который будет извлекать данные из моей базы данных и отправлять их на eBay. Я пытался перечислить новый продукт в изолированной среде, предоставляемой eBay.
вот мой xml
<?xml version="1.0" encoding="utf-8"?>
<AddFixedPriceItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>Token Already Inserted Here</eBayAuthToken>
</RequesterCredentials>
<!-- Call-specific Input Fields -->
<Item>
<ConditionID>1000</ConditionID>
<Country>IN</Country>
<Currency>INR</Currency>
<Description>This Is Description</Description>
<InventoryTrackingMethod>SKU</InventoryTrackingMethod>
<DispatchTimeMax>3</DispatchTimeMax>
<ListingDuration>Days_7</ListingDuration>
<ListingType>FixedPriceItem</ListingType>
<OutOfStockControl>true</OutOfStockControl>
<PaymentMethods>CreditCard</PaymentMethods>
<PaymentMethods>DirectDebit</PaymentMethods>
<PictureDetails>
<GalleryURL>http://cdn3.purplle.com/static/img/cache/product/PPLB121HD110/250x250_1.jpg?1390916568</GalleryURL>
</PictureDetails>
<PostalCode>400086</PostalCode>
<PrimaryCategory>
<CategoryID>11858</CategoryID>
</PrimaryCategory>
<Quantity>1</Quantity>
<ShippingDetails>
<ShippingType>Flat</ShippingType>
<ShippingServiceOptions>
<ShippingService>In_Courier</ShippingService>
<ShippingServiceCost>49.0</ShippingServiceCost>
</ShippingServiceOptions>
</ShippingDetails>
<ShipToLocations>IN</ShipToLocations>
<!--more ShipToLocations values allowed here-->
<Site>India</Site>
<SKU>PPLB121HD110</SKU>
<StartPrice>2258.00</StartPrice>
<!--SubTitle> string </SubTitle-->
<Title>Braun Satin Hair 1 Dryer HD 110 Hair Dryer</Title>
</Item>
<!-- Standard Input Fields -->
<ErrorLanguage>en_US</ErrorLanguage>
<!--MessageID> string </MessageID>
<Version> string </Version-->
<WarningLevel>High</WarningLevel>
</AddFixedPriceItemRequest>
Теперь, после внесения многих изменений в XML-запрос, приведенный выше, является последним. Я получаю следующий ответ об ошибке при отправке вышеуказанного запроса каждый раз.
<?xml version="1.0" encoding="UTF-8"?>
<AddFixedPriceItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2014-06-24T07:19:29.784Z</Timestamp>
<Ack>Failure</Ack>
<Errors>
<ShortMessage>Input data is invalid.</ShortMessage>
<LongMessage>Input data for tag amp;<Item.ShippingDetailsamp;> is invalid or missing. Please check API documentation.</LongMessage>
<ErrorCode>37</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorParameters ParamID="0">
<Value>Item.ShippingDetails</Value>
</ErrorParameters>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>873</Version>
<Build>E873_UNI_API5_16868630_R1</Build>
</AddFixedPriceItemResponse>
Я выполнил весь поиск в Google, прошел через все api, попытался скопировать пример кода, но все равно получаю ту же ошибку.
Мне интересно, есть ли какая-то ошибка в xml или что-то еще, что я мог бы пропустить.
Ответ №1:
Значение для ShippingService
чувствительно к регистру, я думаю, вам нужно использовать «IN_Courier» с прописной буквой «N».
Список допустимых опций для ShippingService
вы найдете здесь:
http://developer.ebay.com/DevZone/XML/docs/Reference/ebay/types/ShippingServiceCodeType.html
Комментарии:
1. теперь произошла следующая ошибка <Короткое сообщение> Метод оплаты отсутствует. </ShortMessage>
2. Затем вы должны указать способ оплаты: developer.ebay.com/devzone/xml/docs/reference/ebay /…