Использование Ebay: метод AddFixedPriceItem для создания элемента на Ebay
Почтовый URL: https://api.ebay.com/ws/api.dll
Почтальон Заголовок:
"x-ebay-api-app-name: MY_App_ID",
"x-ebay-api-call-name: ReviseFixedPriceItem",
"x-ebay-api-cert-name: MY_SCERT_ID",
"x-ebay-api-compatibility-level: 1125",
"x-ebay-api-dev-name: MY_DEV_ID",
"x-ebay-api-siteid: 0"
Почтальон Тело: XML (текст / xml)
<?xml version="1.0" encoding="UTF-8"?>
<BulkDataExchangeRequests>
<Header>
<SiteID>0</SiteID>
<Version>949</Version>
</Header>
<AddFixedPriceItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>MY_TOKEN
</eBayAuthToken>
</RequesterCredentials>
<ErrorLanguage>en_US</ErrorLanguage>
<WarningLevel>High</WarningLevel>
<Version>949</Version>
<MessageID>Request 1</MessageID>
<Item>
<SKU>XYZ-776040644183</SKU>
<Country>US</Country>
<Currency>USD</Currency>
<Description>Looking for a sexy pj set This cami capri set fits the bill.Deep V neckline extends to empire waist.Lace trim all around the cups and across the back.Waterfall pleats fall from the waist for an extra pretty look.Slim leg capri pants with flat elastic waistband and side slits with tiny bows.Soft silky fabric with a hint of stretch for easy movement.
<li>Maidenform Cami Capris Set</li>
<li>Fabric Content </li>
<li>Color Name Gloxinia</li>
<li>Size L</li></Description>
<DispatchTimeMax>4</DispatchTimeMax>
<InventoryTrackingMethod>SKU</InventoryTrackingMethod>
<ListingDuration>Days_7</ListingDuration>
<ListingType>FixedPriceItem</ListingType>
<PostalCode>27105</PostalCode>
<PaymentMethods>PayPal</PaymentMethods>
<PayPalEmailAddress>example@example.com</PayPalEmailAddress>
<PrimaryCategory>
<CategoryID>63863</CategoryID>
</PrimaryCategory>
<Quantity>1</Quantity>
<StartPrice>34.46</StartPrice>
<ShippingDetails>
<ShippingType>Flat</ShippingType>
<ShippingServiceOptions>
<ShippingServicePriority>1</ShippingServicePriority>
<ShippingService>USPS_1st_Class</ShippingService>
<ShippingServiceCost>6.04</ShippingServiceCost>
<ShippingServiceAdditionalCost>0</ShippingServiceAdditionalCost>
</ShippingServiceOptions>
</ShippingDetails>
<Title>Maidenform Cami and Capris Set, Gloxinia, Size-L</Title>
<ReturnPolicy>
<ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption>
<RefundOption>MoneyBack</RefundOption>
<ReturnsWithinOption>Days_30</ReturnsWithinOption>
<Description>Description of return policy details</Description>
<ShippingCostPaidByOption>Free</ShippingCostPaidByOption>
</ReturnPolicy>
</Item>
</AddFixedPriceItemRequest>
</BulkDataExchangeRequests>
Ошибка при получении: Схема XML Ошибка запроса
Ответ:
<?xml version="1.0" encoding="UTF-8"?>
<AddFixedPriceItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2020-01-13T11:20:40.563Z</Timestamp>
<Ack>Failure</Ack>
<Errors>
<ShortMessage>Schema XML request error.</ShortMessage>
<LongMessage>Schema XML request error: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize..</LongMessage>
<ErrorCode>20170</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorParameters ParamID="0">
<Value>SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.</Value>
</ErrorParameters>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>1131</Version>
<Build>E1131_UNI_API5_19109898_R1</Build>
</AddFixedPriceItemResponse>
Я пытался
1. removing <li> tags in Description.
2. also <Description><![CDATA[ desc ]]></Decription>
3. Also there is no space in <?xml version="1.0" encoding="UTF-8"?>
Я пытаюсь добавить AddFixedPriceItem через E-bay LMS API. И для обработки этого я использую Почтальон. Все поля в порядке. Но в моем запросе XML может быть какая-то ошибка.
Кто-нибудь, пожалуйста, направьте меня с соответствующим ответом. Как исправить эту проблему.