Document Properties
Kbid
Y29607
Last Modified
09-Nov-2022
Added to KB
03-Sep-2020
Public Access
Everyone
Status
Online
Doc Type
References
Product
  • ICM 7.10
  • ICM 11
Reference - Recommendation REST API 1.0.0
Document View


This API specification is available for download as an Open API 3.0 YAML file: 

References

The following page lists available REST APIs for ICM 7.10 and their version dependencies:

API Specification

Introduction
OpenAPI Version: 3.0.1
Recommendation Version: 1.0.0

This is Intershop ICM REST API documentation.

This reference lists the REST API for storefront development. The REST API covers features of both, the B2C (SMB - Small and Medium-sized businesses) and the B2B storefront development.
This reference is intended for developers who want to make use of an easy-to-use API when developing frontend solutions.
You can find more information at Intershop Communications. Contact our Intershop experts at Support - Intershop Communications

Introduction

This API is documented in OpenAPI format.

Recommendation API
/recommendationcontexts
POST: Creates a new Recommendation Context

Description

The call is not mandatory - any other alpha-numeric string can be used instead

Java Method

public javax.ws.rs.core.Response com.intershop.component.recommendation.capi.rest.resource.RecommendationContextListResource.createContext()

Request Body

--

Request Parameters

--

Response

201 - Created

