Get Card Transactions for the department

Get Card Transactions for the Department

This endpoint returns card transaction activity for a specific department, identified by its departmentId. The request body accepts date range filters, amount filters, a text search string, and transaction type filters, enabling precise retrieval of departmental spending history. Results are paginated and include full financial event detail for each transaction.

Endpoint

POST /api/teams/departments/{departmentId}/transactions

Authentication

Bearer token required. Obtain via:

POST https://api.banking.netevia.dev/api/auth/v2

Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.

When to use

Use this endpoint when you need to audit or report on card spending for a specific department inside a business customer's team structure. It is suitable for expense management dashboards, departmental budget reconciliation, or compliance reporting where transactions must be filtered by date range, amount, and transaction type.

Path Parameters

ParameterTypeRequiredDescription
departmentIdinteger (int32)YesThe unique identifier of the department whose card transactions are being retrieved.

Request Body

FieldTypeRequiredDescription
dateFromstring (date-time)YesStart of the date range for transaction filtering (ISO 8601 format).
dateTostring (date-time)YesEnd of the date range for transaction filtering (ISO 8601 format).
searchStringstringNoOptional free-text search string to match against transaction details.
filterobjectNoTransaction type filter. Contains nested filter items: all, deposit, withdraw, pos, transactionStatus. Each filter item has displayName (string), value (boolean), and optional nested items array.
amountFilterobjectNoAmount range filter with minValue (integer, cents) and maxValue (integer, cents) fields.

filter object (paymentcardtransactionfilter):

FieldTypeRequiredDescription
allfilteritemNoFilter item for all transaction types.
depositfilteritemNoFilter item for deposit transactions.
withdrawfilteritemNoFilter item for withdrawal transactions.
posfilteritemNoFilter item for point-of-sale transactions.
transactionStatusfilteritemNoFilter item for transaction status.

filteritem object:

FieldTypeRequiredDescription
displayNamestringNoHuman-readable label for the filter.
valuebooleanNoWhether this filter is active (true) or inactive (false).
itemsarray of filteritemNoNested sub-filter items.

amountFilter object:

FieldTypeRequiredDescription
minValueinteger (int64)NoMinimum transaction amount in cents.
maxValueinteger (int64)NoMaximum transaction amount in cents.
{
  "dateFrom": "2026-05-01T00:00:00Z",
  "dateTo": "2026-05-31T23:59:59Z",
  "searchString": "office supplies",
  "filter": {
    "all": {
      "displayName": "All",
      "value": false
    },
    "pos": {
      "displayName": "Point of Sale",
      "value": true
    },
    "transactionStatus": {
      "displayName": "Completed",
      "value": true
    }
  },
  "amountFilter": {
    "minValue": 500,
    "maxValue": 50000
  }
}

Response

200 OK

FieldTypeDescription
dataarrayArray of financial activity records matching the filter criteria.
filterobjectEcho of the applied paymentcardtransactionfilter.
paginationSettingsobjectPagination metadata containing totalItems (integer).

data item (financialactivityresponsemodel):

