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

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

URI

/categories/<cat_ID>/products/<sku>/links

Http Method

GET

Short Description

Retrieves a list of products and a list of categories linked by the given product 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/Computers/206/1563/products/11089966/links?linkType=upselling&targetObject=product

HTTP Status Codes

200 OK
404 Not found 

Description

Retrieves a list of products and a list of categories linked by the given product 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

7.8 

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

Response Example

/categories/Cameras-Camcorders/products/859910/links?linkType=crossselling&targetObject=product

{
    "elements": [
        {
            "type": "TypedLink",
            "linkType": "crossselling",
            "productLinks": [
                {
                    "type": "Link",
                    "description": "S599 128GB Notebook Package SSD, 6.35 cm (2.5 \") SATA II, 1500G, 68g, Black",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/6830681",
                    "title": "A-DATA 128GB S599"
                },
                {
                    "type": "Link",
                    "description": "16GB C003, USB 2,0, 10g, Blue",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/5079739",
                    "title": "A-DATA 16GB C003"
                }
            ]
        }
    ],
    "type": "TypedLinks"
}

/categories/Cameras-Camcorders/products/859910/links?linkType=crossselling&targetObject=category

{
    "elements": [
        {
            "type": "TypedLink",
            "linkType": "crossselling",
            "categoryLinks": [
                {
                    "type": "Link",
                    "description": "The Vectra products and services catalog.",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Cameras-Camcorders",
                    "title": "Cameras-Camcorders",
                    "attributes": [
                        {
                            "name": "hasOnlineProducts",
                            "type": "ResourceAttribute",
                            "value": true
                        },
                        {
                            "name": "hasOnlineSubCategories",
                            "type": "ResourceAttribute",
                            "value": true
                        }
                    ]
                },
                {
                    "type": "Link",
                    "description": "The Computers products and services catalog.",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Computers",
                    "title": "Computers",
                    "attributes": [
                        {
                            "name": "hasOnlineProducts",
                            "type": "ResourceAttribute",
                            "value": true
                        },
                        {
                            "name": "hasOnlineSubCategories",
                            "type": "ResourceAttribute",
                            "value": true
                        }
                    ]
                },
                {
                    "type": "Link",
                    "description": "The Mobile Computing products and services catalog.",
                    "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Telecommunication",
                    "title": "Telecommunication",
                    "attributes": [
                        {
                            "name": "hasOnlineProducts",
                            "type": "ResourceAttribute",
                            "value": false
                        },
                        {
                            "name": "hasOnlineSubCategories",
                            "type": "ResourceAttribute",
                            "value": true
                        }
                    ]
                }
            ]
        }
    ],
    "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.b2c.capi.resourceobject.TypedLinkRO
com.intershop.component.rest.capi.resourceobject.LinkRO

XML Response Example

/categories/Cameras-Camcorders/products/859910/links?linkType=crossselling&targetObject=product

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TypedLinks type="TypedLinks">
    <elements>
        <TypedLink type="TypedLink">
            <linkType>crossselling</linkType>
            <productLinks>
                <Link type="Link">
                    <description>S599 128GB Notebook Package SSD, 6.35 cm (2.5 &quot;) SATA II, 1500G, 68g, Black</description>
                    <title>A-DATA 128GB S599</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/6830681</uri>
                </Link>
                <Link type="Link">
                    <description>16GB C003, USB 2,0, 10g, Blue</description>
                    <title>A-DATA 16GB C003</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/5079739</uri>
                </Link>
            </productLinks>
        </TypedLink>
    </elements>
</TypedLinks>

/categories/Cameras-Camcorders/products/859910/links?linkType=crossselling&targetObject=category

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TypedLinks type="TypedLinks">
    <elements>
        <TypedLink type="TypedLink">
            <categoryLinks>
                <Link type="Link">
                    <attributes>
                        <ResourceAttribute name="hasOnlineProducts" type="ResourceAttribute">
                            <value 
                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                                xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:boolean">true
                            </value>
                        </ResourceAttribute>
                        <ResourceAttribute name="hasOnlineSubCategories" type="ResourceAttribute">
                            <value 
                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                                xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:boolean">true
                            </value>
                        </ResourceAttribute>
                    </attributes>
                    <description>The Vectra products and services catalog.</description>
                    <title>Cameras-Camcorders</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Cameras-Camcorders</uri>
                </Link>
                <Link type="Link">
                    <attributes>
                        <ResourceAttribute name="hasOnlineProducts" type="ResourceAttribute">
                            <value 
                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                                xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:boolean">true
                            </value>
                        </ResourceAttribute>
                        <ResourceAttribute name="hasOnlineSubCategories" type="ResourceAttribute">
                            <value 
                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                                xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:boolean">true
                            </value>
                        </ResourceAttribute>
                    </attributes>
                    <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">
                    <attributes>
                        <ResourceAttribute name="hasOnlineProducts" type="ResourceAttribute">
                            <value 
                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                                xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:boolean">false
                            </value>
                        </ResourceAttribute>
                        <ResourceAttribute name="hasOnlineSubCategories" type="ResourceAttribute">
                            <value 
                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                                xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:boolean">true
                            </value>
                        </ResourceAttribute>
                    </attributes>
                    <description>The Mobile Computing products and services catalog.</description>
                    <title>Telecommunication</title>
                    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/categories/Telecommunication</uri>
                </Link>
            </categoryLinks>
            <linkType>crossselling</linkType>
        </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