REST API v2.8

Warehouses

Handle warehouses and stock.

Get Warehouses

Endpoint

GET sites/{siteid}/warehouses

Parameters

start

The index of the item to start fromDefault: 0

num

The number of items returnedDefault: 10

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns an envelope with items of type warehouse.

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses.json?num=2

Response

{ "totalcount": 3, "items": [ { "warehouseid": 1, "warehousetype": 10, "currencycode": "SEK", "name": "Warehouse 1", "address": "", "address2": "", "zip": "", "city": "", "state": "", "countryid": null, "externalid": null }, { "warehouseid": 2, "warehousetype": 20, "currencycode": "SEK", "name": "Warehouse 2", "address": "", "address2": "", "zip": "", "city": "", "state": "", "countryid": null, "externalid": null } ] }

Get Warehouse

Endpoint

GET sites/{siteid}/warehouses/{warehouseid}

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns an item of type warehouse.

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1.json

Response

{ "warehouseid": 1, "warehousetype": 10, "currencycode": "SEK", "name": "Warehouse 1", "address": "", "address2": "", "zip": "", "city": "", "state": "", "countryid": null, "externalid": null }

Get Warehouse Items

Endpoint

GET sites/{siteid}/warehouses/{warehouseid}/warehouseitems

Parameters

start

The index of the item to start fromDefault: 0

num

The number of items returnedDefault: 10

datelastmodifiedfrom

Filter on warehouseitems with datelastmodified starting from the timestamp provided

datelastmodifiedto

Filter on warehouseitems with datelastmodified ending before the timestamp provided

fields

Comma separated list of fields to return. Use this to query only the fields you are using.
Default fields:
warehouseitemidskubinlocationdecimalthresholddecimaltotalmoneytotaldatelastmodifieddatelaststocktaking

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

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

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehouseitems.json?num=2&fields=warehouseitemid,sku,binlocation,decimalthreshold,decimaltotal,moneytotal,datelastmodified,datelaststocktaking,decimalreserved,decimalavailable

Response

{ "totalcount": 14, "items": [ { "warehouseitemid": 1, "sku": "10038-3", "binlocation": "", "decimalthreshold": "3.000", "decimaltotal": "5.000", "moneytotal": "19600.00", "datelastmodified": 1462874148, "datelaststocktaking": 1462874148, "decimalreserved": "0.000", "decimalavailable": "5.000" }, { "warehouseitemid": 2, "sku": "10038-4", "binlocation": "", "decimalthreshold": "3.000", "decimaltotal": "5.000", "moneytotal": "19600.00", "datelastmodified": 1462874148, "datelaststocktaking": 1462874148, "decimalreserved": "0.000", "decimalavailable": "5.000" } ] }

Batch Set Warehouse Items

Endpoint

PUT sites/{siteid}/warehouses/{warehouseid}/warehouseitems

Request body

See warehouseitem for fields.
Required fields:
sku

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns a batch envelope with warehouseitemid for the warehouseitems set.

Example

Request

PUT https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehouseitems.json [ { "sku": "10038-1", "binlocation": "I3:S4", "decimalthreshold": "10.000" }, { "sku": "10038-2", "binlocation": "I3:S5", "decimalthreshold": "3.000" } ]

Response

[ { "statuscode": 200, "return": 3 }, { "statuscode": 200, "return": 5 } ]

Get Warehouse Batches

Endpoint

GET sites/{siteid}/warehouses/{warehouseid}/warehousebatches

Parameters

transactiontype

Filter on the type of transaction. ValueDescription10ManualIn20ManualOut30Sales40Refund50StockTaking

warehousebatchstate

Filter on the state of the warehousebatch. ValueDescription10Open20Closed30CancelledDefault: 10

start

The index of the item to start fromDefault: 0

num

The number of items returnedDefault: 10

fields

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

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

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

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches.json

Response

{ "totalcount": 1, "items": [ { "warehousebatchid": 1, "warehouseid": 1, "warehousetransactionid": null, "transactiontype": 10, "datecreated": 1463124692, "warehousebatchstate": 10, "emailowner": "", "comment": "", "shipmentid": null, "externalid": null, "reasoncode": null } ] }

Add Warehouse Batch

Endpoint

POST sites/{siteid}/warehouses/{warehouseid}/warehousebatches

Request body

See warehousebatch for fields.
Required fields:
transactiontype

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns warehousebatchid if successful.

Example

Request

POST https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches.json { "transactiontype": 50, "emailowner": "info@example.com", "comment": "New Stocktaking" }

Response

2

Get Warehouse Batch

Endpoint

GET sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns an item of type warehousebatch.

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches/2.json

Response

{ "warehousebatchid": 2, "warehouseid": 1, "warehousetransactionid": null, "transactiontype": 50, "datecreated": 1543832753, "warehousebatchstate": 10, "emailowner": "info@example.com", "comment": "New Stocktaking", "shipmentid": null, "externalid": null, "reasoncode": null }

Get Warehouse Batch Items

Endpoint

GET sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems

Parameters

start

The index of the item to start fromDefault: 0

num

The number of items returnedDefault: 10

fields

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

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

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

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches/1/warehousebatchitems.json

Response

{ "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" } ] }

Batch Set Warehouse Batch Items

Endpoint

PUT sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems

Request body

See warehousebatchitem for fields. Note! moneypricein is only allowed for transactiontype 10 (ManualIn).
Required fields:
sku

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns true if successful or a batch envelope if multiple warehousebatchitems were set.

Example

Request

PUT https://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

[ { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true } ]

Batch Delete Warehouse Batch Items

Endpoint

