PORTOS Developers
  • 👋Introduction
  • 📖Glossary
  • HTTP Status codes
  • Error models
  • Error codes
  • Validation constraints
  • Resource names
  • 🔒User rights
  • Device environments
  • 🌍Localization
  • 🔍NData query syntax
  • OpenAPI specification
  • Data models
  • Authentication
    • 🔐Authentication schemes
      • JWT Bearer Authentication
      • HMAC Authentication
  • ⚡Notifications
    • SignalR
    • Webhooks
  • API reference
    • 🔑API keys
    • 🛍️Article categories
    • 💼Companies
    • 💱Currencies
    • 👫Customers
    • 📈Daily sales reports
    • 🖥️Devices
    • 🖨️Fiscals
    • ❤️Health check
    • 📃License
    • 🎚️Modifiers
    • 👨‍🍳Order endpoints
    • 🛎️Orders
    • 🪙Payment types
    • ☕Plus
    • 🔏Roles
    • 🔐Sessions
    • ⚙️Settings
    • 🔎Stock takings
    • 🔢Stock transfer numbering
    • 🚚Stock transfers
    • 📦Stocks
    • 🧾Tickets
      • Ticket Model States
      • Ticket Operations and User Rights
      • Ticket Model Mathematics
    • 👨‍💼Users
    • ⚖️Vats
    • 🪑Zones
  • 3rd Party Integrations
    • Introduction
    • Online orders API
    • Rewards API
    • PDA Files
  • Previous versions
    • Migration to V4.1
    • Migration to V4
    • Legacy documentation
Powered by GitBook
On this page
  • API methods
  • CRUD actions
  • Get fiscals
  • Get fiscal by name
  • Create fiscal
  • Create or update fiscal
  • Delete fiscal by name
  • RPC actions
  • Open cash drawer
  • Perform cash transfer
  • Print ticket copy
  • Print last ticket copy
  • Print overview sales report
  • Print summary interval sales report
  • Print detailed interval sales report
  • Print daily sales report
  • Print daily sales report copy
  • Print last daily sales report copy
  • Print text

Was this helpful?

  1. API reference

Fiscals

This page provides a description of the available API routes for managing fiscal devices.

PreviousDevicesNextHealth check

Last updated 1 year ago

Was this helpful?

Fiscal device refers to receipt printer that prints cash register receipts (part of ticket closing procedure).

Fiscal device is represented by 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 .

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 true, response will not contain items collection. Use to get resource count, not the resources themselves.

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.

{
    "items":
    [
        {
            "name": "Virtual",
            "isActive": true,
            "type": "Virtual",
            "version": "",
            "dkp": "88811223344550000",
            "settings":
            {
                "Footer": "Ďakujeme za nákup!"
            },
            "_v": 1
        }
    ],
    "count": 1,
    "totalCount": 1
}

Get fiscal by name

GET http://{server-address}/fiscals/{name}

Path Parameters

Name
Type
Description

name*

string

Unique fiscal name.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "name": "fiscal1",
    "isActive": true,
    "type": "Virtual",
    "version": "",
    "dkp": "88811223344550000",
    "settings":
    {
        "Footer": "Ďakujeme za nákup!"
    },
    "_v": 1
}{
    "name": "fiscal1",
    "isActive": true,
    "type": "Virtual",
    "version": "",
    "dkp": "88811223344550000",
    "settings":
    {
        "Footer": "Ďakujeme za nákup!"
    },
    "_v": 1
}
{
    "title": "Zdroj nebol nájdený",
    "status": 404
}

Create fiscal

POST http://{server-address}/fiscals

Required rights

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(body)*

Fiscal

Model to create.

{
    "name": "fiscal1",
    "isActive": true,
    "type": "Virtual",
    "version": "",
    "dkp": "88811223344550000",
    "settings":
    {
        "Footer": "Ďakujeme za nákup!"
    },
    "_v": 1
}

Create or update fiscal

PUT http://{server-address}/fiscals/{name}

Required rights

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.

{
    "name": "fiscal1",
    "isActive": true,
    "type": "Virtual",
    "version": "",
    "dkp": "88811223344550000",
    "settings":
    {
        "Footer": "Ďakujeme za nákup!"
    },
    "_v": 1
}

Delete fiscal by name

DELETE http://{server-address}/fiscals/{name}

Required rights

Path Parameters

Name
Type
Description

name*

string

Unique fiscal name.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "name": "fiscal1",
    "isActive": true,
    "type": "Virtual",
    "version": "",
    "dkp": "88811223344550000",
    "settings":
    {
        "Footer": "Ďakujeme za nákup!"
    },
    "_v": 1
}
{
    "title": "Fiskálna tlačiareň 'eKasa' je označená ako neaktívna.",
    "status": 403
}

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

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.

Required rights

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

Required rights

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

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

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.

Required rights

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.

Required rights

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

Required rights

Path Parameters

Name
Type
Description

name*

string

