recommendations

Interface to recommendations related API calls
Source:
Returns:
Type:
object

Methods

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

Retrieve recommendation results from Constructor.io API
Source:
See:
Parameters:
Name Type Attributes Description
podId string Pod identifier
parameters object <optional>
Additional parameters to refine results
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
networkParameters object <optional>
Parameters relevant to the network request
Name Type Attributes Description
timeout number <optional>
Request timeout (in milliseconds)
Returns:
Type:
Promise
Example
constructorio.recommendations.getRecommendations('t-shirt-best-sellers', {
    numResults: 5,
    filters: {
        size: 'medium'
    },
});