Method: / api / storage-translocation/
Example of capitalization:
Move example:
Example of write-off:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | type | string | type of operation | Required field. | incoming - posting transfer - move outcoming - cancellation |
4 | code1c | string | opcode from external system | Optional field. | id operations from external system |
5 | storagefrom | string | Warehouse from which will be written off or moved | Optional field. | id product from your system or from BOX, if there is one, the engine will link it to the order |
6 | storageto | string | Warehouse will not be capitalized or moved | Optional field. | id warehouse from your system or from BOX or its name, if there is none, the system will create it |
7 | productArray | array(code, name, serialnumber, count, price, currency, vat, shipment, warranty, cell) | Array of products | Optional field. |
code - id product from your system or from BOX custom_*key* - additional warehouse field, replace * key * with Field ID |
8 | cdate | datetime | Date of operation | Optional field. | |
9 | dateto | datetime | Expiration date of the consignment (used for posting) | Optional field. | |
10 | contractor | decimal | Legal entity | Optional field. | id legal entity in BOX or its name |
11 | supplier | string | Provider | Optional field. | id the supplier of the item being posted or his name |
12 | numberdocument | string | Document Number | Optional field. | |
13 | typetransaction | integer | Trazak type of external system | Optional field. | |
14 | orderid | string | translate_wp_nomer_protsessa | Optional field. | Передача номера процесса в операцию |
Editing operations, method: /api/storage-translocation/edit/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | id | integer | id the operation that our API returned to you when it was created | Required field. | BOX operation code |
4 | code1c | string | opcode from external system | Required field. | id operations from external system |
5 | date | date | date of the event | Optional field. | Date of operation |
6 | dateto | date | Best before | Optional field. | |
7 | return | 1 / 0 | Return product | Optional field. | If you want to return an item from a transaction, please set this field to true |
8 | deleted | 1 / 0 | Delete | Optional field. | If you want to delete the operation, then set this field to true |
9 | productArray | array(id, price, amount, shipment, delete) | Array of products | Optional field. |
id - internal product code in operation custom_*key* - additional warehouse field, replace * key * with Field ID |
Stock balance update, method: /api/storage-translocation/updatebalance/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | storagecode | string | Warehouse where the balance of products will be checked | Required field. | warehouse code on the BOX system or from your system or the name of the warehouse on the system |
4 | suppliercode | string | The provider from which the posting will be made | Required field. | Vendor code in BOX system or from your system or vendor name |
5 | searchbyproductid | boolean | Only match products by id | Optional field. | If the parameter is not specified, by default the search goes by the code 1c, id, name |
6 | productArray | array(code, amount, currencyid, shipment, serial, taxvalue) | Array of products | Optional field. |
code - product code or name serial - serial number taxvalue - VAT amount |
Receiving operations, method: /api/storage-translocation/get/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | type | string | type of operation | Optional field. | incoming - posting transfer - move outcoming - cancellation |
4 | id | integer | id the operation that our API returned to you when it was created | Optional field. | BOX operation code |
5 | code1c | string | opcode from external system | Optional field. | id operations from the external system, if you pass -1 to this field, then you will get all records with empty code1c |
6 | datefrom | date | Date from | Optional field. | Date from which to take operations |
7 | dateto | date | Date to | Optional field. | By which date to take operations |
8 | storageto | string | ID or code1c | Optional field. | ID or code1c of the warehouse to which the operations were carried out |
9 | storagefrom | string | ID or code1c | Optional field. | ID or code1c of the warehouse from which the operations were carried out |
10 | orderid | string | translate_wp_nomer_protsessa | Optional field. | Фильтрация по номеру процесса |
11 | part | integer | Operation part | Optional field. | API gives up to 1000 products in the 1st part, to get the next 1000 products transfer there 2 (part 2 is obtained) and so on. Return field values id - id operations, code1c - opcode from external system, amount - quantity of goods in operation, cost - value of goods in operation in base currency, date - date of the event, dateto - expiration date, document - transaction document, type - type of operation, storagefrom - Array of information about the warehouse from which the move was made (id, code1c, name), storageto - Array of information about the warehouse to which the move was made (id, code1c, name), numberdocument - document number from external system, user - array of information about the operator (id, full name), typetransaction - type of operation from external system, product - array of products from the operation: id - internal product code in operation, productId - internal product code in the BOX system, productCode1c - external product code, productName - product name, amount - Quantity, pricebase - purchase price, warranty - guarantee, batchCode - batch code, |
Receiving leftovers, method: /api/storage-balance/get/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | storagenameid | string | id or warehouse code1c | Required field. | |
4 | getproductdiscount | boolean | Получить скидку продукта в процентах | Optional field. | Если параметр указан, в возвращаемом массиве появятся значения discountpercent |
Return field values reserve - Quantity reserved item, |
Get a list of warehouses, method: /api/storage-names/get/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | id | string | id warehouse | Optional field. | Used to get a specific warehouse at the specified id |
4 | externalid | string | external warehouse ID | Optional field. | Used to get a specific warehouse by the specified external ID |
4 | code | string | warehouse code | Optional field. | Used to get warehouses with the specified code |
5 | isemployee | boolean | Warehouse-employee | Optional field. | Used to get warehouses by employee |
6 | employerexternalid | integer | Employee external ID | Optional field. | Used to get warehouses for the employee with the specified external ID |
Return field values |
Change the balance of products in stock: / api / storage-translocation / product / updatebalance/
Posting a product in the amount of 2pcs to the warehouse:
Writing off a product in the amount of 2pcs from the warehouse:
Set product balance to 2:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | dataFromBody | boolean | Take data not from arguments, but from body | Optional field. | If dataFromBody = 1 is passed, then data will be taken not from arguments, but from the request body. Json must be passed to the body, in which the keys must be the parameters described above |
4 | useTotalBalance | boolean | 1 or 0 | Optional field. | If transferred - then when transferring count = 1 - the balance of the specified product in the warehouse will become 1. If this parameter is not passed, then when passing count = 1, 1 product will be capitalized, and if count = -1, 1 product will be written off |
5 | data | json | json | Required field. | Array where: storageid - id stock in OneBox storagecode1c - external warehouse id in OneBox. Required field if not specified storageid vendorid - id OneBox vendor vendorcode1c - External vendor id in OneBox. If not vendorid and vendorcode1c - the first available provider in the system will be taken productArray - array with product data, where one element is an array with data for 1 product, in which: code1c - external id of the product in the OneBox system (Required field) count - amount (Required) price - price (Optional) |
Adding a New Storeage /api/storage/names/add/
Добавление склада с названием Склад1 и Внешним id 10
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | externalid | integer | Внешний id склада | Required field. | Внешний id склада |
4 | name | string | 1 or 0 | Required field. | Название склада |
5 | forsale | boolean | boolean | Required field. | Можно продавать с этого склада? |
Possible responses to the request
№ | Status | Message | Message Description |
1 | ok | balanceArray | Array of the balance of the selected warehouse |
2 | fail | login_empty | Login missing |
3 | fail | password_empty | Missing password |
4 | fail | Login or password not correct! | Invalid username or password |
5 | fail | Bad user level! | Low user level to perform this action (requires level 2 or higher) |
6 | fail | Not found storage | No warehouse found |
7 | fail | You don't available transaction for update! | No transaction found to update (no id or transaction code) |
8 | fail | Transaction by id not found! | No transaction found with this id |
9 | fail | Transaction by code1c not found! | No transaction found with this code |
10 | fail | Returns can not be done! | Refund transaction could not be completed |
11 | fail | Returns can not be done! | The return could not be processed (no warehouse found to return the item to) |