Skip to main content
The Accessories API allows you to manage accessories such as keyboards, mice, and other peripherals.

List Accessories

curl -X GET "https://your-domain.com/api/v1/accessories" \
  -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, model_number, category, location, company, manufacturer, supplier, qty, min_amt, order_number
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 accessories
rows
array
Array of accessory objects

Get Accessory by ID

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

Create Accessory

curl -X POST "https://your-domain.com/api/v1/accessories" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "USB Mouse",
    "qty": 50,
    "category_id": 2,
    "company_id": 1
  }'
name
string
required
Accessory 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
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
Accessory notes

Update Accessory

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

Delete Accessory

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

Checkout Accessory

curl -X POST "https://your-domain.com/api/v1/accessories/{accessory_id}/checkout" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "assigned_to": 123,
    "checkout_qty": 2,
    "note": "Assigned to employee"
  }'
accessory_id
integer
required
The accessory ID
assigned_to
integer
required
User ID to checkout to
checkout_qty
integer
default:"1"
Quantity to checkout
note
string
Checkout note

Checkin Accessory

curl -X POST "https://your-domain.com/api/v1/accessories/{accessory_id}/checkin" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "assigned_to": 123,
    "note": "Returned"
  }'
accessory_id
integer
required
The accessory ID
assigned_to
integer
required
User ID who has the accessory checked out
note
string
Checkin note

Get Checked Out Items

curl -X GET "https://your-domain.com/api/v1/accessories/{accessory_id}/checkedout" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
accessory_id
integer
required
The accessory ID
limit
integer
default:"50"
Number of results to return
offset
integer
default:"0"
Offset for pagination
Returns a list of all checkouts for a specific accessory, including who it’s checked out to and when.

Build docs developers (and LLMs) love