{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/barclays/main/json-schema/barclays-redemption-request-data-v3-schema.json",
  "title": "RedemptionRequestDataV3",
  "description": "Root object that holds redemption amount and related program attributes.",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/barclays-rewards-redemption-api-openapi.yml#/components/schemas/RedemptionRequestDataV3",
  "type": "object",
  "additionalProperties": false,
  "deprecated": false,
  "properties": {
    "data": {
      "$ref": "#/$defs/RedemptionRequestV3"
    }
  },
  "required": [
    "data"
  ],
  "nullable": false,
  "$defs": {
    "RedemptionRequestV3": {
      "type": "object",
      "additionalProperties": false,
      "deprecated": false,
      "description": "Redemption amount and related program attributes.",
      "properties": {
        "redemptionReferenceNumber": {
          "type": "string",
          "description": "UUID to keep track of each redemption request from a partner. Generated by the partner and passed in each request.",
          "maxLength": 36,
          "minLength": 36,
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        },
        "redemptionAmount": {
          "type": "number",
          "description": "Dollar value of the rewards to be redeemed. Minimum and Maximum limits depend on program setup."
        },
        "conversionRate": {
          "type": "number",
          "description": "Denotes the dollar value of rewards (ex: 1 point = $0.01)."
        },
        "rewards": {
          "type": "number",
          "description": "Quantity of rewards/points consumed for this redemption."
        },
        "redemptionTypeId": {
          "type": "string",
          "description": "Unique identifier for the partner product brand.",
          "maxLength": 36,
          "minLength": 36,
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        },
        "redemptionType": {
          "type": "string",
          "description": "Type of redemption.",
          "maxLength": 30,
          "minLength": 1,
          "pattern": "^[a-zA-Z_]{1,30}$"
        },
        "fulfillmentMethod": {
          "type": "string",
          "description": "Method of fulfillment.",
          "maxLength": 20,
          "minLength": 1,
          "pattern": "^[a-zA-Z_]{1,20}$"
        },
        "externalAccountRefId": {
          "type": [
            "string",
            "null"
          ],
          "description": "External account reference ID required for ACH-based fulfillment.",
          "maxLength": 30,
          "minLength": 1,
          "pattern": "^[0-9a-zA-Z]{1,30}$"
        },
        "transactionInfo": {
          "$ref": "#/$defs/TransactionInfo"
        }
      },
      "required": [
        "conversionRate",
        "fulfillmentMethod",
        "redemptionAmount",
        "redemptionReferenceNumber",
        "redemptionType",
        "redemptionTypeId",
        "rewards"
      ],
      "nullable": false
    },
    "TransactionInfo": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "description": "Optional metadata supplied by partner for pay with points redemption.",
      "properties": {
        "authorizationCode": {
          "type": "string",
          "description": "Authorization code generated by merchant at point of sale.",
          "maxLength": 50,
          "minLength": 1,
          "pattern": "^[a-zA-Z0-9]{1,50}$"
        },
        "transactionDesc": {
          "type": [
            "string",
            "null"
          ],
          "description": "Free-text description of the source transaction tied to redemption.",
          "maxLength": 200,
          "minLength": 1,
          "pattern": "^.{1,200}$"
        }
      }
    }
  }
}