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
  • Get daily sales reports
  • Get daily sales report
  • Create or update daily sales report
  • Manually close daily sales report
  • Delete daily sales report

Was this helpful?

  1. API reference

Daily sales reports

This page provides a description of the available API routes for managing daily sales reports.

PreviousCustomersNextDevices

Last updated 5 months ago

Was this helpful?

The fiscal device sends record closure information after each closed ticket or cash transfer. If a daily sales report record does not already exist (identified by fiscal name, fiscal memory serial number, and daily sales report number), it is automatically created by API.

Each ticket is associated with a specific daily sales report, and this information is stored in the 's closeInfo property.

Daily sales report record is modified by API after following actions are performed on fiscal device:

  • cash transfer: new element is added to cash transfers collection

  • daily sales report closure: fiscal info model is fulfilled and daily sales report is considered as closed.

Daily sales report is closed, when it's state property is set to closed or manuallyClosed. Closed daily sales reports cannot be modified.

Daily sales report is represented by class.

API methods

Get daily sales reports

GET http://{server-address}/dailysalesreports

Returns all daily sales reports that matches query parameters. Result is of type .

Query Parameters

Name
Type
Description

isClosed

bool

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.

id

bool

Supports NData syntax.

openDate

DateTime

currencyLabel

string

fiscalMemorySerialNumber

string

number

int

fiscalName

string

state

DailySalesReportStatus

closeDate

DateTime

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "items":
    [
        {
            "id": "646f5d625527869ae467b117",
            "fiscalName": "eKasa",
            "number": 2,
            "fiscalMemorySerialNumber": "1326585810",
            "openDate": "2023-06-28T08:06:40Z",
            "closeDate": null,
            "currencyLabel": "EUR",
            "cashTransfers":
            [],
            "fiscalInfo": null,
            "state": "Open",
            "_v": 1
        },
        {
            "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":
                [
                    {
                        "vatRate": 20.0,
                        "totalAmount":
                        {
                            "amount": 9.45,
                            "currencyLabel": "EUR"
                        },
                        "vatAmount":
                        {
                            "amount": 1.58,
                            "currencyLabel": "EUR"
                        }
                    },
                    {
                        "vatRate": 10.0,
                        "totalAmount":
                        {
                            "amount": 71.2,
                            "currencyLabel": "EUR"
                        },
                        "vatAmount":
                        {
                            "amount": 6.47,
                            "currencyLabel": "EUR"
                        }
                    },
                    {
                        "vatRate": 0.0,
                        "totalAmount":
                        {
                            "amount": 0.0,
                            "currencyLabel": "EUR"
                        },
                        "vatAmount":
                        {
                            "amount": 0.0,
                            "currencyLabel": "EUR"
                        }
                    },
                    {
                        "vatRate": null,
                        "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
        }
    ],
    "count": 2,
    "totalCount": 2
}

Get daily sales report

GET http://{server-address}/dailysalesreports/{id}

Path Parameters

Name
Type
Description

id*

string

Unique identifier.

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":
        [
            {
                "vatRate": 20.0,
                "totalAmount":
                {
                    "amount": 9.45,
                    "currencyLabel": "EUR"
                },
                "vatAmount":
                {
                    "amount": 1.58,
                    "currencyLabel": "EUR"
                }
            },
            {
                "vatRate": 10.0,
                "totalAmount":
                {
                    "amount": 71.2,
                    "currencyLabel": "EUR"
                },
                "vatAmount":
                {
                    "amount": 6.47,
                    "currencyLabel": "EUR"
                }
            },
            {
                "vatRate": 0.0,
                "totalAmount":
                {
                    "amount": 0.0,
                    "currencyLabel": "EUR"
                },
                "vatAmount":
                {
                    "amount": 0.0,
                    "currencyLabel": "EUR"
                }
            },
            {
                "vatRate":null,
                "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
}
{
    "title": "Zdroj nebol nΓ‘jdenΓ½",
    "status": 404
}

Create or update daily sales report

PUT http://{server-address}/dailysalesreports/{id}

Required rights

Path Parameters

Name
Type
Description

id*

string

Unique identifier.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

Request Body

Name
Type
Description

(body)*

DailySalesReport

Model to create or update.

{
    "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":
        [
            {
                "vatRate": 20.0,
                "totalAmount":
                {
                    "amount": 9.45,
                    "currencyLabel": "EUR"
                },
                "vatAmount":
                {
                    "amount": 1.58,
                    "currencyLabel": "EUR"
                }
            },
            {
                "vatRate": 10.0,
                "totalAmount":
                {
                    "amount": 71.2,
                    "currencyLabel": "EUR"
                },
                "vatAmount":
                {
                    "amount": 6.47,
                    "currencyLabel": "EUR"
                }
            },
            {
                "vatRate": 0.0,
                "totalAmount":
                {
                    "amount": 0.0,
                    "currencyLabel": "EUR"
                },
                "vatAmount":
                {
                    "amount": 0.0,
                    "currencyLabel": "EUR"
                }
            },
            {
                "vatRate": null,
                "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
}
{
    "title": "Cannot modify daily sales report that is aleady marked as closed.",
    "status": 403
}

Manually close daily sales report

POST http://{server-address}/dailysalesreports/{id}/close

Required rights

Path Parameters

Name
Type
Description

id

string

Unique identifier.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "id": "646f5d625527869ae467b117",
    "fiscalName": "eKasa",
    "number": 2,
    "fiscalMemorySerialNumber": "1326585810",
    "openDate": "2023-06-28T08:06:40Z",
    "closeDate": "2023-06-28T15:06:40Z",
    "currencyLabel": "EUR",
    "cashTransfers":
    [],
    "fiscalInfo": null,
    "state": "ManuallyClosed",
    "_v": 2
}

Delete daily sales report

DELETE http://{server-address}/dailysalesreports/{id}

Required rights

Path Parameters

Name
Type
Description

id*

string

Unique identifier.

Headers

Name
Type
Description

Authorization*

string

Authorization header with authorization token.

{
    "id": "646f5d625527869ae467b117",
    "fiscalName": "eKasa",
    "number": 2,
    "fiscalMemorySerialNumber": "1326585810",
    "openDate": "2023-06-28T08:06:40Z",
    "closeDate": null,
    "currencyLabel": "EUR",
    "cashTransfers":
    [],
    "fiscalInfo": null,
    "state": "Open",
    "_v": 1
}
{
    "title": "Zdroj nebol nΓ‘jdenΓ½",
    "status": 404
}

Result is of type .

Creates new or updates existing (non-closed) daily sales report. Result is of type .

Authorized user must have assigned DsrCreate or DsrUpdate .

Changes state of daily sales report to manuallyClosed. Result is of type .

Authorized user must have dsrCloseManually assigned.

Authorized user must have DsrDelete assigned.

πŸ“ˆ
right
right
right
ticket
DailySalesReport
QueryResult<DailySalesReport>
DailySalesReport
DailySalesReport
DailySalesReport