Skip to main content

Spare Parts Inventory

Manage spare parts, stock levels, transactions, and work order part consumption.

Parts

List parts

GET /inventory/parts

Auth: Bearer JWT (any role)

ParameterTypeDescription
category_iduuidFilter by category
searchstringSearch by name or part number
low_stock_onlybooleanOnly parts below reorder point
pageintPage number
page_sizeintItems per page

Create a part

POST /inventory/parts

Auth: Bearer JWT (admin, operator)

{
"part_number": "BRG-6205-2RS",
"name": "Deep Groove Ball Bearing 6205",
"category_id": "CATEGORY_UUID",
"quantity_on_hand": 25,
"reorder_point": 5,
"reorder_quantity": 20,
"unit_cost": 12.50,
"unit": "piece",
"location": "Warehouse A, Shelf B3",
"supplier": "SKF Distribution",
"manufacturer_part_number": "6205-2RS1"
}

Get / Update / Delete a part

GET PATCH DELETE /inventory/parts/{part_id}

Low stock alerts

GET /inventory/parts/low-stock

Returns parts where quantity_on_hand is at or below reorder_point.

Stock transactions

List transactions

GET /inventory/parts/{part_id}/transactions

Record a transaction

POST /inventory/parts/{part_id}/transactions

Auth: Bearer JWT (admin, operator)

{
"type": "receive",
"quantity": 20,
"notes": "PO #12345 received from SKF"
}

Transaction types: receive, consume, adjust, return, transfer

Categories

List categories

GET /inventory/categories

Create a category

POST /inventory/categories

Delete a category

DELETE /inventory/categories/{category_id}

Work order parts

Track parts consumed by work orders.

List parts for a work order

GET /inventory/work-orders/{work_order_id}/parts

Add a part to a work order

POST /inventory/work-orders/{work_order_id}/parts

{
"spare_part_id": "PART_UUID",
"quantity": 2
}

Remove a part from a work order

DELETE /inventory/work-orders/{work_order_id}/parts/{wop_id}