API documentation
Method list
Test your request
Changelog


addOrderReceiptFile
The method allows you to add an external file to a receipt previously issued from BaseLinker. It enables replacing a standard receipt from BaseLinker with a receipt issued e.g. in an ERP program. The method supports PDF and JWS (e-receipt) file formats.


Input parameters
receipt_idintBaseLinker receipt identifier
filetextReceipt file in PDF or JWS format. For PDF: binary content encoded in base64 with a "data:" prefix, e.g. "data:4AAQSkSzkJRgABA[...]". For JWS (e-receipt): raw JWS token string (without base64 encoding or "data:" prefix).
external_receipt_numbervarchar(20)External system receipt number (overwrites BaseLinker receipt number)



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



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