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
Output data:
A sample request in PHP:
| series_id | int | (optional) The numbering series ID allows filtering by the receipt numbering series. |
| id_from | int | (optional) The ID of the receipt from which subsequent receipts will be retrieved (inclusive). |
| date_from | int | (optional) Date from which receipts are to be collected. Unix timestamp format. |
| date_to | int | (optional) Date to which receipts are to be collected. Unix timestamp format. |
Output data
The method returns the data in JSON format.
| status | varchar(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 |
| receipts | array | An array of information on the receipts found. Each receipt is described by the fields listed below. |
| receipt_id | int | The receipt ID |
| series_id | int | Receipt numbering series identifier |
| receipt_full_nr | varchar(30) | The number assigned by Base when creating the receipt. |
| order_id | int | Order Identifier from Base order manager |
| date_add | int | Date of order creation (in unix time format) |
| payment_method | varchar(30) | Payment type name |
| nip | varchar(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. |
| products | array | An 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: