# infoplus.VendorApi
All URIs are relative to *https://kingsrook.localhost-testsubdomain1.infopluswms.com:8443/infoplus-wms/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addVendor**](VendorApi.md#addVendor) | **POST** /beta/vendor | Create a vendor
[**addVendorAudit**](VendorApi.md#addVendorAudit) | **PUT** /beta/vendor/{vendorId}/audit/{vendorAudit} | Add new audit for a vendor
[**addVendorFile**](VendorApi.md#addVendorFile) | **POST** /beta/vendor/{vendorId}/file/{fileName} | Attach a file to a vendor
[**addVendorFileByURL**](VendorApi.md#addVendorFileByURL) | **POST** /beta/vendor/{vendorId}/file | Attach a file to a vendor by URL.
[**addVendorTag**](VendorApi.md#addVendorTag) | **PUT** /beta/vendor/{vendorId}/tag/{vendorTag} | Add new tags for a vendor.
[**deleteVendor**](VendorApi.md#deleteVendor) | **DELETE** /beta/vendor/{vendorId} | Delete a vendor
[**deleteVendorFile**](VendorApi.md#deleteVendorFile) | **DELETE** /beta/vendor/{vendorId}/file/{fileId} | Delete a file for a vendor.
[**deleteVendorTag**](VendorApi.md#deleteVendorTag) | **DELETE** /beta/vendor/{vendorId}/tag/{vendorTag} | Delete a tag for a vendor.
[**getDuplicateVendorById**](VendorApi.md#getDuplicateVendorById) | **GET** /beta/vendor/duplicate/{vendorId} | Get a duplicated a vendor by id
[**getVendorByFilter**](VendorApi.md#getVendorByFilter) | **GET** /beta/vendor/search | Search vendors by filter
[**getVendorById**](VendorApi.md#getVendorById) | **GET** /beta/vendor/{vendorId} | Get a vendor by id
[**getVendorFiles**](VendorApi.md#getVendorFiles) | **GET** /beta/vendor/{vendorId}/file | Get the files for a vendor.
[**getVendorTags**](VendorApi.md#getVendorTags) | **GET** /beta/vendor/{vendorId}/tag | Get the tags for a vendor.
[**updateVendor**](VendorApi.md#updateVendor) | **PUT** /beta/vendor | Update a vendor
[**updateVendorCustomFields**](VendorApi.md#updateVendorCustomFields) | **PUT** /beta/vendor/customFields | Update a vendor custom fields
# **addVendor**
> Vendor addVendor(body)
Create a vendor
Inserts a new vendor 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.VendorApi();
var body = new infoplus.Vendor(); // Vendor | Vendor to be inserted.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.addVendor(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Vendor**](Vendor.md)| Vendor to be inserted. |
### Return type
[**Vendor**](Vendor.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
# **addVendorAudit**
> addVendorAudit(vendorId, vendorAudit)
Add new audit for a vendor
Adds an audit to an existing vendor.
### 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.VendorApi();
var vendorId = 56; // Number | Id of the vendor to add an audit to
var vendorAudit = "vendorAudit_example"; // String | The audit to add
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addVendorAudit(vendorId, vendorAudit, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**vendorId** | **Number**| Id of the vendor to add an audit to |
**vendorAudit** | **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
# **addVendorFile**
> addVendorFile(vendorId, fileName)
Attach a file to a vendor
Adds a file to an existing vendor.
### 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.VendorApi();
var vendorId = 56; // Number | Id of the vendor 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.addVendorFile(vendorId, fileName, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**vendorId** | **Number**| Id of the vendor 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
# **addVendorFileByURL**
> addVendorFileByURL(body, vendorId)
Attach a file to a vendor by URL.
Adds a file to an existing vendor 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.VendorApi();
var body = new infoplus.RecordFile(); // RecordFile | The url and optionly fileName to be used.
var vendorId = 56; // Number | Id of the vendor to add an file to
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addVendorFileByURL(body, vendorId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**RecordFile**](RecordFile.md)| The url and optionly fileName to be used. |
**vendorId** | **Number**| Id of the vendor 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
# **addVendorTag**
> addVendorTag(vendorId, vendorTag)
Add new tags for a vendor.
Adds a tag to an existing vendor.
### 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.VendorApi();
var vendorId = 56; // Number | Id of the vendor to add a tag to
var vendorTag = "vendorTag_example"; // String | The tag to add
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addVendorTag(vendorId, vendorTag, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**vendorId** | **Number**| Id of the vendor to add a tag to |
**vendorTag** | **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
# **deleteVendor**
> deleteVendor(vendorId)
Delete a vendor
Deletes the vendor 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.VendorApi();
var vendorId = 56; // Number | Id of the vendor to be deleted.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteVendor(vendorId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**vendorId** | **Number**| Id of the vendor 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
# **deleteVendorFile**
> deleteVendorFile(vendorId, fileId)
Delete a file for a vendor.
Deletes an existing vendor 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.VendorApi();
var vendorId = 56; // Number | Id of the vendor 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.deleteVendorFile(vendorId, fileId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**vendorId** | **Number**| Id of the vendor 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
# **deleteVendorTag**
> deleteVendorTag(vendorId, vendorTag)
Delete a tag for a vendor.
Deletes an existing vendor 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.VendorApi();
var vendorId = 56; // Number | Id of the vendor to remove tag from
var vendorTag = "vendorTag_example"; // String | The tag to delete
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteVendorTag(vendorId, vendorTag, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**vendorId** | **Number**| Id of the vendor to remove tag from |
**vendorTag** | **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
# **getDuplicateVendorById**
> Vendor getDuplicateVendorById(vendorId)
Get a duplicated a vendor by id
Returns a duplicated vendor 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.VendorApi();
var vendorId = 56; // Number | Id of the vendor to be duplicated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getDuplicateVendorById(vendorId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**vendorId** | **Number**| Id of the vendor to be duplicated. |
### Return type
[**Vendor**](Vendor.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **getVendorByFilter**
> [Vendor] getVendorByFilter(opts)
Search vendors by filter
Returns the list of vendors 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.VendorApi();
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.getVendorByFilter(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
[**[Vendor]**](Vendor.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **getVendorById**
> Vendor getVendorById(vendorId)
Get a vendor by id
Returns the vendor 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.VendorApi();
var vendorId = 56; // Number | Id of the vendor to be returned.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getVendorById(vendorId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**vendorId** | **Number**| Id of the vendor to be returned. |
### Return type
[**Vendor**](Vendor.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **getVendorFiles**
> getVendorFiles(vendorId)
Get the files for a vendor.
Get all existing vendor 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.VendorApi();
var vendorId = 56; // Number | Id of the vendor to get files for
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.getVendorFiles(vendorId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**vendorId** | **Number**| Id of the vendor 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
# **getVendorTags**
> getVendorTags(vendorId)
Get the tags for a vendor.
Get all existing vendor 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.VendorApi();
var vendorId = 56; // Number | Id of the vendor to get tags for
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.getVendorTags(vendorId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**vendorId** | **Number**| Id of the vendor 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
# **updateVendor**
> updateVendor(body)
Update a vendor
Updates an existing vendor 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.VendorApi();
var body = new infoplus.Vendor(); // Vendor | Vendor to be updated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.updateVendor(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Vendor**](Vendor.md)| Vendor 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
# **updateVendorCustomFields**
> updateVendorCustomFields(body)
Update a vendor custom fields
Updates an existing vendor 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.VendorApi();
var body = new infoplus.Vendor(); // Vendor | Vendor to be updated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.updateVendorCustomFields(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Vendor**](Vendor.md)| Vendor 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