> For the complete documentation index, see [llms.txt](https://www.boxhero.io/docs/llms.txt). Every page is available as Markdown by appending `.md` to its URL; this page is [Markdown](https://www.boxhero.io/docs/developers/api/reference/item-attrs.md).

# Item attributes

> Custom attribute specs attached to items (text, date, number, barcode).

File-type attributes are app-only and cannot be managed via the API.

## The Attr object

Specification of a custom attribute that items in this team may carry (e.g. "Brand", "Expiration Date", "Minimum Stock").

- `id` (integer, minimum 0, maximum 2147483647, required): Attribute spec id.
- `attr_type` (string, required): Value type accepted by this attribute. `text` accepts any string; `date` accepts an ISO-8601 date (`YYYY-MM-DD`); `number` accepts a JSON number; `barcode` accepts a barcode string. File-type attributes exist in the BoxHero app but cannot be queried or set via the Open API.

  Possible values: `text`, `date`, `number`, `barcode`
- `attr_name` (string, required): Display name of the attribute.
- `rank` (number, required): Sort order shown in the BoxHero app. Lower values appear first; ties are broken by id. Ranks need not be contiguous.

Example

```json
{
  "id": 485697,
  "attr_type": "text",
  "attr_name": "Brand",
  "rank": 1
}
```

## Endpoints

- [List attribute specs](https://www.boxhero.io/docs/developers/api/reference/item-attrs/list-item-attrs.md) `GET /v1/item-attrs`
- [Create an attribute spec](https://www.boxhero.io/docs/developers/api/reference/item-attrs/create-item-attr.md) `POST /v1/item-attrs`
- [Get an attribute spec](https://www.boxhero.io/docs/developers/api/reference/item-attrs/get-item-attr.md) `GET /v1/item-attrs/{attr_id}`
- [Rename an attribute spec](https://www.boxhero.io/docs/developers/api/reference/item-attrs/rename-item-attr.md) `PUT /v1/item-attrs/{attr_id}`
- [Delete an attribute spec](https://www.boxhero.io/docs/developers/api/reference/item-attrs/delete-item-attr.md) `DELETE /v1/item-attrs/{attr_id}`
- [Reorder attribute specs](https://www.boxhero.io/docs/developers/api/reference/item-attrs/reorder-item-attrs.md) `PUT /v1/item-attrs/ranks`
