1b.app
Link copied -

API Storage (Storage)

Method: / api / storage-translocation/

Parameters

Example of capitalization:

http://myboxurl/api/storage-translocation/?login=LOGIN&password=PASSWORD&type=incoming&storageto=STORAGE_1&productArray[1][code]=GOODS1&productArray[1][count]=2&productArray[1][price]=22&productArray[1][currency]=USD&productArray[1][serialnumber]=123456

Move example:

http://myboxurl/api/storage-translocation/?login=LOGIN&password=PASSWORD&type=transfer&storageto=STORAGE_1&storagefrom=STORAGE_2&productArray[1][code]=GOODS1&productArray[1][count]=2&productArray[1][serialnumber]=123456

Example of write-off:

http://myboxurl/api/storage-translocation/?login=LOGIN&password=PASSWORD&type=outcoming&storagefrom=STORAGE_2&productArray[1][code]=GOODS1&productArray[1][count]=2&productArray[1][serialnumber]=123456

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
name - product name
serialnumber - serial number
count - Quantity
price - product price
currency - currency name or code
vat - VAT included
shipment - batch code
warranty - guarantee
cell - cell

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/

Parameters

Example:

http://myboxurl/api/storage-translocation/edit/?login=LOGIN&password=PASSWORD&id=111&productArray[1][count]=1&productArray[1][price]=10&productArray[1][batchCode]=1111111&productArray[1][id]=123

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
price - Price
amount - Quantity
shipment - batch code
delete - delete product, if you want to remove product from operation set this field to true

custom_*key* - additional warehouse field, replace * key * with Field ID

Stock balance update, method: /api/storage-translocation/updatebalance/

Parameters

Example:

http://myboxurl/api/storage-translocation/updatebalance/?login=LOGIN&password=PASSWORD&storagecode=111&suppliercode=222&productArray[1][code]=1&productArray[1][amount]=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 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
price - Price
currencyid - system currency code
currencyname - currency name
amount - Quantity
shipment - batch code

serial - serial number

taxvalue - VAT amount

Receiving operations, method: /api/storage-translocation/get/

Parameters

Example:

http://myboxurl/api/storage-translocation/get/?login=LOGIN&password=PASSWORD&type=incoming
http://myboxurl/api/storage-translocation/get/?login=LOGIN&password=PASSWORD&id=123
http://myboxurl/api/storage-translocation/get/?login=LOGIN&password=PASSWORD

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/

Parameters

Example:

http://myboxurl/api/storage-balance/get/?login=LOGIN&password=PASSWORD&storagenameid=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 storagenameid string id or warehouse code1c Required field.  
4 getproductdiscount boolean Получить скидку продукта в процентах Optional field. Если параметр указан, в возвращаемом массиве появятся значения discountpercent
         

Return field values
id - id entries,
productId - id product,
code - post code,
amount - product quantity,
amountavaillable - quantity of goods that is not reserved,

reserve - Quantity reserved item,
cost - value of goods in operation in base currency,
cdate - date the entry was added,
dateto - expiration date,
currency - currency,
price - Price,
pricebase - base price,
productname - product name,
serial - product series,
currencyrate - currency rate,
storageName - warehouse name,

Get a list of warehouses, method: /api/storage-names/get/

Parameters

Example:

http://myboxurl/api/storage-names/get/?login=LOGIN&password=PASSWORD

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
id - id warehouse,
name - warehouse name,
code - warehouse code,
forsale - is it possible to sell from this warehouse (1 - you can, 0 - no),
isvendor - is the warehouse a virtual warehouse of the supplier (1 - yes, 0 - no),
isemployee - is the warehouse an employee's virtual warehouse (1 - yes, 0 - no),
isoutcoming - can I check out from the warehouse (1 - yes, 0 - no),
hidden - hidden warehouse (1 - yes, 0 - no),
default - default warehouse for posting (1 - yes, 0 - no),
externalid - external warehouse ID,

Change the balance of products in stock: / api / storage-translocation / product / updatebalance/

Parameters

Posting a product in the amount of 2pcs to the warehouse:

http://myboxurl/api/storage-translocation/product/updatebalance/?login=LOGIN&password=PASSWORD&data={"storageid":4,"vendorid":3,"productArray":[{"code1c":42875,"count":2,"price":120}]}

Writing off a product in the amount of 2pcs from the warehouse:

http://myboxurl/api/storage-translocation/product/updatebalance/?login=LOGIN&password=PASSWORD&data={"storageid":4,"vendorid":3,"productArray":[{"code1c":42875,"count":-2,"price":120}]}

Set product balance to 2:

http://myboxurl/api/storage-translocation/product/updatebalance/?login=LOGIN&password=PASSWORD&useTotalBalance=1&data={"storageid":4,"vendorid":3,"productArray":[{"code1c":42875,"count":2,"price":120}]}
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/

Parameters

Добавление склада с названием Склад1 и Внешним id 10

http://myboxurl/api/storage/names/add/?login=LOGIN&password=PASSWORD&externalid=10&name=Склад1

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

More details
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)

Errors may also occur:

502 Bad Gateway - If this error occurs it is necessary:
1. Check if you have internet access (go to any other site).
2. If there are no problems with access — cookies can be deleted.
If the above doesn't work — server side problem. Please contact your site system administrator.

503 (Service Temporarily Unavailable) - this error may occur as a result of too many server requests. If you see this error, you should wait a couple of minutes and try again.

504 Gateway Timeout - cmost likely the reason is the increased load on the site, in which Apache is not has time to send HTTP responses and new requests are queued. You can add resources to the server, in particular RAM, and increase the number of httpd (Apache) processes.
Another possible reason for error 504 is that the executable script does not fit within the allotted limit time. This happens when the request is too heavy. Try to split your request into a few more small.

Error 505 HTTP Version not supported means the website is not Supports the version of the HTTP protocol that the browser uses to request a web page