addOrderInvoiceFile
The method allows you to add an external PDF file to an invoice previously issued from BaseLinker. It enables replacing a standard invoice from BaseLinker with an invoice issued e.g. in an ERP program.
Input parameters
Output data:
A sample request in PHP:
invoice_id | int | BaseLinker invoice identifier |
file | text | Invoice PDF file in binary format encoded in base64, at the very beginning of the invoice string provide a prefix "data:" e.g. "data:4AAQSkSzkJRgABA[...]" In some countries (e.g. Brazil), XML encoded in base64 is allowed - the string should also start with a prefix "data:" e.g. "data:PG5mZVB[...]" |
external_invoice_number | varchar(30) | External system invoice number (overwrites BaseLinker invoice number) |
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 |
Sample
Input data:Output data:
A sample request in PHP: