Inventory

Update Inventory Item

Patch an inventory row. Only fields explicitly set in the body are changed. The CHECK constraint (product_id OR name) is enforced at the DB level — clearing both will fail.

patch/v1/inventory/{item_id}

Request

  • Base URL: http://localhost:8000
  • URL: http://localhost:8000/v1/inventory/{item_id}
  • Auth: HTTP bearer

Path parameters

item_idinteger required

Headers

X-API-Keystring nullable

Request body

product_idinteger nullable
namestring nullable
status'owned' | 'wanted' | 'for_sale' | 'sold' | 'discarded'
notesstring nullable
acquisition_currencystring nullable
purchased_atstring date nullable
asking_currencystring nullable
conditionstring nullable
external_linkstring nullable
external_idstring nullable
projectstring nullable
recipient_idinteger nullable

Response

Successful Response

idinteger required
user_idinteger required
product_idinteger nullable
status'owned' | 'wanted' | 'for_sale' | 'sold' | 'discarded' required
namestring nullable
quantitystring required
notesstring nullable
acquisition_pricestring nullable
acquisition_currencystring nullable
purchased_atstring date-time nullable
asking_pricestring nullable
asking_currencystring nullable
conditionstring nullable
external_linkstring nullable
external_idstring nullable
projectstring nullable
recipient_idinteger nullable
created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.