> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/grokability/snipe-it/llms.txt
> Use this file to discover all available pages before exploring further.

# Consumables

> Manage consumable items via the API

The Consumables API allows you to manage consumable items like toner cartridges, paper, and other supplies.

## List Consumables

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://your-domain.com/api/v1/consumables" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Accept: application/json"
  ```
</CodeGroup>

<ParamField query="limit" type="integer" default="50">
  Number of results to return
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Offset for pagination
</ParamField>

<ParamField query="search" type="string">
  Search string to filter results
</ParamField>

<ParamField query="sort" type="string" default="created_at">
  Column to sort by. Allowed values: `id`, `name`, `category`, `location`, `company`, `manufacturer`, `supplier`, `qty`, `min_amt`, `model_number`, `item_no`, `order_number`, `purchase_date`, `purchase_cost`
</ParamField>

<ParamField query="order" type="string" default="desc">
  Sort order: `asc` or `desc`
</ParamField>

<ParamField query="category_id" type="integer">
  Filter by category ID
</ParamField>

<ParamField query="company_id" type="integer">
  Filter by company ID
</ParamField>

<ParamField query="manufacturer_id" type="integer">
  Filter by manufacturer ID
</ParamField>

<ParamField query="supplier_id" type="integer">
  Filter by supplier ID
</ParamField>

<ParamField query="location_id" type="integer">
  Filter by location ID
</ParamField>

<ResponseField name="total" type="integer">
  Total number of consumables
</ResponseField>

<ResponseField name="rows" type="array">
  Array of consumable objects

  <Expandable title="Consumable Object">
    <ResponseField name="id" type="integer">
      Consumable ID
    </ResponseField>

    <ResponseField name="name" type="string">
      Consumable name
    </ResponseField>

    <ResponseField name="model_number" type="string">
      Model number
    </ResponseField>

    <ResponseField name="item_no" type="string">
      Item number
    </ResponseField>

    <ResponseField name="qty" type="integer">
      Total quantity
    </ResponseField>

    <ResponseField name="remaining" type="integer">
      Remaining quantity available
    </ResponseField>

    <ResponseField name="min_amt" type="integer">
      Minimum quantity threshold
    </ResponseField>

    <ResponseField name="category" type="object">
      Category information
    </ResponseField>

    <ResponseField name="company" type="object">
      Company information
    </ResponseField>

    <ResponseField name="manufacturer" type="object">
      Manufacturer information
    </ResponseField>

    <ResponseField name="supplier" type="object">
      Supplier information
    </ResponseField>

    <ResponseField name="location" type="object">
      Location information
    </ResponseField>

    <ResponseField name="order_number" type="string">
      Order number
    </ResponseField>

    <ResponseField name="purchase_date" type="string">
      Purchase date
    </ResponseField>

    <ResponseField name="purchase_cost" type="string">
      Purchase cost
    </ResponseField>

    <ResponseField name="notes" type="string">
      Consumable notes
    </ResponseField>
  </Expandable>
</ResponseField>

## Get Consumable by ID

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://your-domain.com/api/v1/consumables/{consumable_id}" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Accept: application/json"
  ```
</CodeGroup>

<ParamField path="consumable_id" type="integer" required>
  The consumable ID
</ParamField>

## Create Consumable

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://your-domain.com/api/v1/consumables" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Printer Toner HP 12A",
      "qty": 20,
      "category_id": 3,
      "company_id": 1
    }'
  ```
</CodeGroup>

<ParamField body="name" type="string" required>
  Consumable name
</ParamField>

<ParamField body="qty" type="integer" required>
  Total quantity
</ParamField>

<ParamField body="category_id" type="integer" required>
  Category ID
</ParamField>

<ParamField body="company_id" type="integer">
  Company ID
</ParamField>

<ParamField body="manufacturer_id" type="integer">
  Manufacturer ID
</ParamField>

<ParamField body="supplier_id" type="integer">
  Supplier ID
</ParamField>

<ParamField body="location_id" type="integer">
  Location ID
</ParamField>

<ParamField body="model_number" type="string">
  Model number
</ParamField>

<ParamField body="item_no" type="string">
  Item/SKU number
</ParamField>

<ParamField body="order_number" type="string">
  Order number
</ParamField>

<ParamField body="purchase_date" type="string">
  Purchase date (YYYY-MM-DD)
</ParamField>

<ParamField body="purchase_cost" type="number">
  Purchase cost
</ParamField>

<ParamField body="min_amt" type="integer">
  Minimum quantity threshold for alerts
</ParamField>

<ParamField body="notes" type="string">
  Consumable notes
</ParamField>

## Update Consumable

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH "https://your-domain.com/api/v1/consumables/{consumable_id}" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Updated Consumable Name",
      "qty": 30
    }'
  ```
</CodeGroup>

<ParamField path="consumable_id" type="integer" required>
  The consumable ID
</ParamField>

## Delete Consumable

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://your-domain.com/api/v1/consumables/{consumable_id}" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Accept: application/json"
  ```
</CodeGroup>

<ParamField path="consumable_id" type="integer" required>
  The consumable ID
</ParamField>

## Checkout Consumable

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://your-domain.com/api/v1/consumables/{consumable_id}/checkout" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -d '{
      "assigned_to": 123,
      "note": "Issued to employee"
    }'
  ```
</CodeGroup>

<ParamField path="consumable_id" type="integer" required>
  The consumable ID
</ParamField>

<ParamField body="assigned_to" type="integer" required>
  User ID to checkout to
</ParamField>

<ParamField body="note" type="string">
  Checkout note
</ParamField>

<Note>Consumables do not have a checkin process since they are consumed when checked out. The quantity automatically decrements.</Note>

## Get Users Who Have Consumable

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://your-domain.com/api/v1/consumables/{consumable_id}/users" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Accept: application/json"
  ```
</CodeGroup>

<ParamField path="consumable_id" type="integer" required>
  The consumable ID
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Number of results to return
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Offset for pagination
</ParamField>

Returns a list of users who have been assigned this consumable.
