REST API v2.15

Warehouse Transactions

Handle warehouse transactions.

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": 1550669776, "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" } ] } ] }

Batch Add Warehouse Transactions

This functions allows multiple transactions to be sent at once, like in the example below. For each item sent in an array a response is returned.

NOTE! Transactions cannot be added to warehouses with warehousetype Virtual (20).

NOTE 2! The maximum number of items allowed for one request to this endpoint is 1000.

Endpoint

POST sites/{siteid}/warehousetransactions

Request body

See warehousetransaction for fields. Arrays are allowed when sending multiple transactions.
Required fields:
warehouseidtransactiontypeitems

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 warehousetransactionid if successful. If multiple transactions were added, a batch envelope is returned as response.

Example

Request

POST https://api.mysitoo.com/v2/accounts/1500/sites/1/warehousetransactions.json [ { "warehouseid": 2, "transactiontype": 20, "description": "Move Out", "externalid": "EXTID1", "reasoncode": null, "items": [ { "sku": "Q100", "decimalquantity": "-13.000" } ] }, { "warehouseid": 1, "transactiontype": 10, "description": "Move In", "externalid": "EXTID2", "reasoncode": null, "items": [ { "sku": "Q100", "decimalquantity": "13.000", "moneypricein": "3.45" } ] } ]

Response

[ { "statuscode": 200, "return": 16 }, { "statuscode": 200, "return": 17 } ]

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": 16, "items": [ { "warehousetransactionid": 17, "warehouseid": 1, "datecreated": 1559046593, "transactiontype": 10, "description": "Move In", "orderdeliveryid": null, "shipmentid": null, "externalid": "EXTID2", "reasoncode": null, "items": [ { "decimalquantity": "13.000", "decimaltotal": "13.000", "moneypricein": "3.45", "moneytotal": "44.85", "moneyvalue": "44.85", "sku": "Q100" } ] }, { "warehousetransactionid": 15, "warehouseid": 1, "datecreated": 1550669776, "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" } ] } ] }

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": 1550669776, "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" } ] }