{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nashboard-ai/json-schema/nashboard-ai-transaction-input-schema.json",
  "title": "TransactionInput",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nashboard-ai-openapi.json#/components/schemas/TransactionInput",
  "type": "object",
  "required": [
    "raw_descriptor"
  ],
  "properties": {
    "raw_descriptor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Raw bank transaction descriptor string. Send it exactly as it appears on the statement — do not pre-clean. PSP prefixes (e.g. \"PAYPAL *\", \"SQ *\", \"TST*\"), POS channel markers (\"POS DEBIT\", \"CHECKCARD\"), store numbers, and trailing city/country tokens are unwrapped server-side before matching. Non-Latin descriptors (Arabic, Persian, Cyrillic, Turkish) are matched natively in-script — no transliteration needed."
    },
    "amount_minor": {
      "type": "integer",
      "minimum": 0,
      "description": "Transaction amount in minor currency units (e.g. cents)."
    },
    "currency_code": {
      "type": "string",
      "pattern": "^[A-Z]{3}$",
      "description": "ISO 4217 currency code (e.g. USD)."
    },
    "date_hint": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Transaction date hint (YYYY-MM-DD)."
    },
    "country_hint": {
      "type": "string",
      "pattern": "^[A-Z]{2}$",
      "description": "ISO 3166-1 alpha-2 country hint."
    },
    "user_locale": {
      "type": "string",
      "maxLength": 35,
      "description": "BCP 47 locale tag (e.g. en-US)."
    }
  },
  "additionalProperties": false
}