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.shippingOptionType.update("sotype_123", {
code: "express"
})
.then(({ shipping_option_type }) => {
console.log(shipping_option_type)
}){
"shipping_option_type": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"description": "<string>",
"code": "<string>",
"shipping_option_id": "<string>"
}
}Update a shipping option type’s details.
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.shippingOptionType.update("sotype_123", {
code: "express"
})
.then(({ shipping_option_type }) => {
console.log(shipping_option_type)
}){
"shipping_option_type": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"description": "<string>",
"code": "<string>",
"shipping_option_id": "<string>"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The shipping option type's ID.
Comma-separated fields that should be included in the returned data.
if a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields.
without prefix it will replace the entire default fields.
Comma-separated fields that should be included in the returned data. If a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. Without prefix it will replace the entire default fields.
OK
The shipping option type's details.
The shipping option's details.
Show child attributes
The shipping option's ID.
The date the shipping option was created.
The date the shipping option was updated.
The date the shipping option was deleted.
The type's label.
The type's description.
The type's code.
The type's shipping option id.