import Switchyard from "@switchyard/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.stockLocation.delete("sloc_123")
.then(({ deleted }) => {
console.log(deleted)
}){
"id": "<string>",
"object": "stock_location",
"deleted": true
}Delete a stock location.
import Switchyard from "@switchyard/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.stockLocation.delete("sloc_123")
.then(({ deleted }) => {
console.log(deleted)
}){
"id": "<string>",
"object": "stock_location",
"deleted": true
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The stock location's ID.