Warehouse Batches

Add Warehouse Batch

post /sites/{siteid}/warehouses/{warehouseid}/warehousebatches.json
PARAMETERS
siteid
integer
path
REQUIRED

Site ID. (Use eshopid of the site for this parameter).

warehouseid
integer
path
REQUIRED

Warehouse ID.

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
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
429Too Many Requests.
500Internal Server Error.

Get Warehouse Batches

get /sites/{siteid}/warehouses/{warehouseid}/warehousebatches.json
PARAMETERS
transactiontype
integer
query

Filter on the type of transaction.

TransactionType
warehousebatchstate
object
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.json?fields=warehousebatchid,comment,emailowner
siteid
integer
path
REQUIRED

Site ID. (Use eshopid of the site for this parameter).

warehouseid
integer
path
REQUIRED

Warehouse ID.

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.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
429Too Many Requests.
500Internal Server Error.

Get Warehouse Batch

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

Site ID. (Use eshopid of the site for this parameter).

warehouseid
integer
path
REQUIRED

Warehouse ID.

warehousebatchid
integer
path
REQUIRED

Warehouse Batch ID.

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.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
429Too Many Requests.
500Internal Server Error.

Update Warehouse Batch

put /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}.json

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

Site ID. (Use eshopid of the site for this parameter).

warehouseid
integer
path
REQUIRED

Warehouse ID.

warehousebatchid
integer
path
REQUIRED

Warehouse Batch ID.

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
200Successful. Returns true.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
429Too Many Requests.
500Internal Server Error.

Get Warehouse Batch Items

get /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems.json
PARAMETERS
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.json?fields=warehouseitemid,sku,decimalquantity
siteid
integer
path
REQUIRED

Site ID. (Use eshopid of the site for this parameter).

warehouseid
integer
path
REQUIRED

Warehouse ID.

warehousebatchid
integer
path
REQUIRED

Warehouse Batch ID.

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.
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
429Too Many Requests.
500Internal Server Error.

Batch Set Warehouse Batch Items

put /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems.json
PARAMETERS
siteid
integer
path
REQUIRED

Site ID. (Use eshopid of the site for this parameter).

warehouseid
integer
path
REQUIRED

Warehouse ID.

warehousebatchid
integer
path
REQUIRED

Warehouse Batch ID.

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
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
429Too Many Requests.
500Internal Server Error.

Batch Delete Warehouse Batch Items

delete /sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems.json
PARAMETERS
siteid
integer
path
REQUIRED

Site ID. (Use eshopid of the site for this parameter).

warehouseid
integer
path
REQUIRED

Warehouse ID.

warehousebatchid
integer
path
REQUIRED

Warehouse Batch ID.

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
400Invalid request. Data sent from client is invalid.
401Missing or bad authentication.
404The specified resource was not found.
429Too Many Requests.
500Internal Server Error.

Objects

DecimalQuantity
string

Pattern: ^[-+]?[0-9]+\.[0-9]{3}$
Example: "123.000"

Error
object

PROPERTIES
statuscode
integer
REQUIRED

A status code for the error. Usually HTTP status code.

errortext
string
REQUIRED

A textual description of the error.

errorcode
string

An optional internal code for the error.

Money
string

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

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

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