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
Output data:
A sample request in PHP:
warehouse_id | int | Source warehouse identifier |
document_type | int | 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) |
target_warehouse_id | int | (optional) Target warehouse identifier - required only for transfer documents |
date_add | int | (optional) Date of document creation (in unix time format). If not specified, the current date will be used. |
date_execute | int | (optional) Date of document execution (in unix time format). If not specified, the current date will be used. |
contractor | varchar(500) | (optional) Contractor description/notes |
invoice_no | varchar(50) | (optional) Related 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 |
document_id | int | Created document identifier |
document_number | string | Generated document number |
Sample
Input data:Output data:
A sample request in PHP: