# CardsApi

All URIs are relative to *http://localhost:8889/api*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createAuthorizationHold**](#createauthorizationhold) | **POST** /cards/{cardReferenceToken}/authorizationholds | Create an authorization hold corresponding to a given card.|
|[**createCardTransaction**](#createcardtransaction) | **POST** /cards/{cardReferenceToken}/financialtransactions | Create a financial transaction corresponding to a given card|
|[**decreaseAuthorizationHold**](#decreaseauthorizationhold) | **POST** /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:decrease | Decreases the amount of an authorization hold. If the amount is greater or equal to the authorization hold amount, then the authorization hold is reversed.|
|[**getAccountBalances**](#getaccountbalances) | **GET** /cards/{cardReferenceToken}/balanceInquiry | Get account balances using card tokens|
|[**getAuthorizationHoldById**](#getauthorizationholdbyid) | **GET** /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId} | Get card authorization hold|
|[**getCardTransaction**](#getcardtransaction) | **GET** /cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId} | Get card transaction|
|[**increaseAuthorizationHold**](#increaseauthorizationhold) | **POST** /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId}:increase | Increase authorization hold amount|
|[**patchAuthorizationHold**](#patchauthorizationhold) | **PATCH** /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId} | Partially update an authorization hold|
|[**reverseAuthorizationHold**](#reverseauthorizationhold) | **DELETE** /cards/{cardReferenceToken}/authorizationholds/{authorizationHoldExternalReferenceId} | Reverse a card authorization hold.|
|[**reverseCardTransaction**](#reversecardtransaction) | **POST** /cards/{cardReferenceToken}/financialtransactions/{cardTransactionExternalReferenceId}:decrease | Reverse card transaction|

# **createAuthorizationHold**
> AuthorizationHold createAuthorizationHold(authorizationHold)


### Example

```typescript
import {
    CardsApi,
    Configuration,
    AuthorizationHold
} from './api';

const configuration = new Configuration();
const apiInstance = new CardsApi(configuration);

let cardReferenceToken: string; //The token used to externally identify the card. (default to undefined)
let authorizationHold: AuthorizationHold; //The authorization hold to be created.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.createAuthorizationHold(
    cardReferenceToken,
    authorizationHold,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **authorizationHold** | **AuthorizationHold**| The authorization hold to be created. | |
| **cardReferenceToken** | [**string**] | The token used to externally identify the card. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**AuthorizationHold**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | The card authorization hold was successfully created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | The card was not found. |  -  |
|**409** | Operation cannot be performed due to another pending operation that locked shared resources. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **createCardTransaction**
> CardTransactionOutput createCardTransaction(cardTransactionInput)


### Example

```typescript
import {
    CardsApi,
    Configuration,
    CardTransactionInput
} from './api';

const configuration = new Configuration();
const apiInstance = new CardsApi(configuration);

let cardReferenceToken: string; //The token used to externally identify the card. (default to undefined)
let cardTransactionInput: CardTransactionInput; //The financial transaction to be created.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.createCardTransaction(
    cardReferenceToken,
    cardTransactionInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **cardTransactionInput** | **CardTransactionInput**| The financial transaction to be created. | |
| **cardReferenceToken** | [**string**] | The token used to externally identify the card. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**CardTransactionOutput**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | The financial transaction was successfully created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | The card was not found. |  -  |
|**409** | Operation cannot be performed due to another pending operation that locked shared resources. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **decreaseAuthorizationHold**
> decreaseAuthorizationHold(authorizationHoldAmountAdjustmentRequest)


### Example

```typescript
import {
    CardsApi,
    Configuration,
    AuthorizationHoldAmountAdjustmentRequest
} from './api';

const configuration = new Configuration();
const apiInstance = new CardsApi(configuration);

let cardReferenceToken: string; //The token used to externally identify the card. (default to undefined)
let authorizationHoldExternalReferenceId: string; //The ID used to reference the authorization hold. (default to undefined)
let authorizationHoldAmountAdjustmentRequest: AuthorizationHoldAmountAdjustmentRequest; //Represents the information to decrease the amount of an authorization hold.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.decreaseAuthorizationHold(
    cardReferenceToken,
    authorizationHoldExternalReferenceId,
    authorizationHoldAmountAdjustmentRequest,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **authorizationHoldAmountAdjustmentRequest** | **AuthorizationHoldAmountAdjustmentRequest**| Represents the information to decrease the amount of an authorization hold. | |
| **cardReferenceToken** | [**string**] | The token used to externally identify the card. | defaults to undefined|
| **authorizationHoldExternalReferenceId** | [**string**] | The ID used to reference the authorization hold. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**204** | The authorization hold was successfully decreased. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | The card or the authorization hold was not found. |  -  |
|**409** | Operation cannot be performed due to another pending operation that locked shared resources. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getAccountBalances**
> AccountBalances getAccountBalances()


### Example

```typescript
import {
    CardsApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new CardsApi(configuration);

let cardReferenceToken: string; //The token used to externally identify the card. (default to undefined)

const { status, data } = await apiInstance.getAccountBalances(
    cardReferenceToken
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **cardReferenceToken** | [**string**] | The token used to externally identify the card. | defaults to undefined|


### Return type

**AccountBalances**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | The card\&#39;s account balances were returned. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getAuthorizationHoldById**
> GetAuthorizationHold getAuthorizationHoldById()


### Example

```typescript
import {
    CardsApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new CardsApi(configuration);

let cardReferenceToken: string; //The token used to externally identify the card. (default to undefined)
let authorizationHoldExternalReferenceId: string; //The ID used to reference the authorization hold. (default to undefined)

const { status, data } = await apiInstance.getAuthorizationHoldById(
    cardReferenceToken,
    authorizationHoldExternalReferenceId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **cardReferenceToken** | [**string**] | The token used to externally identify the card. | defaults to undefined|
| **authorizationHoldExternalReferenceId** | [**string**] | The ID used to reference the authorization hold. | defaults to undefined|


### Return type

**GetAuthorizationHold**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | The authorization hold has been returned. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | The card was not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getCardTransaction**
> GetCardTransaction getCardTransaction()


### Example

```typescript
import {
    CardsApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new CardsApi(configuration);

let cardReferenceToken: string; //The token used to externally identify the card. (default to undefined)
let cardTransactionExternalReferenceId: string; //The external reference of a card transaction used to identify the card transaction. (default to undefined)
let detailsLevel: 'BASIC' | 'FULL'; //The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. (optional) (default to undefined)

const { status, data } = await apiInstance.getCardTransaction(
    cardReferenceToken,
    cardTransactionExternalReferenceId,
    detailsLevel
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **cardReferenceToken** | [**string**] | The token used to externally identify the card. | defaults to undefined|
| **cardTransactionExternalReferenceId** | [**string**] | The external reference of a card transaction used to identify the card transaction. | defaults to undefined|
| **detailsLevel** | [**&#39;BASIC&#39; | &#39;FULL&#39;**]**Array<&#39;BASIC&#39; &#124; &#39;FULL&#39;>** | The level of details to return: &#x60;FULL&#x60; means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and &#x60;BASIC&#x60; will return only the first level elements of the object. | (optional) defaults to undefined|


### Return type

**GetCardTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | The card transaction has been returned. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | The card was not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **increaseAuthorizationHold**
> increaseAuthorizationHold(authorizationHoldAmountAdjustmentRequest)


### Example

```typescript
import {
    CardsApi,
    Configuration,
    AuthorizationHoldAmountAdjustmentRequest
} from './api';

const configuration = new Configuration();
const apiInstance = new CardsApi(configuration);

let cardReferenceToken: string; //The token used to externally identify the card. (default to undefined)
let authorizationHoldExternalReferenceId: string; //The ID used to reference the authorization hold. (default to undefined)
let authorizationHoldAmountAdjustmentRequest: AuthorizationHoldAmountAdjustmentRequest; //Represents the information to increase the amount of an authorization hold.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.increaseAuthorizationHold(
    cardReferenceToken,
    authorizationHoldExternalReferenceId,
    authorizationHoldAmountAdjustmentRequest,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **authorizationHoldAmountAdjustmentRequest** | **AuthorizationHoldAmountAdjustmentRequest**| Represents the information to increase the amount of an authorization hold. | |
| **cardReferenceToken** | [**string**] | The token used to externally identify the card. | defaults to undefined|
| **authorizationHoldExternalReferenceId** | [**string**] | The ID used to reference the authorization hold. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**204** | The authorization hold was successfully increased. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | The card or the authorization hold was not found. |  -  |
|**409** | Operation cannot be performed due to another pending operation that locked shared resources. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **patchAuthorizationHold**
> patchAuthorizationHold(patchOperation)


### Example

```typescript
import {
    CardsApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new CardsApi(configuration);

let cardReferenceToken: string; //The token used to externally identify the card. (default to undefined)
let authorizationHoldExternalReferenceId: string; //The ID used to reference the authorization hold. (default to undefined)
let patchOperation: Array<PatchOperation>; //Patch operations to be applied to a resource.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.patchAuthorizationHold(
    cardReferenceToken,
    authorizationHoldExternalReferenceId,
    patchOperation,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **patchOperation** | **Array<PatchOperation>**| Patch operations to be applied to a resource. | |
| **cardReferenceToken** | [**string**] | The token used to externally identify the card. | defaults to undefined|
| **authorizationHoldExternalReferenceId** | [**string**] | The ID used to reference the authorization hold. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**204** | The authorization hold has been updated. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | The card was not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **reverseAuthorizationHold**
> reverseAuthorizationHold()


### Example

```typescript
import {
    CardsApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new CardsApi(configuration);

let cardReferenceToken: string; //The token used to externally identify the card. (default to undefined)
let authorizationHoldExternalReferenceId: string; //The ID used to reference the authorization hold. (default to undefined)

const { status, data } = await apiInstance.reverseAuthorizationHold(
    cardReferenceToken,
    authorizationHoldExternalReferenceId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **cardReferenceToken** | [**string**] | The token used to externally identify the card. | defaults to undefined|
| **authorizationHoldExternalReferenceId** | [**string**] | The ID used to reference the authorization hold. | defaults to undefined|


### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**204** | The card authorization hold was successfully reversed. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | The card or the authorization hold was not found. |  -  |
|**409** | Operation cannot be performed due to another pending operation that locked shared resources. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **reverseCardTransaction**
> reverseCardTransaction(cardTransactionReversal)


### Example

```typescript
import {
    CardsApi,
    Configuration,
    CardTransactionReversal
} from './api';

const configuration = new Configuration();
const apiInstance = new CardsApi(configuration);

let cardReferenceToken: string; //The token used to externally identify the card. (default to undefined)
let cardTransactionExternalReferenceId: string; //The external reference of a card transaction used to identify the card transaction. (default to undefined)
let cardTransactionReversal: CardTransactionReversal; //The card transaction to be reversed.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.reverseCardTransaction(
    cardReferenceToken,
    cardTransactionExternalReferenceId,
    cardTransactionReversal,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **cardTransactionReversal** | **CardTransactionReversal**| The card transaction to be reversed. | |
| **cardReferenceToken** | [**string**] | The token used to externally identify the card. | defaults to undefined|
| **cardTransactionExternalReferenceId** | [**string**] | The external reference of a card transaction used to identify the card transaction. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**204** | The card transaction was reversed. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | The card was not found. |  -  |
|**409** | Operation cannot be performed due to another pending operation that locked shared resources. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

