在 _POST_PRODUCT_DATA_ 提要中,“ProductData”节点包含特定于项目所在类别的数据。项目所在的类别究竟应该如何映射到 XSD,因为(总是)似乎没有直接关系。调用“GetProductCategoriesForASIN”似乎也没什么帮助——“Categories”的 ProductCategoryName 有什么用? (如下)
<?xml version="1.0"?>
<GetProductCategoriesForASINResponse xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01">
<GetProductCategoriesForASINResult>
<Self>
<ProductCategoryId>166099011</ProductCategoryId>
<ProductCategoryName>Building Sets</ProductCategoryName>
<Parent>
<ProductCategoryId>166092011</ProductCategoryId>
<ProductCategoryName>Building Toys</ProductCategoryName>
<Parent>
<ProductCategoryId>165795011</ProductCategoryId>
<ProductCategoryName>Categories</ProductCategoryName>
<Parent>
<ProductCategoryId>165793011</ProductCategoryId>
<ProductCategoryName>Categories</ProductCategoryName>
</Parent>
</Parent>
</Parent>
</Self>
</GetProductCategoriesForASINResult>
<ResponseMetadata>
<RequestId>0ce91472-4234-4222-8fd8-d56714db18ba</RequestId>
</ResponseMetadata>
</GetProductCategoriesForASINResponse>
简而言之,我真正想知道的是,对于新产品或具有现有 ASIN 的产品,如何获取类别 ID 或名称并将其映射到正确的 XSD,以便可以返回正确的类别特定选项集。
谢谢。
最佳答案
警告 这充其量只是一个脆弱的解决方法 - 你已经被警告过!
没有来自 ProductCategoryId
的直接映射到 XSD。但是,BTG (Browse Tree Guide)之间大致是一一对应的。 * 和 Product XSD files *(减去 BMVD¹ 类别)。
BTG的Node ID
列对应于 ProductCategoryId
.一旦你找出哪个BTGSelf
您可以放心地假设相应的 XSD 文件是正确的。
例如,Self > ProductCategoryId
的 166099011
在 Toys and Games BTG 中找到对应于 Toys and Games XSD
¹书籍、音乐、视频和 DVD
*必须登录您的卖家中心帐户才能访问
关于amazon-web-services - 将亚马逊产品类别映射到正确的类别 XSD,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17444338/