# AccountingReportsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**create**](#create) | **POST** /accounting/reports | Create  accounting report|
|[**get**](#get) | **GET** /accounting/reports/{reportKey} | Get accounting reports|

# **create**
> AccountingReportGenerationResponse create(accountingReportGenerationInput)


### Example

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

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

let accountingReportGenerationInput: AccountingReportGenerationInput; //Represents information for creating an accounting report.
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.create(
    accountingReportGenerationInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **accountingReportGenerationInput** | **AccountingReportGenerationInput**| Represents information for creating an accounting report. | |
| **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

**AccountingReportGenerationResponse**

### 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. |  -  |
|**202** | Creation of the accounting report started. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Currency 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)

# **get**
> AccountingReport get()


### Example

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

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

let reportKey: string; //The report\'s encoded key. (default to undefined)

const { status, data } = await apiInstance.get(
    reportKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **reportKey** | [**string**] | The report\&#39;s encoded key. | defaults to undefined|


### Return type

**AccountingReport**

### 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 |
|-------------|-------------|------------------|
|**202** | The accounting report has been returned. |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Accounting report 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)

