Warehouse Batches
Add Warehouse Batch
post /sites/{siteid}/warehouses/{warehouseid}/warehousebatches.jsonSite ID. (Use eshopid
of the site for this parameter).
Warehouse ID.
{ "transactiontype": 50, "emailowner": "info@example.com", "comment": "New Stocktaking"}
2
HTTP Status Code Summary | |
---|---|
200 | Returns warehousebatchid |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Warehouse Batches
get /sites/{siteid}/warehouses/{warehouseid}/warehousebatches.jsonFilter on the type of transaction.
The index of the item to start from
The number of items returned
Comma separated list of fields to return. Use this to query only the fields you are using. Default is all fields in warehousebatch.
Site ID. (Use eshopid
of the site for this parameter).
Warehouse ID.
{ "totalcount": 1, "items": [ { "warehousebatchid": 1, "warehouseid": 1, "warehousetransactionid": null, "transactiontype": 10, "datecreated": 1463124692, "warehousebatchstate": 10, "emailowner": "", "comment": "", "shipmentid": null, "externalid": null, "reasoncode": null } ]}
HTTP Status Code Summary | |
---|---|
200 | Returns an envelope with items of type warehousebatch for a warehouse. |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Warehouse Batch
get /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}.jsonSite ID. (Use eshopid
of the site for this parameter).
Warehouse ID.
Warehouse Batch ID.
{ "warehousebatchid": 2, "warehouseid": 1, "warehousetransactionid": null, "transactiontype": 50, "datecreated": 1550669775, "warehousebatchstate": 10, "emailowner": "info@example.com", "comment": "New Stocktaking", "shipmentid": null, "externalid": null, "reasoncode": null}
HTTP Status Code Summary | |
---|---|
200 | Returns an item of type warehousebatch. |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Update Warehouse Batch
put /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}.jsonNote! Changing the warehousebatchstate from 10
(Open) to 20
(Closed) will trigger the commit of a transaction for the batch items
Site ID. (Use eshopid
of the site for this parameter).
Warehouse ID.
Warehouse Batch ID.
{ "warehousebatchstate": 20, "emailowner": "info@example.com", "comment": "Stocktaking has been completed!"}
true
HTTP Status Code Summary | |
---|---|
200 | Successful. Returns true. |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Warehouse Batch Items
get /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems.jsonThe index of the item to start from
The number of items returned
Comma separated list of fields to return. Use this to query only the fields you are using. Default is all fields in warehousebatchitem.
Site ID. (Use eshopid
of the site for this parameter).
Warehouse ID.
Warehouse Batch ID.
Returns an envelope with items of type warehousebatchitem for a warehousebatch.
{ "totalcount": 2, "items": [ { "warehousebatchitemid": 1, "warehousebatchid": 1, "warehouseitemid": 3, "datemodified": 1463131430, "decimalquantity": "25.000", "moneypricein": "3920.00", "emailowner": "info@example.com", "comment": null, "sku": "10038-1" }, { "warehousebatchitemid": 2, "warehousebatchid": 1, "warehouseitemid": 5, "datemodified": 1463131443, "decimalquantity": "5.000", "moneypricein": "3920.00", "emailowner": "info@example.com", "comment": null, "sku": "10038-2" } ]}
HTTP Status Code Summary | |
---|---|
200 | Returns an envelope with items of type warehousebatchitem for a warehousebatch. |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Batch Set Warehouse Batch Items
put /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems.jsonSite ID. (Use eshopid
of the site for this parameter).
Warehouse ID.
Warehouse Batch ID.
[ { "sku": "10038-1", "decimalquantity": "9.000", "emailowner": "info@example.com", "comment": "1 missing" }, { "sku": "10038-2", "decimalquantity": "2.000", "emailowner": "info@example.com", "comment": "" }, { "sku": "10038-3", "decimalquantity": "1.000" }]
[ { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true }]
HTTP Status Code Summary | |
---|---|
200 | Returns true or a batch envelope if multiple warehousebatchitems were set |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Batch Delete Warehouse Batch Items
delete /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems.jsonSite ID. (Use eshopid
of the site for this parameter).
Warehouse ID.
Warehouse Batch ID.
[ { "sku": "10038-2" }, { "sku": "10038-3" }]
[ { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true }]
HTTP Status Code Summary | |
---|---|
200 | Returns true or a batch envelope if multiple warehousebatchitems were deleted |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
404 | The specified resource was not found. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Objects
DecimalQuantitystring
Errorobject
A status code for the error. Usually HTTP status code.
A textual description of the error.
An optional internal code for the error.
Moneystring
Timestampinteger
Number of seconds since the Unix Epoch.
TransactionTypeinteger
10
ManualIn20
ManualOut30
Sales40
Refund50
StockTaking
WarehouseBatchobject
All changes to a warehouse is made using transactions. To make a change, first create a warehousebatch, add batch items and then set the batch to closed. That will commit the batch and create a warehousetransaction.
The unique ID of the warehousebatch.
The warehouse ID for this warehousebatch.
The warehouse transaction ID for this warehousebatch.
The type of the transaction.
The creation date for this warehousebatch.
The state of this warehousebatch.
The email for the owner of this warehousebatch.
The comment for this warehousebatch.
The ID for the shipment that is the source of this warehouse batch (if applicable).
External ID for the warehousebatch which will be transferred to the warehouse transaction (if applicable).
A reason code for the warehousebatch which will be transferred to the warehouse transaction (if applicable).
WarehouseBatchItemobject
Warehouse batch item for a warehousebatch.
The unique ID of the warehousebatchitem.
The ID of the warehousebatch that this warehousebatchitem belongs to.
The unique ID of the warehouseitem.
The modified date for this warehousebatchitem.
The stock quantity for this warehousebatchitem.
The purchase price per item for this warehousebatchitem.
The email for the owner of this warehousebatchitem.
A comment for the warehousebatchitem.
The SKU for this stock item.
WarehouseBatchStateinteger
10
Open20
Closed30
Cancelled