# 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:frames
name: XBRL Frames
version: 0.1.0
status: draft
domain: regulatory-disclosures
tags:
- sec-edgar
- xbrl
description:
  purpose: Compare the last reported standard fact that best aligns with a requested calendar frame across
    filers.
  usage: Compare start and end dates explicitly. Request annual, quarterly, or instantaneous frames using
    SEC calendar codes. 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: The SEC selects the latest matching filing. As-of analysis needs filing-level data, and
    fiscal period boundaries can differ between filers. 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/frames/{taxonomy}/{tag}/{unit}/{frame}.json
  description: JSON response with a data array. Carry taxonomy, tag, unit, and ccp from the response envelope
    into each row.
  customProperties:
  - property: channel
    value: api
schema:
- name: frames
  description: Compare the last reported standard fact that best aligns with a requested calendar frame
    across filers.
  dataGranularityDescription: One fact per filer in a taxonomy, concept, unit, and calendar frame.
  properties:
  - name: taxonomy
    logicalType: string
    required: true
    description: Taxonomy from the response envelope
    primaryKey: true
    primaryKeyPosition: 1
  - name: tag
    logicalType: string
    required: true
    description: Concept tag from the response envelope
    primaryKey: true
    primaryKeyPosition: 2
  - name: uom
    logicalType: string
    required: true
    description: Unit of measure from the response envelope
    primaryKey: true
    primaryKeyPosition: 3
  - name: ccp
    logicalType: string
    required: true
    description: SEC calendar frame from the response envelope
    primaryKey: true
    primaryKeyPosition: 4
  - name: accn
    logicalType: string
    required: true
    description: Accession of the selected filing
  - name: cik
    logicalType: integer
    required: true
    description: Central Index Key for the reporting entity
    primaryKey: true
    primaryKeyPosition: 5
  - name: entityName
    logicalType: string
    required: false
    description: Reporting entity name
  - name: loc
    logicalType: string
    required: false
    description: SEC location code for the entity when supplied
  - name: start
    logicalType: date
    required: false
    description: Fact period start for duration frames
  - name: end
    logicalType: date
    required: true
    description: Fact period end or instant
  - name: val
    logicalType: number
    required: true
    description: Numeric value selected for the frame
  quality:
  - id: primary_key_unique
    metric: duplicateValues
    mustBe: 0
    arguments:
      properties:
      - taxonomy
      - tag
      - uom
      - ccp
      - cik
    dimension: uniqueness
    severity: error
    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.
