Related Documents
Document Properties
Kbid22F601
Last Modified05-Jul-2019
Added to KB25-May-2011
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.6
  • ICM 7.7
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

REST API - Get product attributes of view category


Note

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

URI

/categories/<cat_ID>/products/<sku>?view=<namedViewID>

Http Method

GET

Short Description

Get product attributes given by view

Query Parameters

view=<namedViewID>

attrs=<attributeName>

Example Requests

/categories/Computers/Notebooks/products/29556141?view=myview&attrs=shortDesc,variations

HTTP Status Codes

200 OK
404 Not found 

Description

The request retrieves attributes of a product. The selected attributes are defined in a view. The query parameter view defines the ID of the selected view.
The views are defined in a WebshopREST.properties file. The file should exist on domain level. For the PrimeTechSpecials Webshop, e.g., we would need it in <IS_HOME>/share/system/config/domains/PrimeTech-PrimeTechSpecials-Site.

Some example entry with the ID myview:

Webshop.REST.products.view.myview=salePrice,Height,longDesc

The parameter view and the parameter attrs can be combined. See REST API - Get product data category (until 7.8) and the second example.

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.sellside.rest.b2c.capi.resourceobject.ProductRO

Response Example

/categories/Cameras-Camcorders/products/859910?view=myview

{
    "name": "Product",
    "type": "Product",
    "salePrice": {
        "type": "ProductPrice",
        "value": 181.53,
        "currencyMnemonic": "USD"
    },
    "listPrice": {
        "type": "ProductPrice",
        "value": 181.53,
        "currencyMnemonic": "USD"
    },
    "longDescription": "<b>FRITZ!Box Fon WLAN Overview</b><br/><br/>FRITZ!Box Fon WLAN makes telephoning over the Internet easy:<br/><br/>Connect your existing telephones and pick up the handset: that's all there is to it! Now you can talk over the Internet with voice over IP (without even turning on your PC) or over the conventional phone line. And FRITZ!Box Fon WLAN also puts your PCs on the Internet at ADSL speed -- over Ethernet, USB or wireless LAN -- all of this with firewall protection and wireless encryption enabled out of the box.<br/><br/>* FRITZ!Box Fon WLAN combines ADSL router and PBX <br/>* Router with integrated ADSL modem; connects to multiple PCs <br/>* Economical phone calls over Internet with VoIP, or over ISDN or analog phone line <br/>* Internet telephony with existing phones, without PC turned on <br/>* Connect analog terminal equipment, ISDN telephones and PBXs <br/>* Intelligent bandwidth management for perfect voice quality <br/>* Up to 5 answering machines and fax function integrated, with voice-to-mail and fax-to-mail <br/>* USB host for USB printers or USB mass storage media in the network <br/>* WLAN encrypted with unique, factory-set key <br/>* Secure WDS repeater mode for extending WLAN range <br/>* WAN port to connect to an existing cable modem or router <br/>* Integrated firewall protects connected PCs <br/>* Wake on LAN: wake up network devices from standby operation <br/>* Many additional functions like Stick & Surf, Eco Mode, VPN<br/>",
    "availableGiftMessages": [
        {
            "type": "Link",
            "description": "An ordinary gift message card.",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/OrdinaryGiftMessage",
            "title": "Ordinary Gift Message"
        },
        {
            "type": "Link",
            "description": "A birthday gift message card.",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/BirthdayGiftMessage",
            "title": "Birthday Gift Message"
        },
        {
            "type": "Link",
            "description": "A Christmas theme gift card message.",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/ChristmasGiftMessage",
            "title": "Christmas Gift Message"
        },
        {
            "type": "Link",
            "description": "A flower theme message card.",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/FlowerGiftMessage",
            "title": "Flower Gift Message"
        },
        {
            "type": "Link",
            "description": "A Valentine's Day theme gift card message.",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/ValentinesDayGiftMessage",
            "title": "Valentine's Day Gift Message"
        }
    ]
}

/categories/Cameras-Camcorders/products/859910?view=myview&attrs=shortDescription

