{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/descriptorapi-com/json-schema/descriptorapi-com-enrich-request-schema.json",
  "title": "EnrichRequest",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/descriptorapi-com-openapi.yml#/components/schemas/EnrichRequest",
  "type": "object",
  "required": [
    "descriptor"
  ],
  "properties": {
    "descriptor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "description": "The raw statement line, exactly as your bank or processor provides it."
    },
    "country": {
      "type": "string",
      "pattern": "^[A-Za-z]{2}$",
      "description": "Optional ISO 3166-1 alpha-2 code of the card or account country. Improves accuracy. A country named in the descriptor comes first, and a currency used by one country comes before this, because a card can be used abroad."
    },
    "mcc": {
      "type": "string",
      "pattern": "^[0-9]{4}$",
      "description": "Optional merchant category code from the card network."
    },
    "amount": {
      "type": "number",
      "minimum": 0,
      "description": "Optional. Accepted and validated; not used for matching yet."
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Za-z]{3}$",
      "description": "Optional ISO 4217 code of the currency the transaction was paid in. It tells us where the card was used when the descriptor does not say: a currency used by one country (AED, EGP, GBP) points to that country, EUR and other shared currencies to their region (or to your country, when it uses that currency), and USD is ignored because it is spent everywhere. Improves accuracy."
    }
  }
}