Skip to main content
PATCH
Spree Admin SDK

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Path Parameters

id
string
required

Stock level ID

Body

application/json
external_references
object

Identities the record has in external systems, keyed by system: the same { system: external_id } map the Admin API renders, so what you read can be sent straight back. Systems you do not name keep the reference they have. A list of { system, external_id } entries is accepted too.

count_on_hand
integer

The count the shelf should end at: a whole number of zero or more. The API records the difference as an adjusted movement, so the correction appears in the stock history.

adjustment
integer

A signed change to the shelf instead of a target count, applied to the count the API holds at that moment and recorded the same way. Cannot be sent together with count_on_hand.

backorderable
boolean

Whether this location sells the variant beyond what it holds.

reason
string

Labels the correction in the stock history. Defaults to "Manual adjustment".

metadata
object

Response

200 - application/json

stock level updated

id
string
required
count_on_hand
number
required
backorderable
boolean
required
stock_location_id
string | null
required
variant_id
string | null
required
external_references
object
required
metadata
object
required
reserved_count
number
required
incoming_count
number
required
purchasable_count
number
required
variant_name
string | null
required
variant_sku
string | null
required
created_at
string
required
updated_at
string
required
stock_location_name
string | null
required
product_id
string | null
required
options_text
string | null
required
thumbnail_url
string | null
required
allocated_count
number
required
available_count
number
required
stock_location
object
variant
object