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.order.updateOrderChange(
"ordch_123",
{
carry_over_promotions: true
}
)
.then(({ order_change }) => {
console.log(order_change)
})Update an order change’s details. An order change can be an exchange, claim, or edit. For example, you can edit whether an exchange carries over the parent order’s promotion.
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.order.updateOrderChange(
"ordch_123",
{
carry_over_promotions: true
}
)
.then(({ order_change }) => {
console.log(order_change)
})Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The order change's ID.
Filter by the order change's creation date.
Show child attributes
Filter by the order change's update date.
Show child attributes
Filter by the order change's deletion date.
Show child attributes
Filter by an order change's ID.
Filter by an order change's status.
Filter by the order change's change type.
Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
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.
The data to update in the order change.
Whether promotions from the original order should be carried over to the order change (specifically, exchanges).
OK
The details of the order change.
The order change's details.
Show child attributes