{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hackforddata-com/json-schema/hackforddata-com-firm-fos-decisions-response-schema.json",
  "title": "FirmFosDecisionsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hackforddata-com-openapi.yml#/components/schemas/FirmFosDecisionsResponse",
  "type": "object",
  "properties": {
    "firm": {
      "$ref": "#/$defs/FirmPermissionFirm"
    },
    "count": {
      "type": "integer"
    },
    "page": {
      "type": "integer"
    },
    "page_size": {
      "type": "integer"
    },
    "next": {
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "type": [
        "string",
        "null"
      ]
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FirmFosDecisionRow"
      }
    },
    "source": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "count",
    "firm",
    "next",
    "page",
    "page_size",
    "previous",
    "results",
    "source"
  ],
  "$defs": {
    "FirmFosDecisionRow": {
      "type": "object",
      "properties": {
        "decision_reference": {
          "type": [
            "string",
            "null"
          ]
        },
        "decision_date": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "outcome": {
          "type": [
            "string",
            "null"
          ]
        },
        "product_category": {
          "type": [
            "string",
            "null"
          ]
        },
        "decision_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "business_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "excerpt": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "business_name",
        "decision_date",
        "decision_reference",
        "decision_url",
        "excerpt",
        "outcome",
        "product_category"
      ]
    },
    "FirmIdentifiers": {
      "type": "object",
      "properties": {
        "fca_frn": {
          "type": [
            "string",
            "null"
          ]
        },
        "sec_crd": {
          "type": [
            "string",
            "null"
          ]
        },
        "sec_file": {
          "type": [
            "string",
            "null"
          ]
        },
        "cik": {
          "type": [
            "string",
            "null"
          ]
        },
        "companies_house": {
          "type": [
            "string",
            "null"
          ]
        },
        "lei": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "FirmPermissionFirm": {
      "type": "object",
      "properties": {
        "hackford_id": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "canonical_url": {
          "type": "string"
        },
        "identifiers": {
          "$ref": "#/$defs/FirmIdentifiers"
        }
      },
      "required": [
        "canonical_url",
        "display_name",
        "hackford_id",
        "identifiers"
      ]
    }
  }
}