# NomadEnvoyCli.StoreApi

All URIs are relative to *https://nomad.samarkand-global.cn/envoy*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createStoreInventory**](StoreApi.md#createStoreInventory) | **POST** /stores/{store_id}/inventory | createStoreInventory
[**postStore**](StoreApi.md#postStore) | **POST** /stores/ | postStore
[**queryStore**](StoreApi.md#queryStore) | **GET** /stores/ | queryStore
[**queryStoreInventory**](StoreApi.md#queryStoreInventory) | **GET** /stores/{store_id}/inventory | queryStoreInventory
[**updateStoreInventory**](StoreApi.md#updateStoreInventory) | **PUT** /stores/{store_id}/inventory | updateStoreInventory



## createStoreInventory

> ApiResponseInventory createStoreInventory(storeId, inventory)

createStoreInventory

Create store-level product inventory

### Example

```javascript
var NomadEnvoyCli = require('nomad_envoy_cli');
var defaultClient = NomadEnvoyCli.ApiClient.instance;
// Configure API key authorization: ca_key
var ca_key = defaultClient.authentications['ca_key'];
ca_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ca_key.apiKeyPrefix = 'Token';
// Configure API key authorization: ca_stage
var ca_stage = defaultClient.authentications['ca_stage'];
ca_stage.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ca_stage.apiKeyPrefix = 'Token';

var apiInstance = new NomadEnvoyCli.StoreApi();
var storeId = "storeId_example"; // String | The store Id in Nomad system
var inventory = new NomadEnvoyCli.Inventory(); // Inventory | Product in store inventory.
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createStoreInventory(storeId, inventory, callback);
```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **storeId** | **String**| The store Id in Nomad system | 
 **inventory** | [**Inventory**](Inventory.md)| Product in store inventory. | 

### Return type

[**ApiResponseInventory**](ApiResponseInventory.md)

### Authorization

[ca_key](../README.md#ca_key), [ca_stage](../README.md#ca_stage)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json


## postStore

> ApiResponseGeneral postStore(store, opts)

postStore

Operations for stores, such as query score of platform

### Example

```javascript
var NomadEnvoyCli = require('nomad_envoy_cli');
var defaultClient = NomadEnvoyCli.ApiClient.instance;
// Configure API key authorization: ca_key
var ca_key = defaultClient.authentications['ca_key'];
ca_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ca_key.apiKeyPrefix = 'Token';
// Configure API key authorization: ca_stage
var ca_stage = defaultClient.authentications['ca_stage'];
ca_stage.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ca_stage.apiKeyPrefix = 'Token';

var apiInstance = new NomadEnvoyCli.StoreApi();
var store = new NomadEnvoyCli.Store(); // Store | Store operation.
var opts = {
  'storeId': "storeId_example" // String | The store ID in nomad system
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.postStore(store, opts, callback);
```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **store** | [**Store**](Store.md)| Store operation. | 
 **storeId** | **String**| The store ID in nomad system | [optional] 

### Return type

[**ApiResponseGeneral**](ApiResponseGeneral.md)

### Authorization

[ca_key](../README.md#ca_key), [ca_stage](../README.md#ca_stage)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json


## queryStore

> ApiResponseGeneral queryStore(opts)

queryStore

Query all store name or specific store

### Example

```javascript
var NomadEnvoyCli = require('nomad_envoy_cli');
var defaultClient = NomadEnvoyCli.ApiClient.instance;
// Configure API key authorization: ca_key
var ca_key = defaultClient.authentications['ca_key'];
ca_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ca_key.apiKeyPrefix = 'Token';
// Configure API key authorization: ca_stage
var ca_stage = defaultClient.authentications['ca_stage'];
ca_stage.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ca_stage.apiKeyPrefix = 'Token';

var apiInstance = new NomadEnvoyCli.StoreApi();
var opts = {
  'storeName': "storeName_example" // String | The store name in nomad system
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.queryStore(opts, callback);
```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **storeName** | **String**| The store name in nomad system | [optional] 

### Return type

[**ApiResponseGeneral**](ApiResponseGeneral.md)

### Authorization

[ca_key](../README.md#ca_key), [ca_stage](../README.md#ca_stage)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


## queryStoreInventory

> ApiResponseInventory queryStoreInventory(storeId, opts)

queryStoreInventory

Query store-level product inventory

### Example

```javascript
var NomadEnvoyCli = require('nomad_envoy_cli');
var defaultClient = NomadEnvoyCli.ApiClient.instance;
// Configure API key authorization: ca_key
var ca_key = defaultClient.authentications['ca_key'];
ca_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ca_key.apiKeyPrefix = 'Token';
// Configure API key authorization: ca_stage
var ca_stage = defaultClient.authentications['ca_stage'];
ca_stage.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ca_stage.apiKeyPrefix = 'Token';

var apiInstance = new NomadEnvoyCli.StoreApi();
var storeId = "storeId_example"; // String | The store Id in Nomad system
var opts = {
  'pageNo': 1, // Number | Page number, starting with 1
  'pageSize': 10, // Number | Page size, options: [1, 10, 50, 100, 1000]
  'productId': "productId_example", // String | The product Id in the store
  'batchId': "batchId_example", // String | The batch Id in the store
  'locationId': "locationId_example", // String | The product Id of product
  'skuName': "skuName_example", // String | The SKU name of product
  'barcode': "barcode_example" // String | The barcode of product
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.queryStoreInventory(storeId, opts, callback);
```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **storeId** | **String**| The store Id in Nomad system | 
 **pageNo** | **Number**| Page number, starting with 1 | [optional] [default to 1]
 **pageSize** | **Number**| Page size, options: [1, 10, 50, 100, 1000] | [optional] [default to 10]
 **productId** | **String**| The product Id in the store | [optional] 
 **batchId** | **String**| The batch Id in the store | [optional] 
 **locationId** | **String**| The product Id of product | [optional] 
 **skuName** | **String**| The SKU name of product | [optional] 
 **barcode** | **String**| The barcode of product | [optional] 

### Return type

[**ApiResponseInventory**](ApiResponseInventory.md)

### Authorization

[ca_key](../README.md#ca_key), [ca_stage](../README.md#ca_stage)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


## updateStoreInventory

> ApiResponseInventory updateStoreInventory(storeId, inventory)

updateStoreInventory

Update store-level product inventory

### Example

```javascript
var NomadEnvoyCli = require('nomad_envoy_cli');
var defaultClient = NomadEnvoyCli.ApiClient.instance;
// Configure API key authorization: ca_key
var ca_key = defaultClient.authentications['ca_key'];
ca_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ca_key.apiKeyPrefix = 'Token';
// Configure API key authorization: ca_stage
var ca_stage = defaultClient.authentications['ca_stage'];
ca_stage.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ca_stage.apiKeyPrefix = 'Token';

var apiInstance = new NomadEnvoyCli.StoreApi();
var storeId = "storeId_example"; // String | The store Id in Nomad system
var inventory = new NomadEnvoyCli.Inventory(); // Inventory | Product in store inventory.
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateStoreInventory(storeId, inventory, callback);
```

### Parameters



Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **storeId** | **String**| The store Id in Nomad system | 
 **inventory** | [**Inventory**](Inventory.md)| Product in store inventory. | 

### Return type

[**ApiResponseInventory**](ApiResponseInventory.md)

### Authorization

[ca_key](../README.md#ca_key), [ca_stage](../README.md#ca_stage)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

