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.claim.addInboundShipping(
"claim_123",
{
shipping_option_id: "so_123",
custom_amount: 10
},
)
.then(({ return: returnData }) => {
console.log(returnData)
})Add an inbound (or return) shipping method to a claim. 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.claim.addInboundShipping(
"claim_123",
{
shipping_option_id: "so_123",
custom_amount: 10
},
)
.then(({ return: returnData }) => {
console.log(returnData)
})Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The claim'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.
OK
The details of the claim's return, with a preview of the order when the claim's return is applied.