# infoplus.WorkBatchApi
All URIs are relative to *https://kingsrook.localhost-testsubdomain1.infopluswms.com:8443/infoplus-wms/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addWorkBatchAudit**](WorkBatchApi.md#addWorkBatchAudit) | **PUT** /beta/workBatch/{workBatchId}/audit/{workBatchAudit} | Add new audit for a workBatch
[**addWorkBatchFile**](WorkBatchApi.md#addWorkBatchFile) | **POST** /beta/workBatch/{workBatchId}/file/{fileName} | Attach a file to a workBatch
[**addWorkBatchFileByURL**](WorkBatchApi.md#addWorkBatchFileByURL) | **POST** /beta/workBatch/{workBatchId}/file | Attach a file to a workBatch by URL.
[**addWorkBatchTag**](WorkBatchApi.md#addWorkBatchTag) | **PUT** /beta/workBatch/{workBatchId}/tag/{workBatchTag} | Add new tags for a workBatch.
[**deleteWorkBatchFile**](WorkBatchApi.md#deleteWorkBatchFile) | **DELETE** /beta/workBatch/{workBatchId}/file/{fileId} | Delete a file for a workBatch.
[**deleteWorkBatchTag**](WorkBatchApi.md#deleteWorkBatchTag) | **DELETE** /beta/workBatch/{workBatchId}/tag/{workBatchTag} | Delete a tag for a workBatch.
[**getDuplicateWorkBatchById**](WorkBatchApi.md#getDuplicateWorkBatchById) | **GET** /beta/workBatch/duplicate/{workBatchId} | Get a duplicated a workBatch by id
[**getWorkBatchByFilter**](WorkBatchApi.md#getWorkBatchByFilter) | **GET** /beta/workBatch/search | Search workBatchs by filter
[**getWorkBatchById**](WorkBatchApi.md#getWorkBatchById) | **GET** /beta/workBatch/{workBatchId} | Get a workBatch by id
[**getWorkBatchFiles**](WorkBatchApi.md#getWorkBatchFiles) | **GET** /beta/workBatch/{workBatchId}/file | Get the files for a workBatch.
[**getWorkBatchTags**](WorkBatchApi.md#getWorkBatchTags) | **GET** /beta/workBatch/{workBatchId}/tag | Get the tags for a workBatch.
[**updateWorkBatch**](WorkBatchApi.md#updateWorkBatch) | **PUT** /beta/workBatch | Update a workBatch
[**updateWorkBatchCustomFields**](WorkBatchApi.md#updateWorkBatchCustomFields) | **PUT** /beta/workBatch/customFields | Update a workBatch custom fields
# **addWorkBatchAudit**
> addWorkBatchAudit(workBatchId, workBatchAudit)
Add new audit for a workBatch
Adds an audit to an existing workBatch.
### 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.WorkBatchApi();
var workBatchId = 56; // Number | Id of the workBatch to add an audit to
var workBatchAudit = "workBatchAudit_example"; // String | The audit to add
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addWorkBatchAudit(workBatchId, workBatchAudit, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workBatchId** | **Number**| Id of the workBatch to add an audit to |
**workBatchAudit** | **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
# **addWorkBatchFile**
> addWorkBatchFile(workBatchId, fileName)
Attach a file to a workBatch
Adds a file to an existing workBatch.
### 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.WorkBatchApi();
var workBatchId = 56; // Number | Id of the workBatch 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.addWorkBatchFile(workBatchId, fileName, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workBatchId** | **Number**| Id of the workBatch 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
# **addWorkBatchFileByURL**
> addWorkBatchFileByURL(body, workBatchId)
Attach a file to a workBatch by URL.
Adds a file to an existing workBatch 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.WorkBatchApi();
var body = new infoplus.RecordFile(); // RecordFile | The url and optionly fileName to be used.
var workBatchId = 56; // Number | Id of the workBatch to add an file to
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addWorkBatchFileByURL(body, workBatchId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**RecordFile**](RecordFile.md)| The url and optionly fileName to be used. |
**workBatchId** | **Number**| Id of the workBatch 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
# **addWorkBatchTag**
> addWorkBatchTag(workBatchId, workBatchTag)
Add new tags for a workBatch.
Adds a tag to an existing workBatch.
### 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.WorkBatchApi();
var workBatchId = 56; // Number | Id of the workBatch to add a tag to
var workBatchTag = "workBatchTag_example"; // String | The tag to add
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addWorkBatchTag(workBatchId, workBatchTag, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workBatchId** | **Number**| Id of the workBatch to add a tag to |
**workBatchTag** | **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
# **deleteWorkBatchFile**
> deleteWorkBatchFile(workBatchId, fileId)
Delete a file for a workBatch.
Deletes an existing workBatch 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.WorkBatchApi();
var workBatchId = 56; // Number | Id of the workBatch 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.deleteWorkBatchFile(workBatchId, fileId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workBatchId** | **Number**| Id of the workBatch 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
# **deleteWorkBatchTag**
> deleteWorkBatchTag(workBatchId, workBatchTag)
Delete a tag for a workBatch.
Deletes an existing workBatch 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.WorkBatchApi();
var workBatchId = 56; // Number | Id of the workBatch to remove tag from
var workBatchTag = "workBatchTag_example"; // String | The tag to delete
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteWorkBatchTag(workBatchId, workBatchTag, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workBatchId** | **Number**| Id of the workBatch to remove tag from |
**workBatchTag** | **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
# **getDuplicateWorkBatchById**
> WorkBatch getDuplicateWorkBatchById(workBatchId)
Get a duplicated a workBatch by id
Returns a duplicated workBatch 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.WorkBatchApi();
var workBatchId = 56; // Number | Id of the workBatch to be duplicated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getDuplicateWorkBatchById(workBatchId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workBatchId** | **Number**| Id of the workBatch to be duplicated. |
### Return type
[**WorkBatch**](WorkBatch.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **getWorkBatchByFilter**
> [WorkBatch] getWorkBatchByFilter(opts)
Search workBatchs by filter
Returns the list of workBatchs 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.WorkBatchApi();
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.getWorkBatchByFilter(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
[**[WorkBatch]**](WorkBatch.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **getWorkBatchById**
> WorkBatch getWorkBatchById(workBatchId)
Get a workBatch by id
Returns the workBatch 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.WorkBatchApi();
var workBatchId = 56; // Number | Id of the workBatch to be returned.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getWorkBatchById(workBatchId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workBatchId** | **Number**| Id of the workBatch to be returned. |
### Return type
[**WorkBatch**](WorkBatch.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **getWorkBatchFiles**
> getWorkBatchFiles(workBatchId)
Get the files for a workBatch.
Get all existing workBatch 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.WorkBatchApi();
var workBatchId = 56; // Number | Id of the workBatch to get files for
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.getWorkBatchFiles(workBatchId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workBatchId** | **Number**| Id of the workBatch 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
# **getWorkBatchTags**
> getWorkBatchTags(workBatchId)
Get the tags for a workBatch.
Get all existing workBatch 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.WorkBatchApi();
var workBatchId = 56; // Number | Id of the workBatch to get tags for
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.getWorkBatchTags(workBatchId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**workBatchId** | **Number**| Id of the workBatch 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
# **updateWorkBatch**
> updateWorkBatch(body)
Update a workBatch
Updates an existing workBatch 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.WorkBatchApi();
var body = new infoplus.WorkBatch(); // WorkBatch | WorkBatch to be updated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.updateWorkBatch(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**WorkBatch**](WorkBatch.md)| WorkBatch 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
# **updateWorkBatchCustomFields**
> updateWorkBatchCustomFields(body)
Update a workBatch custom fields
Updates an existing workBatch 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.WorkBatchApi();
var body = new infoplus.WorkBatch(); // WorkBatch | WorkBatch to be updated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.updateWorkBatchCustomFields(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**WorkBatch**](WorkBatch.md)| WorkBatch 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