getPointOfSaleDayTotals

Returns today's cash, card and other payment type totals for the specified register (point of sale) or for a specific day.

This API call is for implementing a day closing procedure in POS. API provides day totals as recorded by Erply; cashier can then input actual counted amounts and reconcile the differences.

The returned totals include all payments that have taken place since the day was opened at the register. If you provide input parameter "openedUnixTime", API will check if a day was opened at that time; if it does not find that day opening event, an empty response is returned. If the parameter is omitted, API will automatically fetch the latest opening of the register.

This API call can also be called after the day closing procedure, should it be necessary.

If you are looking for X Report / Z Report printouts, see API call getReports.

To open or close the register, see POSOpenDay and POSCloseDay.

In order to use drawer counting feature use POSOpenDayV2 to open the days instead.

Input parameters

Parameter name Description Possible value Required
pointOfSaleID Point of sale ID. Integer yes
dayID Day ID. Cannot be used together with parameter pointOfSaleID. API will return code 1013 when both parameters are assigned. Integer yes
currencyCode

Specify the currency in which the day was opened, and get today's totals for this specific currency.

This parameter is necessary when you want to count cash separately for different currencies. This requires the additional module "POS multicurrency"; please contact customer support to enable it on your account.

To count cash in multiple currencies, day must be opened in the register separately in each currency. For instance, if the store accepts EUR, USD and JPY, three POSOpenDay calls need to be sent when the day is opened; one for each currency. Day totals must be retrieved with three "getPointOfSaleDayTotals" calls, and the Z Report can be retrieved separately for each currency with getReports.

If the "POS multicurrency" module has not been enabled, setting a value to this input parameter will return API error code 1028.

String (3)
openedUnixTime Opening timestamp. If specified, API tries to retrieve information that specific register day, otherwise, today's information is returned. Unix timestamp

Response

Field name Type Description
pointOfSaleID Integer Point of sale ID.
openedUnixTime Unix timestamp Opening timestamp.
openedEmployeeID Integer Employee opening the day.
paymentType String (10) CASH, CARD or TRANSFER
cardType String(255) Credit card type, eg. VISA, AMEX, M/C etc. (for card payments only).
beginningAmount Decimal Total amount of cash in register at opening time.
transactionsTotal Decimal
otherChangesTotal Decimal
expectedAmount Decimal
closedUnixTime Unix timestamp Closing timestamp.
closedEmployeeID Integer Employee closing the day.