Related Documents
Document Properties
KbidB25123
Last Modified23-Jun-2020
Added to KB09-Sep-2013
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.6
  • ICM 7.7
  • ICM 7.8

REST API - Get personalized promotion list (until 7.8)

URI

/promotions

Http Method

GET

Short Description

Get a personalized list of promotions available for the store.

Query Parameters

none

Example Requests

/promotions

or

/promotions/FreeShippingOnLEDTVs;spgid=cmW2S00A2u8000m.k6.GgAim0000

HTTP Status Codes

200 OK
404 Not Found

Description

Here a list of all promotions defined for the store is returned.
Details for each promotion are not returned but a link where to find these details.

The matrix parameter "spgid" is optional and it stands for personalization Group Based Caching. If you are a registered user then you get a personalized promotion list.

If the "spgid" is not valid then an empty list will be returned.

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

Response Example

example for anonymous customer:

 

{
   "total": 2,
   "elements":
   [
	   {
		   "type": "Link",
		   "title": "Free Shipping on LED TVs",
		   "uri": "PrimeTech-PrimeTechSpecials-Site/-/promotions/FreeShippingOnLEDTVs"
	   },
	   {
		   "type": "Link",
		   "title": "Void Promotion",
		   "uri": "PrimeTech-PrimeTechSpecials-Site/-/promotions/1LEKDgAOt38AAAFBSm9G9O7d"
	   }
   ],
   "type": "ResourceCollection",
   "name": "promotions"
}

example for authenticated customer:  

{
   "total": 3,
   "elements":
   [
	   {
		   "type": "Link",
		   "title": "Free Shipping on LED TVs",
		   "uri": "PrimeTech-PrimeTechSpecials-Site/-/promotions/FreeShippingOnLEDTVs;spgid=cmW2S00A2u8000m.k6.GgAim0000"
	   },
	   {
		   "type": "Link",
		   "title": "Void Promotion",
		   "uri": "PrimeTech-PrimeTechSpecials-Site/-/promotions/1LEKDgAOt38AAAFBSm9G9O7d;spgid=cmW2S00A2u8000m.k6.GgAim0000"
	   },
	   {
		   "type": "Link",
		   "title": "Some Promotion",
		   "uri": "PrimeTech-PrimeTechSpecials-Site/-/promotions/YCsKDgAOsKMAAAFB6YFEHOrN;spgid=cmW2S00A2u8000m.k6.GgAim0000"
	   }
   ],
   "type": "ResourceCollection",
   "name": "promotions"

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

XML Response Example

example for authenticated customer:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResourceCollection name="promotions" type="ResourceCollection">
	<elements>
		<Link type="Link">
			<title>Free Shipping on LED TVs</title>
			<uri>PrimeTech-PrimeTechSpecials-Site/-/promotions/FreeShippingOnLEDTVs</uri>
		</Link>
		<Link type="Link">
			<title>Void Promotion</title>
			<uri>PrimeTech-PrimeTechSpecials-Site/-/promotions/1LEKDgAOt38AAAFBSm9G9O7d</uri>
		</Link>
	</elements>
	<total>2</total>
</ResourceCollection>

example for anonymous customer:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResourceCollection name="promotions" type="ResourceCollection">
	<elements>
		<Link type="Link">
			<title>Free Shipping on LED TVs</title>
			<uri>PrimeTech-PrimeTechSpecials-Site/-/promotions/FreeShippingOnLEDTVs;spgid=cmW2S00A2u8000m.k6.GgAim0000</uri>
		</Link>
		<Link type="Link">
			<title>Void Promotion</title>
			<uri>PrimeTech-PrimeTechSpecials-Site/-/promotions/1LEKDgAOt38AAAFBSm9G9O7d;spgid=cmW2S00A2u8000m.k6.GgAim0000</uri>
		</Link>
		<Link type="Link">
			<title>Some Promotion</title>
			<uri>PrimeTech-PrimeTechSpecials-Site/-/promotions/YCsKDgAOsKMAAAFB6YFEHOrN;spgid=cmW2S00A2u8000m.k6.GgAim0000</uri>
		</Link>
	</elements>
	<total>3</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
Tickets