Unique fiscal name.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "id": "649ad7516413d6a4de6c8cb4",
    "fiscalName": "eKasa",
    "number": 1,
    "fiscalMemorySerialNumber": "1326585810",
    "openDate": "2023-06-27T08:04:25.605Z",
    "closeDate": "2023-06-27T22:42:13.662Z",
    "currencyLabel": "EUR",
    "cashTransfers":
    [],
    "fiscalInfo":
    {
        "ticketsCount": 7,
        "ticketsAmountIncludingVat":
        {
            "amount": 80.65,
            "currencyLabel": "EUR"
        },
        "invalidTicketsCount": 0,
        "invalidTicketsAmountIncludingVat":
        {
            "amount": 0.0,
            "currencyLabel": "EUR"
        },
        "invoiceTicketsCount": 0,
        "invoiceTicketsAmountIncludingVat":
        {
            "amount": 0.0,
            "currencyLabel": "EUR"
        },
        "positiveTicketItemsCount": 8,
        "positiveTicketItemsAmountIncludingVat":
        {
            "amount": 80.65,
            "currencyLabel": "EUR"
        },
        "returnedContainerTicketItemsCount": 0,
        "returnedContainerTicketItemsAmountIncludingVat":
        {
            "amount": 0.0,
            "currencyLabel": "EUR"
        },
        "returnedTicketItemsCount": 0,
        "returnedTicketItemsAmountIncludingVat":
        {
            "amount": 0.0,
            "currencyLabel": "EUR"
        },
        "correctionTicketItemsCount": 0,
        "correctionTicketItemsAmountIncludingVat":
        {
            "amount": 0.0,
            "currencyLabel": "EUR"
        },
        "discountTicketItemsCount": 0,
        "discountTicketItemsAmountIncludingVat":
        {
            "amount": 0.0,
            "currencyLabel": "EUR"
        },
        "advanceTicketItemsCount": 0,
        "advanceTicketItemsAmountIncludingVat":
        {
            "amount": 0.0,
            "currencyLabel": "EUR"
        },
        "creditTicketItemsCount": 0,
        "creditTicketItemsAmountIncludingVat":
        {
            "amount": 0.0,
            "currencyLabel": "EUR"
        },
        "voucherTicketItemsCount": 0,
        "voucherTicketItemsAmountIncludingVat":
        {
            "amount": 0.0,
            "currencyLabel": "EUR"
        },
        "vatIncomes":
        [
            {
                "vatCategory": 1,
                "vatRate": 20.0,
                "totalAmount":
                {
                    "amount": 9.45,
                    "currencyLabel": "EUR"
                },
                "vatAmount":
                {
                    "amount": 1.58,
                    "currencyLabel": "EUR"
                }
            },
            {
                "vatCategory": 2,
                "vatRate": 10.0,
                "totalAmount":
                {
                    "amount": 71.2,
                    "currencyLabel": "EUR"
                },
                "vatAmount":
                {
                    "amount": 6.47,
                    "currencyLabel": "EUR"
                }
            },
            {
                "vatCategory": 3,
                "vatRate": 0.0,
                "totalAmount":
                {
                    "amount": 0.0,
                    "currencyLabel": "EUR"
                },
                "vatAmount":
                {
                    "amount": 0.0,
                    "currencyLabel": "EUR"
                }
            },
            {
                "vatCategory": 4,
                "vatRate": 0.0,
                "totalAmount":
                {
                    "amount": 0.0,
                    "currencyLabel": "EUR"
                },
                "vatAmount":
                {
                    "amount": 0.0,
                    "currencyLabel": "EUR"
                }
            },
            {
                "vatCategory": 5,
                "vatRate": 0.0,
                "totalAmount":
                {
                    "amount": 0.0,
                    "currencyLabel": "EUR"
                },
                "vatAmount":
                {
                    "amount": 0.0,
                    "currencyLabel": "EUR"
                }
            }
        ],
        "grandTotalAmountIncludingVat":
        {
            "amount": 1619.31,
            "currencyLabel": "EUR"
        },
        "roundingDown":
        {
            "amount": -0.02,
            "currencyLabel": "EUR"
        },
        "roundingUp":
        {
            "amount": 0.02,
            "currencyLabel": "EUR"
        }
    },
    "state": "Closed",
    "_v": 2
}

Print daily sales report copy

POST http://{server-address}/fiscals/{name}/daily_sales_report_copy

Required rights

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

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

Required rights

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.

Result is of type .

Creates new fiscal. Result is of type .

Authorized user must have FiscalCreate assigned.

Creates new or updates existing fiscal. Result is of type .

Authorized user must have assigned FiscalCreate or FiscalUpdate .

Authorized user must have FiscalDelete assigned.

Authorized user must have FiscalOpenDrawer assigned.

The method accepts in request body.

Authorized user must have FiscalCashTransfer assigned.

Prints copy of specified ticket on fiscal printer. Method accepts in request body.

Authorized user must have FiscalPrintRecordCopy assigned.

Authorized user must have FiscalPrintRecordCopy assigned.

Authorized user must have OverviewSalesReport assigned.

The method accepts in request body.

Authorized user must have SummaryIntervalSalesReport assigned.

The method accepts in request body.

Authorized user must have DetailedIntervalSalesReport assigned.

Performs daily sales closure and prints daily sales report on specified fiscal printer. 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.

Authorized user must have DoDailySalesReport assigned.

Prints copy of daily sales report associated with given fiscal printer. Method accepts in request body.

Authorized user must have FiscalPrintDailySalesReportCopy assigned.

Authorized user must have FiscalPrintDailySalesReportCopy assigned.

Prints text (nonfiscal record) on selected fiscal device. Method accepts in request body.

Authorized user must have PrintNonfiscalRecord assigned.

🖨️
right
right
right
right
right
right
right
right
right
right
right
right
right
right
Fiscal
QueryResult<Fiscal>
Fiscal
Fiscal
Fiscal
CashTransfer
RecordCopyContext
IntervalSalesReportContext
IntervalSalesReportContext
DailySalesReport
DailySalesReportCopyContext
NonfiscalRecordContext