在尝试修改所列产品的数量时,我遇到BulkDataExchangeRequest / ReviseInventoryStatus(使用Large Merchant Sevices api)的一些问题。我设法成功地发出所有先决条件请求,以便上传和处理BulkDataExchange xml(createUploadJob,uploadFileRequest,startUploadJob),但是在ebay商店没有修改产品的数量。我发现为了获取xml本身的错误,而不是上传作业,我必须使用DownloadFileRequest,但我无法修复它返回的错误。对于我试图用ReviseInventoryStatus修改数量的3个产品,我得到一个'缺少必需的容器',错误代码为21916253.我已经检查了我发送的xml但我无法弄清楚到底是什么不见了。这是xml,任何提示都将不胜感激:
<?xml version="1.0" encoding="UTF-8"?>
<BulkDataExchangeRequests>
<Header>
<SiteID>77</SiteID>
<Version>955</Version>
</Header>
<ReviseInventoryStatusRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<errorlanguage>en_US</errorlanguage>
<warninglevel>High</warninglevel>
<version>955</version>
<inventorystatus>
<itemid>281077289788</itemid>
<quantity>500</quantity>
<sku>MGA10003</sku>
<startprice>6.90</startprice>
</inventorystatus>
</ReviseInventoryStatusRequest>
<ReviseInventoryStatusRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<errorlanguage>en_US</errorlanguage>
<warninglevel>High</warninglevel>
<version>955</version>
<inventorystatus>
<itemid>271171602595</itemid>
<quantity>500</quantity>
<sku>MGA10215</sku>
<startprice>20.90</startprice>
</inventorystatus>
</ReviseInventoryStatusRequest>
<ReviseInventoryStatusRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<errorlanguage>en_US</errorlanguage>
<warninglevel>High</warninglevel>
<version>955</version>
<inventorystatus>
<itemid>281449929626</itemid>
<quantity>8</quantity>
<sku>MGA12496.3</sku>
<startprice>18.90</startprice>
</inventorystatus>
</ReviseInventoryStatusRequest>
</BulkDataExchangeRequests>
以下是来自DownloadFileRequest的回复:
<?xml version="1.0" encoding="utf-8"?>
<BulkDataExchangeResponses xmlns="urn:ebay:apis:eBLBaseComponents">
<ReviseInventoryStatusResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2016-04-15T07:39:41.431Z</Timestamp>
<Ack>Failure</Ack>
<Errors>
<ShortMessage>Erforderlicher Container fehlt.</ShortMessage>
<LongMessage>Erforderlicher Container fehlt.</LongMessage>
<ErrorCode>21916253</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>961</Version>
<Build>E961_UNI_API5_17901460_R1</Build>
</ReviseInventoryStatusResponse>
<ReviseInventoryStatusResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2016-04-15T07:39:41.565Z</Timestamp>
<Ack>Failure</Ack>
<Errors>
<ShortMessage>Erforderlicher Container fehlt.</ShortMessage>
<LongMessage>Erforderlicher Container fehlt.</LongMessage>
<ErrorCode>21916253</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>961</Version>
<Build>E961_UNI_API5_17901460_R1</Build>
</ReviseInventoryStatusResponse>
<ReviseInventoryStatusResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2016-04-15T07:39:41.660Z</Timestamp>
<Ack>Failure</Ack>
<Errors>
<ShortMessage>Erforderlicher Container fehlt.</ShortMessage>
<LongMessage>Erforderlicher Container fehlt.</LongMessage>
<ErrorCode>21916253</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>961</Version>
<Build>E961_UNI_API5_17901460_R1</Build>
</ReviseInventoryStatusResponse>
</BulkDataExchangeResponses>
答案 0 :(得分:0)
字段名称区分大小写。我在你的请求中发现了一些小写的字段。例如,<inventorystatus
&gt;应为<InventoryStatus>
,<itemid>
必须为<ItemID>
。
答案 1 :(得分:0)
我知道这是一个老问题,但是也许可以帮助其他人。
也许您必须删除ErrorLanguage,WarningLevel和Version,并像这样保留XML:
<?xml version="1.0" encoding="UTF-8"?>
<BulkDataExchangeRequests>
<Header>
<SiteID>77</SiteID>
<Version>955</Version>
</Header>
<ReviseInventoryStatusRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<inventorystatus>
<itemid>281077289788</itemid>
<quantity>500</quantity>
<sku>MGA10003</sku>
<startprice>6.90</startprice>
</inventorystatus>
</ReviseInventoryStatusRequest>
<ReviseInventoryStatusRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<inventorystatus>
<itemid>271171602595</itemid>
<quantity>500</quantity>
<sku>MGA10215</sku>
<startprice>20.90</startprice>
</inventorystatus>
</ReviseInventoryStatusRequest>
<ReviseInventoryStatusRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<inventorystatus>
<itemid>281449929626</itemid>
<quantity>8</quantity>
<sku>MGA12496.3</sku>
<startprice>18.90</startprice>
</inventorystatus>
</ReviseInventoryStatusRequest>
</BulkDataExchangeRequests>