ResourceCollectionRO */*

401 - Unauthorized

Recommendation Event API
/recommendationcontexts/{RecommendationContextKey}/events
POST: Sends an event to the recommendation engine

Description

If a recommendation service is configured this sends one of the following events to the recommendation engine:

  • ProductViewRecommendationEvent - The product with given ID [SKU] that has been viewed.
  • BasketRecommendationEvent - The items that have been added to the basket.
  • OrderRecommendationEvent - The items that have been ordered or the order with the given order number which were submitted.
  • SearchRecommendationEvent - A search with given search term has been processed
  • UserToSessionRecommendationEvent - Connects the current recommendation context with the given userid (after login). This event may affect the results of the recommendation requests.

    The event can only be dispatched successfully if the installed Recommendation Engines support the event type and if the corresponding back office preference in 'Channel preferences / Recommendation Engines' is activated for the given event type. The used can be any alpha-numeric string. It will be used to distinguish between different users/customers.

Java Method

public javax.ws.rs.core.Response com.intershop.component.recommendation.capi.rest.resource.EventRecommendationsListResource.sendEvent(com.intershop.component.recommendation.capi.rest.resourceobject.RecommendationEventRO)

Request Body

RecommendationEventRO application/json

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathRecommendationContextKeystringExampleKeyRequired | The key or UUID to resolve a single item

Response

204 - No Content

400 - Bad Request

401 - Unauthorized

403 - Forbidden

404 - Not Found

Recommendation Request API
/recommendationcontexts/{RecommendationContextKey}/basketrecommendations
GET: Get recommended Products for the basket with the given basketID

Description

If a recommendation service is configured, this call returns a list of recommended products for the given basket. The resulting list strongly depends on the configuration of the recommendation engine and on the back office preferences in 'Channel preferences / Recommendation Engines'. If the request type BasketRecommendationRequest is not activated then an empty list is returned. The used can be any alpha-numeric string. It will be used to distinguish between different users/customers.

Java Method

public javax.ws.rs.core.Response com.intershop.component.recommendation.capi.rest.resource.BasketRequestRecommendationsListResource.getBasketRecommendations(java.lang.String)

Request Body

--

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathRecommendationContextKeystringExampleKeyRequired | The key or UUID to resolve a single item
in querybasketIDstring

Response

200 - OK

ResourceCollectionRO application/json

400 - Bad Request

401 - Unauthorized

404 - Not Found

/recommendationcontexts/{RecommendationContextKey}/productrecommendations
GET: Get recommended products for the given produkt(sku)

Description

If a recommendation service is configured this call returns a list of recommended products for the given product ID (SKU). The result list strongly depends on the configuration of the recommendation engine and on the back office preferences in 'Channel preferences / Recommendation Engines'. If the request type ProductRecommendationRequest is not activated then an empty list is returned.The used can be any alpha-numeric string. It will be used to distinguish between different users/customers.

Java Method

public javax.ws.rs.core.Response com.intershop.component.recommendation.capi.rest.resource.ProductRequestRecommendationsListResource.getProductRecommendations(java.lang.String)

Request Body

--

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathRecommendationContextKeystringExampleKeyRequired | The key or UUID to resolve a single item
in queryproductIDstring

Response

200 - OK

ResourceCollectionRO application/json

400 - Bad Request (when missing query parameter)

401 - Unauthorized

/recommendationcontexts/{RecommendationContextKey}/searchrecommendations
GET: Get recommended products for the given search term

Description

If a recommendation service is configured this call returns a list of recommended products for the given search term. The result list strongly depends on the configuration of the recommendation engine and on the back office preferences in 'Channel preferences / Recommendation Engines'. If the request type SearchRecommendationRequest is not activated then an empty list is returned. The used can be any alpha-numeric string. It will be used to distinguish between different users/customers.

Java Method

public javax.ws.rs.core.Response com.intershop.component.recommendation.capi.rest.resource.SearchRequestRecommendationsListResource.getProductRecommendations(java.lang.String)

Request Body

--

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathRecommendationContextKeystringExampleKeyRequired | The key or UUID to resolve a single item
in querysearchTermstring

Response

200 - OK

ResourceCollectionRO application/json

400 - Bad Request (when missing query parameter searchTerm)

401 - Unauthorized

/recommendationcontexts/{RecommendationContextKey}/topsellerrecommendations
GET: Get recommended global topseller products

Description

If a recommendation service is configured this call returns a list of recommended global top-seller products. The result list strongly depends on the configuration of the recommendation engine and on the back office preferences in 'Channel preferences / Recommendation Engines'. If the request type TopsellerRecommendationRequest is not activated then an empty list is returned. The used can be any alpha-numeric string. It will be used to distinguish between different users/customers.

Java Method

public javax.ws.rs.core.Response com.intershop.component.recommendation.capi.rest.resource.TopsellerRequestRecommendationsListResource.getProductRecommendations()

Request Body

--

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathRecommendationContextKeystringExampleKeyRequired | The key or UUID to resolve a single item

Response

200 - OK

ResourceCollectionRO application/json

401 - Unauthorized

/recommendationcontexts/{RecommendationContextKey}/userrecommendations
GET: Get recommended products for the assigned user

Description

If a recommendation service is configured this call returns a list of recommended products for the assigned user. The assignment of an user to the context-ID has to be done before with a separate REST Call (see UserToSessionRecommendationEvent at REST API - Recommendation events). The result list strongly depends on the configuration of the recommendation engine and on the back office preferences in 'Channel preferences / Recommendation Engines'. If the request type UserRecommendationRequest is not activated then an empty list is returned. The used can be any alpha-numeric string. It will be used to distinguish between different users/customers.

Java Method

public javax.ws.rs.core.Response com.intershop.component.recommendation.capi.rest.resource.UserRequestRecommendationsListResource.getProductRecommendations()

Request Body

--

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathRecommendationContextKeystringExampleKeyRequired | The key or UUID to resolve a single item

Response

200 - OK

ResourceCollectionRO application/json

401 - Unauthorized

Request and Response Object Schemata
RecommendationEventRO application/json{
  • "name":
    string
    The name of an element
  • "type":
    string
    Readonly | The type of the element. This is normally a constant that can be used to differentiate elements by their type.
}
ResourceCollectionRO application/json{
  • "pageable":
    string
    The pageable ID
  • "total":
    integer
    The pageable amount total | Format: int32
  • "offset":
    integer
    The pageable offset | Format: int32
  • "amount":
    integer
    The pageable amount | Format: int32
  • "elements":
    array
    An array of AbstractResourceObject objects. The list of elements
    [
    AbstractResourceObject: The list of elements
    {
    • "name":
      string
      The name of an element
    • "type":
      string
      Readonly | The type of the element. This is normally a constant that can be used to differentiate elements by their type.
    }
    ]
  • "type":
    string
    The type of the element. This is normally a constant that can be used to differentiate elements by their type.
  • "sortKeys":
    array
    An array of string literals. The keys to sort for
  • "name":
    string
    The name of an element
}
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.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.