Related Documents
Document Properties
Kbid28P693
Last Modified26-Nov-2018
Added to KB22-Aug-2018
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.9
  • ICM 7.10

REST API - Get list of products category


Note

Starting with 7.10 our REST API is documented using Swagger notation accessible at developer.cloud.intershop.com.

URI

/categories/<catID>/products?amount=<amount>&offset=<offset>

Http Method

GET

Short Description

Returns a list of products of a (sub-) category

Query Parameters

Optional parameters:

  • amount - the number of products to retrieve
  • offset - the offset in the retrieved product list to start from


e.g.:
/categories/Computers/206/1563/products
/categories/Computers/206/1563/products?amount=4 or
/categories/Computers/206/1563/products?amount=4&offset=2

or

/categories;spgid=NbaQwWGD1u6RpDkoWPiAHHB60000/Computers/206/1563/products

Example Requests

/categories/Computers/206/1563/products?amount=2&offset=2

HTTP Status Codes

200 OK
404 Not Found

Description

The following details/attributes are listed for each product:

  • Type
  • Title
  • Description
  • URI to /categories/<catID>/products/<sku>

If the REST call is an authenticated one, spgid parameter should be provided in the request URL as well or the request will be considered anonymous, even if Authorization header is provided. The personalization ID can be retrieved using /personalization call, see: REST API - Get Personalization ID

Cartridge

app_sf_rest

Application

B2C Web Shop, SMB Web Shop

Product Version

7.9

Product To Version

 

Status

final

JSON

Request Data Format

application/json

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.LinkRO
com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO

Response Example

/categories/Computers/206/1563/products?amount=2&offset=2

{
    "pageable": "DZoKDACw_hcAAAFBh1yJnO6I",
    "total": 19,
    "offset": 2,
    "amount": 2,
    "elements": [
        {
            "type": "Link",
            "description": "Insurance against breakdown. Warranty period: 3 years.",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Cameras-Camcorders/products/3YLEDTVSUP",
            "title": "3-year LED TV Support"
        },
        {
            "type": "Link",
            "description": "120GB S510 SATA III",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Cameras-Camcorders/products/11089966",
            "title": "A-DATA 120GB S510"
        }
    ],
    "type": "ResourceCollection",
    "name": "products"
}

XML

XML Request Data Format

text/xml

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.LinkRO
com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO

XML Response Example

/categories/Computers/206/1563/products?amount=2&offset=2

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResourceCollection name="products" type="ResourceCollection">
    <amount>2</amount>
    <elements>
        <Link type="Link">
            <description>Insurance against breakdown. Warranty period: 3 years.</description>
            <title>3-year LED TV Support</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Cameras-Camcorders/products/3YLEDTVSUP</uri>
        </Link>
        <Link type="Link">
            <description>120GB S510 SATA III</description>
            <title>A-DATA 120GB S510</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Cameras-Camcorders/products/11089966</uri>
        </Link>
    </elements>
    <offset>2</offset>
    <pageable>TLsKDACwZJYAAAFBj92JnO6M</pageable>
    <total>19</total>
</ResourceCollection

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