client.reports
client.reports
client.reports wraps /api/v1/reports/* — X (interim), Z (closing), JE (Electronic Journal) and MF (Fiscal Memory) report management plus ANAF-compliant XML / MF document generation. See the matching REST documentation at Reports API.
HTTP-level failures surface as EBonApiError — see Errors and /en/api/errors.
client.reports.listXReports(query?)
List X reports.
async listXReports(query?: ListReportsQuery): Promise<ListReportsResult<XReport>>
| Name | Type | Required | Notes |
|---|---|---|---|
deviceId | string | no | Filter by device. |
from | string | no | ISO-8601 lower bound (inclusive). |
to | string | no | ISO-8601 upper bound (inclusive). |
limit | number | no | Page size; server caps the maximum. |
Returns { reports: XReport[] }.
const { reports } = await client.reports.listXReports({ deviceId: 'dev_01HZ...' });
client.reports.getXReport(id)
Get a single X report.
async getXReport(id: string): Promise<GetReportResult<XReport>>
| Name | Type | Required | Notes |
|---|---|---|---|
id | string | yes | X report identifier. |
Returns { report: XReport }.
const { report } = await client.reports.getXReport('xr_01HZ...');
client.reports.createXReport(body)
Create an X report.
async createXReport(body: CreateXReportBody): Promise<XReport>
| Name | Type | Required | Notes |
|---|---|---|---|
deviceId | string | yes | Source device. |
totals | { sales, refunds, net: number } | yes | Day totals. |
vatBreakdown | VatBreakdownEntry[] | yes | VAT split. |
receiptCount | number | yes | Receipts included in the X. |
Returns the created XReport.
await client.reports.createXReport({
deviceId: 'dev_01HZ...',
totals: { sales: 1024.5, refunds: 0, net: 1024.5 },
vatBreakdown: [{ rate: 19, base: 860.92, vat: 163.58 }],
receiptCount: 42,
});
client.reports.listZReports(query?)
List Z reports.
async listZReports(query?: ListReportsQuery): Promise<ListReportsResult<ZReport>>
| Name | Type | Required | Notes |
|---|---|---|---|
deviceId | string | no | Filter by device. |
from | string | no | ISO-8601 lower bound (inclusive). |
to | string | no | ISO-8601 upper bound (inclusive). |
limit | number | no | Page size; server caps the maximum. |
Returns { reports: ZReport[] }.
const { reports } = await client.reports.listZReports({ from: '2026-04-01' });
client.reports.getZReport(id)
Get a single Z report.
async getZReport(id: string): Promise<GetReportResult<ZReport>>
| Name | Type | Required | Notes |
|---|---|---|---|
id | string | yes | Z report identifier. |
Returns { report: ZReport }.
const { report } = await client.reports.getZReport('zr_01HZ...');
client.reports.createZReport(body)
Create a Z report.
async createZReport(body: CreateZReportBody): Promise<ZReport>
| Name | Type | Required | Notes |
|---|---|---|---|
deviceId | string | yes | Source device. |
totals | { sales, refunds, net: number } | yes | Day totals. |
vatBreakdown | VatBreakdownEntry[] | yes | VAT split. |
receiptCount | number | yes | Receipts included in the Z. |
resetCounter | number | yes | Daily reset counter from the printer. |
periodStart | string | yes | ISO-8601 start of the Z period. |
periodEnd | string | yes | ISO-8601 end of the Z period. |
Returns the created ZReport.
await client.reports.createZReport({
deviceId: 'dev_01HZ...',
totals: { sales: 1024.5, refunds: 0, net: 1024.5 },
vatBreakdown: [{ rate: 19, base: 860.92, vat: 163.58 }],
receiptCount: 42,
resetCounter: 17,
periodStart: '2026-04-23T00:00:00+03:00',
periodEnd: '2026-04-24T00:00:00+03:00',
});
client.reports.listJEReports(query?)
List JE reports.
async listJEReports(query?: ListJEReportsQuery): Promise<ListReportsResult<JEReport>>
| Name | Type | Required | Notes |
|---|---|---|---|
deviceId | string | no | Filter by device. |
from | string | no | ISO-8601 lower bound (inclusive). |
to | string | no | ISO-8601 upper bound (inclusive). |
limit | number | no | Page size; server caps the maximum. |
anafStatus | AnafStatus | no | Filter by ANAF submission status. |
Returns { reports: JEReport[] }.
const { reports } = await client.reports.listJEReports({ anafStatus: 'pending' });
client.reports.getJEReport(id)
Get a single JE report.
async getJEReport(id: string): Promise<GetReportResult<JEReport>>
| Name | Type | Required | Notes |
|---|---|---|---|
id | string | yes | JE report identifier. |
Returns { report: JEReport }.
const { report } = await client.reports.getJEReport('je_01HZ...');
client.reports.createJEReport(body)
Create a JE report.
async createJEReport(body: CreateJEReportBody): Promise<JEReport>
| Name | Type | Required | Notes |
|---|---|---|---|
deviceId | string | yes | Source device. |
xmlContent | string | yes | ANAF-compliant XML payload. |
reportDate | string | yes | ISO-8601 date the report covers. |
Returns the created JEReport.
await client.reports.createJEReport({
deviceId: 'dev_01HZ...',
xmlContent: '<?xml ...?>',
reportDate: '2026-04-23',
});
client.reports.generateJEXml(deviceId, query)
Generate ANAF-compliant JE XML for a device/period.
async generateJEXml(deviceId: string, query: GenerateJEXmlQuery): Promise<string>
| Name | Type | Required | Notes |
|---|---|---|---|
from | string | yes | ISO-8601 start of the period. |
to | string | yes | ISO-8601 end of the period. |
Returns the raw XML string ready for ANAF submission.
const xml = await client.reports.generateJEXml('dev_01HZ...', {
from: '2026-04-01',
to: '2026-04-30',
});
client.reports.listMFReports(query?)
List MF reports.
async listMFReports(query?: ListReportsQuery): Promise<ListReportsResult<MFReport>>
| Name | Type | Required | Notes |
|---|---|---|---|
deviceId | string | no | Filter by device. |
from | string | no | ISO-8601 lower bound (inclusive). |
to | string | no | ISO-8601 upper bound (inclusive). |
limit | number | no | Page size; server caps the maximum. |
Returns { reports: MFReport[] }.
const { reports } = await client.reports.listMFReports();
client.reports.getMFReport(id)
Get a single MF report.
async getMFReport(id: string): Promise<GetReportResult<MFReport>>
| Name | Type | Required | Notes |
|---|---|---|---|
id | string | yes | MF report identifier. |
Returns { report: MFReport }.
const { report } = await client.reports.getMFReport('mf_01HZ...');
client.reports.createMFReport(body)
Create an MF report.
async createMFReport(body: CreateMFReportBody): Promise<MFReport>
| Name | Type | Required | Notes |
|---|---|---|---|
deviceId | string | yes | Source device. |
content | string | yes | Fiscal memory archive content. |
archiveDate | string | yes | ISO-8601 date the archive was generated. |
Returns the created MFReport.
await client.reports.createMFReport({
deviceId: 'dev_01HZ...',
content: '<archive>...</archive>',
archiveDate: '2026-04-23',
});
client.reports.generateMF(deviceId, query)
Generate Fiscal Memory document for a device/period.
async generateMF(deviceId: string, query: GenerateMFQuery): Promise<unknown>
| Name | Type | Required | Notes |
|---|---|---|---|
from | string | yes | ISO-8601 start of the period. |
to | string | yes | ISO-8601 end of the period. |
Returns the generated MF document (driver-specific shape — see Reports API › Generate MF).
const mf = await client.reports.generateMF('dev_01HZ...', {
from: '2026-04-01',
to: '2026-04-30',
});
client.receipts
Reference for the ReceiptsResource — store fiscal receipts after printing and retrieve them with cursor-based pagination, mirroring /api/v1/receipts.
client.webhooks
Reference for the WebhooksResource — manage webhook subscriptions, rotate signing secrets, fire test deliveries and inspect delivery history, mirroring /api/v1/org/webhooks.