# infoplus.AsnApi
All URIs are relative to *https://kingsrook.localhost-testsubdomain1.infopluswms.com:8443/infoplus-wms/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addAsn**](AsnApi.md#addAsn) | **POST** /beta/asn | Create an asn
[**addAsnAudit**](AsnApi.md#addAsnAudit) | **PUT** /beta/asn/{asnId}/audit/{asnAudit} | Add new audit for an asn
[**addAsnFile**](AsnApi.md#addAsnFile) | **POST** /beta/asn/{asnId}/file/{fileName} | Attach a file to an asn
[**addAsnFileByURL**](AsnApi.md#addAsnFileByURL) | **POST** /beta/asn/{asnId}/file | Attach a file to an asn by URL.
[**addAsnTag**](AsnApi.md#addAsnTag) | **PUT** /beta/asn/{asnId}/tag/{asnTag} | Add new tags for an asn.
[**closeAsn**](AsnApi.md#closeAsn) | **POST** /beta/asn/closeAsn | Run the ClosePurchProcess process.
[**deleteAsn**](AsnApi.md#deleteAsn) | **DELETE** /beta/asn/{asnId} | Delete an asn
[**deleteAsnFile**](AsnApi.md#deleteAsnFile) | **DELETE** /beta/asn/{asnId}/file/{fileId} | Delete a file for an asn.
[**deleteAsnTag**](AsnApi.md#deleteAsnTag) | **DELETE** /beta/asn/{asnId}/tag/{asnTag} | Delete a tag for an asn.
[**getAsnByFilter**](AsnApi.md#getAsnByFilter) | **GET** /beta/asn/search | Search asns by filter
[**getAsnById**](AsnApi.md#getAsnById) | **GET** /beta/asn/{asnId} | Get an asn by id
[**getAsnFiles**](AsnApi.md#getAsnFiles) | **GET** /beta/asn/{asnId}/file | Get the files for an asn.
[**getAsnTags**](AsnApi.md#getAsnTags) | **GET** /beta/asn/{asnId}/tag | Get the tags for an asn.
[**getDuplicateAsnById**](AsnApi.md#getDuplicateAsnById) | **GET** /beta/asn/duplicate/{asnId} | Get a duplicated an asn by id
[**updateAsn**](AsnApi.md#updateAsn) | **PUT** /beta/asn | Update an asn
[**updateAsnCustomFields**](AsnApi.md#updateAsnCustomFields) | **PUT** /beta/asn/customFields | Update an asn custom fields
# **addAsn**
> Asn addAsn(body)
Create an asn
Inserts a new asn 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.AsnApi();
var body = new infoplus.Asn(); // Asn | Asn to be inserted.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.addAsn(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Asn**](Asn.md)| Asn to be inserted. |
### Return type
[**Asn**](Asn.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
# **addAsnAudit**
> addAsnAudit(asnId, asnAudit)
Add new audit for an asn
Adds an audit to an existing asn.
### 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.AsnApi();
var asnId = 56; // Number | Id of the asn to add an audit to
var asnAudit = "asnAudit_example"; // String | The audit to add
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addAsnAudit(asnId, asnAudit, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**asnId** | **Number**| Id of the asn to add an audit to |
**asnAudit** | **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
# **addAsnFile**
> addAsnFile(asnId, fileName)
Attach a file to an asn
Adds a file to an existing asn.
### 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.AsnApi();
var asnId = 56; // Number | Id of the asn 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.addAsnFile(asnId, fileName, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**asnId** | **Number**| Id of the asn 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
# **addAsnFileByURL**
> addAsnFileByURL(body, asnId)
Attach a file to an asn by URL.
Adds a file to an existing asn 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.AsnApi();
var body = new infoplus.RecordFile(); // RecordFile | The url and optionly fileName to be used.
var asnId = 56; // Number | Id of the asn to add an file to
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addAsnFileByURL(body, asnId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**RecordFile**](RecordFile.md)| The url and optionly fileName to be used. |
**asnId** | **Number**| Id of the asn 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
# **addAsnTag**
> addAsnTag(asnId, asnTag)
Add new tags for an asn.
Adds a tag to an existing asn.
### 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.AsnApi();
var asnId = 56; // Number | Id of the asn to add a tag to
var asnTag = "asnTag_example"; // String | The tag to add
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addAsnTag(asnId, asnTag, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**asnId** | **Number**| Id of the asn to add a tag to |
**asnTag** | **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
# **closeAsn**
> [ProcessOutputAPIModel] closeAsn(body)
Run the ClosePurchProcess process.
### 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.AsnApi();
var body = new infoplus.ClosePurchProcessInputAPIModel(); // ClosePurchProcessInputAPIModel | Input data for ClosePurchProcess process.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.closeAsn(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**ClosePurchProcessInputAPIModel**](ClosePurchProcessInputAPIModel.md)| Input data for ClosePurchProcess process. |
### Return type
[**[ProcessOutputAPIModel]**](ProcessOutputAPIModel.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **deleteAsn**
> deleteAsn(asnId)
Delete an asn
Deletes the asn 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.AsnApi();
var asnId = 56; // Number | Id of the asn to be deleted.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteAsn(asnId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**asnId** | **Number**| Id of the asn 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
# **deleteAsnFile**
> deleteAsnFile(asnId, fileId)
Delete a file for an asn.
Deletes an existing asn 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.AsnApi();
var asnId = 56; // Number | Id of the asn 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.deleteAsnFile(asnId, fileId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**asnId** | **Number**| Id of the asn 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
# **deleteAsnTag**
> deleteAsnTag(asnId, asnTag)
Delete a tag for an asn.
Deletes an existing asn 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.AsnApi();
var asnId = 56; // Number | Id of the asn to remove tag from
var asnTag = "asnTag_example"; // String | The tag to delete
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteAsnTag(asnId, asnTag, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**asnId** | **Number**| Id of the asn to remove tag from |
**asnTag** | **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
# **getAsnByFilter**
> [Asn] getAsnByFilter(opts)
Search asns by filter
Returns the list of asns 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.AsnApi();
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.getAsnByFilter(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
[**[Asn]**](Asn.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **getAsnById**
> Asn getAsnById(asnId)
Get an asn by id
Returns the asn 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.AsnApi();
var asnId = 56; // Number | Id of the asn to be returned.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getAsnById(asnId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**asnId** | **Number**| Id of the asn to be returned. |
### Return type
[**Asn**](Asn.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **getAsnFiles**
> getAsnFiles(asnId)
Get the files for an asn.
Get all existing asn 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.AsnApi();
var asnId = 56; // Number | Id of the asn to get files for
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.getAsnFiles(asnId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**asnId** | **Number**| Id of the asn 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
# **getAsnTags**
> getAsnTags(asnId)
Get the tags for an asn.
Get all existing asn 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.AsnApi();
var asnId = 56; // Number | Id of the asn to get tags for
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.getAsnTags(asnId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**asnId** | **Number**| Id of the asn 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
# **getDuplicateAsnById**
> Asn getDuplicateAsnById(asnId)
Get a duplicated an asn by id
Returns a duplicated asn 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.AsnApi();
var asnId = 56; // Number | Id of the asn to be duplicated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getDuplicateAsnById(asnId, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**asnId** | **Number**| Id of the asn to be duplicated. |
### Return type
[**Asn**](Asn.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **updateAsn**
> updateAsn(body)
Update an asn
Updates an existing asn 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.AsnApi();
var body = new infoplus.Asn(); // Asn | Asn to be updated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.updateAsn(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Asn**](Asn.md)| Asn 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
# **updateAsnCustomFields**
> updateAsnCustomFields(body)
Update an asn custom fields
Updates an existing asn 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.AsnApi();
var body = new infoplus.Asn(); // Asn | Asn to be updated.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.updateAsnCustomFields(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Asn**](Asn.md)| Asn 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