API documentation
Method list
Test your request
Changelog


addInventoryDocument
The method allows you to create a new inventory document in BaseLinker storage. Documents are created as draft and need to be confirmed by the user or setInventoryDocumentStatusConfirmed API method.


Input parameters
warehouse_idintSource warehouse identifier
document_typeintDocument 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)
target_warehouse_idint(optional) Target warehouse identifier - required only for transfer documents
date_addint(optional) Date of document creation (in unix time format). If not specified, the current date will be used.
date_executeint(optional) Date of document execution (in unix time format). If not specified, the current date will be used.
contractorvarchar(500)(optional) Contractor description/notes
invoice_novarchar(50)(optional) Related invoice 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
document_idintCreated document identifier
document_numberstringGenerated document number



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