update_inventory_item
Patch an existing inventory item. Only provided fields change.
Authenticated. Required OAuth scope: `inventory:write`. Caller must
own the item (404 otherwise — we don't leak existence).
Idempotent: calling twice with the same input yields the same final
state. For lifecycle convenience, see `mark_for_sale` and
`mark_sold` which set the right combination of fields atomically.
Args:
item_id: ID of the inventory row to update. Get from
`get_my_inventory` or `add_inventory_item`'s return value.
(every other param matches `add_inventory_item`; omit any field
you don't want changed.)
api_key: Optional API key (`pk_*`, generate at /account).
Used when there is no OAuth token, and also when the OAuth
token lacks the required scope — an explicitly passed key
overrides an ambient token that is scoped too narrowly.
An invalid or revoked token still fails regardless.
Returns:
The updated inventory row, or ``{"error": ...}`` on auth /
not-found / validation failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| notes | No | ||
| status | No | ||
| api_key | No | ||
| item_id | Yes | ||
| project | No | ||
| quantity | No | ||
| condition | No | ||
| product_id | No | ||
| external_id | No | ||
| asking_price | No | ||
| purchased_at | No | ||
| external_link | No | ||
| asking_currency | No | ||
| acquisition_price | No | ||
| acquisition_currency | No |