# catalogs/transaction/cancel-reasons

## Purpose
Returns the list of available cancellation reasons for transactions. These reasons are required when cancelling a transaction via `DELETE /transaction/cancel`.
## When to Use
Use this endpoint when you need to:
- Populate a cancellation reason dropdown when the user wants to cancel a transaction
- Obtain the `reasonId` and `reasonName` values required by the `DELETE /transaction/cancel` endpoint

## Integration with Transaction Cancel
The response fields map directly to the cancel request body:
- `reasonId` → use as `reasonId` in `DELETE /transaction/cancel`
- `reasonName` → use as `reasonName` in `DELETE /transaction/cancel`

## Authentication
Requires `x-client-id` and `x-secret-key` headers for partner authentication.
## Notes
- Returns only active cancellation reasons (available for agency-type cancellations)
- Results are ordered alphabetically by description

## Common Errors
- `400` Validation errors (missing/invalid fields)
- `401` Invalid credentials
- `403` Access forbidden
- `404` Resource not found
- `500` Internal error

<details><summary><b>Error codes (click to expand)</b></summary><table style='border-collapse:collapse; width:100%; margin-top:8px;'><thead><tr><th style='border:1px solid #e5e7eb; padding:6px; text-align:left;'>Code</th><th style='border:1px solid #e5e7eb; padding:6px; text-align:left;'>Description</th></tr></thead><tbody><tr><td style='border:1px solid #e5e7eb; padding:6px; width:140px;'><code>400000</code></td><td style='border:1px solid #e5e7eb; padding:6px;'>Invalid request format</td></tr><tr><td style='border:1px solid #e5e7eb; padding:6px; width:140px;'><code>401000</code></td><td style='border:1px solid #e5e7eb; padding:6px;'>Invalid credentials</td></tr><tr><td style='border:1px solid #e5e7eb; padding:6px; width:140px;'><code>403001</code></td><td style='border:1px solid #e5e7eb; padding:6px;'>Access to this resource is forbidden for this client</td></tr><tr><td style='border:1px solid #e5e7eb; padding:6px; width:140px;'><code>404000</code></td><td style='border:1px solid #e5e7eb; padding:6px;'>No cancellation reasons found</td></tr><tr><td style='border:1px solid #e5e7eb; padding:6px; width:140px;'><code>500000</code></td><td style='border:1px solid #e5e7eb; padding:6px;'>Internal server error</td></tr></tbody></table></details>

Endpoint: GET /catalogs/transaction/cancel-reasons
Version: 1.0.0

## Query parameters:

  - `validations` (string)
    Return validation schema instead of executing the request

Error codes: type=400002, allowedValues=400010

## Header parameters:

  - `x-client-id` (string, required)
    Unique identifier assigned to the integrating client. It determines the validation rules, allowed values, compliance policies, and operational limits applied to the request.

Error codes: required=400001, type=400002, minLength=400003, maxLength=400004

  - `x-secret-key` (string, required)
    Secret authentication key associated with the client. It is used to authorize the request and must be kept strictly confidential.

Error codes: required=400001, type=400002, minLength=400003, maxLength=400004

## Response 200 fields (application/json):

  - `reasonId` (string)
    Unique identifier of the cancellation reason. Use as `reasonId` in DELETE /transaction/cancel.

  - `reasonName` (string)
    Description of the cancellation reason. Use as `reasonName` in DELETE /transaction/cancel.

## Response 400 fields (application/json):

  - `errors` (array)
    List of validation errors.Error catalog for 400 (click to expand)CodeDescription400000Invalid request format

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

  - `errors.details` (string)

## Response 401 fields (application/json):

  - `errors` (array)
    List of authentication errors.Error catalog for 401 (click to expand)CodeDescription401000Invalid credentials

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

## Response 403 fields (application/json):

  - `errors` (array)
    List of authorization errors.Error catalog for 403 (click to expand)CodeDescription403001Access to this resource is forbidden for this client

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

  - `errors.details` (string)

## Response 404 fields (application/json):

  - `errors` (array)
    List of not found errors.Error catalog for 404 (click to expand)CodeDescription404000No cancellation reasons found

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

## Response 500 fields (application/json):

  - `errors` (array)
    List of server errors.Error catalog for 500 (click to expand)CodeDescription500000Internal server error

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

