# Nr1CatalogApp.ItemGroupingsApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**itemGroupingsGet**](ItemGroupingsApi.md#itemGroupingsGet) | **GET** /item-groupings/{itemCode}/{itemGroupingsType} | Retrieves an item-groupings document by the resource identifier.
[**itemGroupingsGetItemGroupingsTypeSnapshot**](ItemGroupingsApi.md#itemGroupingsGetItemGroupingsTypeSnapshot) | **GET** /item-groupings/snapshot/{itemGroupingsType} | Get the snapshot based on the provided client snapshot version and item-groupings type.
[**itemGroupingsGetSnapshot**](ItemGroupingsApi.md#itemGroupingsGetSnapshot) | **GET** /item-groupings/snapshot | Get the snapshot based on the provided client snapshot version.
[**itemGroupingsSaveMultiple**](ItemGroupingsApi.md#itemGroupingsSaveMultiple) | **PUT** /item-groupings | Creates/updates multiple item-grouping documents.


<a name="itemGroupingsGet"></a>
# **itemGroupingsGet**
> ItemGroupingsViewData itemGroupingsGet(itemCode, nepEnterpriseUnit, itemGroupingsType, opts)

Retrieves an item-groupings document by the resource identifier.

<p>This API retrieves an item-groupings document for the provided <b>itemCode</b> and <b>itemGroupingsType</b>. It is executed on a context of a single enterprise unit which is expected to be passed as a standard header.</p> <p><h3>Input parameter:- </h3><code>itemGroupingsId:</code> Identifier for the item-groupings to retrieve.<br/><h3>Returns:</h3> All of the fields of a catalog item-groupings, including read-only system generated/assigned fields.</p>

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

var apiInstance = new Nr1CatalogApp.ItemGroupingsApi();

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

var nepEnterpriseUnit = "nepEnterpriseUnit_example"; // String | Enterprise unit identifier for which the item groupings are defined.

var itemGroupingsType = "itemGroupingsType_example"; // String | 

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.itemGroupingsGet(itemCode, nepEnterpriseUnit, itemGroupingsType, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **itemCode** | **String**| A unique item (unique per Tenant) code which is used to identify the item. | 
 **nepEnterpriseUnit** | **String**| Enterprise unit identifier for which the item groupings are defined. | 
 **itemGroupingsType** | **String**|  | 
 **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

[**ItemGroupingsViewData**](ItemGroupingsViewData.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="itemGroupingsGetItemGroupingsTypeSnapshot"></a>
# **itemGroupingsGetItemGroupingsTypeSnapshot**
> GetItemGroupingsSnapshotResponse itemGroupingsGetItemGroupingsTypeSnapshot(nepEnterpriseUnit, itemGroupingsType, opts)

Get the snapshot based on the provided client snapshot version and item-groupings type.

<p>Item-groupings 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>.<br/></p><p><h3>Input parameter:- </h3><code>request:</code> Snapshot request containing snapshotVersion, enterpriseUnitId, and itemGroupingsType<br/><br/><h3>Returns:</h3> A snapshot that matches the request parameters (e.g. all item-groupings modified since the submitted client version that are of certain itemGroupingsType).<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.ItemGroupingsApi();

var nepEnterpriseUnit = "nepEnterpriseUnit_example"; // String | Enterprise unit identifier for which the documents are defined.

var itemGroupingsType = "itemGroupingsType_example"; // String | Snapshot response will be limited to the itemGroupingsType This allows to get updates only for a specific itemGroupingsType, for example only for \"groupings\" groupings.

var opts = { 
  '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.itemGroupingsGetItemGroupingsTypeSnapshot(nepEnterpriseUnit, itemGroupingsType, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **nepEnterpriseUnit** | **String**| Enterprise unit identifier for which the documents are defined. | 
 **itemGroupingsType** | **String**| Snapshot response will be limited to the itemGroupingsType This allows to get updates only for a specific itemGroupingsType, for example only for \"groupings\" groupings. | 
 **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

[**GetItemGroupingsSnapshotResponse**](GetItemGroupingsSnapshotResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="itemGroupingsGetSnapshot"></a>
# **itemGroupingsGetSnapshot**
> GetItemGroupingsSnapshotResponse itemGroupingsGetSnapshot(nepEnterpriseUnit, opts)

Get the snapshot based on the provided client snapshot version.

<p>Item groupings 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>.<br/></p><p><h3>Input parameter:- </h3><code>request:</code> Snapshot request containing snapshotVersion and enterpriseUnitId<br/><br/><h3>Returns:</h3> A snapshot that matches the request parameters (e.g. all item-groupings 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.ItemGroupingsApi();

var nepEnterpriseUnit = "nepEnterpriseUnit_example"; // String | Enterprise unit identifier for which the documents are defined.

var opts = { 
  '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.itemGroupingsGetSnapshot(nepEnterpriseUnit, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **nepEnterpriseUnit** | **String**| Enterprise unit identifier for which the documents are defined. | 
 **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

[**GetItemGroupingsSnapshotResponse**](GetItemGroupingsSnapshotResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

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

Creates/updates multiple item-grouping documents.

<p>This API creates/updates one or more item-groupings documents. If the item-grouping 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. Allows specifying multiple enterprise units in the request, with a maximum of 100 enterprise units per request. The API will perform an authorization check on the supplied enterprise units.<br/></p> <p><h3>Input parameter:- </h3> <code>request:</code> contains the list of item-groupings to save <br/></p> 

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

var apiInstance = new Nr1CatalogApp.ItemGroupingsApi();

var opts = { 
  'body': new Nr1CatalogApp.SaveMultipleItemGroupingsRequest(), // SaveMultipleItemGroupingsRequest | 
  '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.itemGroupingsSaveMultiple(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**SaveMultipleItemGroupingsRequest**](SaveMultipleItemGroupingsRequest.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

