Skip to content
Get started

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 ParametersExpand Collapse
code: optional string

Filter by reason code.

code_description: optional string

Filter by reason code description.

function_key: optional string

Filter by function key.

is_gain: optional boolean

Filter by gain-type reason codes.

is_loss: optional boolean

Filter by loss-type reason codes.

is_store: optional boolean

Filter by store-level reason codes.

ReturnsExpand Collapse
code: number

The reason code itself. This is the value the movement endpoints expect.

formatint32
is_comment_mandatory: boolean

true when a comment must be supplied with the movement.

is_gain: boolean

true when the code represents stock arriving. The is_gain filter matches on this.

is_image_mandatory: boolean

true when a photo must be supplied with the movement.

is_loss: boolean

true when the code represents stock leaving. The is_loss filter on the movement log matches on this.

is_order_number_mandatory: boolean

true when an order number must be supplied with the movement.

is_picking_list: boolean

true when the code applies to picking.

is_rollback_allowed: boolean

true when a movement booked under this code can be reversed.

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.

Deprecatedis_sales_order_discsount: boolean

Deprecated — use is_sales_order_discount instead. Both names are still accepted and behave identically; is_sales_order_discount is the supported spelling going forward.

is_store: boolean

true when store staff may use this code.

reason_code_type: number

Type of reason code.

formatint32
review_status: number

Review state movements get when booked under this code.

formatint32
code_description: optional string

Short label for the code.

description: optional string

Fuller description of when to use the code.

function_key: optional string

Shortcut key the code is bound to in the app.

store_type: optional string

Store type the code applies to.

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."
}