๐จ๏ธFiscals
This page provides a description of the available API routes for managing fiscal devices.
Fiscal device refers to receipt printer that prints cash register receipts (part of ticket closing procedure).
Fiscal device is represented by Fiscal
class.
API methods
CRUD actions
These API methods allow for the management of fiscal resources, including creation, reading, updating, and deletion.
Get fiscals
GET
http://{server-address}/fiscals
Returns all fiscals that matches query parameters. Result is of type QueryResult<Fiscal>
.
Query Parameters
Name | Type | Description |
---|---|---|
name | string | Supports NData syntax. |
$skip | int | Pagination property. Describing number of records to skip from beginning of result collection. |
$take | int | Pagination property. Maximum count of items to be returned. |
$sort | string[] | Comma separated list of property names. Please see NData syntax. |
$count | bool | If set to |
isActive | bool | Supports NData syntax. |
type | string | Supports NData syntax. |
dkp | string | Supports NData syntax. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Get fiscal by name
GET
http://{server-address}/fiscals/{name}
Result is of type Fiscal.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Create fiscal
POST
http://{server-address}/fiscals
Creates new fiscal. Result is of type Fiscal.
Required rights
Authorized user must have FiscalCreate
right assigned.
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(body)* | Fiscal | Model to create. |
Create or update fiscal
PUT
http://{server-address}/fiscals/{name}
Creates new or updates existing fiscal. Result is of type Fiscal.
Required rights
Authorized user must have assigned FiscalCreate
or FiscalUpdate
right.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(body)* | Fiscal | Model to create or update. |
Delete fiscal by name
DELETE
http://{server-address}/fiscals/{name}
Required rights
Authorized user must have FiscalDelete
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
RPC actions
These API methods trigger specific actions on fiscal devices. However, it's important to note that depending on the type of fiscal device, some methods may not be supported. Additionally, attempting an action on a fiscal device that is marked as inactive will also result in failure. In both of these cases, making API calls will result in an HTTP status code of 403.
Open cash drawer
POST
http://{server-address}/fiscals/{name}/open_drawer
Opens cash drawer on specified device.
Required rights
Authorized user must have FiscalOpenDrawer
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
The response body contains no content.
Perform cash transfer
POST
http://{server-address}/fiscals/{name}/cash_transfer
This method performs a cash transfer operation on a fiscal device specified by name. It updates the latest daily sales report for the device or creates a new report if none is currently opened. The updated daily sales report is then returned in the response body.
The method accepts CashTransfer
in request body.
Required rights
Authorized user must have FiscalCashTransfer
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(body)* | CashTransfer | Cash transfer model. |
Print ticket copy
POST
http://{server-address}/fiscals/{name}/print_record_copy
Prints copy of specified ticket on fiscal printer. Method accepts RecordCopyContext
in request body.
Required rights
Authorized user must have FiscalPrintRecordCopy
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(body)* | RecordCopyContext | The record copy context. |
The response body contains no content.
Print last ticket copy
POST
http://{server-address}/fiscals/{name}/print_last_record_copy
Prints copy of last ticket printed on fiscal printer.
Required rights
Authorized user must have FiscalPrintRecordCopy
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
The response body contains no content.
Print overview sales report
POST
http://{server-address}/fiscals/{name}/print_overview_sales_report
Prints overview sales report on specified fiscal printer.
The overview sales report ("Priebeลพnรก uzรกvierka", "Prehฤพadovรก uzรกvierka" or "X uzรกvierka" in Slovak) includes financial information on sales from the last daily sales report.
Required rights
Authorized user must have OverviewSalesReport
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
The response body contains no content.
Print summary interval sales report
POST
http://{server-address}/fiscals/{name}/print_summary_interval_sales_report
Prints summary interval sales report on specified fiscal printer. The generated report consolidates financial information extracted from multiple daily sales reports.
The method accepts IntervalSalesReportContext
in request body.
Required rights
Authorized user must have SummaryIntervalSalesReport
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(body)* | IntervalSalesReportContext | Model that specifies sales reports interval. |
The response body contains no content.
Print detailed interval sales report
POST
http://{server-address}/fiscals/{name}/print_detailed_interval_sales_report
Prints detailed interval sales report on specified fiscal printer. The generated report consolidates financial information extracted from multiple daily sales reports.
The method accepts IntervalSalesReportContext
in request body.
Required rights
Authorized user must have DetailedIntervalSalesReport
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(body)* | IntervalSalesReportContext | Model that specifies sales reports interval. |
The response body contains no content.
Print daily sales report
POST
http://{server-address}/fiscals/{name}/daily_sales_report
Performs daily sales closure and prints daily sales report on specified fiscal printer. DailySalesReport
is returned in response body. It's important to note that certain fiscal devices only support one daily sales report per day, while other types of fiscal devices allow multiple closures to be performed within the same day.
Required rights
Authorized user must have DoDailySalesReport
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Print daily sales report copy
POST
http://{server-address}/fiscals/{name}/daily_sales_report_copy
Prints copy of daily sales report associated with given fiscal printer. Method accepts DailySalesReportCopyContext
in request body.
Required rights
Authorized user must have FiscalPrintDailySalesReportCopy
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(body) | DailySalesReportCopyContex | Context that specifies daily sales report to be printed. |
The response body contains no content.
Print last daily sales report copy
POST
http://{server-address}/fiscals/{name}/last_daily_sales_report_copy
Prints copy of last daily sales report associated with given fiscal printer.
Required rights
Authorized user must have FiscalPrintDailySalesReportCopy
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
The response body contains no content.
Print text
POST
http://{server-address}/fiscals/{name}/print_nonfiscal_record
Prints text (nonfiscal record) on selected fiscal device. Method accepts NonfiscalRecordContext
in request body.
Required rights
Authorized user must have PrintNonfiscalRecord
right assigned.
Path Parameters
Name | Type | Description |
---|---|---|
name* | string | Unique fiscal name. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | string | Authorization header with authorization token. |
Request Body
Name | Type | Description |
---|---|---|
(body) | NonfiscalRecordContext | Context that specifies text to be printed. |
The response body contains no content.
Last updated