{
    "name": "Product",
    "type": "Product",
    "salePrice": {
        "type": "ProductPrice",
        "value": 181.53,
        "currencyMnemonic": "USD"
    },
    "listPrice": {
        "type": "ProductPrice",
        "value": 181.53,
        "currencyMnemonic": "USD"
    },
    "shortDescription": "FRITZ!Box Fon WLAN 7170 Annex A",
    "longDescription": "<b>FRITZ!Box Fon WLAN Overview</b><br/><br/>FRITZ!Box Fon WLAN makes telephoning over the Internet easy:<br/><br/>Connect your existing telephones and pick up the handset: that's all there is to it! Now you can talk over the Internet with voice over IP (without even turning on your PC) or over the conventional phone line. And FRITZ!Box Fon WLAN also puts your PCs on the Internet at ADSL speed -- over Ethernet, USB or wireless LAN -- all of this with firewall protection and wireless encryption enabled out of the box.<br/><br/>* FRITZ!Box Fon WLAN combines ADSL router and PBX <br/>* Router with integrated ADSL modem; connects to multiple PCs <br/>* Economical phone calls over Internet with VoIP, or over ISDN or analog phone line <br/>* Internet telephony with existing phones, without PC turned on <br/>* Connect analog terminal equipment, ISDN telephones and PBXs <br/>* Intelligent bandwidth management for perfect voice quality <br/>* Up to 5 answering machines and fax function integrated, with voice-to-mail and fax-to-mail <br/>* USB host for USB printers or USB mass storage media in the network <br/>* WLAN encrypted with unique, factory-set key <br/>* Secure WDS repeater mode for extending WLAN range <br/>* WAN port to connect to an existing cable modem or router <br/>* Integrated firewall protects connected PCs <br/>* Wake on LAN: wake up network devices from standby operation <br/>* Many additional functions like Stick & Surf, Eco Mode, VPN<br/>",
    "availableGiftMessages": [
        {
            "type": "Link",
            "description": "An ordinary gift message card.",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/OrdinaryGiftMessage",
            "title": "Ordinary Gift Message"
        },
        {
            "type": "Link",
            "description": "A birthday gift message card.",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/BirthdayGiftMessage",
            "title": "Birthday Gift Message"
        },
        {
            "type": "Link",
            "description": "A Christmas theme gift card message.",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/ChristmasGiftMessage",
            "title": "Christmas Gift Message"
        },
        {
            "type": "Link",
            "description": "A flower theme message card.",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/FlowerGiftMessage",
            "title": "Flower Gift Message"
        },
        {
            "type": "Link",
            "description": "A Valentine's Day theme gift card message.",
            "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/ValentinesDayGiftMessage",
            "title": "Valentine's Day Gift Message"
        }
    ]
}

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.sellside.rest.b2c.capi.resourceobject.ProductRO

XML Response Example

/categories/Cameras-Camcorders/products/859910?view=myview

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Product name="Product" type="Product">
    <availableGiftMessages>
        <availableGiftMessages type="Link">
            <description>An ordinary gift message card.</description>
            <title>Ordinary Gift Message</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/OrdinaryGiftMessage</uri>
        </availableGiftMessages>
        <availableGiftMessages type="Link">
            <description>A birthday gift message card.</description>
            <title>Birthday Gift Message</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/BirthdayGiftMessage</uri>
        </availableGiftMessages>
        <availableGiftMessages type="Link">
            <description>A Christmas theme gift card message.</description>
            <title>Christmas Gift Message</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/ChristmasGiftMessage</uri>
        </availableGiftMessages>
        <availableGiftMessages type="Link">
            <description>A flower theme message card.</description>
            <title>Flower Gift Message</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/FlowerGiftMessage</uri>
        </availableGiftMessages>
        <availableGiftMessages type="Link">
            <description>A Valentine's Day theme gift card message.</description>
            <title>Valentine's Day Gift Message</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/ValentinesDayGiftMessage</uri>
        </availableGiftMessages>
    </availableGiftMessages>
    <listPrice type="ProductPrice">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>181.53</value>
    </listPrice>
    <longDescription>&lt;b&gt;FRITZ!Box Fon WLAN Overview&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;FRITZ!Box Fon WLAN makes telephoning over the Internet easy:&lt;br/&gt;&lt;br/&gt;Connect your existing telephones and pick up the handset: that's all there is to it! Now you can talk over the Internet with voice over IP (without even turning on your PC) or over the conventional phone line. And FRITZ!Box Fon WLAN also puts your PCs on the Internet at ADSL speed -- over Ethernet, USB or wireless LAN -- all of this with firewall protection and wireless encryption enabled out of the box.&lt;br/&gt;&lt;br/&gt;* FRITZ!Box Fon WLAN combines ADSL router and PBX &lt;br/&gt;* Router with integrated ADSL modem; connects to multiple PCs &lt;br/&gt;* Economical phone calls over Internet with VoIP, or over ISDN or analog phone line &lt;br/&gt;* Internet telephony with existing phones, without PC turned on &lt;br/&gt;* Connect analog terminal equipment, ISDN telephones and PBXs &lt;br/&gt;* Intelligent bandwidth management for perfect voice quality &lt;br/&gt;* Up to 5 answering machines and fax function integrated, with voice-to-mail and fax-to-mail &lt;br/&gt;* USB host for USB printers or USB mass storage media in the network &lt;br/&gt;* WLAN encrypted with unique, factory-set key &lt;br/&gt;* Secure WDS repeater mode for extending WLAN range &lt;br/&gt;* WAN port to connect to an existing cable modem or router &lt;br/&gt;* Integrated firewall protects connected PCs &lt;br/&gt;* Wake on LAN: wake up network devices from standby operation &lt;br/&gt;* Many additional functions like Stick &amp; Surf, Eco Mode, VPN&lt;br/&gt;</longDescription>
    <salePrice type="ProductPrice">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>181.53</value>
    </salePrice>
