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.promotion.delete("promo_123")
.then(({ promotion }) => {
console.log(promotion)
}){
"id": "<string>",
"object": "promotion",
"deleted": true
}Delete a promotion.
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.promotion.delete("promo_123")
.then(({ promotion }) => {
console.log(promotion)
}){
"id": "<string>",
"object": "promotion",
"deleted": true
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The promotion's ID.