Skip to content
Get started

List Reason Codes

IReadOnlyList<ReasonCodeListReasonCodesResponse> ReasonCodes.ListReasonCodes(ReasonCodeListReasonCodesParams?parameters, CancellationTokencancellationToken = default)
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.

ParametersExpand Collapse
ReasonCodeListReasonCodesParams parameters
string code

Filter by reason code.

string codeDescription

Filter by reason code description.

string functionKey

Filter by function key.

Boolean isGain

Filter by gain-type reason codes.

Boolean isLoss

Filter by loss-type reason codes.

Boolean isStore

Filter by store-level reason codes.

List Reason Codes

ReasonCodeListReasonCodesParams parameters = new();

var response = await client.ReasonCodes.ListReasonCodes(parameters);

Console.WriteLine(response);
[
  {
    "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."
}