Ettevõtte majandusaasta aruanded

Meetod: GET /company/documents/reports/financialYear

OpenAPI/Swagger: https://ar-rest.rik.ee/docs#/Company/get_company_financial_year

Tagastab ettevõtete majandusaasta aruandeid koos auditeerimise staatustega. Aruanded on saadaval PDF-vormingus ning olemasolul XBRL- ja DDOC/BDOC-vormingus. Võimaldab otsida aruandeid registrikoodi, aruandeaasta, dokumenditüübi ja esitamise ajavahemiku järgi.

Päringu parameetrid

Parameeter Tüüp Kohustuslik Kirjeldus
registryCode integer Valikuline Ettevõtte registrikood.
reportYear integer Valikuline Aruandeaasta.
documentType string Valikuline Dokumenditüüp: A – PDF, D – BDOC/DDOC, X – XBRL.
submissionStartDate string (date-time) Valikuline Aruannete esitamise ajavahemiku alguskuupäev ja kellaaeg.
submissionEndDate string (date-time) Valikuline Aruannete esitamise ajavahemiku lõppkuupäev ja kellaaeg.
pageNumber integer Valikuline Tulemuste lehekülje number. Vaikeväärtus: 1; Maksimum: 100000; Suurem kui: 0.
pageSize integer Valikuline Soovitud tulemuste arv ühel lehel. Vaikeväärtus: 100; Maksimum: 1000; Suurem kui: 0.

Päise parameetrid

Parameeter Tüüp Kohustuslik Kirjeldus
apiVersion ApiVersions Valikuline API versioon. Lubatud ja toetatud väärtus: V1. Vaikimisi: V1.
acceptLanguage AcceptLanguage Valikuline Klassifikaatorite tõlgete keel: est – eesti, eng – inglise. Vaikimisi: est.

Vastuse skeem

Kohustuslikuks märgitud väljad peavad vastuses sisalduma. Muud väljad võivad puududa; null on lubatud ainult siis, kui see on välja tüübis kirjas. Puuduv finantsnäitaja ei tähenda väärtust 0.

ReportResponse

Väli Tüüp Kirjeldus
total integer (int64) Kohustuslik. Leitud aruannete koguarv.
list array[FinancialYearReport] Kohustuslik. Majandusaasta aruannete loend.

FinancialYearReport

Väli Tüüp Kirjeldus
documentId integer (int64) Kohustuslik. Majandusaasta aruande dokumendi ID.
submissionDate string (date) Kohustuslik. Esitamise kuupäev.
reportYear integer Kohustuslik. Aruandeaasta.
currency string | null Aruande valuuta.
balanceSheet integer (int64) | null Bilansimaht.
revenue integer (int64) | null Müügitulu.
workers integer (int64) | null Töötajate arv.
status string Kohustuslik. Aruande või dokumendi kehtivus: K – kehtiv, A – lõppenud.
registryCode integer Kohustuslik. Ettevõtte registrikood.
reportStartDate string (date) Kohustuslik. Aruandeperioodi algus.
reportEndDate string (date) | null Aruandeperioodi lõpp.
isConsolidatedReport boolean | null Kas tegemist on konsolideeritud aruandega.
auditStatus string Kohustuslik. Auditeerimise staatus. Vastustes esinevad näiteks AUDITEERITUD ja PUUDUB INFO AUDITEERIMISE KOHTA. OpenAPI kirjeldab väärtusi PERFORMED, NOTPERFORMED ja NOTAVAILABLE; välja tüüp on string, mitte enum.
relatedDocuments array[ReportDocument] | null Aruandega seotud dokumendid.

ReportDocument

Väli Tüüp Kirjeldus
id integer Kohustuslik. Dokumendi ID.
name string Kohustuslik. Dokumendi nimi.
type string Kohustuslik. Dokumendi tüüp. Vastustes esinevad PDF ja XBRL; päringu documentType kasutab eraldi koode A, D ja X.
url string | null Viide dokumendile.
status string Kohustuslik. Aruande või dokumendi kehtivus: K – kehtiv, A – lõppenud.

CustomValidationError

Väli Tüüp Kirjeldus
message string Kohustuslik. Veateade.
code APIError Kohustuslik. Veakood (APIError).
id string | null Kohustuslik. Vea identifikaator.
timestamp string (date-time) Vea tekkimise kuupäev ja kellaaeg.

HTTPValidationError

Väli Tüüp Kirjeldus
detail array[ValidationError] Valideerimisvigade loend.

ValidationError

Väli Tüüp Kirjeldus
loc array[string | integer] Kohustuslik. Vea asukoht päringus.
msg string Kohustuslik. Veateade.
type string Kohustuslik. Valideerimisvea tüüp.
input any Vea põhjustanud sisend.
ctx object Vea lisakontekst.

Vastuse koodid

  • 200 – Edukas vastus.
  • 204 – Majandusaasta aruandeid ei leitud. Vastuse keha puudub.
  • 403 – Juurdepääs teenusele on keelatud. OpenAPI ei määra vastuse keha.
  • 404 – Ei leitud (CustomValidationError).
  • 422 – Päringu valideerimisviga (HTTPValidationError).

Näited

200 – Aruanded PDF- ja XBRL-dokumentidega

GET /company/documents/reports/financialYear?registryCode=12345678

