问题描述
目标:
完整提交 _POST_PRODUCT_DATA_
提要,其中包含替代“项目”(参考 Item.xsd)字段而不是“产品”,因为我们正在尝试在工业和科学类别中发布产品。请参阅 https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/XML_Documentation_Intl.pdf 的第 34 页。
我们的问题/问题:
但是,我们会收到提要提交警告和错误。主要问题是这些错误和警告似乎无效。在尝试通过将它们与现有的 Item.xsd 文件进行比较来进行故障排除时,似乎我包含了所有必需的具有正确数据类型的属性。
Feed 提交示例
编号:RandomForStackOverFlow
操作:SubmitFeed
供稿类型:_POST_PRODUCT_DATA_
失败的 XML 请求:
<?xml version="1.0" encoding="UTF-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema"><Header><DocumentVersion>1.01</DocumentVersion><MerchantIdentifier>RandomForStackOverFlow</MerchantIdentifier></Header><MessageType>Product</MessageType><PurgeAndReplace>1</PurgeAndReplace><Message><MessageID>1</MessageID><OperationType>Update</OperationType><Item><sku><value>PWML1000</value></sku><MarketplaceData market_name="A MarketName"><contribution_margin delete="true"><value currency="USD">10</value></contribution_margin><msrp delete="true"><value currency="USD">10</value></msrp><offering_can_ship_in_original_container delete="true"><value>true</value></offering_can_ship_in_original_container></MarketplaceData><DescriptionData><bullet_point><value>Features a high-performance permanent neodymium magnet,strong in magnetic pull and light weight</value></bullet_point><bullet_point><value>"V" style design can lift round steel objects like steel pipes</value></bullet_point><bullet_point><value>3:1 safety factor,it has high safety performance and higher efficiency</value></bullet_point><bullet_point><value>The magnetic lifter can be used to lift steel sheets,blocks,rods,cylinders and other steel materials</value></bullet_point></DescriptionData></Item></Message></AmazonEnvelope>
似乎是无效错误的主要示例
object(stdClass)#54 (4) {
["messageID"]=>
string(1) "1"
["resultCode"]=>
string(5) "Error"
["resultMessageCode"]=>
string(4) "5000"
["resultDescription"]=>
string(427) "XML Parsing Error at Line 2,Column 877: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bullet_point'. One of '{new_in_this_version_bullet_point,can_be_giftmessaged,can_be_giftwrapped,ean,ean8,gtin,isbn,ItemDimensions,item_name,item_weight,manufacturer,offering_condition,offering_subcondition,package_weight,part_number,product_description,product_tax_code,upc,volume}' is expected."
}
根据我的理解,此错误表明 bullet point
字段不应该存在,我应该使用 new_in_this_version_bullet_point
,或者我有某种形式的不正确数据。但是没有参考点来纠正错误,因为 Item.xsd 中不存在 new_in_this_version_bullet_point
。我再次调试了一段时间,我相信当前的 Item.xsd 无效 http://g-ecx.images-amazon.com/images/G/01/rainier/help/xsd/release_1_9/Item.xsd。
如果有任何信息可以帮助我构建 MWS 的 Item
节点
不胜感激。
解决方法
一段时间后,使用新的 SP-API 会更容易