# List reason codes

Operation ID: `reasonCodes`

Group: Inventory › Reason Codes

[Open in the interactive reference](https://docs.api.lensing.ai/lensing/v1/endpoints/reasonCodes)

`GET /inventory/reason-codes`

Read-only: Reads and returns; changes nothing.

Lists reason codes. Each reason code comes back with its settings, but without the document types it can be selected on.

To read documentTypes, use GET inventory/reason-codes/:id or POST inventory/reason-codes/search.

To filter by document type, use POST inventory/reason-codes/search.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | string · v1 | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`. |

## Query surface

- `id` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `code` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `isActive` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between
- `requiresApproval` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between
- `lastModifiedDate` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between
- Orderable: id, code, description, isActive, requiresApproval, lastModifiedDate
- Selectable: id, code, description, isActive, requiresApproval, lastModifiedDate
- `page[size]` — Page size
- `page[cursor]` — Opaque continuation cursor

## Response

`200` Success

Under `data`, an array of reasonCodesRow:

| Field | Type | Required | Filter | Sort | Description |
| --- | --- | --- | --- | --- | --- |
| `id` | string | no | Exact (`eq`, `ne`), Range (`gt`, `gte`, `lt`, `lte`, `between`), Any of (`in`, `notIn`), Pattern (`like`) | yes | The unique identifier for the reason code. Example: `"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"`. |
| `code` | string | no | Exact (`eq`, `ne`), Range (`gt`, `gte`, `lt`, `lte`, `between`), Any of (`in`, `notIn`), Pattern (`like`) | yes | The business code of the reason code, for example 'DAMAGE'. It is unique within the tenant. Example: `"DAMAGE"`. |
| `description` | string \| null | no | no | yes | A free-form description of what the reason code means. Absent when none was given. Example: `"Stock damaged in the warehouse"`. |
| `isActive` | boolean \| null | no | Exact (`eq`, `ne`), Range (`gt`, `gte`, `lt`, `lte`, `between`), Any of (`in`, `notIn`) | yes | Whether the reason code can be selected on new documents. When false, existing documents keep it and new ones cannot select it. Example: `true`. |
| `requiresApproval` | boolean \| null | no | Exact (`eq`, `ne`), Range (`gt`, `gte`, `lt`, `lte`, `between`), Any of (`in`, `notIn`) | yes | Whether documents using this reason code require approval before they take effect. Example: `true`. |
| `lastModifiedDate` | date-time \| null | no | Exact (`eq`, `ne`), Range (`gt`, `gte`, `lt`, `lte`, `between`), Any of (`in`, `notIn`) | yes | The date and time the reason code record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding or removing a document type does not change it. Example: `"2026-05-12T09:30:00.000Z"`. |

```json
{
  "data": [
    {
      "id": "7a1c9e42-8b30-4d67-9f15-3c8e02a74b61",
      "code": "DAMAGE",
      "description": "Stock damaged in the warehouse",
      "isActive": true,
      "requiresApproval": true,
      "lastModifiedDate": "2026-05-12T09:30:00.000Z"
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextCursor": "<nextCursor>"
  }
}
```

## Statuses

- `400` — Invalid request or business failure
- `401` — The request carries no valid access token.
- `403` — Not authorized
- `404` — Not found
- `429` — Too many requests from this client address. The response has no body and no `Retry-After` header.
- `500` — Internal server error
