Last update 2020-03-06
This method is for creating stocks operation document. Method could be called multiple times for appending rows to stocks document. All parameters are expected via HTTP POST.
| Name | Description | Notes |
|---|---|---|
| session_id | Session id | |
| login | RIVILE username | |
| pass | RIVILE password hashed in MD5 | |
| stocksOperationId | Unique stocks operation id. 0 if new document must be created | i11_kodas_in |
| stocksOperationNr | Stocks operation document number | i11_dok_nr |
| stocksOperationDep | Stocks operation department | i11_kodas_is |
| stocksRow | document rows list JSON format |
| Name | Description | Notes |
|---|---|---|
| stocksRowType | row type 1 - product 3 - code |
i12_tipas |
| stocksRowCode | code of stocks row If stocksRowType = 1 then ID of product. If stocksRowType = 3 then ID of code |
i12_kodas_ps |
| stocksRowQty | stocks row quantity | i12_kiekis |
If stocksRowQty is < 0, then product quantity will be written off, otherwise quantity will be increased.
| Name | Description | Notes |
|---|---|---|
| lang | Web service response language. EN LT or RU | |
| testMode | Test mode on / off. If 1 No actual documment will be created, just parameters , test. 0 By default | |
| stocksOperationDescription | Stock operation description | i11_pav |
| stocksOperationDate | Date of stocks operation in YYYY-MM-DD format. By default current date | i11_op_data |
| stocksOperationStatus | Stocks operation status | i11_busena |
| stocksOperationType | Stocks operation type 1 - inventory 2 - write-off 3 - production 4 - Adjustments 5 - stocks 6 - Other Default value 6 is used |
i11_tipas |
| stocksLogisticCode1 | Logistic code 1 | i11_kodas_ls_1 |
| stocksLogisticCode2 | Logistic code 2 | i11_kodas_ls_2 |
| stocksLogisticCode3 | Logistic code 3 | i11_kodas_ls_3 |
| stocksLogisticCode4 | Logistic code 4 | i11_kodas_ls_4 |
| Name | Description | Notes |
|---|---|---|
| stocksRowName | stocks row name | i12_pav |
| stocksRowObject | stocks row object | i12_kodas_os |
| stocksRowCenter | stocks row center | i12_kodas_os_c |
| stocksRowSerial | stocks row serial | i12_serija |
| stocksRowAccount | General Ledger account number (6000 by default) | i12_kodas_ss |
| stocksRowDescription1 | stocks document row description 1 field | i12_aprasymas1 |
| stocksRowDescription2 | stocks document row description 2 field | i12_aprasymas2 |
| stocksRowDescription3 | stocks document row description 3 field | i12_aprasymas3 |
| stocksRowCertificate | stocks row certificate | i12_sertifikatas |
| stocksRowAmount | stocks row amount without VAT | i12_sav_suma |
stocksRowAmount is necessary if stocksRowQty is > 0 in case off quantity increase operation , otherwise it will be ignored.
| Name | Description | Notes |
|---|---|---|
| status | Web service status | |
| description | Status description | |
| login | RIVILE username | |
| stocksOperationId | Stocks operation id |
| Name | Description |
|---|---|
| 00 | Ok |
| 01 | No parameter session_id |
| 02 | No parameter login |
| 03 | No parameter pass |
| 04 | Login failed |
| 05 | No parameter stocksOperationId |
| 06 | Stocks document not found |
| 07 | Parameter stocksOperationDate validation error |
| 08 | stocksOperationType values 1,2,3,4,5,6 only allowed |
| 09 | Wrong parameter lang , values LT,EN,RU only. |
| 10 | Department not found |
| 11 | stocksOperationDep identification error |
| 12 | testMode only values 0,1 allowed |
| 13 | Parameter stocksOperationStatus validation error. Values 1-99 only. |
| 14 | stocksLogisticCodeX not found |
| 15 | Parameter stocksRow is not json List. |
| 16 | Parameter stocksRow not found |
| 17 | stocksRow field - stocksRowType is required |
| 18 | stocksRowType values 1,3 only allowed |
| 19 | stocksRow field - stocksRowCode is required |
| 20 | Product code not found |
| 21 | Code not found |
| 22 | stocksRowQty not number |
| 23 | Fraction is 1 but Quantity not whole number |
| 24 | salesRowObject not found |
| 25 | stocksRowCenter not found |
| 26 | stocksRowAmount not number |
| 27 | stocksRowAccount not found |
| 28 | Insufficient quantity |
| 29 | System does not have required parameter riv_id |
| 30 | New document. Mandatory field stocksOperationDep is required |
| 31 | New document. Mandatory field - stocksOperationNr required |
| 32 | Document with the same number exists. stocksOperationNr |
| 33 | Stocks document is confirmed |
| 98 | DB connect error |
| 99 | Web service POST parameters error |