# JournalEntriesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**create**](#create) | **POST** /gljournalentries | Create general ledger journal entries.|
|[**getAll**](#getall) | **GET** /gljournalentries | Get general ledger journal entries|
|[**search**](#search) | **POST** /gljournalentries:search | Search for general ledger journal entries|

# **create**
> Array<GLJournalEntry> create(postGLJournalEntriesDTO)


### Example

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

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

let postGLJournalEntriesDTO: PostGLJournalEntriesDTO; //Represents the information to create general ledger journal entries.
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(
    postGLJournalEntriesDTO,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **postGLJournalEntriesDTO** | **PostGLJournalEntriesDTO**| Represents the information to create general ledger journal entries. | |
| **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

**Array<GLJournalEntry>**

### 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** | General ledger journal entries have been created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

[[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)

# **getAll**
> Array<GLJournalEntry> getAll()


### Example

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

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

let from: string; //The booking date to search from for general ledger journal entries. (default to undefined)
let to: string; //The booking date to search to for general ledger journal entries. (default to undefined)
let offset: number; //Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results (optional) (default to undefined)
let limit: number; //Pagination, the number of elements to retrieve, used in combination with offset to paginate results (optional) (default to undefined)
let paginationDetails: 'ON' | 'OFF'; //Flag specifying whether the pagination  details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs (optional) (default to 'OFF')
let branchId: string; //The branch ID to filter general ledger journal entries by. (optional) (default to undefined)
let glAccountId: string; //The general ledger account ID to filter general ledger journal entries by. (optional) (default to undefined)

const { status, data } = await apiInstance.getAll(
    from,
    to,
    offset,
    limit,
    paginationDetails,
    branchId,
    glAccountId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **from** | [**string**] | The booking date to search from for general ledger journal entries. | defaults to undefined|
| **to** | [**string**] | The booking date to search to for general ledger journal entries. | defaults to undefined|
| **offset** | [**number**] | Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results | (optional) defaults to undefined|
| **limit** | [**number**] | Pagination, the number of elements to retrieve, used in combination with offset to paginate results | (optional) defaults to undefined|
| **paginationDetails** | [**&#39;ON&#39; | &#39;OFF&#39;**]**Array<&#39;ON&#39; &#124; &#39;OFF&#39;>** | Flag specifying whether the pagination  details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs | (optional) defaults to 'OFF'|
| **branchId** | [**string**] | The branch ID to filter general ledger journal entries by. | (optional) defaults to undefined|
| **glAccountId** | [**string**] | The general ledger account ID to filter general ledger journal entries by. | (optional) defaults to undefined|


### Return type

**Array<GLJournalEntry>**

### 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** | General ledger journal entries list returned. |  * Items-Limit - Pagination details, the requested page size <br>  * Items-Offset - Pagination details, the index of the first returned item <br>  * Items-Total - Pagination details, the total available items <br>  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

[[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)

# **search**
> Array<GLJournalEntry> search(gLJournalEntrySearchCriteria)


### Example

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

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

let gLJournalEntrySearchCriteria: GLJournalEntrySearchCriteria; //Represents the filtering criteria and sorting criterion to search for general ledger journal entries.
let offset: number; //Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results (optional) (default to undefined)
let limit: number; //Pagination, the number of elements to retrieve, used in combination with offset to paginate results (optional) (default to undefined)
let paginationDetails: 'ON' | 'OFF'; //Flag specifying whether the pagination  details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs (optional) (default to 'OFF')
let cursor: string; //Pagination, cursor to start searching at when retrieving elements, used in combination with limit to paginate results (optional) (default to undefined)

const { status, data } = await apiInstance.search(
    gLJournalEntrySearchCriteria,
    offset,
    limit,
    paginationDetails,
    cursor
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **gLJournalEntrySearchCriteria** | **GLJournalEntrySearchCriteria**| Represents the filtering criteria and sorting criterion to search for general ledger journal entries. | |
| **offset** | [**number**] | Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results | (optional) defaults to undefined|
| **limit** | [**number**] | Pagination, the number of elements to retrieve, used in combination with offset to paginate results | (optional) defaults to undefined|
| **paginationDetails** | [**&#39;ON&#39; | &#39;OFF&#39;**]**Array<&#39;ON&#39; &#124; &#39;OFF&#39;>** | Flag specifying whether the pagination  details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs | (optional) defaults to 'OFF'|
| **cursor** | [**string**] | Pagination, cursor to start searching at when retrieving elements, used in combination with limit to paginate results | (optional) defaults to undefined|


### Return type

**Array<GLJournalEntry>**

### 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 |
|-------------|-------------|------------------|
|**200** | The general ledger journal entry search returned values. |  * Items-Limit - Pagination details, the requested page size <br>  * Items-Next-Cursor - The next cursor to be used by the subsequent calls <br>  * Items-Offset - Pagination details, the index of the first returned item <br>  * Items-Total - Pagination details, the total available items <br>  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

[[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)

