我在这里问,而不是在易趣论坛上问,因为那里似乎没有人回应或活跃。
基本上,我在交易API上使用SetStoreCategories方法。http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/SetStoreCategories.html
API调用的数据部分如下所示
<Action>Add</Action>
<StoreCategories>
<CustomCategory>
<Name>name of a thing</Name>
<ChildCategory>
<Name>a child name</Name>
</ChildCategory>
</CustomCategory>
<CustomCategory>
<Name>name of another thing</Name>
<ChildCategory>
<Name>2nd child name</Name>
</ChildCategory>
</CustomCategory>
易趣API的结果是
array(7) {
["Timestamp"]=>
string(24) "2013-07-15T01:49:39.888Z"
["Ack"]=>
string(7) "Success"
["Version"]=>
string(3) "831"
["Build"]=>
string(32) "E831_CORE_APISELLING_16205050_R1"
["TaskID"]=>
string(1) "0"
["Status"]=>
string(8) "Complete"
["CustomCategory"]=>
array(1) {
["CustomCategory"]=>
array(2) {
[0]=>
array(2) {
["CategoryID"]=>
string(9) "660835819"
["Name"]=>
string(15) "name of a thing"
}
[1]=>
array(2) {
["CategoryID"]=>
string(9) "660835919"
["Name"]=>
string(21) "name of another thing"
}
}
}
}
所以你可以看到,它并没有关注我的孩子类别。我在ebay.com上查了一下,他们不在那里。
ebayAPI表示CustomCategory元素的类型与ChildCategory类型相同。你只能窝3个孩子,但我连1个都找不到。
任何帮助都将是惊人的。
谢谢!
事实证明你不能这么做。您必须一次进行1级调用,返回categoryId,然后在后续调用中设置DestinationParentCategoryID。