JavaScript
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.stockLocation.delete("sloc_123") .then(({ deleted }) => { console.log(deleted) })
200
Example
{ "id": "<string>", "object": "stock_location", "deleted": true}
Delete a stock location.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The stock location's ID.
OK
The details of the stock location's deletion.
The name of the deleted object.
Whether the stock location was deleted.