POST
/
admin
/
inventory-items
/
{id}
/
location-levels
/
batch
import Medusa from "@medusajs/js-sdk"

export const sdk = new Medusa({
  baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
  debug: import.meta.env.DEV,
  auth: {
    type: "session",
  },
})

sdk.admin.inventoryItem.batchInventoryItemLocationLevels("iitem_123", {
  create: [{
    location_id: "sloc_123",
    stocked_quantity: 10
  }],
  delete: ["ilvl_123"]
})
.then(({ created, updated, deleted }) => {
  console.log(created, updated, deleted)
})
This response does not have an example.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The inventory item's ID.

Body

application/json

The inventory levels to create, update, or delete.

Response

200

OK