# infoplus.ItemApi All URIs are relative to *https://kingsrook.localhost-testsubdomain1.infopluswms.com:8443/infoplus-wms/api* Method | HTTP request | Description ------------- | ------------- | ------------- [**addItem**](ItemApi.md#addItem) | **POST** /beta/item | Create an item [**addItemAudit**](ItemApi.md#addItemAudit) | **PUT** /beta/item/{itemId}/audit/{itemAudit} | Add new audit for an item [**addItemFile**](ItemApi.md#addItemFile) | **POST** /beta/item/{itemId}/file/{fileName} | Attach a file to an item [**addItemFileByURL**](ItemApi.md#addItemFileByURL) | **POST** /beta/item/{itemId}/file | Attach a file to an item by URL. [**addItemTag**](ItemApi.md#addItemTag) | **PUT** /beta/item/{itemId}/tag/{itemTag} | Add new tags for an item. [**deleteItem**](ItemApi.md#deleteItem) | **DELETE** /beta/item/{itemId} | Delete an item [**deleteItemFile**](ItemApi.md#deleteItemFile) | **DELETE** /beta/item/{itemId}/file/{fileId} | Delete a file for an item. [**deleteItemTag**](ItemApi.md#deleteItemTag) | **DELETE** /beta/item/{itemId}/tag/{itemTag} | Delete a tag for an item. [**getBySKU**](ItemApi.md#getBySKU) | **GET** /beta/item/getBySKU | Get an item by SKU [**getDuplicateItemById**](ItemApi.md#getDuplicateItemById) | **GET** /beta/item/duplicate/{itemId} | Get a duplicated an item by id [**getItemByFilter**](ItemApi.md#getItemByFilter) | **GET** /beta/item/search | Search items by filter [**getItemById**](ItemApi.md#getItemById) | **GET** /beta/item/{itemId} | Get an item by id [**getItemFiles**](ItemApi.md#getItemFiles) | **GET** /beta/item/{itemId}/file | Get the files for an item. [**getItemTags**](ItemApi.md#getItemTags) | **GET** /beta/item/{itemId}/tag | Get the tags for an item. [**updateItem**](ItemApi.md#updateItem) | **PUT** /beta/item | Update an item [**updateItemCustomFields**](ItemApi.md#updateItemCustomFields) | **PUT** /beta/item/customFields | Update an item custom fields # **addItem** > Item addItem(body) Create an item Inserts a new item using the specified data. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var body = new infoplus.Item(); // Item | Item to be inserted. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.addItem(body, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Item**](Item.md)| Item to be inserted. | ### Return type [**Item**](Item.md) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **addItemAudit** > addItemAudit(itemId, itemAudit) Add new audit for an item Adds an audit to an existing item. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var itemId = 56; // Number | Id of the item to add an audit to var itemAudit = "itemAudit_example"; // String | The audit to add var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.addItemAudit(itemId, itemAudit, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **itemId** | **Number**| Id of the item to add an audit to | **itemAudit** | **String**| The audit to add | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **addItemFile** > addItemFile(itemId, fileName) Attach a file to an item Adds a file to an existing item. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var itemId = 56; // Number | Id of the item to add a file to var fileName = "fileName_example"; // String | Name of file var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.addItemFile(itemId, fileName, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **itemId** | **Number**| Id of the item to add a file to | **fileName** | **String**| Name of file | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **addItemFileByURL** > addItemFileByURL(body, itemId) Attach a file to an item by URL. Adds a file to an existing item by URL. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var body = new infoplus.RecordFile(); // RecordFile | The url and optionly fileName to be used. var itemId = 56; // Number | Id of the item to add an file to var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.addItemFileByURL(body, itemId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**RecordFile**](RecordFile.md)| The url and optionly fileName to be used. | **itemId** | **Number**| Id of the item to add an file to | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **addItemTag** > addItemTag(itemId, itemTag) Add new tags for an item. Adds a tag to an existing item. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var itemId = 56; // Number | Id of the item to add a tag to var itemTag = "itemTag_example"; // String | The tag to add var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.addItemTag(itemId, itemTag, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **itemId** | **Number**| Id of the item to add a tag to | **itemTag** | **String**| The tag to add | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **deleteItem** > deleteItem(itemId) Delete an item Deletes the item identified by the specified id. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var itemId = 56; // Number | Id of the item to be deleted. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.deleteItem(itemId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **itemId** | **Number**| Id of the item to be deleted. | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **deleteItemFile** > deleteItemFile(itemId, fileId) Delete a file for an item. Deletes an existing item file using the specified data. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var itemId = 56; // Number | Id of the item to remove file from var fileId = 56; // Number | Id of the file to delete var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.deleteItemFile(itemId, fileId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **itemId** | **Number**| Id of the item to remove file from | **fileId** | **Number**| Id of the file to delete | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **deleteItemTag** > deleteItemTag(itemId, itemTag) Delete a tag for an item. Deletes an existing item tag using the specified data. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var itemId = 56; // Number | Id of the item to remove tag from var itemTag = "itemTag_example"; // String | The tag to delete var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.deleteItemTag(itemId, itemTag, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **itemId** | **Number**| Id of the item to remove tag from | **itemTag** | **String**| The tag to delete | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getBySKU** > Item getBySKU(lobId, sku) Get an item by SKU Returns the item identified by the specified parameters. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var lobId = 56; // Number | lobId of the item to be returned. var sku = "sku_example"; // String | sku of the item to be returned. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.getBySKU(lobId, sku, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **lobId** | **Number**| lobId of the item to be returned. | **sku** | **String**| sku of the item to be returned. | ### Return type [**Item**](Item.md) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getDuplicateItemById** > Item getDuplicateItemById(itemId) Get a duplicated an item by id Returns a duplicated item identified by the specified id. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var itemId = 56; // Number | Id of the item to be duplicated. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.getDuplicateItemById(itemId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **itemId** | **Number**| Id of the item to be duplicated. | ### Return type [**Item**](Item.md) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getItemByFilter** > [Item] getItemByFilter(opts) Search items by filter Returns the list of items that match the given filter. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var opts = { 'filter': "filter_example", // String | Query string, used to filter results. 'page': 56, // Number | Result page number. Defaults to 1. 'limit': 56, // Number | Maximum results per page. Defaults to 20. Max allowed value is 250. 'sort': "sort_example" // String | Sort results by specified field. }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.getItemByFilter(opts, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **filter** | **String**| Query string, used to filter results. | [optional] **page** | **Number**| Result page number. Defaults to 1. | [optional] **limit** | **Number**| Maximum results per page. Defaults to 20. Max allowed value is 250. | [optional] **sort** | **String**| Sort results by specified field. | [optional] ### Return type [**[Item]**](Item.md) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getItemById** > Item getItemById(itemId) Get an item by id Returns the item identified by the specified id. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var itemId = 56; // Number | Id of the item to be returned. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; apiInstance.getItemById(itemId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **itemId** | **Number**| Id of the item to be returned. | ### Return type [**Item**](Item.md) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getItemFiles** > getItemFiles(itemId) Get the files for an item. Get all existing item files. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var itemId = 56; // Number | Id of the item to get files for var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.getItemFiles(itemId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **itemId** | **Number**| Id of the item to get files for | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getItemTags** > getItemTags(itemId) Get the tags for an item. Get all existing item tags. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var itemId = 56; // Number | Id of the item to get tags for var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.getItemTags(itemId, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **itemId** | **Number**| Id of the item to get tags for | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **updateItem** > updateItem(body) Update an item Updates an existing item using the specified data. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var body = new infoplus.Item(); // Item | Item to be updated. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.updateItem(body, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Item**](Item.md)| Item to be updated. | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **updateItemCustomFields** > updateItemCustomFields(body) Update an item custom fields Updates an existing item custom fields using the specified data. ### Example ```javascript var infoplus = require('infoplus-javascript-client'); var defaultClient = infoplus.ApiClient.instance; // Configure API key authorization: api_key var api_key = defaultClient.authentications['api_key']; api_key.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //api_key.apiKeyPrefix = 'Token'; var apiInstance = new infoplus.ItemApi(); var body = new infoplus.Item(); // Item | Item to be updated. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; apiInstance.updateItemCustomFields(body, callback); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Item**](Item.md)| Item to be updated. | ### Return type null (empty response body) ### Authorization [api_key](../README.md#api_key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json