Warehouse Transactions

Get Warehouse Transactions

get /sites/{siteid}/warehouses/{warehouseid}/warehousetransactions.json
PARAMETERS
siteid
integer
path
REQUIRED
warehouseid
integer
path
REQUIRED
warehousetransactionid
array (integer)
query

Filter on warehousetransactionid, use comma as separator for multiple values.

Example: /sites/{siteid}/warehouses/{warehouseid}/warehousetransactions.json?warehousetransactionid=123,127,135
warehousetransactionidfrom
integer
query

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

warehousetransactionidto
integer
query

Filter on warehousetransactions with id lower than the value provided

datecreatedfrom
integer
query

Filter on warehousetransactions with datecreated starting from the timestamp provided

datecreatedto
integer
query

Filter on warehousetransactions with datecreated ending before the timestamp provided

transactiontype
integer
query

Filter on transactiontype.

transactiontype
start
integer
query

The index of the item to start from

Default: 0
num
integer
query

The number of items returned

Default: 10
sort
string
query

Sort the result.

Available values:
  • warehousetransactionid
  • -warehousetransactionid
Default: "-warehousetransactionid"
fields
array (string)
query

Comma separated list of fields to return. Use this to query only the fields you are using. See warehousetransaction for all fields.

Default: [ "warehousetransactionid", "warehouseid", "datecreated", "transactiontype", "description", "orderdeliveryid", "shipmentid", "externalid", "reasoncode", "items" ]
Example: /sites/{siteid}/warehouses/{warehouseid}/warehousetransactions.json?fields=warehousetransactionid,warehouseid,transactiontype
Returns

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

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousetransactions.json?num=2
RESPONSE JSON
{
"totalcount": 16,
"items": [
{
"warehousetransactionid": 18,
"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": 16,
"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"
}
]
}
]
}
HTTP Status Code Summary
200Returns an envelope with items of type warehousetransaction 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 Transaction

get /sites/{siteid}/warehouses/{warehouseid}/warehousetransactions/{warehousetransactionid}.json
PARAMETERS
siteid
integer
path
REQUIRED
warehouseid
integer
path
REQUIRED
warehousetransactionid
integer
path
REQUIRED
Returns

Returns an item of type warehousetransaction.

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/warehouses/1/warehousetransactions/16.json
RESPONSE JSON
{
"warehousetransactionid": 16,
"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"
}
]
}
HTTP Status Code Summary
200Returns an item of type warehousetransaction.
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 Add Warehouse Transactions

post /sites/{siteid}/warehousetransactions.json

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.

PARAMETERS
siteid
integer
path
REQUIRED
REQUEST BODY
posthttps://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 JSON
[
{
"statuscode": 200,
"return": 17
},
{
"statuscode": 200,
"return": 18
}
]
HTTP Status Code Summary
200Returns warehousetransactionid or a batch envelope if multiple transactions were added
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 All Warehouse Transactions

get /sites/{siteid}/warehousetransactions.json
PARAMETERS
siteid
integer
path
REQUIRED
warehousetransactionid
array (integer)
query

Filter on warehousetransactionid, use comma as separator for multiple values.

Example: /sites/{siteid}/warehousetransactions.json?warehousetransactionid=123&warehousetransactionid=127&warehousetransactionid=135
warehousetransactionidfrom
integer
query

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

warehousetransactionidto
integer
query

Filter on warehousetransactions with id lower than the value provided

datecreatedfrom
integer
query

Filter on warehousetransactions with datecreated starting from the timestamp provided

datecreatedto
integer
query

Filter on warehousetransactions with datecreated ending before the timestamp provided

warehouseid
integer
query

Filter on warehouseid

transactiontype
integer
query

Filter on transactiontype.

transactiontype
start
integer
query

The index of the item to start from

Default: 0
num
integer
query

The number of items returned

Default: 10
sort
string
query

Sort the result.

Available values:
  • warehousetransactionid
  • -warehousetransactionid
Default: "-warehousetransactionid"
fields
array (string)
query

Comma separated list of fields to return. Use this to query only the fields you are using. See warehousetransaction for all fields.

Default: [ "warehousetransactionid", "warehouseid", "datecreated", "transactiontype", "description", "orderdeliveryid", "shipmentid", "externalid", "reasoncode", "items" ]
Example: /sites/{siteid}/warehousetransactions.json?fields=warehousetransactionid,warehouseid,transactiontype
Returns

Returns an envelope with items of type warehousetransaction.

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/warehousetransactions.json?num=3
RESPONSE JSON
{
"totalcount": 16,
"items": [
{
"warehousetransactionid": 16,
"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": 15,
"warehouseid": 2,
"datecreated": 1606817252,
"transactiontype": 30,
"description": "",
"orderdeliveryid": 13,
"shipmentid": null,
"externalid": null,
"reasoncode": null,
"items": [
{
"decimalquantity": "-1.000",
"decimaltotal": "-1.000",
"moneypricein": "0.00",
"moneytotal": "0.00",
"moneyvalue": "0.00",
"sku": "10038-2"
},
{
"decimalquantity": "-2.000",
"decimaltotal": "-2.000",
"moneypricein": "0.00",
"moneytotal": "0.00",
"moneyvalue": "0.00",
"sku": "83428-0"
},
{
"decimalquantity": "-1.000",
"decimaltotal": "-1.000",
"moneypricein": "0.00",
"moneytotal": "0.00",
"moneyvalue": "0.00",
"sku": "83537-0"
}
]
},
{
"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"
}
]
}
]
}
HTTP Status Code Summary
200Returns an envelope with items of type warehousetransaction.
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}$
Example: "123.00"

timestamp
integer

Number of seconds since the Unix Epoch.

transactiontype
integer

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

warehouseitemlog
object

Log item that belongs to a warehousetransaction (ie. has a product's stock count and value for a transaction).

PROPERTIES
decimalquantity
string
REQUIRED

The change of stock in this transaction.

decimaltotal
string
READ ONLY

The stock level after this transaction.

moneypricein

The purchase price per item for this transaction (Not applicable for all transaction types).

moneytotal
READ ONLY

The value of this stock after this transaction.

moneyvalue
READ ONLY

The sum value of this itemlog entry. (The warehouse value changed).

sku
string
REQUIRED

The SKU for this stock item.

warehousetransaction
object

All changes to a warehouse is made using transactions.

PROPERTIES
warehousetransactionid
integer
READ ONLY

The unique ID of the warehousetransaction.

warehouseid
integer
REQUIRED

The ID of the warehouse that this warehousetransaction belongs to.

datecreated
READ ONLY

The date when the transaction was created.

transactiontype
REQUIRED

The type of the transaction. (Sales, Refund and StockTaking are read only)

description
string

A description of the transaction.

orderdeliveryid
integer
READ ONLY

The ID for the orderdelivery that created this transaction (if applicable, otherwise null).

shipmentid
integer

The ID for the shipment that created this transaction (if applicable, otherwise null).

externalid
string

External ID for the warehouse transaction (if applicable, otherwise null).

reasoncode
string

A reason code for the warehouse transaction (if applicable, otherwise null).

items
REQUIRED

Array of warehouseitemlog.

returnvalue

Holds a value of type string or an integer depending on statuscode