recommendations

Description:
  • Interface to recommendations related API calls
Source:
Interface to recommendations related API calls

Methods

(inner) getRecommendationPods(parametersopt, networkParametersopt) → {Promise}

Description:
  • Get all recommendation pods
Source:
Example
constructorio.recommendations.getRecommendationPods();
Parameters:
Name Type Attributes Description
parameters object <optional>
Parameters relevant to the network request
Properties
Name Type Attributes Description
section string <optional>
Recommendations section
networkParameters object <optional>
Parameters relevant to the network request
Properties
Name Type Attributes Description
timeout number <optional>
Request timeout (in milliseconds)
Returns:
Type
Promise

(inner) getRecommendations(podId, parametersopt, userParametersopt, networkParametersopt) → {Promise}

Description:
  • Get recommendations for supplied pod identifier
Source:
See:
Example
constructorio.recommendations.getRecommendations('t-shirt-best-sellers', {
    numResults: 5,
    filters: {
        size: 'medium'
    },
});
Parameters:
Name Type Attributes Description
podId string Pod identifier
parameters object <optional>
Additional parameters to refine results
Properties
Name Type Attributes Description
itemIds string | array <optional>
Item ID(s) to retrieve recommendations for (strategy specific)
numResults number <optional>
The number of results to return
section string <optional>
The section to return results from
term string <optional>
The term to use to refine results (strategy specific)
filters object <optional>
Key / value mapping of filters used to refine results
variationsMap object <optional>
The variations map object to aggregate variations. Please refer to https://docs.constructor.io/rest_api/variations_mapping for details
hiddenFields Array.<string> <optional>
Hidden metadata fields to return
userParameters object <optional>
Parameters relevant to the user request
Properties
Name Type Attributes Description
sessionId number <optional>
Session ID, utilized to personalize results
clientId string <optional>
Client ID, utilized to personalize results
userId string <optional>
User ID, utilized to personalize results
segments Array.<string> <optional>
User segments
testCells object <optional>
User test cells
userIp string <optional>
Origin user IP, from client
userAgent string <optional>
Origin user agent, from client
networkParameters object <optional>
Parameters relevant to the network request
Properties
Name Type Attributes Description
timeout number <optional>
Request timeout (in milliseconds)
Returns:
Type
Promise