npm package: @plasma-platform/service-products
Description: Products Service API
Author: Kyrylo Voronoi
Latest version: 3.1.0

![version](https://badgen.net/npm/v/@plasma-platform/service-products)
![nextVersion](https://badgen.net/npm/v/@plasma-platform/service-products/next)
![downloads](https://badgen.net/npm/dt/@plasma-platform/service-products)
![license](https://badgen.net/npm/license/@plasma-platform/service-products)
![dependency](https://badgen.net/npm/dependents/@plasma-platform/service-products)  

* * *

[Full documentation](https://templatemonster.gitlab.io/PlasmaPlatform/Frontend/plasma-platform/?path=/story/plasma-platform-sdk--service-products)  
install:  
`npm i @plasma-platform/service-products -S`  

# Short documentation

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [ServiceProducts](#serviceproducts)
    -   [Parameters](#parameters)
    -   [messages](#messages)
    -   [getPossibleSuggestions](#getpossiblesuggestions)
        -   [Parameters](#parameters-1)
        -   [Examples](#examples)
    -   [disableTemplate](#disabletemplate)
        -   [Parameters](#parameters-2)
        -   [Examples](#examples-1)
    -   [freezeTemplate](#freezetemplate)
        -   [Parameters](#parameters-3)
        -   [Examples](#examples-2)
    -   [removedTemplate](#removedtemplate)
        -   [Parameters](#parameters-4)
        -   [Examples](#examples-3)
    -   [getTemplateByIdPublic](#gettemplatebyidpublic)
        -   [Parameters](#parameters-5)
        -   [Examples](#examples-4)
    -   [getTemplateById](#gettemplatebyid)
        -   [Parameters](#parameters-6)
        -   [Examples](#examples-5)
    -   [getTemplatesTopics](#gettemplatestopics)
        -   [Parameters](#parameters-7)
        -   [Examples](#examples-6)
    -   [getTemplatesTypes](#gettemplatestypes)
        -   [Parameters](#parameters-8)
        -   [Examples](#examples-7)
    -   [getTemplates](#gettemplates)
        -   [Parameters](#parameters-9)
        -   [Examples](#examples-8)
    -   [getTemplatesPublic](#gettemplatespublic)
        -   [Parameters](#parameters-10)
        -   [Examples](#examples-9)
    -   [getTotalTemplatesSales](#gettotaltemplatessales)
        -   [Parameters](#parameters-11)
        -   [Examples](#examples-10)
    -   [getUserOwnProducts](#getuserownproducts)
        -   [Parameters](#parameters-12)
        -   [Examples](#examples-11)
    -   [getUserOwnProductsHead](#getuserownproductshead)
        -   [Parameters](#parameters-13)
        -   [Examples](#examples-12)
    -   [undoDisableProcess](#undodisableprocess)
        -   [Parameters](#parameters-14)
        -   [Examples](#examples-13)
    -   [undoFreezeProcess](#undofreezeprocess)
        -   [Parameters](#parameters-15)
        -   [Examples](#examples-14)
    -   [undoRemovedProcess](#undoremovedprocess)
        -   [Parameters](#parameters-16)
        -   [Examples](#examples-15)
    -   [updateUserRatingAndTotalReviewsCount](#updateuserratingandtotalreviewscount)
        -   [Parameters](#parameters-17)
        -   [Examples](#examples-16)
    -   [getProductsBySpecificParams](#getproductsbyspecificparams)
        -   [Parameters](#parameters-18)
        -   [Examples](#examples-17)

## ServiceProducts

-   **See: <http://service-products.templatemonster.com/doc>**

### Parameters

-   `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** service url
-   `token` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | null)** user access token if available (optional, default `null`)

### messages

Object with class service messages

Type: [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

### getPossibleSuggestions

Get possible suggestions

#### Parameters

-   `text` **[text](https://developer.mozilla.org/docs/Web/HTML)** search suggests texts

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/', token);
  const request = await service.getPossibleSuggests('53001');
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** array with fined products

### disableTemplate

Disable template

#### Parameters

-   `templateId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** template ID

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/', token);
  const request = await service.disableTemplate(53001);
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of disable product

### freezeTemplate

Freeze template

#### Parameters

-   `templateId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** template ID

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/', token);
  const request = await service.freezeTemplate(53001);
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object 0f freeze product

### removedTemplate

Removed template

#### Parameters

-   `templateId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** template ID

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/', token);
  const request = await service.removedTemplate(53001);
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object 0f freeze product

### getTemplateByIdPublic

Get template by id (public method)

#### Parameters

-   `props` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
    -   `props.expand` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** expand information
    -   `props.ids` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** list of templates id divided by comma (e.g. "55555,55556,55557")
    -   `props.locale` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 2 char locale (en, ru de, etc.)

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/');
  const request = await service.getTemplateByIdPublic({locale: 'en', ids: 53000});
)();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of product

### getTemplateById

Get template by id

#### Parameters

-   `props` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
    -   `props.expand` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** expand information
    -   `props.ids` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** list of templates id divided by comma (e.g. "55555,55556,55557")

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/', token);
  const request = await service.getTemplateById(53001);
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of product

### getTemplatesTopics

Get templates topics

#### Parameters

-   `props` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
    -   `props.isAdult` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** return only adult or not templates
    -   `props.ids` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** array of templates id divided by comma (e.g. "55555,55556,55557")
    -   `props.searchWord` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
    -   `props.properties` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** array of properties where key is a property name and value is a value to search. e.g. (?properties[author_user_id]=1506970)
    -   `props.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** find all templates with given type name (e.g. "?type=wordpress", "?type=wordpress themes")

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/');
  const request = await service.getTemplatesTopics({
isAdult: 1,
ids: '53001',
searchWord: 'qwe',
properties: {
id: 2570,
propertyName: 'Name of the template',
},
type: 'wordpress',
});
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of topics products list

### getTemplatesTypes

Get templates types

#### Parameters

-   `props` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
    -   `props.isAdult` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** return only adult or not templates
    -   `props.ids` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** array of templates id divided by comma (e.g. "55555,55556,55557")
    -   `props.searchWord` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
    -   `props.properties` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** array of properties where key is a property name and value is a value to search. e.g. (?properties[author_user_id]=1506970)

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/');
  const request = await service.getTemplatesTypes({
isAdult: 1,
ids: '53001',
searchWord: 'qwe',
properties: {
id: 2570,
propertyName: 'Name of the template',
},
});
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of types products list

### getTemplates

Get templates

#### Parameters

-   `props` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
    -   `props.isAdult` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** return only adult or not templates
    -   `props.ids` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** array of templates id divided by comma (e.g. "55555,55556,55557")
    -   `props.searchWord` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
    -   `props.properties` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** array of properties where key is a property name and value is a value to search. e.g. (?properties[author_user_id]=1506970)
    -   `props.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** find all templates with given type name (e.g. "?type=wordpress", "?type=wordpress themes")
    -   `props.sort` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** available value [cheap, pricey, new, from doc API]
    -   `props.perPage` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** max templates per one page (20 by default, 200 is max size)
    -   `props.page` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** page number to view
    -   `props.filterTopic` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** topic id
    -   `props.filterUser` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** vendor id
    -   `props.filterPlatform` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** platform name [wordpress, joomla, ...]

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/', token);
  const request = await service.getTemplates({
isAdult: 1,
ids: '53001',
searchWord: 'qwe',
properties: {
id: 2570,
propertyName: 'Name of the template',
},
type: 'wordpress',
sort: 'price',
perPage: 20,
page: 1,
});
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of products list

### getTemplatesPublic

Get templates public

#### Parameters

-   `props` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
    -   `props.isAdult` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** return only adult or not templates
    -   `props.ids` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** array of templates id divided by comma (e.g. "55555,55556,55557")
    -   `props.searchWord` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
    -   `props.properties` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** array of properties where key is a property name and value is a value to search. e.g. (?properties[author_user_id]=1506970)
    -   `props.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** find all templates with given type name (e.g. "?type=wordpress", "?type=wordpress themes")
    -   `props.sort` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** available value [cheap, pricey, new, from doc API]
    -   `props.perPage` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** max templates per one page (20 by default, 200 is max size)
    -   `props.page` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** page number to view
    -   `props.filterTopic` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** topic id
    -   `props.filterUser` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** vendor id
    -   `props.filterPlatform` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** platform name [wordpress, joomla, ...]

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/', token);
  const request = await service.getTemplatesPublic({
isAdult: 1,
ids: '53001',
searchWord: 'qwe',
properties: {
id: 2570,
propertyName: 'Name of the template',
},
type: 'wordpress',
sort: 'price',
perPage: 20,
page: 1,
});
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of products list

### getTotalTemplatesSales

Get total templates sales

#### Parameters

-   `props` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
    -   `props.isAdult` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** return only adult or not templates
    -   `props.ids` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** array of templates id divided by comma (e.g. "55555,55556,55557")
    -   `props.searchWord` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
    -   `props.properties` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** array of properties where key is a property name and value is a value to search. e.g. (?properties[author_user_id]=1506970)
    -   `props.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** find all templates with given type name (e.g. "?type=wordpress", "?type=wordpress themes")

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/');
  const request = await service.getTotalTemplatesSales({
isAdult: 1,
ids: '53001',
searchWord: 'qwe',
properties: {
id: 2570,
propertyName: 'Name of the template',
},
type: 'wordpress',
});
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of templates total sales value

### getUserOwnProducts

Get user own products

#### Parameters

-   `props` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
    -   `props.locale` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 2 char locale (en, ru de, etc.)
    -   `props.properties` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** array of properties where key is a property name and value is a value to search. e.g. (?properties[author_user_id]=1506970)
    -   `props.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** find all templates with given type name (e.g. "?type=wordpress", "?type=wordpress themes")
    -   `props.sort` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** defines on which fields to sort (e.g. ?sort=price,-templateId) ("-" symbol is DESC sort)
    -   `props.perPage` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** max templates per one page (20 by default, 200 is max size)
    -   `props.page` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** page number to view

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/products/', token);
  const request = await service.getUserOwnProducts({
properties: {
id: 2570,
propertyName: 'Name of the template',
},
type: 'wordpress',
sort: 'price',
perPage: 20,
page: 1,
});
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of product parameters

### getUserOwnProductsHead

Get user own products heads

#### Parameters

-   `props` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
    -   `props.locale` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 2 char locale (en, ru de, etc.)
    -   `props.properties` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** array of properties where key is a property name and value is a value to search. e.g. (?properties[author_user_id]=1506970)
    -   `props.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** find all templates with given type name (e.g. "?type=wordpress", "?type=wordpress themes")
    -   `props.sort` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** defines on which fields to sort (e.g. ?sort=price,-templateId) ("-" symbol is DESC sort)
    -   `props.perPage` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** max templates per one page (20 by default, 200 is max size)
    -   `props.page` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** page number to view

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/products/', token);
  const request = await service.getUserOwnProductsHead({
properties: {
id: 2570,
propertyName: 'Name of the template',
},
type: 'wordpress',
sort: 'price',
perPage: 20,
page: 1,
});
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of product parameters

### undoDisableProcess

Undo disable process

#### Parameters

-   `templateId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** template ID

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/products/', token);
  const request = await service.undoDisableProcess(53001);
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of product

### undoFreezeProcess

Undo freeze process

#### Parameters

-   `templateId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** template ID

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/products/', token);
  const request = await service.undoFreezeProcess(53001);
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of product

### undoRemovedProcess

Undo removed process

#### Parameters

-   `templateId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** template ID

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/products/', token);
  const request = await service.undoRemovedProcess(53001);
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of product

### updateUserRatingAndTotalReviewsCount

Update user rating and total reviews count

#### Parameters

-   `props` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
    -   `props.templateId` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Reviewed template id
    -   `props.reviewsAverageScore` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Review score
    -   `props.reviewsTotal` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Total amount of reviews for this template

#### Examples

```javascript
(async () => {
  const service = new Service('http://service-products.dev/api/v1/', token);
  const request = await service.updateUserRatingAndTotalReviewsCount({
templateId: 53001,
reviewsAverageScore: 123,
reviewsTotal: 123,
});
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object of updated product parameters

### getProductsBySpecificParams

Search products by specific params (only v2)

#### Parameters

-   `params` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
    -   `params.locale` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** locale

#### Examples

```javascript
(async () => {
  const service = new Service('//api.templatemonsterdev.com/products/v2/');
  const request = await service.getProductsBySpecificParams({ locale: 'en' });
})();
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** object product parameters