# Generated by contracts/export_public_catalog.py from contracts/public_sources/sec-edgar.yaml -- do not edit by hand.
# Open Data Contract Standard v3.2.0 (https://bitol-io.github.io/open-data-contract-standard/).
apiVersion: v3.2.0
kind: DataContract
id: urn:alphaswarm:datacontract:sec-edgar:company-facts
name: XBRL Company Facts
version: 0.1.0
status: draft
domain: regulatory-disclosures
tags:
- sec-edgar
- xbrl
description:
  purpose: Retrieve standard-taxonomy entity-wide facts across the concepts reported by one filer.
  usage: Carry CIK, taxonomy, tag, and unit into each row. Use filed and accn to retain release and amendment
    history. Automated requests must identify the client in User-Agent and follow the SEC fair-access
    limit of 10 requests per second. The read APIs require no key.
  limitations: Covers standardized entity-wide facts. A filing can repeat a fact, and contexts can differ
    by optional start date. Retain repeated rows until a policy resolves them. Consult the underlying
    filing for authoritative disclosures and the SEC access policy before automating requests.
  authoritativeDefinitions:
  - type: documentation
    url: https://www.sec.gov/search-filings/edgar-application-programming-interfaces
    description: Dataset documentation
  - type: documentation
    url: https://www.sec.gov/search-filings/edgar-search-assistance/accessing-edgar-data
    description: SEC fair access and EDGAR indexes
servers:
- server: sec-edgar-api
  type: api
  environment: vendor
  location: https://data.sec.gov/api/xbrl/companyfacts/CIK{cik}.json
  description: JSON facts keyed by taxonomy, concept, and unit. Expand each fact in each unit array.
  customProperties:
  - property: channel
    value: api
schema:
- name: company-facts
  description: Retrieve standard-taxonomy entity-wide facts across the concepts reported by one filer.
  dataGranularityDescription: One reported fact occurrence in a filer, taxonomy, concept, and unit.
  properties:
  - name: cik
    logicalType: integer
    required: true
    description: Entity CIK from the response envelope
    primaryKey: true
    primaryKeyPosition: 1
  - name: taxonomy
    logicalType: string
    required: true
    description: Taxonomy key such as us-gaap
    primaryKey: true
    primaryKeyPosition: 2
  - name: tag
    logicalType: string
    required: true
    description: Taxonomy concept key
    primaryKey: true
    primaryKeyPosition: 3
  - name: unit
    logicalType: string
    required: true
    description: Unit key for the enclosing fact array
    primaryKey: true
    primaryKeyPosition: 4
  - name: start
    logicalType: date
    required: false
    description: Period start for a duration fact
  - name: end
    logicalType: date
    required: true
    description: Period end or instant date
    primaryKey: true
    primaryKeyPosition: 6
  - name: val
    logicalType: number
    required: true
    description: Numeric fact as reported
  - name: accn
    logicalType: string
    required: true
    description: Filing accession for this fact
    primaryKey: true
    primaryKeyPosition: 5
  - name: fy
    logicalType: integer
    required: false
    description: Fiscal year associated with the filing
  - name: fp
    logicalType: string
    required: false
    description: Fiscal period code associated with the filing
  - name: form
    logicalType: string
    required: false
    description: Form type associated with the filing
  - name: filed
    logicalType: date
    required: false
    description: Filing date for this occurrence
  - name: frame
    logicalType: string
    required: false
    description: Calendar frame when the SEC assigns one
  quality:
  - id: primary_key_unique
    metric: duplicateValues
    mustBe: 0
    arguments:
      properties:
      - cik
      - taxonomy
      - tag
      - unit
      - accn
      - end
    dimension: uniqueness
    severity: warning
    description: Check duplicate keys within a consistent source extract.
customProperties:
- property: vendorDataGroup
  value: xbrl
- property: licensedData
  value: false
- property: knownIssues
  value:
  - Primary key is inferred for the documented row grain.
