Helcim Logo Support & Tutorials

© Copyright 2006-2018 Helcim Inc.

All Rights Reserved.

Helcim Commerce API » Inventory »

List Categories

This API call let's you retrieve a list of available categories. The response is an XML of the categories' information.

Request Fields

Field Name Type Required Description
action String Yes categoriesView
accountId Integer Yes The Helcim Commerce account ID.
apiToken String Yes API token used for authentication and access control. 

Response Fields (XML)

Field Name Type Description
categories - XML structure
category - XML structure
id Integer The category ID.
parentId Integer The parent category ID.
merchantId Integer The merchant ID.
name String The category name.
description String The category description.
availability Integer 1 or 0 - Whether the category is available for sale.
availabilityOnline Integer 1 or 0 - Whether the category is available for sale online.
availabilityRetail Integer 1 or 0 - Whether the category is available for sale retail.
backgroundColor String The category background color.
pictureTM String The URL location of the small-size picture (500px) 
pictureSM String The URL location of the thumbnail-size picture (120px) 

Errors

For all API requests, there are also generic API authentication and user access restriction errors.
Response Code Error Code Message Description

Code Samples

Listing Categories Response XML

<?xml version="1.0"?>
<categories>
    <category>
        <id>4</id>
        <parentId>0</parentId>
        <merchantId>9</merchantId>
        <name>Things</name>
        <description></description>
        <availability>1</availability>
        <availabilityOnline>1</availabilityOnline>
        <availabilityRetail>1</availabilityRetail>
        <backgroundColor>7566FF</backgroundColor>
        <pictureTM>https://team.myhelcim.com/images/9/tmHelcimCommerce-category4-148766936029.jpg</pictureTM>
        <pictureSM>https://team.myhelcim.com/images/9/smHelcimCommerce-category4-148766936029.jpg</pictureSM>
    </category>
    <category>
        <id>429</id>
        <parentId>0</parentId>
        <merchantId>9</merchantId>
        <name>Food</name>
        <description>Delicious Burgers</description>
        <availability>1</availability>
        <availabilityOnline>0</availabilityOnline>
        <availabilityRetail>1</availabilityRetail>
        <backgroundColor>FFFFFF</backgroundColor>
        <pictureTM></pictureTM>
        <pictureSM></pictureSM>
    </category>
</categories>

HTML Form Sample HTML

<input type="hidden" name="accountId" value="YOUR-ACCOUNT-ID">
<input type="hidden" name="apiToken" value="YOUR-API-TOKEN">
<input type="hidden" name="action" value="categoriesView">