Skip to content

Get a product’s stock

GET
/products/{id}/stock
curl --request GET \
--url https://example.com/products/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/stock \
--cookie bottle.session_token=<bottle.session_token>

How many are on the shelf (null when the product is not counted), its low mark and what the shop does when none are left, and the last 50 changes, newest first: sold on the shop, put back from a cancelled order, a delivery in, or counted by hand. Cylinders are counted under Stock, not here.

id
required

UUID v7

string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

The count, its rules, and the last 50 movements, newest first

Media typeapplication/json
object
productId
required

UUID v7

string format: uuid
stockOnHand
required
integer | null
stockLowAt
required
integer | null
whenOut
required
string | null
Allowed values: stop continue
movements
required
Array<object>
object
id
required

UUID v7

string format: uuid
change
required
integer
after
required
integer
reason
required
string
Allowed values: sale cancelled restock adjustment
orderId
required

UUID v7

string | null format: uuid
note
required
string | null
userId
required
string | null
createdAt
required
string format: date-time
Example
{
"productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"whenOut": "stop",
"movements": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"reason": "sale",
"orderId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
}
]
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not a member, or without the permission this needs

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not found

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}