{
 "total": 2,
 "list": [
 {
 "documentId": 9000000001,
 "submissionDate": "2024-06-18",
 "reportYear": 2023,
 "currency": "EUR",
 "balanceSheet": 1250000,
 "revenue": 2400000,
 "workers": 18,
 "status": "K",
 "registryCode": 12345678,
 "reportStartDate": "2023-01-01",
 "reportEndDate": "2023-12-31",
 "isConsolidatedReport": false,
 "auditStatus": "AUDITEERITUD",
 "relatedDocuments": [
 {
 "id": 9000000001,
 "name": "Majandusaasta aruanne PDF",
 "type": "PDF",
 "url": "https://ariregister.rik.ee/est/company/12345678/file/9000000001",
 "status": "K"
 },
 {
 "id": 9000000001,
 "name": "Majandusaasta aruanne XBRL",
 "type": "XBRL",
 "url": "https://ariregister.rik.ee/est/company/12345678/file/9000000001?document_type=xbrl",
 "status": "K"
 }
 ]
 },
 {
 "documentId": 9000000002,
 "submissionDate": "2002-06-27",
 "reportYear": 2001,
 "status": "K",
 "registryCode": 12345678,
 "reportStartDate": "2001-01-01",
 "reportEndDate": "2001-12-31",
 "auditStatus": "PUUDUB INFO AUDITEERIMISE KOHTA",
 "relatedDocuments": []
 }
 ]
}

200 – XBRL-dokumentide päring

GET /company/documents/reports/financialYear?registryCode=12345678&reportYear=2023&documentType=X

{
 "total": 1,
 "list": [
 {
 "documentId": 9000000001,
 "submissionDate": "2024-06-18",
 "reportYear": 2023,
 "currency": "EUR",
 "balanceSheet": 1250000,
 "revenue": 2400000,
 "workers": 18,
 "status": "K",
 "registryCode": 12345678,
 "reportStartDate": "2023-01-01",
 "reportEndDate": "2023-12-31",
 "isConsolidatedReport": false,
 "auditStatus": "AUDITEERITUD",
 "relatedDocuments": [
 {
 "id": 9000000001,
 "name": "Majandusaasta aruanne XBRL",
 "type": "XBRL",
 "url": "https://ariregister.rik.ee/est/company/12345678/file/9000000001?document_type=xbrl",
 "status": "K"
 }
 ]
 }
 ]
}

404 – Veavastuse näide

Näide illustreerib veavastuse struktuuri; OpenAPI ei täpsusta koodi 4041 tähendust.

{
 "message": "Not found",
 "code": 4041,
 "id": null,
 "timestamp": "2024-07-01T10:00:00Z"
}

422 – Valideerimisvea näide

GET /company/documents/reports/financialYear?pageNumber=0

{
 "detail": [
 {
 "loc": [
 "query",
 "pageNumber"
 ],
 "msg": "Input should be greater than 0",
 "type": "greater_than",
 "input": 0,
 "ctx": {
 "gt": 0
 }
 }
 ]
}

JSON Schema

{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$ref": "#/components/schemas/ReportResponse",
 "components": {
 "schemas": {
 "ApiVersions": {
 "type": "string",
 "enum": [
 "V1"
 ],
 "title": "ApiVersions"
 },
 "AcceptLanguage": {
 "type": "string",
 "enum": [
 "est",
 "eng"
 ],
 "title": "AcceptLanguage"
 },
 "ReportResponse": {
 "properties": {
 "total": {
 "type": "integer",
 "format": "int64",
 "title": "Total",
 "description": "The total number of entities.",
 "examples": [
 1
 ]
 },
 "list": {
 "items": {
 "$ref": "#/components/schemas/FinancialYearReport"
 },
 "type": "array",
 "title": "List",
 "description": "List of Financial Year Reports"
 }
 },
 "type": "object",
 "required": [
 "total",
 "list"
 ],
 "title": "ReportResponse"
 },
 "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": "#/components/schemas/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"
 },
 "CustomValidationError": {
 "properties": {
 "message": {
 "type": "string",
 "title": "Message"
 },
 "code": {
 "$ref": "#/components/schemas/APIError"
 },
 "id": {
 "anyOf": [
 {
 "type": "string"
 },
 {
 "type": "null"
 }
 ],
 "title": "Id"
 },
 "timestamp": {
 "type": "string",
 "format": "date-time",
 "title": "Timestamp",
 "description": "Timestamp of the error"
 }
 },
 "type": "object",
 "required": [
 "message",
 "code",
 "id"
 ],
 "title": "CustomValidationError"
 },
 "APIError": {
 "type": "integer",
 "enum": [
 2001,
 4030,
 4041,
 4042,
 4043,
 4044,
 4045,
 4046,
 4047,
 4048,
 4049
 ],
 "title": "APIError"
 },
 "HTTPValidationError": {
 "properties": {
 "detail": {
 "items": {
 "$ref": "#/components/schemas/ValidationError"
 },
 "type": "array",
 "title": "Detail"
 }
 },
 "type": "object",
 "title": "HTTPValidationError"
 },
 "ValidationError": {
 "properties": {
 "loc": {
 "items": {
 "anyOf": [
 {
 "type": "string"
 },
 {
 "type": "integer"
 }
 ]
 },
 "type": "array",
 "title": "Location"
 },
 "msg": {
 "type": "string",
 "title": "Message"
 },
 "type": {
 "type": "string",
 "title": "Error Type"
 },
 "input": {
 "title": "Input"
 },
 "ctx": {
 "type": "object",
 "title": "Context"
 }
 },
 "type": "object",
 "required": [
 "loc",
 "msg",
 "type"
 ],
 "title": "ValidationError"
 }
 }
 }
}