- Description:
- Interface to browse related API calls
- Source:
Interface to browse related API calls
Methods
(inner) getBrowseFacetOptions(facetName, networkParametersopt, parametersopt) → {Promise}
- Description:
- Retrieve facet options from API
- Source:
- See:
-
Example
constructorio.browse.getBrowseFacetOptions('price', {
});
Parameters:
Name |
Type |
Attributes |
Description |
facetName |
string
|
|
Name of the facet whose options to return |
networkParameters |
object
|
<optional>
|
Parameters relevant to the network request
Properties
Name |
Type |
Attributes |
Description |
timeout |
number
|
<optional>
|
Request timeout (in milliseconds) |
|
parameters |
object
|
<optional>
|
Additional parameters to refine result set
Properties
Name |
Type |
Attributes |
Default |
Description |
section |
string
|
<optional>
|
'Products'
|
The section name for results |
fmtOptions |
object
|
<optional>
|
|
The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/v1-browse-get-browse-facet-options for details |
|
|
|
|
|
Returns:
-
Type
-
Promise
(inner) getBrowseFacets(parametersopt, networkParametersopt) → {Promise}
- Description:
- Retrieve browse facets from API
- Source:
- See:
-
Example
constructorio.browse.getBrowseFacets({
page: 1,
resultsPerPage: 10,
});
Parameters:
Name |
Type |
Attributes |
Description |
parameters |
object
|
<optional>
|
Additional parameters to refine result set
Properties
Name |
Type |
Attributes |
Default |
Description |
page |
number
|
<optional>
|
|
The page number of the results (Can't be used together with offset) |
offset |
number
|
<optional>
|
|
The number of results to skip from the beginning (Can't be used together with page) |
section |
string
|
<optional>
|
'Products'
|
The section name for results |
fmtOptions |
object
|
<optional>
|
|
The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/browse-browse-facets/ for details |
resultsPerPage |
number
|
<optional>
|
|
The number of results per page to return |
|
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) getBrowseGroups(networkParametersopt) → {Promise}
- Description:
- Retrieve browse groups from API
- Source:
- See:
-
Example
constructorio.browse.getBrowseGroups({
filters: {
group_id: 'drill_collection'
},
fmtOptions: {
groups_max_depth: 2
}
});
Parameters:
Name |
Type |
Attributes |
Default |
Description |
parameters.filters |
object
|
<optional>
|
|
Filters used to refine results |
parameters.section |
string
|
<optional>
|
'Products'
|
The section name for results |
parameters.fmtOptions |
object
|
<optional>
|
|
The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/v1-browse-get-browse-groups/ for details |
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) getBrowseResults(filterName, filterValue, parametersopt, networkParametersopt) → {Promise}
- Description:
- Retrieve browse results from Constructor.io API
- Source:
- See:
-
Example
constructorio.browse.getBrowseResults('group_id', 't-shirts', {
resultsPerPage: 40,
filters: {
size: 'medium'
},
filterMatchTypes: {
size: 'all'
}
});
Parameters:
Name |
Type |
Attributes |
Description |
filterName |
string
|
|
Filter name to display results from |
filterValue |
string
|
|
Filter value to display results from |
parameters |
object
|
<optional>
|
Additional parameters to refine result set
Properties
Name |
Type |
Attributes |
Default |
Description |
page |
number
|
<optional>
|
|
The page number of the results (Can't be used together with offset) |
offset |
number
|
<optional>
|
|
The number of results to skip from the beginning (Can't be used together with page) |
resultsPerPage |
number
|
<optional>
|
|
The number of results per page to return |
filters |
object
|
<optional>
|
|
Key / value mapping (dictionary) of filters used to refine results |
sortBy |
string
|
<optional>
|
'relevance'
|
The sort method for results |
sortOrder |
string
|
<optional>
|
'descending'
|
The sort order for results |
section |
string
|
<optional>
|
'Products'
|
The section name for results |
fmtOptions |
object
|
<optional>
|
|
The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/browse-browse-results for details |
preFilterExpression |
object
|
<optional>
|
|
Faceting expression to scope browse results. Please refer to https://docs.constructor.com/reference/configuration-collections |
hiddenFields |
Array.<string>
|
<optional>
|
|
Hidden metadata fields to return |
hiddenFacets |
Array.<string>
|
<optional>
|
|
Hidden facets to return |
variationsMap |
object
|
<optional>
|
|
The variations map object to aggregate variations. Please refer to https://docs.constructor.com/reference/shared-variations-mapping for details |
qsParam |
object
|
<optional>
|
|
Parameters listed above can be serialized into a JSON object and parsed through this parameter. Please refer to https://docs.constructor.com/reference/browse-browse-results |
filterMatchTypes |
object
|
<optional>
|
|
An object specifying whether results must match `all`, `any` or `none` of a given filter. Please refer to https://docs.constructor.com/reference/v1-browse-get-browse-results |
|
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) getBrowseResultsForItemIds(itemIds, parametersopt, networkParametersopt) → {Promise}
- Description:
- Retrieve browse results from API using item id's
- Source:
- See:
-
Example
constructorio.browse.getBrowseResultsForItemIds(['shirt-123', 'shirt-456', 'shirt-789'], {
filters: {
size: 'medium'
},
filterMatchTypes: {
size: 'all'
}
});
Parameters:
Name |
Type |
Attributes |
Description |
itemIds |
Array.<string>
|
|
Item id's of results to fetch |
parameters |
object
|
<optional>
|
Additional parameters to refine result set
Properties
Name |
Type |
Attributes |
Default |
Description |
page |
number
|
<optional>
|
|
The page number of the results (Can't be used together with offset) |
offset |
number
|
<optional>
|
|
The number of results to skip from the beginning (Can't be used together with page) |
resultsPerPage |
number
|
<optional>
|
|
The number of results per page to return |
filters |
object
|
<optional>
|
|
Filters used to refine results |
sortBy |
string
|
<optional>
|
'relevance'
|
The sort method for results |
sortOrder |
string
|
<optional>
|
'descending'
|
The sort order for results |
section |
string
|
<optional>
|
'Products'
|
The section name for results |
fmtOptions |
object
|
<optional>
|
|
The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/browse-browse-results for details |
hiddenFields |
Array.<string>
|
<optional>
|
|
Hidden metadata fields to return |
hiddenFacets |
Array.<string>
|
<optional>
|
|
Hidden facets to return |
variationsMap |
object
|
<optional>
|
|
The variations map object to aggregate variations. Please refer to https://docs.constructor.com/reference/shared-variations-mapping for details |
filterMatchTypes |
object
|
<optional>
|
|
An object specifying whether results must match `all`, `any` or `none` of a given filter. Please refer to https://docs.constructor.com/reference/v1-browse-get-browse-items-results |
preFilterExpression |
object
|
<optional>
|
|
Faceting expression to scope browse results. Please refer to https://docs.constructor.com/reference/configuration-collections |
|
networkParameters |
object
|
<optional>
|
Parameters relevant to the network request
Properties
Name |
Type |
Attributes |
Description |
timeout |
number
|
<optional>
|
Request timeout (in milliseconds) |
|
Returns:
-
Type
-
Promise