Related Documents
Document Properties
Kbid28B044
Last Modified26-Nov-2018
Added to KB27-Oct-2016
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

REST API - Get personalized product data category


Note

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

URI

/categories;spgid=<personalization_group_id>/<catID>/products/<sku>

/categories/<catID>/products;spgid=<personalization_group_id>/<sku>

Http Method

GET

Short Description

Gets product data. If page cache is enabled and the spgid parameter is provided with a valid personalization group ID, the Web Adapter caches this user specific response.

Query Parameters

For available parameters refer to:

Example Requests

/categories;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/Home-Entertainment/220/1584/products/4555724,

/categories;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/Home-Entertainment/220/1584/products/4555724?attrs=shortDescription,longDescription,

/categories/Home-Entertainment/220/1584/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/4555724,

/categories/Home-Entertainment/220/1584/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/4555724?attrs=shortDescription,longDescription

HTTP Status Codes

200 OK

404 Not found

Description

Equivalent to /categories/<catID>/products/<sku>, but in addition the "spgid" matrix parameter is provided and used for personalized caching. See REST API - Get product data category (until 7.8), REST API - Get selected product attributes category, REST API - Get product attributes of view category and REST API - Get product data category with product price based on a address for different query parameters on /categories/<catID>/products/<sku> resource.

The matrix parameter "spgid" is optional and it stands for personalization Group Based Caching. If not provided, the Web Adapter will NOT cache the response from the Rest call.

Response for anonymous customers is NOT cached, even if the "spgid" parameter is provided. This means that anonymous customers always get not cached response and there is NO need to provide "spgid" if this rest call is executed without authorization. If "spgid" is provided in the URI for an unregistered customer (e.g. /categories/Home-Entertainment/220/1584/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/4555724), then this "faulty" spgid is removed from the result URIs (e.g. /products/1YLEDTVSUP is an URI to access an available warranty; /products/4555724/reviews is an URI to access the list of all reviews for this product).

The response for the currently logged-in customer is cached only if the "spgid" parameter is provided (at /categories OR /products path segment, OR both) and it contains a valid personalization group ID as a value. Usually this personalization group is retrieved from the session of the current user. If "spgid" is provided on both places (e.g. /categories;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/Home-Entertainment/220/1584/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/4555724) the response is cached by the Web Adapter but the result URIs contain "spgid" only at /products path segment (e.g. /products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/1YLEDTVSUP is an URI to access an available warranty; /products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/4555724/reviews is an URI to access the list of all reviews for this product). If "spgid" is not provided in the URI for a logged-in customer (e.g. /categories/Home-Entertainment/220/1584/products/4555724), then the response is NOT cached by the Web Adapter but the result URIs contain this "spgid" parameter (e.g. /products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/1YLEDTVSUP is an URI to access an available warranty; /products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/4555724/reviews is an URI to access the list of all reviews for this product) in order to be cached when a call is performed based on the generated URIs. If the "spgid" is not valid then an empty resource is returned.

Cartridge

app_sf_rest
Application

B2C Web Shop, B2C Responsive Shop, SMB Web Shop, SMB Responsive Shop

Product Version

7.8

Product To Version

 
Status

final

JSON

Request data format

Request related java object

n/a

Request data example

n/a

Response data format

application/json

Response related java object

com.intershop.sellside.rest.common.capi.resourceobject.ProductRO

Response data example

Anonymous customer: /categories/Home-Entertainment/1058/1020/products/M4852589

...
"variations": "inSPIRED-inTRONICS-Site/-/products/M4852589/variations",
...

Anonymous customer: /categories;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/Home-Entertainment/1058/1020/products/M4852589

...
"variations": "inSPIRED-inTRONICS-Site/-/products/M4852589/variations",
...

Anonymous customer: /categories/Home-Entertainment/1058/1020/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589

...
"variations": "inSPIRED-inTRONICS-Site/-/products/M4852589/variations",
...

Anonymous customer: /categories;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/Home-Entertainment/1058/1020/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589

...
"variations": "inSPIRED-inTRONICS-Site/-/products/M4852589/variations",
...

Authenticated customer: /categories/Home-Entertainment/1058/1020/products/M4852589

...
"variations": "inSPIRED-inTRONICS-Site/-/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589/variations",
...

Authenticated customer: /categories;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/Home-Entertainment/1058/1020/products/M4852589

...
"variations": "inSPIRED-inTRONICS-Site/-/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589/variations",
...

Authenticated customer: /categories/Home-Entertainment/1058/1020/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589

...
"variations": "inSPIRED-inTRONICS-Site/-/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589/variations",
...

Authenticated customer: /categories;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/Home-Entertainment/1058/1020/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589

...
"variations": "inSPIRED-inTRONICS-Site/-/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589/variations",
...

XML

Request data format

Request related java object

n/a

Request data example

n/a

Response data format

text/xml

Response related java object

com.intershop.sellside.rest.common.capi.resourceobject.ProductRO

Response data example

Anonymous customer: /categories/Home-Entertainment/1058/1020/products/M4852589

...
<variations>inSPIRED-inTRONICS-Site/-/products/M4852589/variations</variations>
...

Anonymous customer: /categories;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/Home-Entertainment/1058/1020/products/M4852589

...
<variations>inSPIRED-inTRONICS-Site/-/products/M4852589/variations</variations>
...

Anonymous customer: /categories/Home-Entertainment/1058/1020/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589

...
<variations>inSPIRED-inTRONICS-Site/-/products/M4852589/variations</variations>
...

Anonymous customer: /categories;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/Home-Entertainment/1058/1020/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589

...
<variations>inSPIRED-inTRONICS-Site/-/products/M4852589/variations</variations>
...

Authenticated customer: /categories/Home-Entertainment/1058/1020/products/M4852589

...
<variations>inSPIRED-inTRONICS-Site/-/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589/variations</variations>
...

Authenticated customer: /categories;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/Home-Entertainment/1058/1020/products/M4852589

...
<variations>inSPIRED-inTRONICS-Site/-/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589/variations</variations>
...

Authenticated customer: /categories/Home-Entertainment/1058/1020/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589

...
<variations>inSPIRED-inTRONICS-Site/-/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589/variations</variations>
...

Authenticated customer: /categories;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/Home-Entertainment/1058/1020/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589

...
<variations>inSPIRED-inTRONICS-Site/-/products;spgid=2.OQ5GnFf7g000TpV0cVgJST0000/M4852589/variations</variations>
...

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