</Product>

/categories/Cameras-Camcorders/products/859910?view=myview&attrs=shortDescription

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Product name="Product" type="Product">
    <availableGiftMessages>
        <availableGiftMessages type="Link">
            <description>An ordinary gift message card.</description>
            <title>Ordinary Gift Message</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/OrdinaryGiftMessage</uri>
        </availableGiftMessages>
        <availableGiftMessages type="Link">
            <description>A birthday gift message card.</description>
            <title>Birthday Gift Message</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/BirthdayGiftMessage</uri>
        </availableGiftMessages>
        <availableGiftMessages type="Link">
            <description>A Christmas theme gift card message.</description>
            <title>Christmas Gift Message</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/ChristmasGiftMessage</uri>
        </availableGiftMessages>
        <availableGiftMessages type="Link">
            <description>A flower theme message card.</description>
            <title>Flower Gift Message</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/FlowerGiftMessage</uri>
        </availableGiftMessages>
        <availableGiftMessages type="Link">
            <description>A Valentine's Day theme gift card message.</description>
            <title>Valentine's Day Gift Message</title>
            <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/products/ValentinesDayGiftMessage</uri>
        </availableGiftMessages>
    </availableGiftMessages>
    <listPrice type="ProductPrice">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>181.53</value>
    </listPrice>
    <longDescription>&lt;b&gt;FRITZ!Box Fon WLAN Overview&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;FRITZ!Box Fon WLAN makes telephoning over the Internet easy:&lt;br/&gt;&lt;br/&gt;Connect your existing telephones and pick up the handset: that's all there is to it! Now you can talk over the Internet with voice over IP (without even turning on your PC) or over the conventional phone line. And FRITZ!Box Fon WLAN also puts your PCs on the Internet at ADSL speed -- over Ethernet, USB or wireless LAN -- all of this with firewall protection and wireless encryption enabled out of the box.&lt;br/&gt;&lt;br/&gt;* FRITZ!Box Fon WLAN combines ADSL router and PBX &lt;br/&gt;* Router with integrated ADSL modem; connects to multiple PCs &lt;br/&gt;* Economical phone calls over Internet with VoIP, or over ISDN or analog phone line &lt;br/&gt;* Internet telephony with existing phones, without PC turned on &lt;br/&gt;* Connect analog terminal equipment, ISDN telephones and PBXs &lt;br/&gt;* Intelligent bandwidth management for perfect voice quality &lt;br/&gt;* Up to 5 answering machines and fax function integrated, with voice-to-mail and fax-to-mail &lt;br/&gt;* USB host for USB printers or USB mass storage media in the network &lt;br/&gt;* WLAN encrypted with unique, factory-set key &lt;br/&gt;* Secure WDS repeater mode for extending WLAN range &lt;br/&gt;* WAN port to connect to an existing cable modem or router &lt;br/&gt;* Integrated firewall protects connected PCs &lt;br/&gt;* Wake on LAN: wake up network devices from standby operation &lt;br/&gt;* Many additional functions like Stick &amp; Surf, Eco Mode, VPN&lt;br/&gt;</longDescription>
    <salePrice type="ProductPrice">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>181.53</value>
    </salePrice>
    <shortDescription>FRITZ!Box Fon WLAN 7170 Annex A</shortDescription>
</Product>

Reference - WebShop REST APIs

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
Tickets