Inventory
Set stock levels
Sets the absolute stock levels for a variant (Managed mode and corrections). The call is an upsert: it returns 201 when the inventory item is created and 200 when an existing item is updated. Availability is recomputed and a set entry is written to the ledger. Active reservations are never disturbed.
Requires the agentic:inventory scope.
put/inventory/{variant_id}
Request
- Base URLhttps://{prefix}.api.sandbox.checkout.com
- AuthOAuth 2Client credentialsToken URLstringScopesagentic:inventory
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
variant_idstring required
The merchant-provided identifier for the variant.
Request body
Example request
{
"on_hand": 25,
"safety_stock": 2,
"reason": "stock take 2026-07"
}Response
The variant already existed and its levels were updated.
Example response
{
"variant_id": "var_123",
"on_hand": 10,
"reserved": 2,
"safety_stock": 1,
"available": 7,
"state": "in_stock",
"source": "managed",
"created_on": "2026-07-01T09:15:00.0000000+00:00",
"modified_on": "2026-07-13T14:02:11.0000000+00:00",
"product": {
"variant_id": "var_123",
"title": "Classic leather belt, brown",
"description": "A full-grain leather belt with a brushed nickel buckle.",
"product_url": "https://merchant.example.com/products/classic-leather-belt-brown",
"image_url": "https://merchant.example.com/images/belt-brown-main.jpg",
"additional_image_urls": [
"https://merchant.example.com/images/belt-brown-alt1.jpg"
],
"video_url": "https://merchant.example.com/videos/belt-brown.mp4",
"model_3d_url": "https://merchant.example.com/models/belt-brown.glb",
"sku": "BELT-BRN-001",
"gtin": "00012345678905",
"mpn": "MPN-4471",
"brand": "Acme Leathercraft",
"category": "Apparel & Accessories > Belts",
"price": {
"amount": 1999,
"currency": "USD"
},
"sale_price": {
"amount": 1999,
"currency": "USD"
},
"sale_price_starts_at": "2026-08-01T00:00:00.0000000+00:00",
"sale_price_ends_at": "2026-08-31T23:59:59.0000000+00:00",
"group_id": "grp_belt_classic",
"group_title": "Classic leather belt",
"color": "Brown",
"size": "M",
"size_system": "US",
"gender": "unisex",
"condition": "new",
"material": "Full-grain leather",
"age_group": "adult",
"length": 110,
"width": 3.5,
"height": 0.5,
"dimension_unit": "cm",
"weight": 0.2,
"weight_unit": "kg",
"expiration_date": "2027-01-01T00:00:00.0000000+00:00",
"harmonized_system_code": "4203.30",
"country_of_origin": "IT",
"seller_name": "Acme Leathercraft Ltd",
"seller_url": "https://acme-leathercraft.example.com",
"seller_privacy_policy": "https://acme-leathercraft.example.com/privacy",
"seller_tos": "https://acme-leathercraft.example.com/terms",
"created_on": "2026-08-01T09:15:00.0000000+00:00",
"modified_on": "2026-08-13T14:02:11.0000000+00:00",
"_links": {
"self": {
"href": "https://api.checkout.com/inventory/var_123",
"actions": [
"GET"
],
"types": [
"application/json"
]
},
"set": {
"href": "https://api.checkout.com/inventory/var_123",
"actions": [
"GET"
],
"types": [
"application/json"
]
},
"delete": {
"href": "https://api.checkout.com/inventory/var_123",
"actions": [
"GET"
],
"types": [
"application/json"
]
}
}
},
"_links": {
"self": {
"href": "https://api.checkout.com/inventory/var_123",
"actions": [
"GET"
],
"types": [
"application/json"
]
},
"set": {
"href": "https://api.checkout.com/inventory/var_123",
"actions": [
"GET"
],
"types": [
"application/json"
]
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.