catalog

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

Methods

(inner) addFacetConfiguration(parameters, networkParametersopt) → {Promise}

Description:
  • Create a facet configuration
Source:
See:
Example
constructorio.catalog.addFacetConfiguration({
    name: 'color',
    type: 'multiple',
    displayName: 'Color',
    sortOrder: 'value',
    sortDescending: false,
    position: 1,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for facet configuration details
Properties
Name Type Attributes Description
name string Unique facet name used to refer to the facet in your catalog
type string Type of facet. Must be one of multiple or range (numerical).
displayName string <optional>
The name of the facet presented to the end users. Defaults to null, in which case the name will be presented.
sortOrder string <optional>
Defines the criterion by which the options of this facet group are sorted. Must be one of relevance, value, numMatches. Defaults to relevance. Can be overridden by setting position attribute on facet options.
sortDescending boolean <optional>
Set to true if the options should be sorted in descending order, false to sort ascending. Default value is true if sortOrder is relevance and false for others.
rangeType string <optional>
Specifies how the range buckets are determined. Must be one of dynamic or static. Default value is null. Required if facet type is range and rangeFormat is options.
rangeFormat string <optional>
Determine wether the range facet is configured to displayed as a slider (with min/max values) or as a list of buckets. Must be one of boundaries (for sliders) or options (for buckets).
rangeInclusive string <optional>
Used to create inclusive buckets. Must be one of above (options have no upper bound), below (no lower bound), or null (if range options should not be inclusive).
bucketSize number <optional>
Specifies the size of generated buckets. Default is null. Either this or rangeLimits are required for facet type range, format options, and rangeType static
rangeLimits json <optional>
Defines the cut-off points for generating static range buckets. Should be a list of sorted numbers (i.e. [10, 25, 40]). Default value is null.
matchType string <optional>
Specifies the behavior of filters when multiple options of the same facet group are selected. Must be one of any, all, or none. Default value is any.
position number <optional>
Slot facet groups to fixed positions. Default value is null.
hidden boolean <optional>
Specifies whether the facet is hidden from users. Used for non-sensitive data that you don't want to show to end users. Default value is false.
protected boolean <optional>
Specifies whether the facet is protected from users. Setting to true will require authentication to view the facet. Default value is false.
data object <optional>
Dictionary/Object with any extra facet data. Default value is {} (empty dictionary/object).
section string <optional>
The section in which your facet is defined. Default value is Products.
options Array.<object> <optional>
List of facet option configurations to create and associate with this facet group. Default value is [] (empty list).
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) addFacetOptionConfiguration(parameters, networkParametersopt) → {Promise}

Description:
  • Create a facet option configuration
Source:
See:
Example
constructorio.catalog.addFacetOptionConfiguration({
    facetGroupName: 'color',
    value: 'blue',
    displayName: 'Blue',
    position: 5,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for facet option configuration details
Properties
Name Type Attributes Default Description
facetGroupName string Unique facet name used to refer to the facet in your catalog
value string A unique value for the facet option
displayName string <optional>
null The name of the facet presented to the end users - if none is supplied, the value from name will be used
position number <optional>
null Slot facet groups to fixed positions
hidden boolean <optional>
false Specifies whether the facet option is hidden from users
data object <optional>
{} Dictionary/Object with any extra facet data
section string <optional>
'Products' The section in which your facet is defined
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) addItemGroup(parameters, networkParametersopt) → {Promise}

Description:
  • Add item group to index
Source:
See:
Example
constructorio.catalog.addItemGroup({
    id: 'subcat_12891',
    name: 'Hoodies & Sweaters',
    parentId: 'cat_49203',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for item group details
Properties
Name Type Attributes Description
id string Item group ID
name string Item group name
parentId string <optional>
Item group parent ID
data object <optional>
JSON object with custom metadata attached with the item group
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) addItemGroups(parameters, networkParametersopt) → {Promise}

Description:
  • Add item groups to index (limit of 1,000)
Source:
See:
Example
constructorio.catalog.addItemGroups({
    itemGroups: [
        {
            id: 'cat_49203',
            name: 'Hoodies & Sweaters',
            children: [{ id: 'subcat_12891', name: 'Blazers'}],
        },
        {
            id: 'cat49204',
            name: 'Outerwear',
        },
    ],
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for item group details
Properties
Name Type Description
itemGroups Array.<object> A list of item groups
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) addOneWaySynonym(parameters, networkParametersopt) → {Promise}

Description:
  • Add a one way synonym
Source:
See:
Example
constructorio.catalog.addOneWaySynonym({
    phrase: 'spices',
    childPhrases: [
        { phrase: 'pepper' },
        { phrase: 'cinnamon' },
    ],
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for synonym details
Properties
Name Type Description
phrase string Parent phrase
childPhrases Array.<string> Array of synonyms
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) addOrModifyFacetOptionConfigurations(parameters, networkParametersopt) → {Promise}

Description:
  • Create new facet option configurations or modify if they already exist
Source:
See:
Example
constructorio.catalog.addOrModifyFacetOptionConfigurations({
    facetGroupName: 'color',
    facetOptionConfigurations: [
        {
            value: 'blue',
            displayName: 'Blue',
            position: 5,
        },
        {
            value: 'red',
            displayName: 'Red',
            position: 3,
        },
    ],
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for facet option configuration details
Properties
Name Type Attributes Default Description
facetGroupName string Unique facet name used to refer to the facet in the catalog
facetOptionConfigurations Array.<object> List of facet option configurations to would like to update - refer to addFacetConfiguration for additional details on what parameters can be supplied for each facet option configuration
section string <optional>
'Products' The section in which your facet is defined
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) addOrUpdateItemGroups(parameters, networkParametersopt) → {Promise}

Description:
  • Add multiple item groups to index whilst updating existing ones (limit of 1,000)
Source:
See:
Example
constructorio.catalog.addOrUpdateItemGroups({
    itemGroups: [
        {
            id: 'cat_49203',
            name: 'Hoodies & Sweaters',
            children: [{ id: 'subcat_12891', name: 'Blazers'}],
        },
        {
            id: 'cat49204',
            name: 'Outerwear',
        },
    ],
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for item group details
Properties
Name Type Description
itemGroups Array.<object> A list of item groups
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) addRedirectRule(parameters, networkParametersopt) → {Promise}

Description:
  • Create a redirect rule
Source:
See:
Example
constructorio.catalog.addRedirectRule({
    url: '/categories/cat_49203',
    matches: [{
        pattern: 'outerwear',
        matchType: 'EXACT'
    }],
    startTime: '2022-08-11T23:41:02.568Z',
    endTime: '2022-08-20T23:41:02.568Z',
    userSegments: ['US', 'Mobile'],
    metadata: {
        additional_data: 'additional string data',
    },
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for redirect rule details
Properties
Name Type Attributes Description
url string Target URL returned when a match happens
matches Array.<object> List of match definitions
startTime string <optional>
Time at which rule begins to apply (ISO8601 format preferred)
endTime string <optional>
Time at which rule stops to apply (ISO8601 format preferred)
userSegments Array.<string> <optional>
List of user segments
metadata object <optional>
Object with arbitrary metadata
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) addSynonymGroup(parameters, networkParametersopt) → {Promise}

Description:
  • Add a synonym group
Source:
See:
Example
constructorio.catalog.addSynonymGroup({
    synonyms: ['0% milk', 'skim milk'],
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for synonym group details
Properties
Name Type Description
synonyms Array.<string> Allows you to add synonyms to the newly created group
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) createOrReplaceItems(parameters, networkParametersopt) → {Promise}

Description:
  • Adds multiple items to your index whilst replacing existing ones (limit of 10,000)
Source:
See:
Example
constructorio.catalog.createOrReplaceItems({
    items: [
        {
            name: 'midnight black pullover hoodie',
            id: 'blk_pllvr_hd_001',
            data: {
              keywords: ['midnight black', 'black', 'hoodie', 'tops', 'outerwear'],
              url: '/products/blk_pllvr_hd_001'
              image_url: '/products/images/blk_pllvr_hd_001'
              description: 'a modified short description about the black pullover hoodie',
            }
        },
        ...
    ],
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for item details
Properties
Name Type Attributes Default Description
items Array.<object> A list of items with the same attributes as defined in the Item schema resource (https://docs.constructor.io/rest_api/items/items/#item-schema)
force boolean <optional>
false Process the request even if it will invalidate a large number of existing items
notificationEmail string <optional>
An email address where you'd like to receive an email notification in case the task fails
section string <optional>
"Products" This indicates which section to operate on within the index
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) createOrReplaceVariations(parameters, networkParametersopt) → {Promise}

Description:
  • Adds multiple variations to your index whilst replacing existing ones (limit of 10,000)
Source:
See:
Example
constructorio.catalog.createOrReplaceVariations({
    variations: [
        {
            name: 'midnight black pullover hoodie',
            id: 'blk_pllvr_hd_001',
            item_id: "nike-shoes-brown",
            data: {
              keywords: ['midnight black', 'black', 'hoodie', 'tops', 'outerwear'],
              url: '/products/blk_pllvr_hd_001'
              image_url: '/products/images/blk_pllvr_hd_001'
              description: 'a modified short description about the black pullover hoodie',
            }
        },
        ...
    ],
    section: 'Products',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for variation details
Properties
Name Type Attributes Default Description
variations Array.<object> A list of variations with the same attributes as defined in the Variation schema resource (https://docs.constructor.io/rest_api/items/variations/#variation-schema)
force boolean <optional>
false Process the request even if it will invalidate a large number of existing variations
notificationEmail string <optional>
An email address where you'd like to receive an email notification in case the task fails
section string <optional>
"Products" This indicates which section to operate on within the index
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) deleteItems(parameters, networkParametersopt) → {Promise}

Description:
  • Remove multiple items from your index (limit of 10,000)
Source:
See:
Example
constructorio.catalog.deleteItems({
    items: [
        { id: 'blk_pllvr_hd_001' },
        { id: 'red_pllvr_hd_02' },
    ],
    section: 'Products',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for item details
Properties
Name Type Attributes Default Description
items Array.<object> A list of items with the same attributes as defined in the Item schema resource (https://docs.constructor.io/rest_api/items/items/#item-schema)
section string <optional>
"Products" This indicates which section to operate on within the index
notificationEmail string <optional>
An email address where you'd like to receive an email notification in case the task fails
force boolean <optional>
false Process the request even if it will invalidate a large number of existing items
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) deleteVariations(parameters, networkParametersopt) → {Promise}

Description:
  • Remove multiple variations from your index (limit of 10,000)
Source:
See:
Example
constructorio.catalog.deleteVariations({
    variations: [
        { id: 'blk_pllvr_hd_001' },
        { id: 'red_pllvr_hd_02' },
    ],
    section: 'Products',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for variation details
Properties
Name Type Attributes Default Description
variations Array.<object> A list of variations with the same attributes as defined in the Variation schema resource (https://docs.constructor.io/rest_api/items/variations/#variation-schema)
force boolean <optional>
false Process the request even if it will invalidate a large number of existing variations
notificationEmail string <optional>
An email address where you'd like to receive an email notification in case the task fails
section string <optional>
"Products" This indicates which section to operate on within the index
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) getFacetConfiguration(parameters, networkParametersopt) → {Promise}

Description:
  • Get a single facet's configuration
Source:
See:
Example
constructorio.catalog.getFacetConfiguration({
    name: 'color',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for retrieving a facet configuration.
Properties
Name Type Attributes Description
name number <optional>
Unique facet name used to refer to the facet in your catalog
section string <optional>
The section in which your facet is defined. Default value is Products.
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) getFacetConfigurations(parameters, networkParametersopt) → {Promise}

Description:
  • Get all facet configurations
Source:
See:
Example
constructorio.catalog.getFacetConfigurations({
    page: 2,
    numResultsPerPage: 50,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for retrieving facet configurations.
Properties
Name Type Attributes Description
page number <optional>
Page number you'd like to request. Defaults to 1.
numResultsPerPage number <optional>
Number of facets per page in paginated response. Default value is 100.
section string <optional>
The section in which your facet is defined. Default value is Products.
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) getFacetOptionConfiguration(parameters, networkParametersopt) → {Promise}

Description:
  • Get a single facet option configuration for a given facet
Source:
See:
Example
constructorio.catalog.getFacetOptionConfiguration({
    facetGroupName: 'color',
    value: 'blue',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for facet option configuration details
Properties
Name Type Attributes Default Description
facetGroupName string Unique facet name used to refer to the facet in your catalog
value string The facet option value. Unique for a particular facet
section string <optional>
'Products' The section in which your facet is defined
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) getFacetOptionConfigurations(parameters, networkParametersopt) → {Promise}

Description:
  • Get all facet option configurations for a given facet
Source:
See:
Example
constructorio.catalog.getFacetOptionConfigurations({
    facetGroupName: 'color',
    page: 3,
    numResultsPerPage: 50
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for facet option configuration details
Properties
Name Type Attributes Default Description
facetGroupName string Unique facet name used to refer to the facet in your catalog
page number <optional>
1 Page number you'd like to request
numResultsPerPage number <optional>
100 Number of facets per page in paginated response
section string <optional>
'Products' The section in which your facet is defined
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) getItemGroup(parameters, networkParametersopt) → {Promise}

Description:
  • Retrieves an item group from index
Source:
See:
Example
constructorio.catalog.getItemGroup({
    id: 'subcat_12891',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for item group details
Properties
Name Type Description
id string The group ID you'd like to retrieve results for
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) getItemGroups(networkParametersopt) → {Promise}

Description:
  • Retrieves item groups from index
Source:
See:
Example
constructorio.catalog.getItemGroups();
Parameters:
Name Type Attributes Description
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) getOneWaySynonym(parameters, networkParametersopt) → {Promise}

Description:
  • Retrieve one way synonym
Source:
See:
Example
constructorio.catalog.getOneWaySynonym({
    phrase: 'spices',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for synonym details
Properties
Name Type Description
phrase string Parent phrase
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) getOneWaySynonyms(parametersopt, networkParametersopt) → {Promise}

Description:
  • Retrieve one way synonyms
Source:
See:
Example
constructorio.catalog.getOneWaySynonyms({
    numResultsPerPage: 50,
    page: 2,
});
Parameters:
Name Type Attributes Description
parameters object <optional>
Additional parameters for synonym details
Properties
Name Type Attributes Description
numResultsPerPage number <optional>
The number of synonym groups to return. Defaults to 100
page number <optional>
The page of results to return. Defaults to 1
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) getRedirectRule(parameters, networkParametersopt) → {Promise}

Description:
  • Retrieve redirect rule for supplied ID
Source:
See:
Example
constructorio.catalog.getRedirectRule({
    id: '1',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for redirect rule details
Properties
Name Type Description
id string Redirect rule ID
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) getRedirectRules(parametersopt, networkParametersopt) → {Promise}

Description:
  • Retrieve all redirect rules optionally filtered by query or status
Source:
See:
Example
constructorio.catalog.getRedirectRules({
    numResultsPerPage: 50,
    page: 2,
    query: 'outerwear',
    status: 'active',
});
Parameters:
Name Type Attributes Description
parameters object <optional>
Additional parameters for redirect rule details
Properties
Name Type Attributes Description
numResultsPerPage number <optional>
The number of rules to return. Defaults to 20
page number <optional>
The page of redirect rules to return. Defaults to 1
query string <optional>
Return redirect rules whose url or match pattern match the provided query
status string <optional>
One of "current" (return redirect rules that are currently active), "pending" (return redirect rules that will become active in the future), and "expired" (return redirect rules that are not active anymore)
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) getSynonymGroup(parameters, networkParametersopt) → {Promise}

Description:
  • Retrieves synonym group for supplied ID
Source:
See:
Example
constructorio.catalog.modifySynonymGroup({
    id: 32,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for synonym group details
Properties
Name Type Description
id number The synonym group you would like returned
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) getSynonymGroups(parametersopt, networkParametersopt) → {Promise}

Description:
  • Retrieve all synonym groups optionally filtered by phrase
Source:
See:
Example
constructorio.catalog.modifySynonymGroup({
    phrase: '0% milk',
    numResultsPerPage: 50,
    page: 3,
});
Parameters:
Name Type Attributes Description
parameters object <optional>
Additional parameters for synonym group details
Properties
Name Type Attributes Description
phrase string <optional>
The phrase for which all synonym groups containing it will be returned
numResultsPerPage number <optional>
The number of synonym groups to return. Defaults to 100
page number <optional>
The page of results to return. Defaults to 1
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) modifyFacetConfiguration(parameters, networkParametersopt) → {Promise}

Description:
  • Modify the configuration of a facet (partially)
Source:
See:
Example
constructorio.catalog.modifyFacetConfiguration({
    name: 'color',
    type: 'multiple',
    displayName: 'Color',
    sortOrder: 'num_matches',
    sortDescending: true,
    position: 1,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for facet configuration details
Properties
Name Type Attributes Description
name string Unique facet name used to refer to the facet in your catalog
type string Type of facet. Must be one of multiple or range (numerical).
displayName string <optional>
The name of the facet presented to the end users. Defaults to null, in which case the name will be presented.
sortOrder string <optional>
Defines the criterion by which the options of this facet group are sorted. Must be one of relevance, value, numMatches. Defaults to relevance. Can be overridden by setting position attribute on facet options.
sortDescending boolean <optional>
Set to true if the options should be sorted in descending order, false to sort ascending. Default value is true if sortOrder is relevance and false for others.
rangeType string <optional>
Specifies how the range buckets are determined. Must be one of dynamic or static. Default value is null. Required if facet type is range and rangeFormat is options.
rangeFormat string <optional>
Determine wether the range facet is configured to displayed as a slider (with min/max values) or as a list of buckets. Must be one of boundaries (for sliders) or options (for buckets).
rangeInclusive string <optional>
Used to create inclusive buckets. Must be one of above (options have no upper bound), below (no lower bound), or null (if range options should not be inclusive).
bucketSize number <optional>
Specifies the size of generated buckets. Default is null. Either this or rangeLimits are required for facet type range, format options, and rangeType static
rangeLimits json <optional>
Defines the cut-off points for generating static range buckets. Should be a list of sorted numbers (i.e. [10, 25, 40]). Default value is null.
matchType string <optional>
Specifies the behavior of filters when multiple options of the same facet group are selected. Must be one of any, all, or none. Default value is any.
position number <optional>
Slot facet groups to fixed positions. Default value is null.
hidden boolean <optional>
Specifies whether the facet is hidden from users. Used for non-sensitive data that you don't want to show to end users. Default value is false.
protected boolean <optional>
Specifies whether the facet is protected from users. Setting to true will require authentication to view the facet. Default value is false.
data object <optional>
Dictionary/Object with any extra facet data. Default value is {} (empty dictionary/object).
section string <optional>
The section in which your facet is defined. Default value is Products.
options Array.<object> <optional>
List of facet option configurations to create and associate with this facet group. Default value is [] (empty list).
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) modifyFacetConfigurations(parameters, networkParametersopt) → {Promise}

Description:
  • Modify the configurations of multiple facets (partially) at once.
Source:
See:
Example
constructorio.catalog.modifyFacetConfigurations(
    facetConfigurations: [
        {
            name: 'color',
            type: 'multiple',
            displayName: 'Color',
            sortOrder: 'value',
            sortDescending: false,
            position: 1,
        },
        {
            name: 'size',
            ...
        }
    ],
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for modifying facet configurations
Properties
Name Type Description
facetConfigurations array List of facet configurations you would like to update. See addFacetConfiguration for additional details on what parameters you can supply for each facet configuration.
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) modifyFacetOptionConfiguration(parameters, networkParametersopt) → {Promise}

Description:
  • Modify a facet option configuration
Source:
See:
Example
constructorio.catalog.modifyFacetOptionConfiguration({
    facetGroupName: 'color',
    value: 'blue',
    displayName: 'Midnight Blue',
    position: 9,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for facet option configuration details
Properties
Name Type Attributes Default Description
facetGroupName string Unique facet name used to refer to the facet in your catalog
value string A unique facet option value
displayName string <optional>
null The name of the facet presented to the end users - if none is supplied, the value from name will be used
position number <optional>
null Slot facet groups to fixed positions
hidden boolean <optional>
false Specifies whether the facet option is hidden from users
data object <optional>
{} Dictionary/Object with any extra facet data
section string <optional>
'Products The section in which your facet is defined
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) modifyItemGroup(parameters, networkParametersopt) → {Promise}

Description:
  • Modify an item group in index
Source:
See:
Example
constructorio.catalog.modifyItemGroup({
    id: 'subcat_12891',
    name: 'Hoodies, Sweaters & Jackets',
    parentId: 'cat_49203',
    data: {
        landing_image_url: '/images/hd_swtrs_jckts.jpg',
    },
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for item group details
Properties
Name Type Attributes Description
id string The group ID to update
name string <optional>
Item group display name
parentId string <optional>
Parent item group customer ID or null for root item groups
data object <optional>
JSON object with custom metadata attached with the item group
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) modifyOneWaySynonym(parameters, networkParametersopt) → {Promise}

Description:
  • Modify a one way synonym for supplied parent phrase
Source:
See:
Example
constructorio.catalog.modifyOneWaySynonym({
    phrase: 'spices',
    childPhrases: [
        { phrase: 'pepper' },
        { phrase: 'cinnamon' },
        { phrase: 'paprika' },
    ],
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for synonym details
Properties
Name Type Description
phrase string Parent phrase
childPhrases Array.<string> Array of synonyms
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) modifyRedirectRule(parameters, networkParametersopt) → {Promise}

Description:
  • Partially update (modify) a redirect rule for supplied ID
Source:
See:
Example
constructorio.catalog.modifyRedirectRule({
    id: '1',
    url: '/categories/cat_49203',
    matches: [{
        pattern: 'outerwear',
        matchType: 'EXACT'
    }],
    userSegments: ['US', 'Mobile', 'Web'],
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for redirect rule details
Properties
Name Type Attributes Description
id string Redirect rule ID
url string Target URL returned when a match happens
matches Array.<object> List of match definitions
startTime string <optional>
Time at which rule begins to apply (ISO8601 format preferred)
endTime string <optional>
Time at which rule stops to apply (ISO8601 format preferred)
userSegments Array.<string> <optional>
List of user segments
metadata object <optional>
Object with arbitrary metadata
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) modifySynonymGroup(parameters, networkParametersopt) → {Promise}

Description:
  • Modify a synonym group for supplied ID
Source:
See:
Example
constructorio.catalog.modifySynonymGroup({
    id: 32,
    synonyms: ['0% milk', 'skim milk', 'fat free milk'],
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for synonym group details
Properties
Name Type Description
id number Synonym group ID
synonyms Array.<string> Determines what phrases will be included in the final synonym group
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) patchCatalog(parameters, networkParametersopt) → {Promise}

Description:
  • Send patch delta catalog files to patch the current catalog
Source:
See:
Example
constructorio.catalog.patchCatalog({
    section: 'Products',
    notificationEmail: 'notifications@example.com',
    items: itemsFileBufferOrStream,
    variations: variationsFileBufferOrStream,
    itemGroups: itemGroupsFileBufferOrStream,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for catalog details
Properties
Name Type Attributes Default Description
section string The section to update
notificationEmail string <optional>
An email address to receive an email notification if the task fails
force boolean <optional>
false Process the catalog even if it will invalidate a large number of existing items
onMissing string <optional>
"FAIL" Defines the strategy for handling items which are present in the file and missing in the system. IGNORE silently prevents adding them to the system, CREATE creates them, FAIL fails the ingestion in case of their presence
items file <optional>
The CSV file with all new items
variations file <optional>
The CSV file with all new variations
itemGroups file <optional>
The CSV file with all new itemGroups
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) patchCatalogUsingTarArchive(parameters, networkParametersopt) → {Promise}

Description:
  • Send patch delta tar archive to patch the current catalog
Source:
See:
Example
constructorio.catalog.patchCatalogUsingTarArchive({
    section: 'Products',
    notificationEmail: 'notifications@example.com',
    tarArchive: tarArchiveBufferOrStream,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for catalog details
Properties
Name Type Attributes Default Description
section string The section to update
notificationEmail string <optional>
An email address to receive an email notification if the task fails
force boolean <optional>
false Process the catalog even if it will invalidate a large number of existing items
onMissing string <optional>
"FAIL" Defines the strategy for handling items which are present in the file and missing in the system. IGNORE silently prevents adding them to the system, CREATE creates them, FAIL fails the ingestion in case of their presence
tarArchive file <optional>
The tar file that includes csv files
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) patchSearchabilities(parameters, networkParametersopt) → {Promise}

Description:
  • Patch metadata searchabilities
Source:
See:
Example
constructorio.catalog.patchSearchabilities({
  searchabilities: [
    {
      name: 'style_id',
      exactSearchable: true,
    },
    {
      name: 'keywords',
      fuzzySearchable: true,
    },
  ],
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for patching metadata searchabilities
Properties
Name Type Attributes Description
searchabilities Array.<object> Array of searchabilities. Additional information about the searchabilities schema can be found here
section string <optional>
The section in which the searchability is defined. Default value is Products
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) removeFacetConfiguration(parameters, networkParametersopt) → {Promise}

Description:
  • Remove a facet configuration Caution: Once a facet group's configuration is removed, all configurations will return to their default values. This includes all facet option configurations (display name, position, etc) you may have defined for the facet group.
Source:
See:
Example
constructorio.catalog.removeFacetConfiguration({
    name: 'color',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for facet configuration details
Properties
Name Type Attributes Description
name string Unique facet name used to refer to the facet in your catalog
section string <optional>
The section in which your facet is defined. Default value is Products.
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) removeFacetOptionConfiguration(parameters, networkParametersopt) → {Promise}

Description:
  • Remove a facet option configuration
Source:
See:
Example
constructorio.removeFacetOptionConfiguration({
    facetGroupName: 'color',
    value: 'red',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for facet option configuration details
Properties
Name Type Attributes Default Description
facetGroupName string Unique facet name used to refer to the facet in your catalog
value string A unique value for this facet option
section string <optional>
'Products' The section in which your facet is defined
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) removeItemGroups(networkParametersopt) → {Promise}

Description:
  • Remove all item groups from index
Source:
See:
Example
constructorio.catalog.removeItemGroups();
Parameters:
Name Type Attributes Description
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) removeOneWaySynonym(parameters, networkParametersopt) → {Promise}

Description:
  • Remove one way synonym
Source:
See:
Example
constructorio.catalog.removeOneWaySynonym({
    phrase: 'spices',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for synonym details
Properties
Name Type Description
phrase string Parent phrase
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) removeOneWaySynonyms(networkParametersopt) → {Promise}

Description:
  • Remove all one way synonyms
Source:
See:
Example
constructorio.catalog.removeOneWaySynonyms();
Parameters:
Name Type Attributes Description
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) removeRedirectRule(parameters, networkParametersopt) → {Promise}

Description:
  • Remove redirect rule for supplied ID
Source:
See:
Example
constructorio.catalog.removeRedirectRule({
    id: '1',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for redirect rule details
Properties
Name Type Description
id string Redirect rule ID
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) removeSynonymGroup(parameters, networkParametersopt) → {Promise}

Description:
  • Remove synonym group for supplied ID
Source:
See:
Example
constructorio.catalog.removeSynonymGroup({
    id: 32,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for synonym group details
Properties
Name Type Description
id number The synonym group you would like deleted
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) removeSynonymGroups(networkParametersopt) → {Promise}

Description:
  • Remove all synonym groups
Source:
See:
Example
constructorio.catalog.modifySynonymGroup();
Parameters:
Name Type Attributes Description
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) replaceCatalog(parameters, networkParametersopt) → {Promise}

Description:
  • Send full catalog files to replace the current catalog
Source:
See:
Example
constructorio.catalog.replaceCatalog({
    section: 'Products',
    notificationEmail: 'notifications@example.com',
    items: itemsFileBufferOrStream,
    variations: variationsFileBufferOrStream,
    itemGroups: itemGroupsFileBufferOrStream,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for catalog details
Properties
Name Type Attributes Default Description
section string The section to update
notificationEmail string <optional>
An email address to receive an email notification if the task fails
force boolean <optional>
false Process the catalog even if it will invalidate a large number of existing items
items file <optional>
The CSV file with all new items
variations file <optional>
The CSV file with all new variations
itemGroups file <optional>
The CSV file with all new itemGroups
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) replaceCatalogUsingTarArchive(parameters, networkParametersopt) → {Promise}

Description:
  • Send full catalog tar archive to replace the current catalog
Source:
See:
Example
constructorio.catalog.replaceCatalogUsingTarArchive({
    section: 'Products',
    notificationEmail: 'notifications@example.com',
    tarArchive: tarArchiveBufferOrStream,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for catalog details
Properties
Name Type Attributes Default Description
section string The section to update
notificationEmail string <optional>
An email address to receive an email notification if the task fails
force boolean <optional>
false Process the catalog even if it will invalidate a large number of existing items
tarArchive file <optional>
The tar file that includes csv files
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) replaceFacetConfiguration(parameters, networkParametersopt) → {Promise}

Description:
  • Replace the configuration of a facet (completely) Caution: Overwrites all other configurations you may have defined for the facet group, resetting them to their defaults. This includes all facet option configurations you may have defined.
Source:
See:
Example
constructorio.catalog.replaceFacetConfiguration({
    name: 'color',
    type: 'multiple',
    displayName: 'Color',
    sortOrder: 'value',
    sortDescending: false,
    position: 1,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for facet configuration details
Properties
Name Type Attributes Description
name string Unique facet name used to refer to the facet in your catalog
type string Type of facet. Must be one of multiple or range (numerical).
displayName string <optional>
The name of the facet presented to the end users. Defaults to null, in which case the name will be presented.
sortOrder string <optional>
Defines the criterion by which the options of this facet group are sorted. Must be one of relevance, value, numMatches. Defaults to relevance. Can be overridden by setting position attribute on facet options.
sortDescending boolean <optional>
Set to true if the options should be sorted in descending order, false to sort ascending. Default value is true if sortOrder is relevance and false for others.
rangeType string <optional>
Specifies how the range buckets are determined. Must be one of dynamic or static. Default value is null. Required if facet type is range and rangeFormat is options.
rangeFormat string <optional>
Determine wether the range facet is configured to displayed as a slider (with min/max values) or as a list of buckets. Must be one of boundaries (for sliders) or options (for buckets).
rangeInclusive string <optional>
Used to create inclusive buckets. Must be one of above (options have no upper bound), below (no lower bound), or null (if range options should not be inclusive).
bucketSize number <optional>
Specifies the size of generated buckets. Default is null. Either this or rangeLimits are required for facet type range, format options, and rangeType static
rangeLimits json <optional>
Defines the cut-off points for generating static range buckets. Should be a list of sorted numbers (i.e. [10, 25, 40]). Default value is null.
matchType string <optional>
Specifies the behavior of filters when multiple options of the same facet group are selected. Must be one of any, all, or none. Default value is any.
position number <optional>
Slot facet groups to fixed positions. Default value is null.
hidden boolean <optional>
Specifies whether the facet is hidden from users. Used for non-sensitive data that you don't want to show to end users. Default value is false.
protected boolean <optional>
Specifies whether the facet is protected from users. Setting to true will require authentication to view the facet. Default value is false.
data object <optional>
Dictionary/Object with any extra facet data. Default value is {} (empty dictionary/object).
section string <optional>
The section in which your facet is defined. Default value is Products.
options Array.<object> <optional>
List of facet option configurations to create and associate with this facet group. Default value is [] (empty list).
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) replaceFacetOptionConfiguration(parameters, networkParametersopt) → {Promise}

Description:
  • Replace a facet option configuration
Source:
See:
Example
constructorio.catalog.replaceFacetOptionConfiguration({
    facetGroupName: 'color',
    value: 'blue',
    displayName: 'Midnight Blue',
    position: 9,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for facet option configuration details
Properties
Name Type Attributes Default Description
facetGroupName string Unique facet name used to refer to the facet in your catalog
value string A unique facet option value
displayName string <optional>
null The name of the facet presented to the end users - if none is supplied, the value from name will be used
position number <optional>
null Slot facet groups to fixed positions
hidden boolean <optional>
false Specifies whether the facet option is hidden from users
data object <optional>
{} Dictionary/Object with any extra facet data
section string <optional>
'Products' The section in which your facet is defined
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) retrieveItems(parameters, networkParametersopt) → {Promise}

Description:
  • Retrieves item(s) from index for the given section or specific item ID
Source:
See:
Examples
constructorio.catalog.retrieveItems({
    section: 'Products',
    numResultsPerPage: 50,
    page: 2,
});
constructorio.catalog.retrieveItems({
    ids: ['blk_pllvr_hd_001', 'blk_pllvr_hd_002']
    section: 'Products',
    numResultsPerPage: 50,
    page: 2,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for item details
Properties
Name Type Attributes Default Description
ids Array.<string> <optional>
Id(s) of items to return (1,000 maximum)
section string <optional>
This indicates which section to operate on within the index
numResultsPerPage number <optional>
100 The number of items to return
page number <optional>
1 The page of results 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) retrieveSearchabilities(parametersopt, networkParametersopt) → {Promise}

Description:
  • Retrieve metadata searchabilities
Source:
See:
Example
constructorio.catalog.retrieveSearchabilities({
    page: 2,
    numResultsPerPage: 50,
    filters: { exactSearchable: true }
});
Parameters:
Name Type Attributes Description
parameters object <optional>
Additional parameters for retrieving metadata searchabilities
Properties
Name Type Attributes Description
name string <optional>
Name of metadata searchability. Providing this field would filter the results based on name
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'
numResultsPerPage number <optional>
The number of searchability configurations to return. Defaults to 100
filters object <optional>
Filters the results based on name, exactSearchable or fuzzySearchable
searchable boolean <optional>
Retrieve only results which are either exactSearchable or fuzzySearchable
sortBy string <optional>
The criteria by which searchability configurations should be sorted. Defaults to no sorting. Valid criteria is name
sortOrder string <optional>
Either descending or ascending. The sort order by which searchability configurations should be sorted. Only valid in conjunction with sortBy
section string <optional>
The section in which the searchability is defined. Default value is Products
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) retrieveVariations(parameters, networkParametersopt) → {Promise}

Description:
  • Retrieves variation(s) from index for the given section or specific variation ID
Source:
See:
Examples
constructorio.catalog.retrieveVariations({
    section: 'Products',
    numResultsPerPage: 50,
    page: 2,
});
constructorio.catalog.retrieveVariations({
    ids: ['blk_pllvr_hd_001', 'blk_pllvr_hd_002']
    section: 'Products',
    numResultsPerPage: 50,
    page: 2,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for variation details
Properties
Name Type Attributes Default Description
section string <optional>
"Products" This indicates which section to operate on within the index
ids Array.<string> <optional>
Id(s) of variations to return (1,000 maximum)
itemId string <optional>
Parent item id to return descendant variations of
numResultsPerPage number <optional>
100 The number of items to return
page number <optional>
1 The page of results 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) updateCatalog(parameters, networkParametersopt) → {Promise}

Description:
  • Send delta catalog files to update the current catalog
Source:
See:
Example
constructorio.catalog.updateCatalog({
    section: 'Products',
    notificationEmail: 'notifications@example.com',
    items: itemsFileBufferOrStream,
    variations: variationsFileBufferOrStream,
    itemGroups: itemGroupsFileBufferOrStream,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for catalog details
Properties
Name Type Attributes Default Description
section string The section to update
notificationEmail string <optional>
An email address to receive an email notification if the task fails
force boolean <optional>
false Process the catalog even if it will invalidate a large number of existing items
items file <optional>
The CSV file with all new items
variations file <optional>
The CSV file with all new variations
itemGroups file <optional>
The CSV file with all new itemGroups
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) updateCatalogUsingTarArchive(parameters, networkParametersopt) → {Promise}

Description:
  • Send delta catalog tar archive to update the current catalog
Source:
See:
Example
constructorio.catalog.updateCatalogUsingTarArchive({
    section: 'Products',
    notificationEmail: 'notifications@example.com',
    tarArchive: tarArchiveBufferOrStream,
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for catalog details
Properties
Name Type Attributes Default Description
section string The section to update
notificationEmail string <optional>
An email address to receive an email notification if the task fails
force boolean <optional>
false Process the catalog even if it will invalidate a large number of existing items
tarArchive file <optional>
The tar file that includes csv files
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) updateItems(parameters, networkParametersopt) → {Promise}

Description:
  • Update multiple items to index (limit of 10,000)
Source:
See:
Example
constructorio.catalog.updateItems({
    items: [
        {
            name: 'midnight black pullover hoodie',
            id: 'blk_pllvr_hd_001',
            data: {
              keywords: ['midnight black', 'black', 'hoodie', 'tops', 'outerwear'],
              url: '/products/blk_pllvr_hd_001'
              image_url: '/products/images/blk_pllvr_hd_001'
              description: 'a modified short description about the black pullover hoodie',
            }
        },
        . . .
    ],
    section: 'Products',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for item details
Properties
Name Type Attributes Default Description
items Array.<object> A list of items with the same attributes as defined in the Item schema resource (https://docs.constructor.io/rest_api/items/items/#item-schema)
force boolean <optional>
false Process the request even if it will invalidate a large number of existing items
onMissing string <optional>
"FAIL" Defines the strategy for handling items which are present in the file and missing in the system. IGNORE silently prevents adding them to the system, CREATE creates them, FAIL fails the ingestion in case of their presence
notificationEmail string <optional>
An email address where you'd like to receive an email notification in case the task fails
section string <optional>
"Products" This indicates which section to operate on within the index
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) updateRedirectRule(parameters, networkParametersopt) → {Promise}

Description:
  • Completely update a redirect rule for supplied ID
Source:
See:
Example
constructorio.catalog.updateRedirectRule({
    id: 1,
    url: '/categories/cat_49203',
    matches: [{
        pattern: 'outerwear',
        matchType: 'EXACT'
    }],
    userSegments: ['US', 'Mobile', 'Web'],
    metadata: {
        additional_data: 'additional string data',
    },
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for redirect rule details
Properties
Name Type Attributes Description
id string Redirect rule ID
url string Target URL returned when a match happens
matches Array.<object> List of match definitions
startTime string <optional>
Time at which rule begins to apply (ISO8601 format preferred)
endTime string <optional>
Time at which rule stops to apply (ISO8601 format preferred)
userSegments Array.<string> <optional>
List of user segments
metadata object <optional>
Object with arbitrary metadata
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) updateVariations(parameters, networkParametersopt) → {Promise}

Description:
  • Update multiple variations to index (limit of 10,000)
Source:
See:
Example
constructorio.catalog.updateVariations({
    variations: [
        {
            name: 'midnight black pullover hoodie',
            id: 'blk_pllvr_hd_001',
            item_id: "nike-shoes-brown",
            data: {
              keywords: ['midnight black', 'black', 'hoodie', 'tops', 'outerwear'],
              url: '/products/blk_pllvr_hd_001'
              image_url: '/products/images/blk_pllvr_hd_001'
              description: 'a modified short description about the black pullover hoodie',
            }
        },
        ...
    ],
    section: 'Products',
});
Parameters:
Name Type Attributes Description
parameters object Additional parameters for variation details
Properties
Name Type Attributes Default Description
variations Array.<object> A list of variations with the same attributes as defined in the Variation schema resource (https://docs.constructor.io/rest_api/items/variations/#variation-schema)
force boolean <optional>
false Process the request even if it will invalidate a large number of existing variations
onMissing string <optional>
"FAIL" Defines the strategy for handling items which are present in the file and missing in the system. IGNORE silently prevents adding them to the system, CREATE creates them, FAIL fails the ingestion in case of their presence
notificationEmail string <optional>
An email address where you'd like to receive an email notification in case the task fails
section string <optional>
"Products" This indicates which section to operate on within the index
networkParameters object <optional>
Parameters relevant to the network request
Properties
Name Type Attributes Description
timeout number <optional>
Request timeout (in milliseconds)
Returns:
Type
Promise