Find counting values for card Suppose you want to know the number of cash withdrawals in the current period, use the get-aggregated-data API endpoint.
Use case
In this example, we will get the current counting value of an assigned counting group for a particular card.
Use case data
API parameters with values
Search for aggregation data of
transaction grouping MONTHLY_WITHDRAWAL_COUNT
and
transactionGroupingCode=MONTHLY_WITHDRAWAL_COUNT
related to card C001692281754
Sample API call
To retrieve the current counting value of an assigned counting group for a particular card, make the following API call.
Sample request
Below is an example request of the API call to retrieve the current counting value of an assigned counting group for a particular card.
cURL
Copy curl --location 'https://card-api.sandbox.tuumplatform.com/api/v1/get-aggregation-data?transactionGroupingCode=MONTHLY_WITHDRAWAL_COUNT&cardId=C001692281754' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiTGlpdmEgS2FzdCIsImVtcGxveWVlSWQiOiJJRC0xMjU4IiwidGVuYW50Q29kZSI6Ik1CLkVVIiwiZXhwaXJ5RFRpbWUiOiIyMDI1LTAzLTA2VDEwOjI3OjMzIiwiZXhwIjoxNzQxMjU2ODUzLCJyb2xlcyI6WyJGVUxMX0NBUkRfTUFOQUdFTUVOVCIsIlNZU1RFTSJdfQ.RcQOv2L6IwWbOQ4EJ7n_we68x0JQz0nLFHinCjV-hwU'
Sample response
Below you find an example response body to the API call above.
Response
Copy {
"errors": null,
"validationErrors": null,
"data": {
"accountId": null,
"cardId": "C001692281754",
"transactionGroupingCode": "MONTHLY_WITHDRAWAL_COUNT",
"currentTransactionAmount": {
"amount": 0,
"currencyCode": "EUR"
},
"currentTransactionCount": 3,
"lastActualDate": "2030-10-19",
"aggregationEvents": [
{
"directionCode": "IN",
"transactionAmount": {
"amount": 50,
"currencyCode": "EUR"
},
"source": {
"sourceName": "CARD.CARD_TRANSACTION",
"sourceRef": "C001692280512"
},
"postingDate": "2030-10-17"
},
{
"directionCode": "IN",
"transactionAmount": {
"amount": 150,
"currencyCode": "EUR"
},
"source": {
"sourceName": "CARD.CARD_TRANSACTION",
"sourceRef": "C001692280513"
},
"postingDate": "2030-10-17"
},
{
"directionCode": "IN",
"transactionAmount": {
"amount": 50,
"currencyCode": "EUR"
},
"source": {
"sourceName": "CARD.CARD_TRANSACTION",
"sourceRef": "C001692280514"
},
"postingDate": "2030-10-17"
},
{
"directionCode": "IN",
"transactionAmount": {
"amount": 150,
"currencyCode": "EUR"
},
"source": {
"sourceName": "CARD.CARD_TRANSACTION",
"sourceRef": "C001692280515"
},
"postingDate": "2030-10-17"
},
{
"directionCode": "OUT",
"transactionAmount": {
"amount": 50,
"currencyCode": "EUR"
},
"source": {
"sourceName": "CARD.CARD_TRANSACTION",
"sourceRef": "C001692280512"
},
"postingDate": "2030-10-17"
},
{
"directionCode": "IN",
"transactionAmount": {
"amount": 15,
"currencyCode": "EUR"
},
"source": {
"sourceName": "CARD.CARD_TRANSACTION",
"sourceRef": "C001692280516"
},
"postingDate": "2030-10-17"
},
{
"directionCode": "OUT",
"transactionAmount": {
"amount": 15,
"currencyCode": "EUR"
},
"source": {
"sourceName": "CARD.CARD_TRANSACTION",
"sourceRef": "C001692280516"
},
"postingDate": "2030-10-19"
}
]
}
}
Result
The result of the API call is the dataset consisting of transactions count 3
and the related authorisation events.