{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bigdata/json-schema/bigdata-public-cash-flow-response-schema.json",
  "title": "PublicCashFlowResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bigdata-financials-ratios-api-openapi.yml#/components/schemas/PublicCashFlowResponse",
  "properties": {
    "results": {
      "anyOf": [
        {
          "$ref": "#/$defs/CashFlowStatement"
        },
        {
          "items": {
            "$ref": "#/$defs/CashFlowStatement"
          },
          "type": "array"
        }
      ],
      "title": "Results"
    },
    "errors": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ErrorDetail"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Errors"
    },
    "metadata": {
      "anyOf": [
        {
          "$ref": "#/$defs/Metadata"
        },
        {
          "type": "null"
        }
      ]
    },
    "sources": {
      "items": {
        "$ref": "#/$defs/Source"
      },
      "type": "array",
      "title": "Sources",
      "description": "The content catalog sources the response was built from, one entry per source. Empty when no catalog source contributed."
    },
    "usage": {
      "anyOf": [
        {
          "$ref": "#/$defs/Usage"
        },
        {
          "type": "null"
        }
      ],
      "description": "Tokens the request consumed, per content tier. Present only for API keys billed in tokens."
    }
  },
  "type": "object",
  "required": [
    "results"
  ],
  "$defs": {
    "CashFlowStatement": {
      "properties": {
        "rp_entity_id": {
          "type": "string",
          "title": "Rp Entity Id",
          "description": "The RavenPack entity ID of the company."
        },
        "target_identifier_id": {
          "type": "string",
          "title": "Target Identifier Id",
          "description": "The target identifier ID of the company."
        },
        "fields": {
          "items": {
            "type": "string",
            "enum": [
              "REPORTED_CURRENCY",
              "CIK",
              "FILING_DATE",
              "ACCEPTED_DATE",
              "FISCAL_YEAR",
              "PERIOD",
              "NET_INCOME",
              "DEPRECIATION_AND_AMORTIZATION",
              "DEFERRED_INCOME_TAX",
              "STOCK_BASED_COMPENSATION",
              "CHANGE_IN_WORKING_CAPITAL",
              "ACCOUNTS_RECEIVABLES",
              "INVENTORY",
              "ACCOUNTS_PAYABLES",
              "OTHER_WORKING_CAPITAL",
              "OTHER_NON_CASH_ITEMS",
              "NET_CASH_PROVIDED_BY_OPERATING_ACTIVITIES",
              "INVESTMENTS_IN_PROPERTY_PLANT_AND_EQUIPMENT",
              "ACQUISITIONS_NET",
              "PURCHASES_OF_INVESTMENTS",
              "SALES_MATURITIES_OF_INVESTMENTS",
              "OTHER_INVESTING_ACTIVITIES",
              "NET_CASH_PROVIDED_BY_INVESTING_ACTIVITIES",
              "NET_DEBT_ISSUANCE",
              "LONG_TERM_NET_DEBT_ISSUANCE",
              "SHORT_TERM_NET_DEBT_ISSUANCE",
              "NET_STOCK_ISSUANCE",
              "NET_COMMON_STOCK_ISSUANCE",
              "COMMON_STOCK_ISSUANCE",
              "COMMON_STOCK_REPURCHASED",
              "NET_PREFERRED_STOCK_ISSUANCE",
              "NET_DIVIDENDS_PAID",
              "COMMON_DIVIDENDS_PAID",
              "PREFERRED_DIVIDENDS_PAID",
              "OTHER_FINANCING_ACTIVITIES",
              "NET_CASH_PROVIDED_BY_FINANCING_ACTIVITIES",
              "EFFECT_OF_FOREX_CHANGES_ON_CASH",
              "NET_CHANGE_IN_CASH",
              "CASH_AT_END_OF_PERIOD",
              "CASH_AT_BEGINNING_OF_PERIOD",
              "OPERATING_CASH_FLOW",
              "CAPITAL_EXPENDITURE",
              "FREE_CASH_FLOW",
              "INCOME_TAXES_PAID",
              "INTEREST_PAID"
            ]
          },
          "type": "array",
          "title": "Fields",
          "description": "The fields of the cash flow statement."
        },
        "values": {
          "items": {
            "prefixItems": [
              {
                "type": "string"
              },
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            ],
            "type": "array",
            "maxItems": 45,
            "minItems": 45
          },
          "type": "array",
          "title": "Values",
          "description": "The values of the cash flow statement."
        }
      },
      "type": "object",
      "required": [
        "rp_entity_id",
        "target_identifier_id",
        "fields",
        "values"
      ],
      "title": "CashFlowStatement"
    },
    "ErrorDetail": {
      "properties": {
        "message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Message"
        }
      },
      "type": "object",
      "title": "ErrorDetail"
    },
    "Metadata": {
      "properties": {
        "request_id": {
          "type": "string",
          "title": "Request Id"
        },
        "timestamp": {
          "type": "string",
          "title": "Timestamp"
        }
      },
      "type": "object",
      "required": [
        "request_id"
      ],
      "title": "Metadata"
    },
    "Source": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Content catalog identifier of the source."
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Catalog name of the dataset the data came from."
        }
      },
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "title": "Source",
      "description": "A content catalog source that contributed data to a structured-data response."
    },
    "Usage": {
      "additionalProperties": {
        "type": "integer"
      },
      "type": "object",
      "title": "Usage",
      "description": "Public structured-data usage for a request, aggregated per content tier.\n\nA flat object keyed per content tier, where each key is derived from the\ncontent tier identifier by dropping the ``content-`` prefix and appending\n``_tokens`` (e.g. ``corporate-fundamentals`` ->\n``corporate_fundamentals_tokens``). It is sparse: only tiers with non-zero\ntokens appear, and an absent key means zero tokens for that tier."
    }
  }
}