FieldTypeDescription
idstringUnique transaction identifier.
financialAccountIdstringID of the financial account associated with the transaction.
datestring (date-time)Transaction date.
sortDatestring (date-time)Date used for sorting results.
balanceobjectAccount balance at time of transaction (value in cents, currencyCode).
statusstringTransaction status. One of: OTHER, PENDING, COMPLETED, FAILED.
riskHoldbooleanIndicates whether the transaction is on a risk hold.
settlementDatestring (date-time)Settlement date of the transaction, if applicable.
purposestringBusiness purpose of the transaction, if applicable.
statusReasonCodestringReason code for the transaction status, if applicable.
amountobjectTransaction amount with value (cents), currencyCode, and symbol.
clearAmountobjectCleared amount with value (cents), currencyCode, and symbol.
pendingAmountobjectPending amount with value (cents) and currencyCode.
namestringDisplay name for the transaction (e.g., merchant name).
last4objectLast 4 digits identifier with type (CARD or ACCOUNT) and value.
typestringTransaction type label (read-only).
authorizedUserstringName or ID of the authorized user who initiated the transaction.
merchantCategorystringMerchant category description.
transactionSourceobjectSource transaction details including typename, id, and transactionEvents array.
rewardPointsinteger (int64)Reward points earned on this transaction, if applicable.
activityInfoobjectProfile and history information including fromProfile, toProfile, and historyRecords.
financialEventobjectDetailed financial event data including merchant details, amounts, status, and card info.
{
  "data": [
    {
      "id": "txn_abc123def456",
      "financialAccountId": "fa_7890xyz",
      "date": "2026-05-15T14:23:10Z",
      "sortDate": "2026-05-15T14:23:10Z",
      "balance": {
        "value": 245000,
        "currencyCode": "USD"
      },
      "status": "COMPLETED",
      "riskHold": false,
      "settlementDate": "2026-05-17T00:00:00Z",
      "purpose": null,
      "statusReasonCode": null,
      "amount": {
        "value": 4799,
        "currencyCode": "USD",
        "symbol": "$"
      },
      "clearAmount": {
        "value": 4799,
        "currencyCode": "USD",
        "symbol": "$"
      },
      "pendingAmount": {
        "value": 0,
        "currencyCode": "USD"
      },
      "name": "Office Depot",
      "last4": {
        "type": "CARD",
        "value": "4242"
      },
      "type": "CARD_TRANSACTION",
      "authorizedUser": "Jane Smith",
      "merchantCategory": "Office Supplies",
      "transactionSource": {
        "typename": "CardTransaction",
        "id": "src_112233",
        "transactionEvents": [
          {
            "typename": "CardAuthorization",
            "id": "evt_aabbcc",
            "merchantDetails": {
              "category": "Office Supplies",
              "categoryCode": "5112",
              "countryCodeAlpha3": "USA",
              "description": "Office supply store",
              "name": "Office Depot",
              "merchantId": "MID_9988776"
            },
            "pointOfServiceDetails": {
              "panEntryMode": "CHIP",
              "pinEntryMode": "NOT_APPLICABLE"
            },
            "responseCode": "00",
            "responseDescription": "Approved",
            "approvedAmount": {
              "value": 4799,
              "currencyCode": "USD"
            },
            "requestedAmount": {
              "value": 4799,
              "currencyCode": "USD"
            },
            "paymentCard": {
              "id": "card_xyz789",
              "bin": "411111",
              "last4": "4242"
            },
            "createdAt": "2026-05-15T14:23:10Z",
            "authorizationExpiration": "2026-05-22T14:23:10Z",
            "processingType": "STANDARD",
            "rewardPoints": 47,
            "accountingDirection": "DEBIT"
          }
        ]
      },
      "rewardPoints": 47,
      "activityInfo": {
        "fromProfile": {
          "id": 1001,
          "name": "Marketing Department",
          "agentId": 55
        },
        "toProfile": null,
        "historyRecords": [
          {
            "date": "2026-05-15T14:23:10Z",
            "status": "COMPLETED"
          }
        ]
      },
      "financialEvent": {
        "id": "fe_998877",
        "accountingDirection": "DEBIT",
        "processingType": "STANDARD",
        "typename": "CardTransaction",
        "merchantDetails": {
          "category": "Office Supplies",
          "categoryCode": "5112",
          "countryCodeAlpha3": "USA",
          "description": "Office supply store",
          "name": "Office Depot",
          "merchantId": "MID_9988776"
        },
        "paymentCard": {
          "id": "card_xyz789",
          "bin": "411111",
          "last4": "4242"
        },
        "amount": {
          "value": 4799,
          "currencyCode": "USD"
        },
        "status": "COMPLETED",
        "statusReason": null,
        "memo": null,
        "purpose": null,
        "createdAt": "2026-05-15T14:23:10Z",
        "updatedAt": "2026-05-17T00:00:00Z",
        "settlementDate": "2026-05-17T00:00:00Z",
        "partial": false,
        "responseCode": "00",
        "avsResponseCode": null,
        "cvvResponseCode": null,
        "postalCodeResponseCode": null
      }
    }
  ],
  "filter": {
    "pos": {
      "displayName": "Point of Sale",
      "value": true
    },
    "transactionStatus": {
      "displayName": "Completed",
      "value": true
    }
  },
  "paginationSettings": {
    "totalItems": 1
  }
}

Error Codes

CodeWhen it happens
400Missing required fields (dateFrom or dateTo) or invalid date format
401Token missing, expired, or invalid
403Insufficient permissions to access this department's transactions
404Department with the specified departmentId not found
500Internal server error

Common Mistakes

  • Omitting dateFrom or dateTo — both are required fields; the request will fail with a 400 error if either is missing.
  • Passing amount values in dollars instead of cents — minValue and maxValue in amountFilter must be in the smallest currency unit (cents). For example, $10.00 should be sent as 1000.
  • Using an invalid or expired Bearer token — tokens expire after 10 minutes; call POST /api/auth/refresh to obtain a new one before the expiry.
  • Sending a departmentId for a department that does not belong to the authenticated partner's business customer, which will result in a 403 or 404 response.
  • Setting all filter value fields to false — this may return no results or behave unexpectedly; ensure at least one relevant filter is enabled or omit the filter object to retrieve all transaction types.

Related Endpoints

  • POST /api/teams/departments/{departmentId}/transactions — this endpoint
  • GET /api/teams/departments — list all departments for the business team
  • GET /api/teams/departments/{departmentId} — retrieve details for a specific department
  • POST /api/financialaccounts/{financialAccountId}/transactions — retrieve transactions for a specific financial account

Example

curl -X POST https://api.banking.netevia.dev/api/teams/departments/42/transactions \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "dateFrom": "2026-05-01T00:00:00Z",
    "dateTo": "2026-05-31T23:59:59Z",
    "searchString": "office supplies",
    "filter": {
      "pos": {
        "displayName": "Point of Sale",
        "value": true
      },
      "transactionStatus": {
        "displayName": "Completed",
        "value": true
      }
    },
    "amountFilter": {
      "minValue": 500,
      "maxValue": 50000
    }
  }'
Path Params
int32
required
Body Params
filter
object
amountFilter
object
string | null
date-time
required
date-time
required
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json