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

`reason_codes.list_reason_codes(ReasonCodeListReasonCodesParams**kwargs)  -> ReasonCodeListReasonCodesResponse`

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

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

### Parameters

- `code: Optional[str]`

  Filter by reason code.

- `code_description: Optional[str]`

  Filter by reason code description.

- `function_key: Optional[str]`

  Filter by function key.

- `is_gain: Optional[bool]`

  Filter by gain-type reason codes.

- `is_loss: Optional[bool]`

  Filter by loss-type reason codes.

- `is_store: Optional[bool]`

  Filter by store-level reason codes.

### Returns

- `List[ReasonCodeListReasonCodesResponseItem]`

  - `code: int`

  - `is_comment_mandatory: bool`

  - `is_gain: bool`

  - `is_image_mandatory: bool`

  - `is_loss: bool`

  - `is_order_number_mandatory: bool`

  - `is_picking_list: bool`

  - `is_rollback_allowed: bool`

  - `is_sales_order_discsount: bool`

  - `is_store: bool`

  - `reason_code_type: int`

  - `review_status: int`

  - `code_description: Optional[str]`

  - `description: Optional[str]`

  - `function_key: Optional[str]`

  - `store_type: Optional[str]`

### Example

```python
import os
from colleqtive_sdk import Colleqtive

client = Colleqtive(
    bearer_token=os.environ.get("COLLEQTIVE_BEARER_TOKEN"),  # This is the default and can be omitted
)
response = client.reason_codes.list_reason_codes()
print(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"
  }
]
```
