Adjust part stock
Applies a signed stock delta to a part with a reason (restock, correction, damaged, other). The site is taken from the part — a part belongs to exactly one site — so site_id is deprecated: it is still accepted for older integrations, but ignored. Returns the updated part.
Authorization
LuxorAPIKey Use your API key here.
In: header
Path Parameters
Part id (uuid).
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v2/commander/parts/497f6eca-6276-4993-bfeb-53cbbbba6f08/stock/adjust" \ -H "Content-Type: application/json" \ -d '{ "delta": 10, "reason": "restock" }'{ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "sku": "HB-0001", "name": "S21 Pro Hashboard", "category": "hashboard", "site_id": "b0a5fad8-1234-5678-9abc-def012345678", "on_hand": 40, "reserved": 5, "available": 35, "supplier": "Acme Distributors", "unit_cost": "120.00", "threshold_method": "manual", "target_qty": 20, "reorder_qty": 8, "target_pct": null, "reorder_pct": null, "stock_status": "healthy", "fleet_demand": 0, "use_per_week": 2.5, "stockout_days": 98, "custom_fields": { "po_number": "PO-558" }, "archived_at": null, "created_at": "2025-09-02T09:30:00Z", "updated_at": "2026-04-20T10:15:00Z", "url": "/v2/commander/parts/a1b2c3d4-e5f6-7890-abcd-ef1234567890"}{ "statusCode": 400, "code": "FST_ERR_VALIDATION", "error": "Bad Request", "message": "body/end_date Required"}{ "statusCode": 403, "code": "7", "error": "Forbidden", "message": "[permission_denied] site_id does not belong to this workspace"}{ "statusCode": 404, "code": "5", "error": "Not Found", "message": "[not_found] agent not found"}Import parts
Upserts parts. A row with a `sku` updates that part; a row without one creates a new part at `site_name` and is assigned a generated SKU. An unknown `sku` is a row error, since SKUs are server-owned. Per-row errors are returned. Per-row errors cover row *data*; a row carrying an unrecognised *column* is a schema error and rejects the whole import with a 400 naming the row and key, so no rows are applied. Strip extra columns (e.g. `on_hand`, `stock_status`) before re-importing an exported file.
Get part stock movements
Returns a paginated history of stock movements for a part. Every movement is at the part's own site.