Skip to main content

Data Structure

The Category object is a structured representation of the transaction category hierarchy. It is divided into separate objects based on the categorization engine that has been used. For Z2 it consists of a single string with a category, a classification confidence score and a matching counterpart entity. In some cases, it can also have additional flags to provide a more specific transaction classification.

The category object is added to the Transaction API result models. These models are described within the Account Information Transaction Data Structures

Z2 category object

Here's a brief overview of each field within the z2 category object:

Field
Type
Description
category
string
The category assigned by the Z2 engine to the transaction (e.g., expenses.other, insurance.other, see Categories).
confidence
number (0..1)
The confidence score of the assigned category, representing the engine's certainty (between 0 and 1).
entity
string
The detected entity associated with the categorization (e.g. a merchant name such as Albert Heijn).
flags
array of string or [ ]
Additional flags to further classify the transaction. Right now, it can be one of reversal_payment, refund, payment_arrangement.

Examples

// Example 1 - Transaction Model, no flags
{
"id": "aeeffb5c-4800-5f6f-8797-7f488351553d",
"accountNumber": "NL12ABNA9999876523",
"accountId": "faa409f9-ff20-4462-4729-08dbfaecde2e",
// ...
"category": {
"z2": {
"category": "income.salary",
"confidence": 0.98,
"entity": "EnableNow B.V.",
"flags": []
}
}
}
// Example 2 - Transaction Model with flags
{
"id": "aeeffb5c-4800-5f6f-8797-7f488351553d",
"accountNumber": "NL12ABNA9999876523",
"accountId": "faa409f9-ff20-4462-4729-08dbfaecde2e",
// ...
"category": {
"z2": {
"category": "other.other",
"confidence": 0.8833,
"entity": "Albert Heijn",
"flags": [ "refund" ]
}
}
}