[
https://issues.apache.org/jira/browse/FINERACT-1912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17750222#comment-17750222
]
Peter Santa commented on FINERACT-1912:
---------------------------------------
Márta Jankovics yesterday
GET \{{url}}/savingsaccounts/<savings id>/transactions/search?<query parameters>
query parameters:
* fromDate: date String formatted by “dateFormat“
transaction_date GTE
* toDate: date String formatted by “dateFormat“
transaction_date LTE
* fromSubmittedDate: date String formatted by “dateFormat“
submitted_on_date GTE
* toSubmittedDate: date String formatted by “dateFormat“
submitted_on_date LTE
* fromAmount: decimal
amount GTE
* toAmount: decimal
amount LTE
* types: “,“ concatenated list of transaction type identifiers ({{{}DEPOSIT:
1, WITHDRAWAL: 2, WITHDRAWAL_FEE: 4{}}})
{{transaction_type_enum}} IN
* credit: boolean
if true, then only the CREDIT type transactions are returned
({{{}transaction_type_enum{}}} IN); false and null values are the same
* debit: boolean
if true, then only the DEBIT type transactions are returned
({{{}transaction_type_enum{}}} IN); false and null values are the same
paging parameters:
* offset: 0 based page number
* limit: page size
* orderBy: “,“ concatenated list of transaction table column names (camel case
supported)
default: created_at DESC, transaction_date DESC, id DESC
* sortOrder: ASC or DESC, default: DESC
other parameters:
* locale: language or full locale, default: tenant locale, case-sensitive
* dateFormat: date format pattern, default: ISO pattern {{{}yyyy-MM-dd{}}},
case-insensitive
All the parameters are optional.
Example:
{\{url}}/savingsaccounts/1/transactions/search?fromDate=26 May 2023&toDate=30
May 2023&fromSubmittedDate=20 May 2023&toSubmittedDate=30 May
2023&fromAmount=1200.12&toAmount=2000&types=1,2,4&credit=true&offset=0&limit=100&orderBy=transactionDate&sortOrder=ASC&locale=en&dateFormat=dd
MMM yyyy
Response: Page<SavingsAccountTransactionData> (SavingsAccountTransactionData is
the same as for GET \{{url}}/savingsaccounts/<savings id>/transactions, GET
\{{url}}/savingsaccounts/<savings id>/transactions/<transaction id>)
> Transaction query - Advanced
> ----------------------------
>
> Key: FINERACT-1912
> URL: https://issues.apache.org/jira/browse/FINERACT-1912
> Project: Apache Fineract
> Issue Type: New Feature
> Components: Savings
> Reporter: Peter Santa
> Assignee: James Dailey
> Priority: Critical
> Labels: BeanSalad
>
> h1. Background
> Currently transactions of a Saving Account cannot be filtered - either all of
> them are in the response (using ...?associations=all), or none of them.
> Pagination and sorting is not supported.
> h1. Goal
> For Transactions related to - at least - Savings Account, support having:
> * pagination - following the concept in Fineract, implemented already for
> other entities
> * sorting - following the concept in Fineract, implemented already for other
> entities
> ** by ID - default
> ** by transaction.date - system time or business date specified by Fineract,
> when the transaction has been inserted
> ** by submittedOnDate - the date, specified in the REST request when
> initiating the transaction
> * filtering for
> ** transaction date:
> *** greather-than-or-equal
> *** less-than-or-equal
> ** amount
> *** greather-than-or-equal
> *** less-than-or-equal
> ** deposit/withdraw
> ** externalId - if FINERACT-1760 is already implemented
> The filtering parameters should be applied with "AND" relation.
> The response should have the transaction details on a similar way, as it is
> in the transactions array of:
> {{{}<url>{}}}{color:#212121}/savingsaccounts/<{color}{{{}account_id>{}}}{color:#212121}?associations=all{color}
> h1. Solution Concept
> Have the solution concept aligned between
> * FINERACT-1910
> * FINERACT-1912
> * FINERACT-1915
> The API should support passing the required parameters.
> <Solution Concept to be extended by developers>
>
> Swagger:
> [https://webapp.ps.mifos.io/fineract-provider/swagger-ui/index.html#/Savings%20Account%20Transactions/searchTransactions]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)