API documentation
Method list
Test your request
Changelog


getReceipts
The method allows you to retrieve issued receipts. Max 100 receipts are returned at a time. To retrieve a list of new receipts (when integrating a fiscal printer), use the getNewReceipts method.


Input parameters
series_idint(optional) The numbering series ID allows filtering by the receipt numbering series.
id_fromint(optional) The ID of the receipt from which subsequent receipts will be retrieved (inclusive).
date_fromint(optional) Date from which receipts are to be collected. Unix timestamp format.
date_toint(optional) Date to which receipts are to be collected. Unix timestamp format.



Output data
The method returns the data in JSON format.
statusvarchar(30)SUCCESS - request executed correctly
ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code
receiptsarrayAn array of information on the receipts found. Each receipt is described by the fields listed below.
| - receipt_idintThe receipt ID
| - series_idintReceipt numbering series identifier
| - receipt_full_nrvarchar(30)The number assigned by Base when creating the receipt.
| - order_idintOrder Identifier from Base order manager
| - date_addintDate of order creation (in unix time format)
| - payment_methodvarchar(30)Payment type name
| - nipvarchar(30)Payers details - VAT Reg No.. It may contain special characters: letters (prefix), hyphens and spaces. The VAT registration number should be cleared from these characters at your own discretion.
| - productsarrayAn array of order products. Each element of the array is also an array containing fields:
name (varchar) - product name
price_brutto (float) - single item gross price
tax_rate (float) - VAT tax rate e.g. "23", (value from range 0-100, EXCEPTION values: "-1" for "EXPT"/"ZW" exempt from VAT, "-0.02" for "NP" annotation, "-0.03" for "OO" VAT reverse charge)
quantity (int) - quantity of pieces
sku (varchar) - product SKU number
ean (varchar) - product EAN number



Sample
Input data:
Output data:
A sample request in PHP: