# Nr1CatalogApp.ItemsApi

All URIs are relative to *http://api.ncr.com/catalog/v2*

Method | HTTP request | Description
------------- | ------------- | -------------
[**itemsFindByCriteria**](ItemsApi.md#itemsFindByCriteria) | **GET** /items | Retrieve item document/s by the specified search criteria.
[**itemsFindMultiple**](ItemsApi.md#itemsFindMultiple) | **POST** /items/get-multiple | Retrieve items by the specified item codes or package identifiers.
[**itemsFindSuggestions**](ItemsApi.md#itemsFindSuggestions) | **GET** /items/suggestions | Retrieve item suggestions by the specified search criteria.
[**itemsGet**](ItemsApi.md#itemsGet) | **GET** /items/{itemCode} | Retrieve an item document by the resource identifier.
[**itemsGetSnapshot**](ItemsApi.md#itemsGetSnapshot) | **GET** /items/snapshot | Get the snapshot based on the provided client snapshot version.
[**itemsSave**](ItemsApi.md#itemsSave) | **PUT** /items/{itemCode} | Creates/Updates a catalog item document.
[**itemsSaveMultiple**](ItemsApi.md#itemsSaveMultiple) | **PUT** /items | Imports a mini-batch of catalog items.


<a name="itemsFindByCriteria"></a>
# **itemsFindByCriteria**
> FindItemsResponse itemsFindByCriteria(opts)

Retrieve item document/s by the specified search criteria.

<p>This API will fetch item documents matching the specified search criteria (also known as standard search).<br/> The search criteria is passed as a query parameter with the API request. If more than one parameters are used, they will be applied as <b>a logical conjunction (AND) operation.</b><br/>Fields named \\*Pattern support wild-card characters. Examples: <br/>itemCodePattern=12331231 (exact match),<br/> itemCodePattern=21\\* (starts with 21), <br/>itemCodePattern=\\*32\\* (contains 32), <br/> itemCodePattern=\\* (any value)<br/></p><p><h3>Input parameter:- </h3> <code>request:</code> It contains a set of item search criteria.<br/></p><h3>Returns:</h3>  A page of catalog item objects that match the specified search criteria.</p>

### Example
```javascript
var Nr1CatalogApp = require('nr1_catalog_app');

var apiInstance = new Nr1CatalogApp.ItemsApi();

var opts = { 
  'pageNumber': 0, // Number | The requested page number (starting from zero)
  'pageSize': 200, // Number | The page size
  'itemCodePattern': "itemCodePattern_example", // String | Item Code pattern to use for a search (standard wildcard matching rules apply).
  'packageIdentifierPattern': "packageIdentifierPattern_example", // String | Pattern for package identifier (any type) to use for a search (standard wildcard matching rules apply).
  'longDescriptionPattern': "longDescriptionPattern_example", // String | Pattern for long description to use for a search (standard wildcard matching rules apply).
  'shortDescriptionPattern': "shortDescriptionPattern_example", // String | Pattern for short description to use for a search (standard wildcard matching rules apply).
  'itemStatus': "itemStatus_example", // String | Item status to use for a search.
  'merchandiseCategoryId': "merchandiseCategoryId_example", // String | Merchandise category code to use for a search. Exact match against the code to which the item belongs or any of the parent nodes.
  'sortDirection': "ASC", // String | Sort direction to the apply to the search results.
  'sortField': "SHORT_DESCRIPTION", // String | Specifies the field on which to sort the items.
  'nepCorrelationId': "nepCorrelationId_example", // String | A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes
  'nepOrganization': "nepOrganization_example" // String | The organization the request applies to
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.itemsFindByCriteria(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **pageNumber** | **Number**| The requested page number (starting from zero) | [optional] [default to 0]
 **pageSize** | **Number**| The page size | [optional] [default to 200]
 **itemCodePattern** | **String**| Item Code pattern to use for a search (standard wildcard matching rules apply). | [optional] 
 **packageIdentifierPattern** | **String**| Pattern for package identifier (any type) to use for a search (standard wildcard matching rules apply). | [optional] 
 **longDescriptionPattern** | **String**| Pattern for long description to use for a search (standard wildcard matching rules apply). | [optional] 
 **shortDescriptionPattern** | **String**| Pattern for short description to use for a search (standard wildcard matching rules apply). | [optional] 
 **itemStatus** | **String**| Item status to use for a search. | [optional] 
 **merchandiseCategoryId** | **String**| Merchandise category code to use for a search. Exact match against the code to which the item belongs or any of the parent nodes. | [optional] 
 **sortDirection** | **String**| Sort direction to the apply to the search results. | [optional] [default to ASC]
 **sortField** | **String**| Specifies the field on which to sort the items. | [optional] [default to SHORT_DESCRIPTION]
 **nepCorrelationId** | **String**| A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes | [optional] 
 **nepOrganization** | **String**| The organization the request applies to | [optional] 

### Return type

[**FindItemsResponse**](FindItemsResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="itemsFindMultiple"></a>
# **itemsFindMultiple**
> GetMultipleItemResponse itemsFindMultiple(opts)

Retrieve items by the specified item codes or package identifiers.

<p>This API retrieves items based on the provided item codes or package identifiers.</b></p><p><h3>Input parameter:- </h3> <code>request:</code> A list of item codes and/or package identifiers. The limit for number of unique resource id passed as input is 100<br/><h3>Returns:</h3>A list of catalog items with matching item codes or packageIdentifier mentioned in the request.</p>

### Example
```javascript
var Nr1CatalogApp = require('nr1_catalog_app');

var apiInstance = new Nr1CatalogApp.ItemsApi();

var opts = { 
  'body': new Nr1CatalogApp.GetMultipleItemRequest(), // GetMultipleItemRequest | 
  'nepCorrelationId': "nepCorrelationId_example", // String | A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes
  'nepOrganization': "nepOrganization_example" // String | The organization the request applies to
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.itemsFindMultiple(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**GetMultipleItemRequest**](GetMultipleItemRequest.md)|  | [optional] 
 **nepCorrelationId** | **String**| A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes | [optional] 
 **nepOrganization** | **String**| The organization the request applies to | [optional] 

### Return type

[**GetMultipleItemResponse**](GetMultipleItemResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="itemsFindSuggestions"></a>
# **itemsFindSuggestions**
> FindItemsResponse itemsFindSuggestions(opts)

Retrieve item suggestions by the specified search criteria.

<p>This API retrieves suggestions that fit the provided search criteria. In this case patterns are not mapped directly to specific fields, but rather apply to the several fields that may match the pattern. In addition to the pattern match the suggestion search supports sorting based on the search score.<br/>The search criteria is passed as a query parameter with the API request. If more than one parameters are used, they will be applied as <b>a logical disjunction (OR) operation.</b></p><p><h3>Input parameter:- </h3> <code>request:</code> A set of suggestions search criteria.<br/><h3>Returns:</h3>A page of catalog item objects that match the specified search criteria. </p>

### Example
```javascript
var Nr1CatalogApp = require('nr1_catalog_app');

var apiInstance = new Nr1CatalogApp.ItemsApi();

var opts = { 
  'pageNumber': 0, // Number | The requested page number (starting from zero)
  'pageSize': 200, // Number | The page size
  'codePattern': "codePattern_example", // String | Item Code pattern to use for a search (standard wildcard matching rules apply).
  'descriptionPattern': "descriptionPattern_example", // String | Pattern for short or long description to use for a search (standard wildcard matching rules apply)
  'packageIdentifierPattern': "packageIdentifierPattern_example", // String | Pattern for package identifier (any type) to use for a search (standard pattern rules apply).
  'posNumberPattern': "posNumberPattern_example", // String | Pattern for POS Identifier Number for Item to use for a search (standard pattern rules apply).
  'sortField': "SHORT_DESCRIPTION", // String | Sort field to apply to the retrieved items.
  'sortDirection': "ASC", // String | Sort direction to apply to the retrieved items.
  'merchandiseCategoryId': "merchandiseCategoryId_example", // String | [Deprecated] Refer to merchandiseCategoryIdPattern.
  'merchandiseCategoryIdPattern': "merchandiseCategoryIdPattern_example", // String | Merchandise category pattern. If provided the search will be restricted to just the items that fall into this category. The pattern must match for either the merchandise category node to which the item belongs or to any of the ancestors (standard wildcard matching rules apply).
  'nepCorrelationId': "nepCorrelationId_example", // String | A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes
  'nepOrganization': "nepOrganization_example" // String | The organization the request applies to
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.itemsFindSuggestions(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **pageNumber** | **Number**| The requested page number (starting from zero) | [optional] [default to 0]
 **pageSize** | **Number**| The page size | [optional] [default to 200]
 **codePattern** | **String**| Item Code pattern to use for a search (standard wildcard matching rules apply). | [optional] 
 **descriptionPattern** | **String**| Pattern for short or long description to use for a search (standard wildcard matching rules apply) | [optional] 
 **packageIdentifierPattern** | **String**| Pattern for package identifier (any type) to use for a search (standard pattern rules apply). | [optional] 
 **posNumberPattern** | **String**| Pattern for POS Identifier Number for Item to use for a search (standard pattern rules apply). | [optional] 
 **sortField** | **String**| Sort field to apply to the retrieved items. | [optional] [default to SHORT_DESCRIPTION]
 **sortDirection** | **String**| Sort direction to apply to the retrieved items. | [optional] [default to ASC]
 **merchandiseCategoryId** | **String**| [Deprecated] Refer to merchandiseCategoryIdPattern. | [optional] 
 **merchandiseCategoryIdPattern** | **String**| Merchandise category pattern. If provided the search will be restricted to just the items that fall into this category. The pattern must match for either the merchandise category node to which the item belongs or to any of the ancestors (standard wildcard matching rules apply). | [optional] 
 **nepCorrelationId** | **String**| A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes | [optional] 
 **nepOrganization** | **String**| The organization the request applies to | [optional] 

### Return type

[**FindItemsResponse**](FindItemsResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="itemsGet"></a>
# **itemsGet**
> ItemViewData itemsGet(itemCode, opts)

Retrieve an item document by the resource identifier.

<p>This API retrieves document of a catalog item based on the provided <b>itemCode</b></p>.<p><h3>Input parameter:- </h3> <code>itemId:</code> Identifies the item to retrieve.<br/><h3>Returns:</h3> All of the fields of a single catalog item document, including read-only system generated/assigned fields.

### Example
```javascript
var Nr1CatalogApp = require('nr1_catalog_app');

var apiInstance = new Nr1CatalogApp.ItemsApi();

var itemCode = "itemCode_example"; // String | A unique item (unique per Tenant) code which is used to identify the item.

var opts = { 
  'nepCorrelationId': "nepCorrelationId_example", // String | A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes
  'nepOrganization': "nepOrganization_example" // String | The organization the request applies to
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.itemsGet(itemCode, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **itemCode** | **String**| A unique item (unique per Tenant) code which is used to identify the item. | 
 **nepCorrelationId** | **String**| A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes | [optional] 
 **nepOrganization** | **String**| The organization the request applies to | [optional] 

### Return type

[**ItemViewData**](ItemViewData.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="itemsGetSnapshot"></a>
# **itemsGetSnapshot**
> GetItemsSnapshotResponse itemsGetSnapshot(opts)

Get the snapshot based on the provided client snapshot version.

<p>Item document synchronization API that is used to synchronize the resource state with the remote client such as POS, Store Server or mobile device. Results are filterable by <i>STATUS</i> using the query parameter <code>status=<i>desiredResourceStatus</i></code>.</p><p><h3>Input parameter:- </h3> <code>request:</code> Snapshot request containing snapshotVersion.<br/><br/><h3>Returns:</h3> Snapshot that matches the request parameters (e.g. all items modified since the submitted client version).<br/><br/></p><p><b>If the the result payload exceeds maximum size (generally around 10K records), the document synchronization cannot be accomplished using APIs. The client should wait a few moments for the file to be available at the provided URI in the details.</b></p>

### Example
```javascript
var Nr1CatalogApp = require('nr1_catalog_app');

var apiInstance = new Nr1CatalogApp.ItemsApi();

var opts = { 
  'nepEnterpriseUnit': "nepEnterpriseUnit_example", // String | Enterprise unit id.
  'nepSnapshotVersion': 789, // Number | Version of the client state. This attribute will be used by the back-end to identify the snapshot that should be generated per client. In a simple case, the version is a timestamp (epoch time in millis) and the generated snapshot will contain all documents modified since the provided timestamp.
  'status': "status_example", // String | Flag to filter just one status type.
  'nepCorrelationId': "nepCorrelationId_example", // String | A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes
  'nepOrganization': "nepOrganization_example" // String | The organization the request applies to
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.itemsGetSnapshot(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **nepEnterpriseUnit** | **String**| Enterprise unit id. | [optional] 
 **nepSnapshotVersion** | **Number**| Version of the client state. This attribute will be used by the back-end to identify the snapshot that should be generated per client. In a simple case, the version is a timestamp (epoch time in millis) and the generated snapshot will contain all documents modified since the provided timestamp. | [optional] 
 **status** | **String**| Flag to filter just one status type. | [optional] 
 **nepCorrelationId** | **String**| A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes | [optional] 
 **nepOrganization** | **String**| The organization the request applies to | [optional] 

### Return type

[**GetItemsSnapshotResponse**](GetItemsSnapshotResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="itemsSave"></a>
# **itemsSave**
> itemsSave(itemCode, opts)

Creates/Updates a catalog item document.

<p>This API creates or updates an item with the provided identifier <b>itemCode</b>.If the item already exists, the document will be updated only if the version number in the request is greater than the version number of the existing document. </p><p><h3>Input parameter:- </h3><code>itemCode:</code> the item identifier.<br/> <code>itemData:</code> the data containing the item information.</p>

### Example
```javascript
var Nr1CatalogApp = require('nr1_catalog_app');

var apiInstance = new Nr1CatalogApp.ItemsApi();

var itemCode = "itemCode_example"; // String | A unique item (unique per Tenant) code which is used to identify the item.

var opts = { 
  'body': new Nr1CatalogApp.ItemData(), // ItemData | 
  'nepCorrelationId': "nepCorrelationId_example", // String | A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes
  'nepOrganization': "nepOrganization_example" // String | The organization the request applies to
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.itemsSave(itemCode, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **itemCode** | **String**| A unique item (unique per Tenant) code which is used to identify the item. | 
 **body** | [**ItemData**](ItemData.md)|  | [optional] 
 **nepCorrelationId** | **String**| A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes | [optional] 
 **nepOrganization** | **String**| The organization the request applies to | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="itemsSaveMultiple"></a>
# **itemsSaveMultiple**
> itemsSaveMultiple(opts)

Imports a mini-batch of catalog items.

<p>This import API will either create or update existing item documents.If the item already exists, the document will be updated only if the version number in the request is greater than the version number of the existing document. </p><p><h3>Input parameter:- </h3><code>request:</code> contains the list of item to save</p> 

### Example
```javascript
var Nr1CatalogApp = require('nr1_catalog_app');

var apiInstance = new Nr1CatalogApp.ItemsApi();

var opts = { 
  'body': new Nr1CatalogApp.SaveMultipleItemsRequest(), // SaveMultipleItemsRequest | 
  'nepCorrelationId': "nepCorrelationId_example", // String | A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes
  'nepOrganization': "nepOrganization_example" // String | The organization the request applies to
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.itemsSaveMultiple(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**SaveMultipleItemsRequest**](SaveMultipleItemsRequest.md)|  | [optional] 
 **nepCorrelationId** | **String**| A unique ID that can be used to correlate one or more related requests for debugging or tracing purposes | [optional] 
 **nepOrganization** | **String**| The organization the request applies to | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

