Skip to main content

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.

The Components API allows you to manage hardware components like RAM, hard drives, and other parts that can be installed in assets.

List Components

curl -X GET "https://your-domain.com/api/v1/components" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
limit
integer
default:"50"
Number of results to return
offset
integer
default:"0"
Offset for pagination
Search string to filter results
sort
string
default:"created_at"
Column to sort by. Allowed values: id, name, category, location, company, manufacturer, supplier, qty, min_amt, model_number, serial, order_number, purchase_date, purchase_cost
order
string
default:"desc"
Sort order: asc or desc
category_id
integer
Filter by category ID
company_id
integer
Filter by company ID
manufacturer_id
integer
Filter by manufacturer ID
supplier_id
integer
Filter by supplier ID
location_id
integer
Filter by location ID
total
integer
Total number of components
rows
array
Array of component objects

Get Component by ID

curl -X GET "https://your-domain.com/api/v1/components/{component_id}" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
component_id
integer
required
The component ID

Create Component

curl -X POST "https://your-domain.com/api/v1/components" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "16GB DDR4 RAM",
    "qty": 50,
    "category_id": 4,
    "company_id": 1
  }'
name
string
required
Component name
qty
integer
required
Total quantity
category_id
integer
required
Category ID
company_id
integer
Company ID
manufacturer_id
integer
Manufacturer ID
supplier_id
integer
Supplier ID
location_id
integer
Location ID
serial
string
Serial number
model_number
string
Model number
order_number
string
Order number
purchase_date
string
Purchase date (YYYY-MM-DD)
purchase_cost
number
Purchase cost
min_amt
integer
Minimum quantity threshold for alerts
notes
string
Component notes

Update Component

curl -X PATCH "https://your-domain.com/api/v1/components/{component_id}" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Component Name",
    "qty": 75
  }'
component_id
integer
required
The component ID

Delete Component

curl -X DELETE "https://your-domain.com/api/v1/components/{component_id}" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
component_id
integer
required
The component ID
A component cannot be deleted if it has any items checked out. All items must be checked in first.

Checkout Component

Checkout a component to an asset (components are installed in assets, not assigned to users).
curl -X POST "https://your-domain.com/api/v1/components/{component_id}/checkout" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "assigned_to": 456,
    "assigned_qty": 2,
    "note": "Installed RAM upgrade"
  }'
component_id
integer
required
The component ID
assigned_to
integer
required
Asset ID to checkout to (components are assigned to assets, not users)
assigned_qty
integer
default:"1"
Quantity to checkout (must not exceed remaining quantity)
note
string
Checkout note

Checkin Component

curl -X POST "https://your-domain.com/api/v1/components/{component_asset_id}/checkin" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "note": "Component removed"
  }'
component_asset_id
integer
required
The component-asset relationship ID (from the components_assets pivot table)
checkin_qty
integer
Quantity to checkin
note
string
Checkin note

Get Assets with Component

curl -X GET "https://your-domain.com/api/v1/components/{component_id}/assets" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
component_id
integer
required
The component ID
limit
integer
default:"50"
Number of results to return
offset
integer
default:"0"
Offset for pagination
search
string
Search string to filter assets
Returns a list of assets that have this component installed.