Related Documents
Document Properties
KbidR24877
Last Modified26-Nov-2018
Added to KB11-Jul-2013
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.6
  • ICM 7.7
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

REST API - Get category links by link type and target objects (products or categories)


Note

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

URI

/categories/<cat_ID>/links

Http Method

GET

Short Description

Retrieves a list of products and a list of categories linked by the given category and filtered by the provided link type/target object

Query Parameters

linkType: specifies the type of links to retrieve
targetObject=category/product: specifies retrieval either of category or product links

Example Requests

/categories/Cameras-Camcorders/links?linkType=upselling&targetObject=product

HTTP Status Codes

200 OK

400 Bad request
       Possible value for header ‘error-key’:

    • category.links.query.invalid_parameters.error

404 Not Found

Description

Retrieves a list of products and a list of categories linked by the given category and filtered by the provided link type/target object

Cartridge

app_sf_rest

Application

B2C Web Shop, SMB Web Shop

Product Version

7.4

Product To Version

 

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.common.capi.resource.CategoryLinksResource
com.intershop.sellside.rest.common.capi.resourceobject.TypedLinkRO
com.intershop.component.rest.capi.resourceobject.LinkRO

Response Example

{
    "elements": [
        {
            "type": "TypedLink",
            "categoryLinks": [
                {
                    "type": "Link",
                    "description": "The Computers products and services catalog.",
                    "title": "Computers",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Computers"
                },
                {
                    "type": "Link",
                    "description": "The Mobile Computing products and services catalog.",
                    "title": "Telecommunication",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Telecommunication"
                },
                {
                    "type": "Link",
                    "description": "Special products and services.",
                    "title": "Specials",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Specials"
                },
                {
                    "type": "Link",
                    "description": "The TV & Home Entertainment products and services catalog.",
                    "title": "TV-Home-Entertainment",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/TV-Home-Entertainment"
                }
            ],
            "linkType": "spareparts"
        },
        {
            "type": "TypedLink",
            "productLinks": [
                {
                    "type": "Link",
                    "description": "EF 50mm f/1.8 II",
                    "title": "Canon EF 50mm f/1.8 II",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/805956"
                },
                {
                    "type": "Link",
                    "description": "Retail Set: Benq T850 Red and Dicota CamPocket Zoom ",
                    "title": "Benq T850 Red + Dicota CamPocket Zoom",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/M1610689"
                }
            ],
            "categoryLinks": [
                {
                    "type": "Link",
                    "description": "The Computers products and services catalog.",
                    "title": "Computers",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Computers"
                },
                {
                    "type": "Link",
                    "description": "The Mobile Computing products and services catalog.",
                    "title": "Telecommunication",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Telecommunication"
                },
                {
                    "type": "Link",
                    "description": "Special products and services.",
                    "title": "Specials",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Specials"
                },
                {
                    "type": "Link",
                    "description": "The TV & Home Entertainment products and services catalog.",
                    "title": "TV-Home-Entertainment",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/TV-Home-Entertainment"
                }
            ],
            "linkType": "other"
        }
    ],
    "type": "TypedLinks"
}

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.common.capi.resource.CategoryLinksResource
com.intershop.sellside.rest.common.capi.resourceobject.TypedLinkRO
com.intershop.component.rest.capi.resourceobject.LinkRO

XML Response Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TypedLinks type="TypedLinks">
    <elements>
        <TypedLink type="TypedLink">
            <categoryLinks>
                <Link type="Link">
                    <description>The Computers products and services catalog.</description>
                    <title>Computers</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Computers</uri>
                </Link>
                <Link type="Link">
                    <description>The Mobile Computing products and services catalog.</description>
                    <title>Telecommunication</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Telecommunication</uri>
                </Link>
                <Link type="Link">
                    <description>Special products and services.</description>
                    <title>Specials</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Specials</uri>
                </Link>
                <Link type="Link">
                    <description>The TV &amp; Home Entertainment products and services catalog.</description>
                    <title>TV-Home-Entertainment</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/TV-Home-Entertainment</uri>
                </Link>
            </categoryLinks>
            <linkType>spareparts</linkType>
        </TypedLink>
        <TypedLink type="TypedLink">
            <categoryLinks>
                <Link type="Link">
                    <description>The Computers products and services catalog.</description>
                    <title>Computers</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Computers</uri>
                </Link>
                <Link type="Link">
                    <description>The Mobile Computing products and services catalog.</description>
                    <title>Telecommunication</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Telecommunication</uri>
                </Link>
                <Link type="Link">
                    <description>Special products and services.</description>
                    <title>Specials</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Specials</uri>
                </Link>
                <Link type="Link">
                    <description>The TV &amp; Home Entertainment products and services catalog.</description>
                    <title>TV-Home-Entertainment</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/TV-Home-Entertainment</uri>
                </Link>
            </categoryLinks>
            <linkType>other</linkType>
            <productLinks>
                <Link type="Link">
                    <description>EF 50mm f/1.8 II</description>
                    <title>Canon EF 50mm f/1.8 II</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/805956</uri>
                </Link>
                <Link type="Link">
                    <description>Retail Set: Benq T850 Red and Dicota CamPocket Zoom </description>
                    <title>Benq T850 Red + Dicota CamPocket Zoom</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/M1610689</uri>
                </Link>
            </productLinks>
        </TypedLink>
    </elements>
</TypedLinks>

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