{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/banyan-systems/main/json-schema/banyan-systems-consent-ingress-json-schema.json",
  "title": "ConsentIngressJSON",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/banyan-systems-sensitive-data-vault-openapi.yml#/components/schemas/ConsentIngressJSON",
  "properties": {
    "consumer_email": {
      "description": "The email address of the consumer",
      "type": "string"
    },
    "consumer_phone": {
      "description": "The phone number of the consumer",
      "type": "string"
    },
    "finx_consumer_token": {
      "type": "string"
    },
    "log": {
      "description": "The log of consumer consent decisions",
      "items": {
        "$ref": "#/$defs/ConsentDecisionIngressJSON"
      },
      "type": "array"
    },
    "merchant_partner_id": {
      "type": "integer"
    }
  },
  "required": [
    "merchant_partner_id",
    "finx_consumer_token",
    "log"
  ],
  "type": "object",
  "$defs": {
    "ConsentAction": {
      "enum": [
        "grant",
        "revoke"
      ],
      "type": "string"
    },
    "ConsentDecisionIngressJSON": {
      "properties": {
        "action": {
          "$ref": "#/$defs/ConsentAction"
        },
        "consent_type": {
          "$ref": "#/$defs/ConsentType"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "consent_type",
        "action"
      ],
      "type": "object"
    },
    "ConsentType": {
      "enum": [
        "talk to support"
      ],
      "type": "string"
    }
  }
}