Related Documents
Document Properties
Kbid2488F4
Last Modified23-Jun-2020
Added to KB11-Jul-2013
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.6
  • ICM 7.7
  • ICM 7.8
  • ICM 7.9

REST API - Get top level categories (until 7.9)

URI

/categories

Http Method

GET

Short Description

Retrieve the top-level navigation data (list of top-level categories)

Query Parameters

view=tree: triggers hierarchical view
limit=<N>: the number of levels to be returned (depth)
imageView=<ImageView>: restricts category images only to a certain view. Example: imageView=front
imageType=<ImageType>: restricts category images only to a certain type. Example: imageType=2XS
allImages=true: specifies whether images in all image views and image types should be provided.

Example Requests

/categories, /categories?view=tree&limit=3

HTTP Status Codes

200 OK

Description

There request retrieves the top-level categories.
There are no further parameters to control the response data.
The response is a JSON data structure containing a list with the retrieved categories.

Cartridge

app_sf_rest

Application

B2C Web Shop, SMB Web Shop

Product Version

7.4

Product To Version

7.9

Status

final

JSON

Request Data Format

Request related java object

n/a

Request Example

n/a

Response Data Format

application/json

Response related java object

com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO
com.intershop.sellside.rest.b2c.capi.resourceobject.CategoryRO

Response Example

{
    "elements": [
        {
            "name": "Cameras-Camcorders",
            "type": "Category",
            "id": "Cameras-Camcorders",
            "description": "The Vectra products and services catalog.",
            "online": "1",
            "images": [
                {
                    "name": "front 1XL",
                    "type": "Image",
                    "imageActualHeight": 220,
                    "imageActualWidth": 220,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/1XL/4545023-288.jpg",
                    "typeID": "1XL",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front 2XS",
                    "type": "Image",
                    "imageActualHeight": 50,
                    "imageActualWidth": 50,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/2XS/4545023-288.jpg",
                    "typeID": "2XS",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front S",
                    "type": "Image",
                    "imageActualHeight": 110,
                    "imageActualWidth": 110,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/S/4545023-288.jpg",
                    "typeID": "S",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front L",
                    "type": "Image",
                    "imageActualHeight": 170,
                    "imageActualWidth": 170,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/L/4545023-288.jpg",
                    "typeID": "L",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front M",
                    "type": "Image",
                    "imageActualHeight": 140,
                    "imageActualWidth": 140,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/M/4545023-288.jpg",
                    "typeID": "M",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front 3XL",
                    "type": "Image",
                    "imageActualHeight": 380,
                    "imageActualWidth": 380,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/3XL/4545023-288.jpg",
                    "typeID": "3XL",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front 1XS",
                    "type": "Image",
                    "imageActualHeight": 80,
                    "imageActualWidth": 80,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/1XS/4545023-288.jpg",
                    "typeID": "1XS",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front 2XL",
                    "type": "Image",
                    "imageActualHeight": 300,
                    "imageActualWidth": 300,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/3XL/4545023-288.jpg",
                    "typeID": "2XL",
                    "primaryImage": true,
                    "viewID": "front"
                }
            ],
            "hasOnlineSubCategories": true,
            "hasOnlineProducts": true,
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Cameras-Camcorders"
        },
        {
            "name": "Computers",
            "type": "Category",
            "id": "Computers",            
            "description": "The Computers products and services catalog.",
            "online": "1",
            "hasOnlineSubCategories": true,
            "hasOnlineProducts": true,
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Computers"
        },
        {
            "name": "Telecommunication",
            "type": "Category",
            "id": "Telecommunication",           
            "description": "The Mobile Computing products and services catalog.",
            "online": "1",
            "hasOnlineSubCategories": true,
            "hasOnlineProducts": false,
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Telecommunication"
        },
        {
            "name": "Specials",
            "type": "Category",
            "id": "Specials",            
            "description": "Special products and services.",
            "online": "1",
            "images": [
                {
                    "name": "front 1XL",
                    "type": "Image",
                    "imageActualHeight": 220,
                    "imageActualWidth": 220,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/1XL/4833886-3661.jpg",
                    "typeID": "1XL",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front S",
                    "type": "Image",
                    "imageActualHeight": 110,
                    "imageActualWidth": 110,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/S/4833886-3661.jpg",
                    "typeID": "S",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front 2XS",
                    "type": "Image",
                    "imageActualHeight": 50,
                    "imageActualWidth": 50,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/2XS/4833886-3661.jpg",
                    "typeID": "2XS",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front L",
                    "type": "Image",
                    "imageActualHeight": 170,
                    "imageActualWidth": 170,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/L/4833886-3661.jpg",
                    "typeID": "L",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front M",
                    "type": "Image",
                    "imageActualHeight": 140,
                    "imageActualWidth": 140,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/M/4833886-3661.jpg",
                    "typeID": "M",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front 3XL",
                    "type": "Image",
                    "imageActualHeight": 380,
                    "imageActualWidth": 380,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/3XL/4833886-3661.jpg",
                    "typeID": "3XL",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front 1XS",
                    "type": "Image",
                    "imageActualHeight": 80,
                    "imageActualWidth": 80,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/1XS/4833886-3661.jpg",
                    "typeID": "1XS",
                    "primaryImage": true,
                    "viewID": "front"
                },
                {
                    "name": "front 2XL",
                    "type": "Image",
                    "imageActualHeight": 300,
                    "imageActualWidth": 300,
                    "effectiveUrl": "/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/3XL/4833886-3661.jpg",
                    "typeID": "2XL",
                    "primaryImage": true,
                    "viewID": "front"
                }
            ],
            "hasOnlineSubCategories": true,
            "hasOnlineProducts": false,
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Specials"
        },
        {
            "name": "TV-Home-Entertainment",
            "type": "Category",
            "id": "TV-Home-Entertainment",           
            "description": "The TV & Home Entertainment products and services catalog.",
            "online": "1",
            "hasOnlineSubCategories": true,
            "hasOnlineProducts": false,
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/TV-Home-Entertainment"
        }
    ],
    "type": "Categories"
}

