API documentation
Method list
Test your request
Changelog


getReceipt
The method allows you to retrieve a single receipt from the BaseLinker order manager. To retrieve a list of new receipts (when integrating a fiscal printer), use the getNewReceipts method.


Input parameters
receipt_idintReceipt ID. Not required if order_id is provided.
order_idintOrder ID. Not required if receipt_id is provided.



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
receipt_idintThe receipt ID, used in the setOrderReceipt method to return the receipt as printed.
series_idintReceipt numbering series identifier
receipt_full_nrvarchar(30)The number assigned by BaseLinker when creating the receipt. Example number: "123/10/2018/P". The format depends on the settings - the numbering can be monthly, annual or continuous (then the number is a consecutive number). The number can be skipped, the fiscal printer can generate its own receipt number and save it in the setOrderReceipt method.
yearintYear - an element of the receipt number
monthintMonth - element of receipt number (0 if annual numbering is used)
sub_idintMonthly/yearly number - receipt number element
order_idintOrder Identifier from BaseLinker 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.
currencychar(3)3-letter currency symbol (e.g. EUR, PLN)
total_price_bruttofloatŁączna wartość paragonu brutto
external_receipt_numbervarchar(30)Receipt number from the fiscal cash register or from the external system
exchange_currencychar(3)Only for converted receipts. The target currency into which the receipt value was additionally converted.
exchange_ratedecimal(10,4)Only for converted receipts. Exchange rate (conversion from field "currency" to field "exchange_currency".
exchange_datevarchar(10)Only for converted receipts. Date of exchange rate.
exchange_infovarchar(10)Only for converted receipts. Information on the exchange rate source (NBP table number).
itemsarrayAn array of receipt items. Each element of the array is also an array containing fields:
name (varchar) - item name
sku (varchar) - product SKU number
ean (varchar) - product EAN number
price_brutto (float) - single item gross price
tax_rate (float) - VAT rate
quantity (int) - quantity of pieces



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