API documentation
Method list
Test your request
Changelog


getInventoryPurchaseOrders
The method allows you to retrieve a list of purchase orders from BaseLinker storage.


Input parameters
inventory_idint(optional) Catalog ID. The list of identifiers can be retrieved using the method getInventories.
supplier_idint(optional) Limiting results to a specific supplier ID
series_idint(optional) Limiting results to a specific document series ID
date_fromint(optional) Date from which documents should be retrieved (Unix timestamp)
date_toint(optional) Date up to which documents should be retrieved (Unix timestamp)
filter_document_numbervarchar(50)(optional) Filtering by document number (full or partial match)
pageint(optional) Results paging (100 documents per page)



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
purchase_ordersarrayList of purchase orders. Each element contains fields listed below
| - order_idintPurchase order identifier
| - series_idintDocument series identifier
| - document_numbervarchar(50)Full document number
| - date_addintDocument creation date (Unix timestamp)
| - date_createdintDocument issue date (Unix timestamp)
| - date_receivedint(optional) Date when order was received (Unix timestamp)
| - date_completedint(optional) Date when order was completed (Unix timestamp)
| - warehouse_idintWarehouse identifier
| - supplier_idintSupplier identifier
| - payer_idint(optional) Payer identifier
| - currencyvarchar(3)Order currency (e.g. EUR, USD)
| - total_quantityintTotal quantity of items
| - completed_total_quantityintTotal quantity of received items
| - total_costdecimal(10,2)Total order cost
| - completed_total_costdecimal(10,2)Total cost of received items
| - items_countintNumber of unique items in order
| - completed_items_countintNumber of unique items received
| - cost_invoice_novarchar(50)(optional) Related invoice number
| - notestext(optional) Order notes/description
| - statustinyintOrder status. 0 - draft, 1 - sent, 2 - received, 3 - completed, 4 - completed partially, 5 - canceled



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