- Plugins
- Auth
- Draft Orders
- Create a Draft Order Edit
- Cancel Edit on Draft Order
- Confirm an Edit on a Draft Order
- Request Edit on Draft Order
- Convert a Draft Order to an Order
- Add Item to Draft Order Edit
- Update Existing Item in Draft Order Edit
- Remove Item from Draft Order Edit
- Update New Item in Draft Order Edit
- Add Promotions to Draft Order Edit
- Remove Promotions from Draft Order Edit
- Add Shipping Method to Draft Order Edit
- Remove Shipping Method from Draft Order Edit
- Update Existing Shipping Method in Draft Order Edit
- Remove New Shipping Method from Draft Order
- Update New Shipping Method in Draft Order Edit
- Delete a Draft Order
- Get a Draft Order
- Update a Draft Order
- Create Draft Order
- List Draft Orders
- Fulfillment Providers
- Fulfillment Sets
- Inventory Items
- Manage Inventory Levels
- Manage Inventory Levels of Inventory Item
- Create Inventory Level for Inventory Item
- List Inventory Levels
- Update an Inventory Level of an Inventory Item
- Remove Inventory Level of Inventory Item
- Create Inventory Item
- List Inventory Items
- Get a Inventory Item
- Delete Inventory Item
- Update an Inventory Item
- Order Edits
- Create Order Edit
- Confirm Order Edit
- Request Order Edit
- Add Items to Order Edit
- Update Order Item Quantity of Order Edit
- Remove Item from Order Edit
- Update an Item in an Order Edit
- Add Shipping Method to Order Edit
- Remove Shipping Method from Order Edit
- Update Shipping Method of an Order Edit
- Cancel Order Edit
- Orders
- List Changes on an Order
- Mark a Fulfillment as Delivered.
- Get Preview
- Archive an Order
- Cancel Order
- Cancel Transfer Request
- Create Credit Line for Order
- Request Order Transfer
- Complete Order
- Update Order
- Get an Order
- List Line Items
- Cancel Fulfillment
- Create an Order Fulfillment
- Create Shipment for an Order's Fulfillment
- List Orders
- Payment Collections
- Products
- Create Product ImportPOST
- Confirm Product ImportPOST
- Export ProductsPOST
- Manage ProductsPOST
- Manage Variants in a ProductPOST
- Associate Variant with Inventory ItemPOST
- Remove Inventory Item Association with Product VariantDELETE
- Update Product Variant's Inventory DetailsPOST
- Delete a ProductDELETE
- Get a ProductGET
- Update a ProductPOST
- Create a Product OptionPOST
- List a Product's OptionsGET
- Get a Product's OptionGET
- Delete an Option from ProductDELETE
- Update a Product's OptionPOST
- Get Variant of a ProductGET
- Delete Product VariantDELETE
- Update a Product VariantPOST
- Manage Variants Inventory in a ProductPOST
- Create a Product VariantPOST
- List Variants of a ProductGET
- Create ProductPOST
- List ProductsGET
- Claims
- Get a Claim
- Cancel a Claim
- Add Inbound Items to a Claim
- Remove an Inbound Item from Claim
- Update Inbound Items of a Claim
- Add an Inbound Shipping Method to a Claim
- Cancel Claim Request
- Confirm a Claim Request
- Add Claim Items to a Claim
- Remove a Claim Item from a Claim
- Update a Claim Item
- Remove Inbound Shipping Method from Claim
- Update Inbound Shipping Method of a Claim
- Add Outbound Items to a Claim
- Remove an Outbound Item from Claim
- Update Outbound Item of a Claim
- Add Outbound Shipping Methods to a Claim
- Remove Outbound Shipping Method from Claim
- Update Outbound Shipping Method of a Claim
- Create a Claim
- List Claims
- Currencies
- Exchanges
- Get an Exchange
- Cancel an Exchange
- Add Inbound Items to an Exchange
- Remove Inbound Item from Exchange
- Update an Inbount Item of an Exchange
- Add an Inbound Shipping Method to an Exchange
- Cancel Exchange Request
- Confirm an Exchange
- Remove Inbound Shipping Method from Exchange
- Update Inbound Shipping Method of an Exchange
- Add Outbound Items to Exchange
- Remove Outbound Item from Exchange
- Update Outbound Item of an Exchange
- Add Outbound Shipping Method to Exchange
- Remove Outbound Shipping Method from Exchange
- Update Outbound Shipping Method of Exchange
- Create Exchange
- List Exchanges
- Fulfillments
- Invites
- Notifications
- Payments
- Returns
- Cancel a return.
- Get a Return
- Update a Return
- Add Damaged Items to Return
- Remove Damaged Item from Return
- Update Damaged Item of Return
- Add Received Items to Return
- Remove a Received Item from Return
- Update a Received Item in a Return
- Confirm Return Receival
- Add Requested Items to Return
- Remove Item from Return
- Update Requested Item in Return
- Add a Shipping Method to a Return
- Remove Shipping Method from Return
- Update a Shipping Method of a Return
- Start Return Receival
- Cancel Return Receival
- Confirm Return Request
- Cancel Return Request
- Create Return
- List Returns
- Users
- Workflows Executions
- Api Keys
- Price Lists
- Stores
- Tax Rates
- Price Preferences
- Return Reasons
- Sales Channels
- Stock Locations
- Tax Regions
- Promotions
- Customer Groups
- Product Tags
- Product Types
- Refund Reasons
- Uploads
- Campaigns
- Collections
- Customers
- Product Categories
- Reservations
- Shipping Profiles
- Regions
- Tax Providers
- Shipping Options
- Product Variants
Manage Variants Inventory in a Product
POST
/admin/products/{id}/variants/inventory-items/batch
Products
Request Request Example
JavaScript
Shell
Java
Swift
curl --location -g --request POST '{{BASE_URL}}/admin/products//variants/inventory-items/batch' \
--header 'Content-Type: application/json' \
--data-raw '{
"delete": [
{
"inventory_item_id": "string",
"variant_id": "string"
}
],
"create": [
{
"required_quantity": 0,
"inventory_item_id": "string",
"variant_id": "string"
}
],
"update": [
{
"required_quantity": 0,
"inventory_item_id": "string",
"variant_id": "string"
}
]
}'
Response Response Example
200 - Example 1
{
"created": {
"Product": {
"variant_id": "string"
},
"Inventory": {
"inventory_item_id": "string"
}
},
"updated": {
"Product": {
"variant_id": "string"
},
"Inventory": {
"inventory_item_id": "string"
}
},
"deleted": {
"Product": {
"variant_id": "string"
},
"Inventory": {
"inventory_item_id": "string"
}
}
}
Request
Authorization
or
or
or
Path Params
id
stringÂ
required
Body Params application/json
The product variant inventories to manage.
delete
array [object {2}]Â
optional
inventory_item_id
stringÂ
inventory_item_id
variant_id
stringÂ
variant_id
create
array [object {3}]Â
optional
required_quantity
numberÂ
required_quantity
required_quantity
. When the customer orders the quantity, Medusa reserves the ordered quantity multiplied by the value set for required_quantity
.inventory_item_id
stringÂ
inventory_item_id
variant_id
stringÂ
variant_id
update
array [object {3}]Â
optional
required_quantity
numberÂ
required_quantity
required_quantity
. When the customer orders the quantity, Medusa reserves the ordered quantity multiplied by the value set for required_quantity
.inventory_item_id
stringÂ
inventory_item_id
variant_id
stringÂ
variant_id
Examples
Responses
🟢200OK
application/json
Body
The created, updated, and deleted associations between variants and inventory items.
created
required
One of
Product
objectÂ
required
Inventory
objectÂ
required
updated
required
One of
Product
objectÂ
required
Inventory
objectÂ
required
deleted
required
One of
Product
objectÂ
required
Inventory
objectÂ
required
🟠400Bad Request
🟠401Unauthorized
🟠404Record Not Found
🟠409409
🟠422Parameter Error
🔴500Server Error
Modified at 2025-06-17 04:10:32