# infoplus.LocationApi
All URIs are relative to *https://kingsrook.localhost-testsubdomain1.infopluswms.com:8443/infoplus-wms/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addLocation**](LocationApi.md#addLocation) | **POST** /beta/location | Create a location
[**addLocationAudit**](LocationApi.md#addLocationAudit) | **PUT** /beta/location/{locationId}/audit/{locationAudit} | Add new audit for a location
[**addLocationFile**](LocationApi.md#addLocationFile) | **POST** /beta/location/{locationId}/file/{fileName} | Attach a file to a location
[**addLocationFileByURL**](LocationApi.md#addLocationFileByURL) | **POST** /beta/location/{locationId}/file | Attach a file to a location by URL.
[**addLocationTag**](LocationApi.md#addLocationTag) | **PUT** /beta/location/{locationId}/tag/{locationTag} | Add new tags for a location.
[**deleteLocation**](LocationApi.md#deleteLocation) | **DELETE** /beta/location/{locationId} | Delete a location
[**deleteLocationFile**](LocationApi.md#deleteLocationFile) | **DELETE** /beta/location/{locationId}/file/{fileId} | Delete a file for a location.
[**deleteLocationTag**](LocationApi.md#deleteLocationTag) | **DELETE** /beta/location/{locationId}/tag/{locationTag} | Delete a tag for a location.
[**getDuplicateLocationById**](LocationApi.md#getDuplicateLocationById) | **GET** /beta/location/duplicate/{locationId} | Get a duplicated a location by id
[**getLocationByFilter**](LocationApi.md#getLocationByFilter) | **GET** /beta/location/search | Search locations by filter
[**getLocationById**](LocationApi.md#getLocationById) | **GET** /beta/location/{locationId} | Get a location by id
[**getLocationFiles**](LocationApi.md#getLocationFiles) | **GET** /beta/location/{locationId}/file | Get the files for a location.
[**getLocationTags**](LocationApi.md#getLocationTags) | **GET** /beta/location/{locationId}/tag | Get the tags for a location.
[**updateLocation**](LocationApi.md#updateLocation) | **PUT** /beta/location | Update a location
[**updateLocationCustomFields**](LocationApi.md#updateLocationCustomFields) | **PUT** /beta/location/customFields | Update a location custom fields
# **addLocation**
> Location addLocation(body)
Create a location
Inserts a new location 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.LocationApi();
var body = new infoplus.Location(); // Location | Location to be inserted.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.addLocation(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Location**](Location.md)| Location to be inserted. |
### Return type
[**Location**](Location.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
# **addLocationAudit**
> addLocationAudit(locationId, locationAudit)
Add new audit for a location
Adds an audit to an existing location.
### 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.LocationApi();
var locationId = 56; // Number | Id of the location to add an audit to
var locationAudit = "locationAudit_example"; // String | The audit to add
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addLocationAudit(locationId, locationAudit, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**locationId** | **Number**| Id of the location to add an audit to |
**locationAudit** | **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
# **addLocationFile**
> addLocationFile(locationId, fileName)
Attach a file to a location
Adds a file to an existing location.
### 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.LocationApi();
var locationId = 56; // Number | Id of the location 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.addLocationFile(locationId, fileName, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**locationId** | **Number**| Id of the location 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
# **addLocationFileByURL**
> addLocationFileByURL(body, locationId)
Attach a file to a location by URL.
Adds a file to an existing location 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.LocationApi();
var body = new infoplus.RecordFile(); // RecordFile | The url and optionly fileName to be used.
var locationId = 56; // Number | Id of the location to add an file to
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addLocationFileByURL(body, locationId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**RecordFile**](RecordFile.md)| The url and optionly fileName to be used. |
**locationId** | **Number**| Id of the location 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
# **addLocationTag**
> addLocationTag(locationId, locationTag)
Add new tags for a location.
Adds a tag to an existing location.
### 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.LocationApi();
var locationId = 56; // Number | Id of the location to add a tag to
var locationTag = "locationTag_example"; // String | The tag to add
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addLocationTag(locationId, locationTag, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**locationId** | **Number**| Id of the location to add a tag to |
**locationTag** | **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
# **deleteLocation**
> deleteLocation(locationId)
Delete a location
Deletes the location 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.LocationApi();
var locationId = 56; // Number | Id of the location to be deleted.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteLocation(locationId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**locationId** | **Number**| Id of the location 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
# **deleteLocationFile**
> deleteLocationFile(locationId, fileId)
Delete a file for a location.
Deletes an existing location 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.LocationApi();
var locationId = 56; // Number | Id of the location 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.deleteLocationFile(locationId, fileId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**locationId** | **Number**| Id of the location 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
# **deleteLocationTag**
> deleteLocationTag(locationId, locationTag)
Delete a tag for a location.
Deletes an existing location 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.LocationApi();
var locationId = 56; // Number | Id of the location to remove tag from
var locationTag = "locationTag_example"; // String | The tag to delete
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteLocationTag(locationId, locationTag, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**locationId** | **Number**| Id of the location to remove tag from |
**locationTag** | **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
# **getDuplicateLocationById**
> Location getDuplicateLocationById(locationId)
Get a duplicated a location by id
Returns a duplicated location 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.LocationApi();
var locationId = 56; // Number | Id of the location to be duplicated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getDuplicateLocationById(locationId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**locationId** | **Number**| Id of the location to be duplicated. |
### Return type
[**Location**](Location.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **getLocationByFilter**
> [Location] getLocationByFilter(opts)
Search locations by filter
Returns the list of locations 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.LocationApi();
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.getLocationByFilter(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
[**[Location]**](Location.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **getLocationById**
> Location getLocationById(locationId)
Get a location by id
Returns the location 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.LocationApi();
var locationId = 56; // Number | Id of the location to be returned.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getLocationById(locationId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**locationId** | **Number**| Id of the location to be returned. |
### Return type
[**Location**](Location.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **getLocationFiles**
> getLocationFiles(locationId)
Get the files for a location.
Get all existing location 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.LocationApi();
var locationId = 56; // Number | Id of the location to get files for
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.getLocationFiles(locationId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**locationId** | **Number**| Id of the location 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
# **getLocationTags**
> getLocationTags(locationId)
Get the tags for a location.
Get all existing location 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.LocationApi();
var locationId = 56; // Number | Id of the location to get tags for
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.getLocationTags(locationId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**locationId** | **Number**| Id of the location 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
# **updateLocation**
> updateLocation(body)
Update a location
Updates an existing location 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.LocationApi();
var body = new infoplus.Location(); // Location | Location to be updated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.updateLocation(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Location**](Location.md)| Location 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
# **updateLocationCustomFields**
> updateLocationCustomFields(body)
Update a location custom fields
Updates an existing location 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.LocationApi();
var body = new infoplus.Location(); // Location | Location to be updated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.updateLocationCustomFields(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Location**](Location.md)| Location 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