## Retrieves a list of reason codes, optionally filtered by search text.

`IReadOnlyList<ReasonCodeListReasonCodesResponse> ReasonCodes.ListReasonCodes(ReasonCodeListReasonCodesParams?parameters, CancellationTokencancellationToken = default)`

**get** `/api/v2/public/reasoncodes`

Retrieves a list of reason codes, optionally filtered by search text.

### Parameters

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

### Example

```csharp
ReasonCodeListReasonCodesParams parameters = new();

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

Console.WriteLine(response);
```

#### Response

```json
[
  {
    "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_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"
  }
]
```
