{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/earningsfeed-com/json-schema/earningsfeed-com-filing-detail-schema.json",
  "title": "FilingDetail",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/earningsfeed-com-openapi.json#/components/schemas/FilingDetail",
  "type": "object",
  "properties": {
    "accessionNumber": {
      "type": "string",
      "pattern": "^(\\d{10}-\\d{2}-\\d{6}|\\d{18})$",
      "description": "SEC accession number (e.g., 0000320193-24-000126)"
    },
    "accessionNoDashes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Accession number without dashes (18-digit format)"
    },
    "cik": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "description": "SEC Central Index Key (CIK) - unique company/filer identifier"
    },
    "formType": {
      "type": "string",
      "description": "SEC form type (10-K, 10-Q, 8-K, 4, etc.)"
    },
    "filedAt": {
      "type": "string",
      "format": "date-time",
      "description": "SEC filing date. A calendar date encoded as midnight UTC: read only the date part (YYYY-MM-DD) and never convert it to a local time zone. For the moment the SEC accepted the filing, use acceptTs."
    },
    "acceptTs": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the SEC accepted the filing (null if provisional)"
    },
    "provisional": {
      "type": "boolean",
      "description": "Whether this is a provisional (not yet finalized) filing"
    },
    "feedDay": {
      "type": [
        "string",
        "null"
      ],
      "description": "Feed day in YYYY-MM-DD format"
    },
    "title": {
      "type": "string",
      "description": "Filing title/description from SEC"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "URL to the filing index on SEC EDGAR"
    },
    "sizeBytes": {
      "type": "integer",
      "description": "Size of the primary document in bytes"
    },
    "secRelativeDir": {
      "type": [
        "string",
        "null"
      ],
      "description": "Relative path on SEC EDGAR for constructing document URLs"
    },
    "companyName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Company name from the filing"
    },
    "primaryTicker": {
      "type": [
        "string",
        "null"
      ],
      "description": "Primary stock ticker symbol"
    },
    "company": {
      "$ref": "#/$defs/FilingDetailCompany"
    },
    "documents": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FilingDocument"
      },
      "description": "List of documents included in this filing"
    },
    "roles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FilingRole"
      },
      "description": "Entities involved in this filing (filers, issuers, etc.)"
    }
  },
  "required": [
    "accessionNumber",
    "accessionNoDashes",
    "cik",
    "formType",
    "filedAt",
    "acceptTs",
    "provisional",
    "feedDay",
    "title",
    "url",
    "sizeBytes",
    "secRelativeDir",
    "companyName",
    "primaryTicker",
    "company",
    "documents",
    "roles"
  ],
  "$defs": {
    "FilingCompany": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "cik": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "description": "SEC Central Index Key (CIK) - unique company/filer identifier"
        },
        "name": {
          "type": "string",
          "description": "Company name"
        },
        "stateOfIncorporation": {
          "type": [
            "string",
            "null"
          ],
          "description": "State or country of incorporation code"
        },
        "stateOfIncorporationDescription": {
          "type": [
            "string",
            "null"
          ],
          "description": "Full name of incorporation location"
        },
        "fiscalYearEnd": {
          "type": [
            "string",
            "null"
          ],
          "description": "Fiscal year end (MMDD format)"
        }
      },
      "required": [
        "cik",
        "name",
        "stateOfIncorporation",
        "stateOfIncorporationDescription",
        "fiscalYearEnd"
      ],
      "description": "Company details if available"
    },
    "FilingDetailCompany": {
      "allOf": [
        {
          "$ref": "#/$defs/FilingCompany"
        },
        {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "entityType": {
              "type": [
                "string",
                "null"
              ],
              "description": "SEC entity type classification"
            }
          },
          "required": [
            "entityType"
          ]
        }
      ],
      "description": "Detailed company information if available"
    },
    "FilingDocument": {
      "type": "object",
      "properties": {
        "seq": {
          "type": "integer",
          "description": "Document sequence number (ordering within the filing)"
        },
        "filename": {
          "type": "string",
          "description": "Filename of the document on SEC EDGAR"
        },
        "docType": {
          "type": "string",
          "description": "Document type (matches form type for primary, EX-## for exhibits)"
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Document description/title"
        },
        "isPrimary": {
          "type": "boolean",
          "description": "Whether this is the primary document of the filing"
        }
      },
      "required": [
        "seq",
        "filename",
        "docType",
        "description",
        "isPrimary"
      ]
    },
    "FilingRole": {
      "type": "object",
      "properties": {
        "cik": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "description": "CIK of the entity in this role"
        },
        "role": {
          "type": "string",
          "description": "Role type (filer, issuer, subject-company, reporting-owner, etc.)"
        }
      },
      "required": [
        "cik",
        "role"
      ]
    }
  }
}