-
Notifications
You must be signed in to change notification settings - Fork 2
GetCountTransactionsBy
Arivetti edited this page Aug 8, 2025
·
3 revisions
The GetCountTransactionsBy method returns the total transaction counts based on the query you've sent, and it's details of transaction lines count with their IDs.
| Parameter | Type | Description |
|---|---|---|
| token | String | The session token retrieved during authentication. |
| query | WSGetTransactionsByQuery | This contains the filter and details of your query. |
The query itself follows this structure WSGetTransactionsByQuery with the following members:
| Name | Type | Description | Mandatory |
|---|---|---|---|
| FromDate | DateTime | Any transaction must have a transaction date after to this date if given (inclusive). | No |
| ToDate | DateTime | Any transaction must have a transaction date before to this date if given (inclusive). | No |
| FromCreationDate | DateTime | Any transaction must have a creation date after to this date if given (inclusive). | No |
| ToCreationDate | DateTime | Any transaction must have a creation date before to this date if given (inclusive). | No |
| Skip | Integer | Number of rows to skip. | No |
| TypesFilter | String[] | Limits the result set to transactions with a type in the provided list. See TransactionTypes for the list of all transaction types. | No |
| AccountIDsFilter | Int32[] | Limits the result set to transactions linked to the account IDs (customer or supplier IDs). | No |
| TransactionIDsFilter | Int32[] | Limits the result set to transactions linked to the transacion IDs. | No |
| DepartmentIDsFilter | String[] | Limits the result set to transactions having at least one line bearing any of the given department IDs. | No |
| FromPeriodDate | DateTime | Any transaction must have a period start date after to this date if given (inclusive). | No |
| ToPeriodDate | DateTime | Any transaction must have a period end date before to this date if given (inclusive). | No |
| ExcludeReconciliationInformation | Boolean | If true won't return transactions related to reconciliation process. | No |
Here is an example of a system requesting all transactions made between the 1st of September 2020 and the 20th of September 2020 with at least one of transaction bearing any of "GENERAL", "OFFICE" department IDs:
Integration ws = new Integration();
String auth = "";// See Authentication page for more
if( auth != null )
{
var query = new WSGetTransactionsByQuery()
{
FromDate = DateTime.Parse("2020-09-1"),
ToDate = DateTime.Parse("2020-09-20"),
DepartmentIDsFilter = new String[]{ "GENERAL", "OFFICE" }
};
var transactionsCountResult = ws.GetCountTransactionsBy(auth, query);
if( transactionsCountResult.Status == OperationStatus.Success )
{
Console.WriteLine(String.Format("Found a total of {0} transactions", transactionsCountResult.Result.TransactionsCount));
foreach(var transactionLinesCount in transactionsCountResult.Result.TransactionLinesCount)
{
Console.WriteLine(String.Format("Transaction ID [{0}] with a total of {1} lines.", transactionLinesCount.TransactionID, transactionLinesCount.LinesCount));
}
}
}