DELETE sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}/warehousebatchitems

Request body

See warehousebatchitem for fields.
Required fields:
sku

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns true if successful or a batch envelope if multiple warehousebatchitems were deleted.

Example

Request

DELETE https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousebatches/2/warehousebatchitems.json [ { "sku": "10038-2" }, { "sku": "10038-3" } ]

Response

[ { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true } ]

Update Warehouse Batch

Note! Changing the warehousebatchstate from 10 (Open) to 20 (Closed) will trigger the commit of a transaction for the batch items

Endpoint

PUT sites/{siteid}/warehouses/{warehouseid}/warehousebatches/{warehousebatchid}

Request body

See warehousebatch for fields.

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns true if successful.

Example

Request

PUT https://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

true

Get All Warehouse Transactions

Endpoint

GET sites/{siteid}/warehousetransactions

Parameters

warehousetransactionidfrom

Filter on warehousetransactions with id higher than or equal to the value provided

warehousetransactionidto

Filter on warehousetransactions with id lower than the value provided

datecreatedfrom

Filter on warehousetransactions with datecreated starting from the timestamp provided

datecreatedto

Filter on warehousetransactions with datecreated ending before the timestamp provided

warehouseid

Filter on warehouseid

transactiontype

Filter on transactiontype. ValueDescription10ManualIn20ManualOut30Sales40Refund50StockTaking

start

The index of the item to start fromDefault: 0

num

The number of items returnedDefault: 10

sort

Sort the result. Possible values:
warehousetransactionid-warehousetransactionidDefault: -warehousetransactionid

fields

Comma separated list of fields to return. Use this to query only the fields you are using.
Default fields:
warehousetransactionidwarehouseiddatecreatedtransactiontypedescriptionorderdeliveryidshipmentidexternalidreasoncodeitems

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns an envelope with items of type warehousetransaction.

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/warehousetransactions.json?num=2

Response

{ "totalcount": 15, "items": [ { "warehousetransactionid": 15, "warehouseid": 1, "datecreated": 1543832753, "transactiontype": 50, "description": "Stocktaking has been completed!", "orderdeliveryid": null, "shipmentid": null, "externalid": null, "reasoncode": null, "items": [ { "decimalquantity": "-1.000", "decimaltotal": "9.000", "moneypricein": "0.00", "moneytotal": "35280.00", "moneyvalue": "-3920.00", "sku": "10038-1" } ] }, { "warehousetransactionid": 14, "warehouseid": 1, "datecreated": 1463041119, "transactiontype": 40, "description": "", "orderdeliveryid": 11, "shipmentid": null, "externalid": null, "reasoncode": null, "items": [ { "decimalquantity": "1.000", "decimaltotal": "8.000", "moneypricein": "0.00", "moneytotal": "7024.00", "moneyvalue": "878.00", "sku": "44079-0" } ] } ] }

Get Warehouse Transactions

Endpoint

GET sites/{siteid}/warehouses/{warehouseid}/warehousetransactions

Parameters

warehousetransactionidfrom

Filter on warehousetransactions with id higher than or equal to the value provided

warehousetransactionidto

Filter on warehousetransactions with id lower than the value provided

datecreatedfrom

Filter on warehousetransactions with datecreated starting from the timestamp provided

datecreatedto

Filter on warehousetransactions with datecreated ending before the timestamp provided

transactiontype

Filter on transactiontype. ValueDescription10ManualIn20ManualOut30Sales40Refund50StockTaking

start

The index of the item to start fromDefault: 0

num

The number of items returnedDefault: 10

sort

Sort the result. Possible values:
warehousetransactionid-warehousetransactionidDefault: -warehousetransactionid

fields

Comma separated list of fields to return. Use this to query only the fields you are using.
Default fields:
warehousetransactionidwarehouseiddatecreatedtransactiontypedescriptionorderdeliveryidshipmentidexternalidreasoncodeitems

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

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

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousetransactions.json?num=2

Response

{ "totalcount": 15, "items": [ { "warehousetransactionid": 15, "warehouseid": 1, "datecreated": 1543832753, "transactiontype": 50, "description": "Stocktaking has been completed!", "orderdeliveryid": null, "shipmentid": null, "externalid": null, "reasoncode": null, "items": [ { "decimalquantity": "-1.000", "decimaltotal": "9.000", "moneypricein": "0.00", "moneytotal": "35280.00", "moneyvalue": "-3920.00", "sku": "10038-1" } ] }, { "warehousetransactionid": 14, "warehouseid": 1, "datecreated": 1463041119, "transactiontype": 40, "description": "", "orderdeliveryid": 11, "shipmentid": null, "externalid": null, "reasoncode": null, "items": [ { "decimalquantity": "1.000", "decimaltotal": "8.000", "moneypricein": "0.00", "moneytotal": "7024.00", "moneyvalue": "878.00", "sku": "44079-0" } ] } ] }

Get Warehouse Transaction

Endpoint

GET sites/{siteid}/warehouses/{warehouseid}/warehousetransactions/{warehousetransactionid}

HTTP Response Status

200

OK. Returns data (see below).

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.

Returns

Returns an item of type warehousetransaction.

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousetransactions/15.json

Response

{ "warehousetransactionid": 15, "warehouseid": 1, "datecreated": 1543832753, "transactiontype": 50, "description": "Stocktaking has been completed!", "orderdeliveryid": null, "shipmentid": null, "externalid": null, "reasoncode": null, "items": [ { "decimalquantity": "-1.000", "decimaltotal": "9.000", "moneypricein": "0.00", "moneytotal": "35280.00", "moneyvalue": "-3920.00", "sku": "10038-1" } ] }