Formatting report messages

General description of the report message

A report message is an XML document with a structure and content set out in the XML schemas https://aruandlus.eestipank.ee/reports/x_headers.xsd, or https://aruandlus.eestipank.ee/reports/x_headers_subrep.xsd for data for subreports, and in the schema for the particular report, which contains the header and the reporting part and is generally in the form:

<message>

<message_header>
...
</message_header>
<report>
...
</report>

</message>

Message Header

FieldXML elementRequiredType
Message headermessage_headerYes 
Reporting subject codefromYesLEI-code, commercial register code or reporter code
Time message createddateYesYYYY-MM-DDThh:mm:ss
Name of sendersenderYesText 6..40
Email address of sendersend_mailYesEmail address
Telephone number of sendersend_phoneNoText 5..20
CommentcommentNoText
Receipt required for message*require_receiptNoyes/no

* Applies for messages sent by email or through the web service.

Example:

<message_header>

<from>549300PHQZ4HL15HH975</from>
<date>2018-10-10T11:12:13</date>
<sender>Jaan Kask</sender>
<send_mail>[email protected]</send_mail>
<send_phone>6666666</send_phone>
<require_receipt>yes</require_receipt>

</message_header>

 

Reporting part with no subreports

<report>

<report_header>
...
</report_header>
<row>
...
</row>
...                
<row>
...                
</row>

</report>

Reporting part with subreports

<report>

<report_header>
...
</report_header>

<subreport_1>

<row>
...
</row>
...                
<row>
...                
</row>

</subreport_1>

<subreport_2>

<row>
...
</row>
...                
<row>
...                
</row>

</subreport_2>

</report>

Report header

FieldXML elementRequiredType
Report headerreport_headerYes 
Report codetypeidYesInteger
Value date of the reporttimeidYesYYYY-MM-DD
Name of report compilercompilerYesText 6..40
Email of report compilercomp_mailYesEmail address
Telephone number of report compilercomp_phoneYesText 5..20

Example:

<report_header>

<typeid>162</typeid>
<timeid>2018-09-30</timeid>
<compiler>Jelizaveta Ivanova</compiler>
<comp_mail>[email protected]</comp_mail>
<comp_phone>7777777</comp_phone>

</report_header>

Subreports

FieldXML elementRequiredType
Subreport headerAs in the schema for reportsYes*As in the schema for reports
Subreport rowrowYes* 
Subreport row first fieldAs in the schema for reportsYes*As in the schema for reports
Subreport row second fieldAs in the schema for reportsYes*As in the schema for reports
......... 

* Not for an empty subreport.

Example:

<E_11>

<row>

<riik>US</riik>
<seis_eel_lopp>27304</seis_eel_lopp>
<seis_lopp>27304</seis_lopp>

</row>

<row>

<riik>DE</riik>
<seis_eel_lopp>161</seis_eel_lopp>
<seis_lopp>161</seis_lopp>

</row>

</E_11>

Report row

FieldXML elementRequiredType
Report rowRowYes* 
Row first fieldAs in the schema for reportsYes*As in the schema for reports
Row second fieldAs in the schema for reportsYes*As in the schema for reports
......... 

* Not for an empty report.

Example:

<row>

<pangakaart_liik_1>11</pangakaart_liik_1>
<pangakaart_liik_2>9</pangakaart_liik_2>
<kasutussagedus>1</kasutussagedus>
<pangakaartide_arv>39739</pangakaartide_arv>

</row>

Example of a full report message formatted as an xml document (without subreports)

<?xml version="1.0" encoding="UTF-8"?>
<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="x_aruanne162.xsd">

<message_header>

<from>549300PHQZ4HL15HH975</from>
<date>2018-10-10T11:12:13</date>
<sender>Jaan Kask</sender>
<send_mail>[email protected]</send_mail>
<send_phone>6666666</send_phone>
<require_receipt>yes</require_receipt>

</message_header>

<report>

<report_header>

<typeid>162</typeid>
<timeid>2018-09-30</timeid>
<compiler>Jelizaveta Ivanova</compiler>
<comp_mail>[email protected]</comp_mail>
<comp_phone>7777777</comp_phone>

</report_header>

<row>

<pangakaart_liik_1>2</pangakaart_liik_1>
<pangakaart_liik_2>1</pangakaart_liik_2>
<kasutussagedus>2</kasutussagedus>
<pangakaartide_arv>1520</pangakaartide_arv>

</row>
<row>

<pangakaart_liik_1>1</pangakaart_liik_1>
<pangakaart_liik_2>1</pangakaart_liik_2>
<kasutussagedus>2</kasutussagedus>
<pangakaartide_arv>1231</pangakaartide_arv>

</row>

</report>

</message>

Example of a full report message formatted as an xml document (with subreports)

<?xml version="1.0" encoding="UTF-8"?>
<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="x_aruanne1020.xsd">

<message_header>

<from>549300PHQZ4HL15HH975</from>
<date>2018-10-10T11:12:13</date>
<sender>Jaan Kask</sender>
<send_mail>[email protected]</send_mail>
<send_phone>6666666</send_phone>
<require_receipt>yes</require_receipt>

</message_header>

<report>

<report_header>

<typeid>1020</typeid>
<timeid>2018-09-30</timeid>
<compiler>Jelizaveta Ivanova</compiler>
<comp_mail>[email protected]</comp_mail>
<comp_phone>7777777</comp_phone>

</report_header>

<E_11>

<row>

<riik>GB</riik>
<seis_eel_lopp>273043</seis_eel_lopp>
 <seis_lopp>273043</seis_lopp>

</row>

<row>

<riik>NZ</riik>
<seis_eel_lopp>1618</seis_eel_lopp>
<seis_lopp>1618</seis_lopp>

</row>

</E_11>

<E_27>

<row>

<riik>FR</riik>
<seis_eel_lopp>1381</seis_eel_lopp>
<seis_lopp>125994</seis_lopp>

</row>

</E_27>

</report>

</message>

Please note. Some important notes on report messages!

1. The email addresses given in messages must actually function!

2. The fields may not contain the invalid characters "< >&'.
This row is an error for example:
<reitinguagentuur>S & P</reitinguagentuur>

To submit these symbols, they must be entered in the following form:

" as &quot;
< as &lt;
> as &gt;
& as &amp;
' as &apos;

3. The first row of an xml document, which sets the coding of the symbols, must match the form of the subsequent content (single quote marks can be used instead of double quotes):

<?xml version="1.0" encoding="ISO-8859-1"?>  or
<?xml version="1.0" encoding="UTF-8"?>  or
<?xml version="1.0" ?>

4. The element 'message' must be submitted in the form:

<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="x_aruanneZZZZ.xsd">, where ZZZZ is the report code.

5. The 'comment’ element in the message header must be used for its intended purpose. If this element is filled with text, it automatically initiates a chat in the portal with that text.

6. It is highly recommended to validate report messages before submitting them!