Warehouse Batches
Add Warehouse Batch
post /sites/{siteid}/warehouses/{warehouseid}/warehousebatches{ "transactiontype": 50, "emailowner": "info@example.com", "comment": "New Stocktaking"}
2
HTTP Status Code Summary | |
---|---|
200 | Returns warehousebatchid |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Warehouse Batches
get /sites/{siteid}/warehouses/{warehouseid}/warehousebatchesFilter 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.
{ "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 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Warehouse Batch
get /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}{ "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 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Update Warehouse Batch
put /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}Note! Changing the warehousebatchstate from 10 (Open) to 20 (Closed) will trigger the commit of a transaction for the batch items
{ "warehousebatchstate": 20, "emailowner": "info@example.com", "comment": "Stocktaking has been completed!"}
true
HTTP Status Code Summary | |
---|---|
200 | Returns true |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Warehouse Batch Items
get /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitemsThe 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.
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 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Batch Set Warehouse Batch Items
put /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems[ { "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 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Batch Delete Warehouse Batch Items
delete /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems[ { "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 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Objects
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