Developer API – Categories

CategoryData

The CategoryData API allows you to specify the product categories that are available.

A Root category should be created as part of the call with the following data:

1
2
3
4
5
6
7
8
<Category>
    <ID>1</ID>
    <Name><![CDATA[Root]]></Name>
    <Position>1</Position>
    <CategoryPath>1</CategoryPath>
    <ParentID>0</ParentID>
    <Level>0</Level>
</Category>

Input

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<ChannelUnity>
    <MerchantName>merch</MerchantName>
    <Authorization>T...==</Authorization>
    <ApiKey>123123123</ApiKey>  
    <RequestType>CategoryData</RequestType>
    <Payload>
        <CategoryList>
        <URL>http://xxxx</URL>
        <FrameworkType>Custom</FrameworkType>
        <WebsiteId>1</WebsiteId>
        <StoreId>1</StoreId>
        <StoreviewId>1</StoreviewId>
        <Category>
            <ID>1</ID>
            <Name><![CDATA[Root]]></Name>
            <Position>1</Position>
            <CategoryPath>1</CategoryPath>
            <ParentID>0</ParentID>
            <Level>0</Level>
        </Category>
        <Category>
            <ID>6</ID>
            <Name><![CDATA[Category 1]]></Name>
            <Position>1</Position>
            <CategoryPath>1/6</CategoryPath>
            <ParentID>1</ParentID>
            <Level>1</Level>
        </Category>
        <Category>
            <ID>3700000</ID>
            <Name><![CDATA[Category 2]]></Name>
            <Position>1</Position>
            <CategoryPath>1/6/3700000</CategoryPath>
            <ParentID>6</ParentID>
            <Level>2</Level>
        </Category>  
<!-- <Category> element repeated for each category -->    
    </CategoryList>
    </Payload>
</ChannelUnity>

The CategoryList elements URL, FrameworkType, WebsiteId, StoreId, and StoreviewId must match those previously given to the StoreData call.

The values to be specified for each category are as follows.

Field name
Description
ID An integer value 2 or greater to identify your category or category folder. These ID values must be unique. (The value 1 is reserved for the Root category).
Name Any name that you wish to use to identify your category or category folder.
Position The sequence within the same folder of categories. An integer value 1 or greater.
CategoryPath Specifies the tree structure for this category. There is always the Root category specified in this path. For example if you have a Category folder with ID 2 and a leaf category of ID 3, the CategoryPath for category ID 3 is “1/2/3”.
ParentID The category ID of the parent. This is usually the penultimate category ID in the category path.
Level The indentation level for the current category in its category tree. This is the number of category IDs in the category path excluding the Root. Root category should be level 0.

 

Output

1
2
3
<ChannelUnity>
    <Status>OK</Status>
</ChannelUnity>

If you want to sell on marketplaces but don't yet have an online store, Synchromatic is the solution for you.
More Details