{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/akahu/main/json-schema/akahu-genie-category-schema.json",
  "title": "GenieCategory",
  "description": "A category classification result from Genie. This classification provides the base [NZFCC](https://nzfcc.org) category code for the transaction. Additionally, the `groups` attribute includes a mapping of the NZFCC category into broader (less-specific) category groups. Category grouping is based on mappings which are able to be customised per-client. The `personal_finance` mapping is included by default.",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/akahu-genie-transaction-enrichment-api-openapi.yml#/components/schemas/GenieCategory",
  "type": "object",
  "properties": {
    "_id": {
      "type": "string",
      "description": "The [NZFCC](https://nzfcc.org) category code for the transaction"
    },
    "name": {
      "type": "string",
      "description": "The name of the NZFCC category for this transaction"
    },
    "groups": {
      "type": "object",
      "description": "A dictionary of category groups, keyed by category mapping name, for the NZFCC base category.",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "The category group identifier for this mapping."
          },
          "name": {
            "type": "string",
            "description": "The category group name for this mapping."
          }
        }
      }
    }
  },
  "required": [
    "_id",
    "name",
    "groups"
  ]
}