Skip to content

Latest commit

 

History

History
900 lines (618 loc) · 22.4 KB

ItemApi.md

File metadata and controls

900 lines (618 loc) · 22.4 KB

infoplus.ItemApi

All URIs are relative to https://kingsrook.localhost-testsubdomain1.infopluswms.com:8443/infoplus-wms/api

Method HTTP request Description
addItem POST /beta/item Create an item
addItemAudit PUT /beta/item/{itemId}/audit/{itemAudit} Add new audit for an item
addItemFile POST /beta/item/{itemId}/file/{fileName} Attach a file to an item
addItemFileByURL POST /beta/item/{itemId}/file Attach a file to an item by URL.
addItemTag PUT /beta/item/{itemId}/tag/{itemTag} Add new tags for an item.
deleteItem DELETE /beta/item/{itemId} Delete an item
deleteItemFile DELETE /beta/item/{itemId}/file/{fileId} Delete a file for an item.
deleteItemTag DELETE /beta/item/{itemId}/tag/{itemTag} Delete a tag for an item.
getBySKU GET /beta/item/getBySKU Get an item by SKU
getDuplicateItemById GET /beta/item/duplicate/{itemId} Get a duplicated an item by id
getItemByFilter GET /beta/item/search Search items by filter
getItemById GET /beta/item/{itemId} Get an item by id
getItemFiles GET /beta/item/{itemId}/file Get the files for an item.
getItemTags GET /beta/item/{itemId}/tag Get the tags for an item.
updateItem PUT /beta/item Update an item
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

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 to be inserted.

Return type

Item

Authorization

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

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

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

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

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

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 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

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

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

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

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

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

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

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

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

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

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

Authorization

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

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

Authorization

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

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]

Authorization

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

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

Authorization

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

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

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

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

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

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 to be updated.

Return type

null (empty response body)

Authorization

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

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 to be updated.

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

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