Php 易趣API设置子类别不会';行不通

Php 易趣API设置子类别不会';行不通,php,xml,ebay-api,Php,Xml,Ebay Api,我在这里问,而不是在eBay论坛上问,因为那里似乎没有人回应或活跃 基本上,我在交易API上使用SetStoreCategories方法。 API调用的数据部分如下 <Action>Add</Action> <StoreCategories> <CustomCategory> <Name>name of a thing</Name> <ChildCategory> <

我在这里问,而不是在eBay论坛上问,因为那里似乎没有人回应或活跃

基本上,我在交易API上使用SetStoreCategories方法。

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>
所以你可以看到它不是在看我的孩子类别。我在ebay.com上查过了,但他们不在那里

ebay api表示CustomCategory元素的类型与ChildCategory类型相同。你只能在家里安顿3个孩子。但我连一个都没办法去窝

任何帮助都将是惊人的


谢谢

结果是你不能这么做。您必须一次进行一级调用,获取CategoryId,然后在后续调用中设置DestinationParentCategoryID

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"
      }
    }
  }
}