Skip to main content
PUT
Update Listing Inventory

Authorizations

X-Treet-Client-Id
string
header
required
X-Treet-Authentication-Key
string
header
required

Path Parameters

id
string<uuid>
required

The listing ID.

Body

application/json

Inventory update action

action
enum<string>
required

The inventory update operation to perform.

  • SET_INVENTORY — sets inventory to an exact value. Requires oldInventory and newInventory.
  • ADJUST_INVENTORY — adjusts inventory by a delta. Requires inventoryAdjustment.
Available options:
SET_INVENTORY,
ADJUST_INVENTORY
oldInventory
integer

The expected current inventory count. The update will only proceed if the listing's current inventory matches this value.

*Required if action is SET_INVENTORY

Required range: x >= 0
newInventory
integer

The inventory value to set.

*Required if action is SET_INVENTORY

Required range: x >= 0
inventoryAdjustment
integer

The amount to add (positive) or subtract (negative) from the current inventory.

*Required if action is ADJUST_INVENTORY

Response

Inventory updated successfully

id
string
required

The Treet listing ID.

Example:

"550e8400-e29b-41d4-a716-446655440000"

availableInventory
integer
required

The updated available inventory count.

Required range: x >= 0
Example:

3