# TinapiMinka.ActionApi

All URIs are relative to *https://achtin-tst.minka.io/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createAction**](ActionApi.md#createAction) | **POST** /action | Create an action
[**getActionByActionId**](ActionApi.md#getActionByActionId) | **GET** /action/{action_id} | Get an action by action_id
[**getActions**](ActionApi.md#getActions) | **GET** /action | Get Actions received
[**getPending**](ActionApi.md#getPending) | **GET** /action/unsigned | Get unsigned actions
[**signAction**](ActionApi.md#signAction) | **POST** /action/{actionid}/signed | Sign action
[**signOffline**](ActionApi.md#signOffline) | **POST** /action/{actionid}/sendit | Sign offline
[**updateActionLabels**](ActionApi.md#updateActionLabels) | **PUT** /action/{action_id} | Update labels of an action


<a name="createAction"></a>
# **createAction**
> CreateActionResponse createAction(createActionRequest)

Create an action

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.ActionApi();
var createActionRequest = new TinapiMinka.CreateActionRequest(); // CreateActionRequest | 
apiInstance.createAction(createActionRequest).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **createActionRequest** | [**CreateActionRequest**](CreateActionRequest.md)|  | 

### Return type

[**CreateActionResponse**](CreateActionResponse.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

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

<a name="getActionByActionId"></a>
# **getActionByActionId**
> GetActionResponse getActionByActionId(actionId)

Get an action by action_id

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.ActionApi();
var actionId = "actionId_example"; // String | 
apiInstance.getActionByActionId(actionId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **actionId** | **String**|  | 

### Return type

[**GetActionResponse**](GetActionResponse.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getActions"></a>
# **getActions**
> GetTransfersResponse getActions(customQuery)

Get Actions received

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.ActionApi();
var customQuery = "customQuery_example"; // String | 
apiInstance.getActions(customQuery).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **customQuery** | **String**|  | 

### Return type

[**GetTransfersResponse**](GetTransfersResponse.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getPending"></a>
# **getPending**
> [GetActionResponse] getPending(opts)

Get unsigned actions

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.ActionApi();
var opts = {
  'type': "type_example", // String | 
  'target': "target_example", // String | 
  'source': "source_example" // String | 
};
apiInstance.getPending(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **type** | **String**|  | [optional] 
 **target** | **String**|  | [optional] 
 **source** | **String**|  | [optional] 

### Return type

[**[GetActionResponse]**](GetActionResponse.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="signAction"></a>
# **signAction**
> ActionSigned signAction(actionid, opts)

Sign action

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.ActionApi();
var actionid = "actionid_example"; // String | 
var opts = {
  'actionSignedLabels': new TinapiMinka.ActionSignedLabels() // ActionSignedLabels | 
};
apiInstance.signAction(actionid, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **actionid** | **String**|  | 
 **actionSignedLabels** | [**ActionSignedLabels**](ActionSignedLabels.md)|  | [optional] 

### Return type

[**ActionSigned**](ActionSigned.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

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

<a name="signOffline"></a>
# **signOffline**
> ActionSigned signOffline(actionid, iouSigned)

Sign offline

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.ActionApi();
var actionid = "actionid_example"; // String | 
var iouSigned = new TinapiMinka.IouSigned(); // IouSigned | 
apiInstance.signOffline(actionid, iouSigned).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **actionid** | **String**|  | 
 **iouSigned** | [**IouSigned**](IouSigned.md)|  | 

### Return type

[**ActionSigned**](ActionSigned.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

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

<a name="updateActionLabels"></a>
# **updateActionLabels**
> GetActionResponse updateActionLabels(actionId, updateActionRequest)

Update labels of an action

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.ActionApi();
var actionId = "actionId_example"; // String | 
var updateActionRequest = new TinapiMinka.UpdateActionRequest(); // UpdateActionRequest | 
apiInstance.updateActionLabels(actionId, updateActionRequest).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **actionId** | **String**|  | 
 **updateActionRequest** | [**UpdateActionRequest**](UpdateActionRequest.md)|  | 

### Return type

[**GetActionResponse**](GetActionResponse.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

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

