API documentation
Method list
Test your request
Changelog


getInventoryDocuments
This method allows you to retrieve a list of inventory documents from BaseLinker. It supports pagination and optional filtering by document type, date range, etc.


Input parameters
filter_source_object_typeint(optional) The source object type to filter by: 1 - order, 2 - purchase order, 3 - stock take, 4 - order return, 7 - fulfillment delivery, 8 - transfer
filter_source_object_idint(optional) The source object ID to filter by
filter_document_idint(optional) A specific inventory document ID
filter_document_typeint(optional) The document type: 0 - GR (Goods Received), 1 - IGR (Internal Goods Received), 2 - GI (Goods Issue), 3 - IGI (Internal Goods Issue), 4 - IT (Internal Transfer), 5 - OB (Opening Balance)
filter_document_statusint(optional) The document status: 0 - Draft, 1 - Confirmed
filter_date_fromint(optional) The minimum creation date (unix timestamp) to filter by
filter_date_toint(optional) The maximum creation date (unix timestamp) to filter by
filter_warehouse_idint(optional) The warehouse ID
pageint(optional) Results page number (100 documents per page, numbered from 1)



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
documentsarrayAn array of inventory documents
| - document_idintThe unique identifier of the inventory document
| - document_typeintThe document type: 0-GR, 1-IGR, 2-GI, 3-IGI, 4-IT, 5-OB
| - document_statusintThe document status: 0 - Draft, 1 - Confirmed
| - directionintThe document direction (0 = incoming, 1 = outgoing)
| - document_series_idintThe ID of the document series
| - full_numbervarchar(30)The full document number
| - date_createdintThe creation date of the document in unix time
| - date_confirmedintThe confirmation date in unix time. 0 if not confirmed
| - warehouse_idintThe main warehouse ID used for this document
| - warehouse_id2intThe second (destination) warehouse ID for transfers
| - items_countintNumber of items in the document
| - total_quantityintTotal quantity of products in the document
| - total_pricedecimal(10,2)Total value (price) for the entire document
| - connection_typeintSource object type: 1-order, 2-purchase order, 3-stock take, 4-order return, 7-fulfillment delivery, 8-transfer
| - connection_idintSource object ID
| - notesvarchar(500)Document notes/comments
| - source_object_typeintType of source object that created this document: 0-no source, 1-order, 2-purchase order, 3-stock take, 4-order return, 7-fulfillment delivery, 8-transfer
| - source_object_idintID of the source object. 0 if no source



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