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.exchange.addInboundShipping("exchange_123", {
shipping_option_id: "so_123"
})
.then(({ return: returnData }) => {
console.log(returnData)
})Add an inbound (or return) shipping method to an exchange. The inbound shipping method will have a SHIPPING_ADD action.
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.exchange.addInboundShipping("exchange_123", {
shipping_option_id: "so_123"
})
.then(({ return: returnData }) => {
console.log(returnData)
})Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The exchange's ID.
The shipping method's details.
The ID of the associated shipping option.
Set the price of the shipping method.
The shipping method's description.
A note viewed only by admin users.
The exchange's metadata, can hold custom key-value pairs.