List Reason Codes
GET/api/v2/public/reasoncodes
Reason codes for the organisation. Reason codes say why stock moved and are required when booking losses, gains and corrections. Each code also carries the rules the app enforces, such as whether a comment or image is mandatory.
Query Parameters
Returns
is_loss: boolean
true when the code represents stock leaving. The is_loss filter on the movement log matches on this.
is_sales_order_discount: boolean
Correctly spelled alias of CountingCloud.Entities.Entities.Response.ReasonCodesResponsePublicV2.IsSalesOrderDiscsount. Both fields are always emitted and always carry the same value; the misspelled one is kept because live integrations read it.
List Reason Codes
curl https://api.colleqtive.net/api/v2/public/reasoncodes \
-H "Authorization: $COLLEQTIVE_BEARER_TOKEN"[
{
"code": 0,
"is_comment_mandatory": true,
"is_gain": true,
"is_image_mandatory": true,
"is_loss": true,
"is_order_number_mandatory": true,
"is_picking_list": true,
"is_rollback_allowed": true,
"is_sales_order_discount": true,
"is_sales_order_discsount": true,
"is_store": true,
"reason_code_type": 0,
"review_status": 0,
"code_description": "code_description",
"description": "description",
"function_key": "function_key",
"store_type": "store_type"
}
]{
"code": 401,
"status": "error",
"message": "Authentication failed.",
"error": "unauthorized",
"error_description": "Authentication failed."
}{
"code": 500,
"status": "fail",
"message": "The request could not be processed.",
"error": "internal_error",
"error_description": "The request could not be processed."
}Returns Examples
[
{
"code": 0,
"is_comment_mandatory": true,
"is_gain": true,
"is_image_mandatory": true,
"is_loss": true,
"is_order_number_mandatory": true,
"is_picking_list": true,
"is_rollback_allowed": true,
"is_sales_order_discount": true,
"is_sales_order_discsount": true,
"is_store": true,
"reason_code_type": 0,
"review_status": 0,
"code_description": "code_description",
"description": "description",
"function_key": "function_key",
"store_type": "store_type"
}
]{
"code": 401,
"status": "error",
"message": "Authentication failed.",
"error": "unauthorized",
"error_description": "Authentication failed."
}{
"code": 500,
"status": "fail",
"message": "The request could not be processed.",
"error": "internal_error",
"error_description": "The request could not be processed."
}