{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flint-network/json-schema/flint-network-outcome-request-schema.json",
  "title": "OutcomeRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flint-network-outcome-feedback-api-openapi.yml#/components/schemas/OutcomeRequest",
  "type": "object",
  "required": [
    "record_id",
    "outcome"
  ],
  "properties": {
    "record_id": {
      "type": "string",
      "pattern": "^frv_",
      "description": "Signed verification record ID."
    },
    "outcome": {
      "type": "string",
      "enum": [
        "completed",
        "disputed",
        "flagged"
      ]
    },
    "merchant_note": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 500,
      "description": "Optional merchant context. Accepts null or a string of at most 500 Unicode code points. Empty and whitespace-only strings are preserved."
    },
    "ground_truth": {
      "$ref": "#/$defs/OutcomeGroundTruthRequest"
    },
    "partner_id": {
      "type": "string",
      "deprecated": true,
      "description": "Ignored. The partner identity is derived from the bearer credential and must match the stored signed record. Retained for existing callers."
    }
  },
  "$defs": {
    "OutcomeGroundTruthRequest": {
      "type": [
        "object",
        "null"
      ],
      "description": "Optional F3 ground truth. Null is retained as null. Omitted or null lists normalize to empty arrays; string IDs are trimmed, uppercased, checked against the F3 catalog, and deduplicated. Other object keys are ignored.",
      "properties": {
        "f3_techniques_confirmed": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "f3_techniques_rejected": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}