Warehouse Batches

Add Warehouse Batch

post /sites/{siteid}/warehouses/{warehouseid}/warehousebatches
PARAMETERS
siteid
integer
path
REQUIRED
warehouseid
integer
path
REQUIRED
REQUEST BODY
posthttps://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches.json
{
"transactiontype": 50,
"emailowner": "info@example.com",
"comment": "New Stocktaking"
}
RESPONSE JSON
2
HTTP Status Code Summary
200Returns warehousebatchid
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Get Warehouse Batches

get /sites/{siteid}/warehouses/{warehouseid}/warehousebatches
PARAMETERS
siteid
integer
path
REQUIRED
warehouseid
integer
path
REQUIRED
transactiontype
integer
query

Filter on the type of transaction.

transactiontype
warehousebatchstate
integer
query

Filter on the state of the warehousebatch.

warehousebatchstate
Default: 10
start
integer
query

The index of the item to start from

Default: 0
num
integer
query

The number of items returned

Default: 10
fields
array (string)
query

Comma separated list of fields to return. Use this to query only the fields you are using. Default is all fields in warehousebatch.

Example: /sites/{siteid}/warehouses/{warehouseid}/warehousebatches?fields=warehousebatchid,comment,emailowner
RETURNS

Returns an envelope with items of type warehousebatch for a warehouse.

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches.json
RESPONSE JSON
{
"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
200Returns an envelope with items of type warehousebatch for a warehouse.
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Get Warehouse Batch

get /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}
PARAMETERS
siteid
integer
path
REQUIRED
warehouseid
integer
path
REQUIRED
warehousebatchid
integer
path
REQUIRED
RETURNS

Returns an item of type warehousebatch.

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches/2.json
RESPONSE JSON
{
"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
200Returns an item of type warehousebatch.
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal 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

PARAMETERS
siteid
integer
path
REQUIRED
warehouseid
integer
path
REQUIRED
warehousebatchid
integer
path
REQUIRED
REQUEST BODY
puthttps://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches/2.json
{
"warehousebatchstate": 20,
"emailowner": "info@example.com",
"comment": "Stocktaking has been completed!"
}
RESPONSE JSON
true
HTTP Status Code Summary
200Returns true
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Get Warehouse Batch Items

get /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems
PARAMETERS
siteid
integer
path
REQUIRED
warehouseid
integer
path
REQUIRED
warehousebatchid
integer
path
REQUIRED
start
integer
query

The index of the item to start from

Default: 0
num
integer
query

The number of items returned

Default: 10
fields
array (string)
query

Comma separated list of fields to return. Use this to query only the fields you are using. Default is all fields in warehousebatchitem.

Example: /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems?fields=warehouseitemid,sku,decimalquantity
RETURNS

Returns an envelope with items of type warehousebatchitem for a warehousebatch.

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches/1/warehousebatchitems.json
RESPONSE JSON
{
"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
200Returns an envelope with items of type warehousebatchitem for a warehousebatch.
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Batch Set Warehouse Batch Items

put /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems
PARAMETERS
siteid
integer
path
REQUIRED
warehouseid
integer
path
REQUIRED
warehousebatchid
integer
path
REQUIRED
REQUEST BODY
puthttps://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches/2/warehousebatchitems.json
[
{
"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"
}
]
RESPONSE JSON
[
{
"statuscode": 200,
"return": true
},
{
"statuscode": 200,
"return": true
},
{
"statuscode": 200,
"return": true
}
]
HTTP Status Code Summary
200Returns true or a batch envelope if multiple warehousebatchitems were set
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Batch Delete Warehouse Batch Items

delete /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems
PARAMETERS
siteid
integer
path
REQUIRED
warehouseid
integer
path
REQUIRED
warehousebatchid
integer
path
REQUIRED
REQUEST BODY
array
deletehttps://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches/2/warehousebatchitems.json
[
{
"sku": "10038-2"
},
{
"sku": "10038-3"
}
]
RESPONSE JSON
[
{
"statuscode": 200,
"return": true
},
{
"statuscode": 200,
"return": true
}
]
HTTP Status Code Summary
200Returns true or a batch envelope if multiple warehousebatchitems were deleted
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Objects

money
string

Pattern: ^[-+]?[0-9]+\.[0-9]{2}$

timestamp
integer

Number of seconds since the Unix Epoch.

transactiontype
integer

  • 10 ManualIn
  • 20 ManualOut
  • 30 Sales
  • 40 Refund
  • 50 StockTaking

warehousebatch
object

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.

PROPERTIES
warehousebatchid
integer
READ ONLY

The unique ID of the warehousebatch.

warehouseid
integer
READ ONLY

The warehouse ID for this warehousebatch.

warehousetransactionid
integer
READ ONLY

The warehouse transaction ID for this warehousebatch.

transactiontype
REQUIRED

The type of the transaction.

datecreated
READ ONLY

The creation date for this warehousebatch.

warehousebatchstate

The state of this warehousebatch.

emailowner
string

The email for the owner of this warehousebatch.

comment
string

The comment for this warehousebatch.

shipmentid
integer

The ID for the shipment that is the source of this warehouse batch (if applicable).

externalid
string

External ID for the warehousebatch which will be transferred to the warehouse transaction (if applicable).

reasoncode
string

A reason code for the warehousebatch which will be transferred to the warehouse transaction (if applicable).

warehousebatchitem
object

Warehouse batch item for a warehousebatch.

PROPERTIES
warehousebatchitemid
integer
READ ONLY

The unique ID of the warehousebatchitem.

warehousebatchid
integer
READ ONLY

The ID of the warehousebatch that this warehousebatchitem belongs to.

warehouseitemid
integer
READ ONLY

The unique ID of the warehouseitem.

datemodified
READ ONLY

The modified date for this warehousebatchitem.

decimalquantity
string

The stock quantity for this warehousebatchitem.

moneypricein

The purchase price per item for this warehousebatchitem.

emailowner
string

The email for the owner of this warehousebatchitem.

comment
string

A comment for the warehousebatchitem.

sku
string
REQUIRED

The SKU for this stock item.

warehousebatchstate
integer

  • 10 Open
  • 20 Closed
  • 30 Cancelled