XML

XML Request Data Format

XML Request Java Objects

n/a

XML Request Example

n/a

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO
com.intershop.sellside.rest.b2c.capi.resourceobject.CategoryRO

XML Response Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Categories type="Categories">
    <elements>
        <Category name="Cameras-Camcorders" type="Category">
            <description>The Vectra products and services catalog.</description>            
            <hasOnlineProducts>true</hasOnlineProducts>
            <hasOnlineSubCategories>true</hasOnlineSubCategories>
            <id>Cameras-Camcorders</id>
            <images>
                <Image name="front 1XL" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/1XL/4545023-288.jpg</effectiveUrl>
                    <imageActualHeight>220</imageActualHeight>
                    <imageActualWidth>220</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>1XL</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front 2XS" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/2XS/4545023-288.jpg</effectiveUrl>
                    <imageActualHeight>50</imageActualHeight>
                    <imageActualWidth>50</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>2XS</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front S" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/S/4545023-288.jpg</effectiveUrl>
                    <imageActualHeight>110</imageActualHeight>
                    <imageActualWidth>110</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>S</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front L" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/L/4545023-288.jpg</effectiveUrl>
                    <imageActualHeight>170</imageActualHeight>
                    <imageActualWidth>170</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>L</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front M" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/M/4545023-288.jpg</effectiveUrl>
                    <imageActualHeight>140</imageActualHeight>
                    <imageActualWidth>140</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>M</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front 3XL" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/3XL/4545023-288.jpg</effectiveUrl>
                    <imageActualHeight>380</imageActualHeight>
                    <imageActualWidth>380</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>3XL</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front 1XS" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/1XS/4545023-288.jpg</effectiveUrl>
                    <imageActualHeight>80</imageActualHeight>
                    <imageActualWidth>80</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>1XS</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front 2XL" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/3XL/4545023-288.jpg</effectiveUrl>
                    <imageActualHeight>300</imageActualHeight>
                    <imageActualWidth>300</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>2XL</typeID>
                    <viewID>front</viewID>
                </Image>
            </images>
            <online>1</online>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Cameras-Camcorders</uri>
        </Category>
        <Category name="Computers" type="Category">
            <description>The Computers products and services catalog.</description>            
            <hasOnlineProducts>true</hasOnlineProducts>
            <hasOnlineSubCategories>true</hasOnlineSubCategories>
            <id>Computers</id>
            <online>1</online>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Computers</uri>
        </Category>
        <Category name="Telecommunication" type="Category">
            <description>The Mobile Computing products and services catalog.</description>            
            <hasOnlineProducts>false</hasOnlineProducts>
            <hasOnlineSubCategories>true</hasOnlineSubCategories>
            <id>Telecommunication</id>
            <online>1</online>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Telecommunication</uri>
        </Category>
        <Category name="Specials" type="Category">
            <description>Special products and services.</description>            
            <hasOnlineProducts>false</hasOnlineProducts>
            <hasOnlineSubCategories>true</hasOnlineSubCategories>
            <id>Specials</id>
            <images>
                <Image name="front 1XL" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/1XL/4833886-3661.jpg</effectiveUrl>
                    <imageActualHeight>220</imageActualHeight>
                    <imageActualWidth>220</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>1XL</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front S" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/S/4833886-3661.jpg</effectiveUrl>
                    <imageActualHeight>110</imageActualHeight>
                    <imageActualWidth>110</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>S</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front 2XS" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/2XS/4833886-3661.jpg</effectiveUrl>
                    <imageActualHeight>50</imageActualHeight>
                    <imageActualWidth>50</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>2XS</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front L" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/L/4833886-3661.jpg</effectiveUrl>
                    <imageActualHeight>170</imageActualHeight>
                    <imageActualWidth>170</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>L</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front M" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/M/4833886-3661.jpg</effectiveUrl>
                    <imageActualHeight>140</imageActualHeight>
                    <imageActualWidth>140</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>M</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front 3XL" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/3XL/4833886-3661.jpg</effectiveUrl>
                    <imageActualHeight>380</imageActualHeight>
                    <imageActualWidth>380</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>3XL</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front 1XS" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/1XS/4833886-3661.jpg</effectiveUrl>
                    <imageActualHeight>80</imageActualHeight>
                    <imageActualWidth>80</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>1XS</typeID>
                    <viewID>front</viewID>
                </Image>
                <Image name="front 2XL" type="Image">
                    <effectiveUrl>/INTERSHOP/static/WFS/PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/PrimeTech/en_US/3XL/4833886-3661.jpg</effectiveUrl>
                    <imageActualHeight>300</imageActualHeight>
                    <imageActualWidth>300</imageActualWidth>
                    <primaryImage>true</primaryImage>
                    <typeID>2XL</typeID>
                    <viewID>front</viewID>
                </Image>
            </images>
            <online>1</online>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Specials</uri>
        </Category>
        <Category name="TV-Home-Entertainment" type="Category">
            <description>The TV &amp; Home Entertainment products and services catalog.</description>            
            <hasOnlineProducts>false</hasOnlineProducts>
            <hasOnlineSubCategories>true</hasOnlineSubCategories>
            <id>TV-Home-Entertainment</id>
            <online>1</online>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/TV-Home-Entertainment</uri>
        </Category>
    </elements>
</Categories>

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets