API


/categories
This method returns a list of the categories available to the API

cat The ID of the category to use as the starting point. By default, the global root of the category tree is used
depth The number of levels from the root to include in the response. By default all the levels are included.
Response
A list of all categories, with id, name, and parent id.
Sample JSON
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
{"metadata":{
  "root":{
    "id":"clothes-shoes-and-jewelry"
    ,"name":"Clothes and Shoes"
  }
  ,"maxDepth":20
  }
  ,"categories":[{
    "id":"women"
    ,"name":"Women's Fashion"
    ,"parentId":"clothes-shoes-and-jewelry"
    }
    ,{
    "id":"womens-clothes"
    ,"name":"Clothing"
    ,"parentId":"women"
    }
  }
}
Sample XML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<APIResponse>
  <metadata>
    <root>
      <id>clothes-shoes-and-jewelry</id>
      <name>Clothes and Shoes</name>
    </root>
    <maxDepth>20</maxDepth>
  </metadata>
  <categories>
    <category>
      <id>women</id>
      <name>Women's Fashion</name>
      <parentId>clothes-shoes-and-jewelry</parentId>
    </category>
    <category>
      <id>womens-clothes</id>
      <name>Clothing</name>
      <parentId>women</parentId>
    </category>
  </categories>
</APIResponse>