# Generated by contracts/export_public_catalog.py from contracts/public_sources/fred.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:fred:series-observations
name: Series Observations
version: 0.1.0
status: draft
domain: macroeconomics
tags:
- fred
- series
description:
  purpose: Retrieve values for one economic series with observation dates and real-time boundaries.
  usage: Attach the requested series_id to each row. Preserve the real-time interval for point-in-time
    analysis. Convert the period sentinel to missing and parse numeric strings at the needed precision.
    Use a registered FRED API key and keep credentials out of saved request URLs and logs.
  limitations: The key is scoped to the default output type 1 and a fixed transformation and frequency.
    Preserve those request parameters separately if combining different requests. Series attribution and
    redistribution rights depend on the original data owner. Review the series notes and FRED terms of
    use.
  authoritativeDefinitions:
  - type: documentation
    url: https://fred.stlouisfed.org/docs/api/fred/series_observations.html
    description: Dataset documentation
  - type: documentation
    url: https://fred.stlouisfed.org/legal/terms/
    description: FRED terms of use
servers:
- server: fred-api-v1
  type: api
  environment: vendor
  location: https://api.stlouisfed.org/fred/series/observations
  description: JSON observations array when file_type=json. The API key is a query parameter and pagination
    uses limit and offset.
  customProperties:
  - property: channel
    value: api-v1
schema:
- name: series-observations
  description: Retrieve values for one economic series with observation dates and real-time boundaries.
  dataGranularityDescription: One observation per date and real-time interval within a fixed request configuration.
  properties:
  - name: series_id
    logicalType: string
    required: true
    description: FRED series ID from the request
    primaryKey: true
    primaryKeyPosition: 1
  - name: date
    logicalType: date
    required: true
    description: Observation period date
    primaryKey: true
    primaryKeyPosition: 2
  - name: realtime_start
    logicalType: date
    required: true
    description: Start of the observation real-time interval
    primaryKey: true
    primaryKeyPosition: 3
  - name: realtime_end
    logicalType: date
    required: true
    description: End of the observation real-time interval
    primaryKey: true
    primaryKeyPosition: 4
  - name: value
    logicalType: string
    required: true
    description: Numeric text or a literal period for a missing value
  quality:
  - id: primary_key_unique
    metric: duplicateValues
    mustBe: 0
    arguments:
      properties:
      - series_id
      - date
      - realtime_start
      - realtime_end
    dimension: uniqueness
    severity: error
    description: Check duplicate keys within a consistent source extract.
customProperties:
- property: vendorDataGroup
  value: series
- property: licensedData
  value: false
- property: knownIssues
  value:
  - Primary key is inferred for the documented row grain.
