# Search item types

Operation ID: `searchItemTypes`

Group: Inventory › Item Types

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

`POST /inventory/item-types/search`

Read-only: A read that takes its filters in the body. Changes nothing, and ignores Idempotency-Key.

Searches item types. The filters go in the request body. The fields are the same as on GET inventory/item-types/:id, including itemCount.

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

## Request body

Required, `application/json`: searchItemTypesInput.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filters` | object | yes | The filters to apply. An item type must match every filter you send. Send an empty object to return all item types. Example: `{"stockable":false}`. |
| `filters.name` | string | no | Limits results to the item type with this name. The match is exact. Names are unique, so this matches at most one item type. |
| `filters.procurable` | boolean | no | Limits results to item types with the given procurable value. |
| `filters.stockable` | boolean | no | Limits results to item types with the given stockable value. |
| `filters.active` | boolean | no | Limits results to item types with the given active value. |
| `filters.modifiedSince` | date-time | no | Limits results to item types changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `page` | object | no | The pagination controls. Omit for the first page. |
| `page.cursor` | string | no | The cursor from the previous response's pagination.nextCursor. Omit for the first page. |
| `page.size` | number | no | The number of item types per page. Defaults to 50. A value above 200 is treated as 200, not rejected. |

```json
{
  "filters": {
    "stockable": false
  },
  "page": {
    "cursor": "<cursor>",
    "size": 0
  }
}
```

## Response

`200` Success

Under `data` (searchItemTypesOutput):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | array<object> | yes | The item types on this page, oldest first. An empty array when nothing matches. Example: `[{"id":"b1d47e29-3c86-4a05-9f72-04e5c13b8a60","name":"Service","description":"Bought but never stocked","procurable":true,"stockable":false,"active":true,"itemCount":7,"lastModifiedDate":"2026-08-18T09:15:02.108Z"}]`. |
| `items[].id` | string | yes | The unique identifier for the item type. |
| `items[].name` | string | no | The display name of the item type, for example 'Stocked good'. Two item types cannot share a name. |
| `items[].description` | string | no | A free-form description of the item type. |
| `items[].procurable` | boolean | no | Whether items of this type can appear on purchase documents. |
| `items[].stockable` | boolean | no | Whether items of this type hold stock. |
| `items[].active` | boolean | no | Whether the item type can be chosen for new items. |
| `items[].itemCount` | number | no | The number of items that name this item type. |
| `items[].createdDate` | date-time | no | The date and time the item type was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `items[].lastModifiedDate` | date-time | no | The date and time the item type record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `pagination` | object | yes | The pagination cursor for this page. Example: `{"hasMore":false}`. |
| `pagination.nextCursor` | string | no | The cursor for the next page. Pass it as page.cursor. Absent on the last page. |
| `pagination.hasMore` | boolean | no | True when more item types remain beyond this page. |

```json
{
  "data": {
    "items": [
      {
        "id": "b1d47e29-3c86-4a05-9f72-04e5c13b8a60",
        "name": "Service",
        "description": "Bought but never stocked",
        "procurable": true,
        "stockable": false,
        "active": true,
        "itemCount": 7,
        "lastModifiedDate": "2026-08-18T09:15:02.108Z"
      }
    ],
    "pagination": {
      "hasMore": false
    }
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}
```

## 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
