{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kokofinance-net/json-schema/kokofinance-net-v1-playbook-request-schema.json",
  "title": "V1PlaybookRequest",
  "description": "Request for POST /api/v1/portfolio/points-playbook",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kokofinance-net-openapi.json#/components/schemas/V1PlaybookRequest",
  "properties": {
    "cards": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "maxItems": 10,
      "minItems": 1,
      "title": "Cards",
      "description": "1-10 card names to analyze"
    },
    "point_balances": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/PlaybookBalanceInput"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Point Balances",
      "description": "Point/miles balances for generating redemption strategies"
    },
    "spending": {
      "anyOf": [
        {
          "$ref": "#/$defs/SpendingInput"
        },
        {
          "type": "null"
        }
      ],
      "description": "Monthly spending for cashback calculation"
    }
  },
  "type": "object",
  "required": [
    "cards"
  ],
  "$defs": {
    "PlaybookBalanceInput": {
      "properties": {
        "program_key": {
          "type": "string",
          "title": "Program Key",
          "description": "Program key"
        },
        "balance": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Balance",
          "description": "Point/miles balance"
        }
      },
      "type": "object",
      "required": [
        "program_key",
        "balance"
      ],
      "title": "PlaybookBalanceInput",
      "description": "Point balance for playbook request"
    },
    "SpendingInput": {
      "properties": {
        "groceries": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Groceries",
          "description": "Monthly grocery spend"
        },
        "dining": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Dining",
          "description": "Monthly dining/restaurant spend"
        },
        "travel": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Travel",
          "description": "Monthly travel spend"
        },
        "gas": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Gas",
          "description": "Monthly gas/fuel spend"
        },
        "streaming": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Streaming",
          "description": "Monthly streaming services spend"
        },
        "shopping": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Shopping",
          "description": "Monthly general shopping spend"
        },
        "other": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Other",
          "description": "Monthly other spend"
        },
        "total_monthly": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total Monthly",
          "description": "Total monthly spend override"
        }
      },
      "type": "object",
      "title": "SpendingInput",
      "description": "Monthly spending by category (dollars)"
    }
  }
}