addInventoryPurchaseOrderFile
The method allows you to add a cost invoice PDF file to a purchase order. It enables attaching an invoice issued by the supplier to the corresponding purchase order in Base.
Input parameters
| purchase_order_id | int | Purchase order identifier from BaseLinker |
| file | text | Invoice PDF file in binary format encoded in base64. Provide a prefix "data:" at the beginning e.g. "data:4AAQSkSzkJRgABA[...]" |
| cost_invoice_no | varchar(100) | (optional) Cost 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: