{
  "title": "Bigdata Document Format (BDDF) v1.3",
  "type": "object",
  "properties": {
    "content": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "content_type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "section": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              }
            },
            "required": [
              "name"
            ]
          },
          "pages": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "required": [
          "content_type",
          "value"
        ]
      }
    },
    "document": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of the document in the providers universe, alias to metadata.provider_document_id"
        },
        "metadata": {
          "type": "object",
          "properties": {
            "copyright": {
              "type": "string",
              "description": "Copyright information as given by the provider"
            },
            "custom": {
              "type": "string",
              "description": "Array of key, value pairs where custom or provider specific metatags can be stored"
            },
            "document_type": {
              "type": "string",
              "description": "Free text for now.. in 2.0 we will convert into enum. Some of the examples of the values we'd expect here: annual-report, interim-report, supplemental-financial-information, earnings-release, current-report, shareholder-meetings-notice, earnings-call-transcript, earnings-call-slides, special-events-slides, sustainability-report, initial-registration-statement"
            },
            "filename": {
              "type": "string",
              "description": "Externally provided document file name"
            },
            "language": {
              "type": "string",
              "description": "The original language detected for the document, following ISO standard",
              "pattern": "^[a-z]{2}(-[A-Z]{2})?$"
            },
            "media_type": {
              "type": "string",
              "description": "Document media type"
            },
            "primary_entity_id": {
              "type": "string",
              "description": "ID from the provider's universe related to the primary entity the document is about"
            },
            "primary_entity_name": {
              "type": "string",
              "description": "Canonical name from the provider's universe related to the primary entity the document is about"
            },
            "url": {
              "type": "string",
              "description": "Document original URL"
            },
            "codes(ARRAY)": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Array of security identifiers, listings, names ..."
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "value"
              ]
            },
            "reporting_period": {
              "type": "object",
              "properties": {
                "fiscal_period": {
                  "type": "string",
                  "description": "Fiscal period - should be enum with the following values allowed: FY, H1, H2, Q1, Q2, Q3, Q4, M01, M02, M03, M04, M05, M06, M07, M08, M09, M10, M11, M12"
                },
                "fiscal_year": {
                  "type": "integer",
                  "description": "Fiscal year, for example: 2024"
                }
              }
            },
            "transcript": {
              "type": "object",
              "properties": {
                "document_type": {
                  "type": "string"
                },
                "transcript_event_date": {
                  "type": "string",
                  "format": "date-time"
                },
                "transcript_event_datetime": {
                  "type": "string"
                },
                "transcript_event_type": {
                  "type": "string",
                  "description": "Ravenpack transcript event type"
                },
                "transcript_version": {
                  "type": "string",
                  "description": "Enum field with values (transcript-raw, transcript-corrected)"
                },
                "transcript_participants (ARRAY)": {
                  "type": "object",
                  "properties": {
                    "affiliation": {
                      "type": "string",
                      "description": "Company name of the participant"
                    },
                    "affiliation_entity": {
                      "type": "string",
                      "description": "Ravenpack entity id of the participant"
                    },
                    "entity": {
                      "type": "string",
                      "description": "Factset entity id of the participant"
                    },
                    "id": {
                      "type": "string",
                      "description": "The Id is also used as the key in the parent dictionary"
                    },
                    "title": {
                      "type": "string",
                      "description": "Professional title of the participant"
                    },
                    "type": {
                      "type": "string",
                      "description": "Participant role in the transcript document (Operator, Corprep, participant, analyst...)"
                    },
                    "value": {
                      "type": "string",
                      "description": "Participant name within the transcript document"
                    }
                  },
                  "required": [
                    "type",
                    "value"
                  ]
                }
              }
            }
          }
        },
        "revision": {
          "type": "object",
          "properties": {
            "chain_id": {
              "type": "string",
              "description": "Document chain identifier"
            },
            "sequence_id": {
              "type": "string",
              "description": "The document sequence identifier within the chain"
            }
          },
          "required": [
            "chain_id",
            "sequence_id"
          ]
        },
        "source": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "The id of the source in the provider's universe"
            },
            "name": {
              "type": "string",
              "description": "The document source name"
            }
          },
          "required": [
            "id",
            "name"
          ]
        },
        "timestamps_utc": {
          "type": "object",
          "properties": {
            "created": {
              "type": "string",
              "format": "date-time",
              "description": "The document creation timestamp in UTC."
            },
            "last_modified": {
              "type": "string",
              "format": "date-time",
              "description": "The document last modified timestamp in UTC"
            },
            "published": {
              "type": "string",
              "format": "date-time",
              "description": "Externally provided timestamp (provider_timestamp), otherwise the document published date if provided, otherwise the reception timestamp in UTC"
            }
          },
          "required": [
            "published"
          ]
        }
      },
      "required": [
        "id"
      ]
    },
    "schema": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "description": "Version of the schema used",
          "enum": [
            "1.3"
          ]
        }
      },
      "required": [
        "version",
        "version"
      ]
    }
  }
}