# Nr1CatalogApp.ItemAttributesApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**itemAttributesFindMultiple**](ItemAttributesApi.md#itemAttributesFindMultiple) | **POST** /item-attributes/get-multiple | Retrieves a collection of item-attribute documents matching the item-identifiers in the request
[**itemAttributesGet**](ItemAttributesApi.md#itemAttributesGet) | **GET** /item-attributes/{itemCode} | Retrieve an item-attribute document by the item-attribute resource identifier.
[**itemAttributesGetItemAttributesDetails**](ItemAttributesApi.md#itemAttributesGetItemAttributesDetails) | **GET** /item-attributes/{itemCode}/details | Get item-attributes details.
[**itemAttributesGetSnapshot**](ItemAttributesApi.md#itemAttributesGetSnapshot) | **GET** /item-attributes/snapshot | Get the snapshot based on the provided enterprise unit.
[**itemAttributesSave**](ItemAttributesApi.md#itemAttributesSave) | **PUT** /item-attributes/{itemCode} | Creates/Updates an item-attribute document for a specific enterprise unit (site/store).
[**itemAttributesSaveMultiple**](ItemAttributesApi.md#itemAttributesSaveMultiple) | **PUT** /item-attributes | Imports a mini-batch of enterprise unit specific item attributes.


<a name="itemAttributesFindMultiple"></a>
# **itemAttributesFindMultiple**
> GetItemAttributesResponse itemAttributesFindMultiple(nepEnterpriseUnit, opts)

Retrieves a collection of item-attribute documents matching the item-identifiers in the request

This API retrieves a set of documents for a given set of item-identifiers. This API is executed on a context of a single enterprise unit which is expected to be passed as a standard header. The API does not fail, if any of the provided item-codes do not have corresponding attributes defined at the specified enterprise unit. This API allows clients to orchestrate multiple catalog APIs more effectively. For example, a client may run a search against global items by various supported parameters and then retrieve with a single call all enterprise  unit specific attributes (e.g. store level attributes) of the catalog items matched by the previous search. This API has no side-effects.<br/><p><h3>Input parameters:-</h3><code>request:</code> Identifies context of the client, such as enterprise unit that the client belongs to.<br/> <code>itemIdentifiers:</code> Object containing the item codes to use for the bulk retrieval.<br/><h3>Returns:</h3> A collection of objects that represents attributes associated with catalog items at the enterprise unit level.

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

var apiInstance = new Nr1CatalogApp.ItemAttributesApi();

var nepEnterpriseUnit = "nepEnterpriseUnit_example"; // String | Enterprise unit id.

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **nepEnterpriseUnit** | **String**| Enterprise unit id. | 
 **body** | [**AttributesItemIdCollectionData**](AttributesItemIdCollectionData.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

[**GetItemAttributesResponse**](GetItemAttributesResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="itemAttributesGet"></a>
# **itemAttributesGet**
> ItemAttributesViewData itemAttributesGet(itemCode, nepEnterpriseUnit, opts)

Retrieve an item-attribute document by the item-attribute resource identifier.

<p>This API retrieves a single document of item-attribute based on the provided <b>itemAttributesId</b> identifier. 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>itemAttributesId</code>: Resource identifier for the item attributes.<br/><h3>Returns:</h3> All of the fields of a single catalog item-attributes document, including read-only system generated/assigned fields.

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

var apiInstance = new Nr1CatalogApp.ItemAttributesApi();

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 attributes are defined.

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.itemAttributesGet(itemCode, nepEnterpriseUnit, 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 attributes are defined. | 
 **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

[**ItemAttributesViewData**](ItemAttributesViewData.md)

### Authorization

No authorization required

### HTTP request headers

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

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

Get item-attributes details.

Get item attributes details for one or more enterprise unit.  If no enterprise unit is provided in request then results will be filter on organization level.

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

var apiInstance = new Nr1CatalogApp.ItemAttributesApi();

var itemCode = "itemCode_example"; // String | An item's unique identifier for which attributes need to find

var opts = { 
  'pageNumber': 0, // Number | The requested page number (starting from zero)
  'pageSize': 200, // Number | The page size
  'nepEnterpriseUnit': "nepEnterpriseUnit_example", // String | Enterprise unit identifier for which the item attributes are defined.  If not specified then result will be filter for all enterprise units (tenant level)
  '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.itemAttributesGetItemAttributesDetails(itemCode, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **itemCode** | **String**| An item's unique identifier for which attributes need to find | 
 **pageNumber** | **Number**| The requested page number (starting from zero) | [optional] [default to 0]
 **pageSize** | **Number**| The page size | [optional] [default to 200]
 **nepEnterpriseUnit** | **String**| Enterprise unit identifier for which the item attributes are defined.  If not specified then result will be filter for all enterprise units (tenant level) | [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

[**GetItemAttributesDetailsResponse**](GetItemAttributesDetailsResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="itemAttributesGetSnapshot"></a>
# **itemAttributesGetSnapshot**
> GetItemAttributesSnapshotResponse itemAttributesGetSnapshot(nepEnterpriseUnit, opts)

Get the snapshot based on the provided enterprise unit.

<p>Item attribute document synchronization API that is used to synchronize the resource state with the remote client such as POS, Store Server or mobile device. This API requires specifying enterprise unit id that matches the client synchronization system (e.g. store server or POS). 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 and enterpriseUnitId<br/><h3>Returns:</h3> Snapshot that matches the request parameters (e.g. all item-attributes modified since the submitted client version.)<br/><br/><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.ItemAttributesApi();

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.itemAttributesGetSnapshot(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

[**GetItemAttributesSnapshotResponse**](GetItemAttributesSnapshotResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

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

Creates/Updates an item-attribute document for a specific enterprise unit (site/store).

<p>This API creates/updates item-attribute document for the provided <b>itemCode</b>. If the item-attribute 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. This API is executed on a context of a single enterprise unit which is expected to be passed as a standard header.</p><p><h3>Input parameters:-</h3><code>itemAttributesId:</code> Identifier object that binds item to enterprise unit<br/><code>itemAttributesData:</code> Request object to create an item attribute for an enterprise unit.</p>

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

var apiInstance = new Nr1CatalogApp.ItemAttributesApi();

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 attributes are defined.

var opts = { 
  'body': new Nr1CatalogApp.ItemAttributesData(), // ItemAttributesData | 
  '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.itemAttributesSave(itemCode, nepEnterpriseUnit, 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 attributes are defined. | 
 **body** | [**ItemAttributesData**](ItemAttributesData.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="itemAttributesSaveMultiple"></a>
# **itemAttributesSaveMultiple**
> itemAttributesSaveMultiple(opts)

Imports a mini-batch of enterprise unit specific item attributes.

<p>Import API will either create or update existing item-attributes documents.<br/> If the item-attribute 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.</p> <p><h3>Input parameters:-</h3><code>request</code>: contains the list of item-attributes to save 

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

var apiInstance = new Nr1CatalogApp.ItemAttributesApi();

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

### Parameters

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

