Reason Codes

Add Reason Code

post /reasoncodes
REQUEST BODY
posthttps://api.mysitoo.com/v2/accounts/1500/reasoncodes.json
{
"type": 10,
"reasoncode": "103",
"name": "Reclaims"
}
RESPONSE JSON
3
HTTP Status Code Summary
200Returns reasoncodeid
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 Reason Codes

get /reasoncodes
PARAMETERS
type
array (integer)
query

Filter on type, use comma as separator for multiple types.

reasoncodetype
Example: /reasoncodes?type=10,20
start
integer
query

The index of the item to start from

Default: 0
num
integer
query

The number of items returned

Default: 10
fields
array (string)
query

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

Example: /reasoncodes?fields=reasoncodeid,transactiontype,reasoncode,name
RETURNS

Returns an envelope with items of type reasoncode.

gethttps://api.mysitoo.com/v2/accounts/1500/reasoncodes.json?num=2
RESPONSE JSON
{
"totalcount": 2,
"items": [
{
"reasoncodeid": 1,
"type": 10,
"reasoncode": "101",
"name": "Reclaim"
},
{
"reasoncodeid": 2,
"type": 10,
"reasoncode": "102",
"name": "Guarantee"
}
]
}
HTTP Status Code Summary
200Returns an envelope with items of type reasoncode.
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 Reason Code

get /reasoncodes/{reasoncodeid}
PARAMETERS
reasoncodeid
integer
path
REQUIRED
RETURNS

Returns an item of type reasoncode.

gethttps://api.mysitoo.com/v2/accounts/1500/reasoncodes/3.json
RESPONSE JSON
{
"reasoncodeid": 3,
"type": 10,
"reasoncode": "103",
"name": "Reclaims"
}
HTTP Status Code Summary
200Returns an item of type reasoncode.
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.

Update Reason Code

put /reasoncodes/{reasoncodeid}
PARAMETERS
reasoncodeid
integer
path
REQUIRED
REQUEST BODY
puthttps://api.mysitoo.com/v2/accounts/1500/reasoncodes/3.json
{
"name": "Customer Reclaim"
}
RESPONSE JSON
true
HTTP Status Code Summary
200Returns true
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.

Delete Reason Code

delete /reasoncodes/{reasoncodeid}
PARAMETERS
reasoncodeid
integer
path
REQUIRED
deletehttps://api.mysitoo.com/v2/accounts/1500/reasoncodes/3.json
RESPONSE JSON
true
HTTP Status Code Summary
200Returns true
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

reasoncode
object

Reason codes are used to label warehouse transactions, events and actions.

PROPERTIES
reasoncodeid
integer
READ ONLY

The unique ID of the reason code.

type
REQUIRED

The type of use for the reason code.

reasoncode
string
REQUIRED

The reason code. (Max 32 characters)

name
string

The display name used for the reason code. (Max 64 characters)

reasoncodetype
integer

  • 10 ManualIn
  • 20 ManualOut
  • 30 Sales
  • 40 Refund
  • 50 StockTaking
  • 60 Move
  • 70 ShipmentIn
  • 80 ShipmentOut
  • 100 ItemManualPrice
  • 110 ItemManualDiscount
  • 120 ItemRefund
  • 130 ItemReclaim
  • 140 CashIn
  • 150 CashOut
  • 160 PickupRejected