REST API v2.8

Warehouse Reason Codes

Collection of warehouse reason codes.

Get Reason Codes

Endpoint

GET warehousereasoncodes

Parameters

transactiontype

Filter on transactiontype. ValueDescription10ManualIn20ManualOut30Sales40Refund50StockTaking

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 warehousereasoncode.

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 warehousereasoncode.

Example

Request

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

Response

{ "totalcount": 2, "items": [ { "reasoncodeid": 1, "transactiontype": 10, "reasoncode": "101", "name": "Reclaim" }, { "reasoncodeid": 2, "transactiontype": 10, "reasoncode": "102", "name": "Guarantee" } ] }

Add Reason Code

Endpoint

POST warehousereasoncodes

Request body

See warehousereasoncode for fields.
Required fields:
reasoncodename

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

Example

Request

POST https://api.mysitoo.com/v2/accounts/1500/warehousereasoncodes.json { "transactiontype": 10, "reasoncode": "103", "name": "Reclaims" }

Response

3

Get Reason Code

Endpoint

GET warehousereasoncodes/{reasoncodeid}

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 warehousereasoncode.

Example

Request

GET https://api.mysitoo.com/v2/accounts/1500/warehousereasoncodes/3.json

Response

{ "reasoncodeid": 3, "transactiontype": 10, "reasoncode": "103", "name": "Reclaims" }

Update Reason Code

Endpoint

PUT warehousereasoncodes/{reasoncodeid}

Request body

See warehousereasoncode 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/warehousereasoncodes/3.json { "name": "Customer Reclaim" }

Response

true

Delete Reason Code

Endpoint

DELETE warehousereasoncodes/{reasoncodeid}

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/warehousereasoncodes/3.json

Response

true