REST API v2.15

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

fields

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

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&fields=warehouseid,warehousetype,usetype,storeid,sellable,name,externalid

Response

{ "totalcount": 3, "items": [ { "warehouseid": 1, "warehousetype": 10, "usetype": 10, "storeid": 1, "sellable": true, "name": "Warehouse 1", "externalid": null }, { "warehouseid": 2, "warehousetype": 10, "usetype": 10, "storeid": null, "sellable": true, "name": "Warehouse 2", "externalid": null } ] }

Add Warehouse

Endpoint

POST sites/{siteid}/warehouses

Request body

See warehouse for fields.
Required fields:
usetypecurrencycodename

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 warehouseid if successful.

Example

Request

POST https://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses.json { "usetype": 40, "currencycode": "USD", "name": "Reclaims" }

Response

4

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/4.json

Response

{ "warehouseid": 4, "warehousetype": 10, "usetype": 40, "storeid": null, "sellable": true, "currencycode": "USD", "name": "Reclaims", "address": "", "address2": "", "zip": "", "city": "", "state": "", "countryid": null, "externalid": "" }

Update Warehouse

Endpoint

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

Request body

See warehouse 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/4.json { "name": "Demo", "usetype": 20 }

Response

true

Delete Warehouse

Endpoint

DELETE 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 true if successful.

Example

Request

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

Response

true

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