{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tickerfacts-com/json-schema/tickerfacts-com-cashflow-inputs-schema.json",
  "title": "CashflowInputs",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tickerfacts-com-openapi.json#/components/schemas/CashflowInputs",
  "properties": {
    "cik": {
      "type": "integer"
    },
    "dataset_built_at": {
      "type": "string"
    },
    "dataset_digest": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "periods": {
      "description": "Newest first; at most 15.",
      "items": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "facts": {
            "additionalProperties": {
              "$ref": "#/$defs/CashflowObservation"
            },
            "propertyNames": {
              "enum": [
                "operating_cash_flow",
                "capex",
                "net_income",
                "shares_outstanding"
              ]
            },
            "type": "object"
          },
          "period_end": {
            "type": "string"
          },
          "period_start": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "period_end",
          "period_start",
          "currency",
          "facts"
        ],
        "type": "object"
      },
      "maxItems": 15,
      "type": "array"
    },
    "ticker": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "ticker",
    "cik",
    "name",
    "dataset_built_at",
    "dataset_digest",
    "periods"
  ],
  "type": "object",
  "$defs": {
    "CashflowObservation": {
      "properties": {
        "accession": {
          "type": "string"
        },
        "filed": {
          "type": "string"
        },
        "period_end": {
          "type": "string"
        },
        "period_start": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_url": {
          "type": "string"
        },
        "tag": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "value": {
          "description": "Decimal STRING. Unlike /api/v1/companies, where values are JSON numbers.",
          "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
          "type": "string"
        }
      },
      "required": [
        "value",
        "unit",
        "period_start",
        "period_end",
        "filed",
        "accession",
        "tag",
        "source_url"
      ],
      "type": "object"
    }
  }
}