{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ariregister-rik-ee/json-schema/ariregister-rik-ee-report-response-schema.json",
  "title": "ReportResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ariregister-rik-ee-openapi.yml#/components/schemas/ReportResponse",
  "properties": {
    "total": {
      "type": "integer",
      "format": "int64",
      "title": "Total",
      "description": "The total number of entities."
    },
    "list": {
      "items": {
        "$ref": "#/$defs/FinancialYearReport"
      },
      "type": "array",
      "title": "List",
      "description": "List of Financial Year Reports"
    }
  },
  "type": "object",
  "required": [
    "total",
    "list"
  ],
  "$defs": {
    "FinancialYearReport": {
      "properties": {
        "documentId": {
          "type": "integer",
          "format": "int64",
          "title": "Documentid",
          "description": "Document ID of the annual report (menetlused_dokumendid.id)"
        },
        "submissionDate": {
          "type": "string",
          "format": "date",
          "title": "Submissiondate",
          "description": "Date of submission"
        },
        "reportYear": {
          "type": "integer",
          "title": "Reportyear",
          "description": "Report Year"
        },
        "currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Currency",
          "description": "Currency of the report"
        },
        "balanceSheet": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "format": "int64",
          "title": "Balancesheet",
          "description": "Balance Sheet Amount"
        },
        "revenue": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "format": "int64",
          "title": "Revenue",
          "description": "Revenue Amount"
        },
        "workers": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "format": "int64",
          "title": "Workers",
          "description": "Number of Employees"
        },
        "status": {
          "type": "string",
          "title": "Status",
          "description": "Validity(K – valid, A – expired)"
        },
        "registryCode": {
          "type": "integer",
          "title": "Registrycode",
          "description": "Registry code of the company"
        },
        "reportStartDate": {
          "type": "string",
          "format": "date",
          "title": "Reportstartdate",
          "description": "Beginning of Reporting period"
        },
        "reportEndDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reportenddate",
          "description": "End of Reporting period"
        },
        "isConsolidatedReport": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Isconsolidatedreport",
          "description": "Report consolidation flag"
        },
        "auditStatus": {
          "type": "string",
          "title": "Auditstatus",
          "description": "NOTAVAILABLE - not available audit information, NOTPERFORMED - audit not performed, PERFORMED - audit performed"
        },
        "relatedDocuments": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/ReportDocument"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Relateddocuments",
          "description": "Related Documents"
        }
      },
      "type": "object",
      "required": [
        "documentId",
        "submissionDate",
        "reportYear",
        "status",
        "registryCode",
        "reportStartDate",
        "auditStatus"
      ],
      "title": "FinancialYearReport"
    },
    "ReportDocument": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id",
          "description": "Document ID. Document ID, can be used as an input in the service arireg.toimikuDokument."
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Document Name"
        },
        "type": {
          "type": "string",
          "title": "Type",
          "description": "Document Type. A - annual reports in PDF, D - annual reports in BDOC, DDOC, X - annual reports in XBRL."
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url",
          "description": "Reference to the document"
        },
        "status": {
          "type": "string",
          "title": "Status",
          "description": "Validity(K – valid, A – expired)"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "type",
        "status"
      ],
      "title": "ReportDocument"
    }
  }
}