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.listChanges("order_123")
.then(({ order_changes }) => {
console.log(order_changes)
})Retrieve a list of changes made on an order, including returns, exchanges, etc…
The changes can be filtered by fields like created_at. The changes can also be paginated.
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.listChanges("order_123")
.then(({ order_changes }) => {
console.log(order_changes)
})Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The order'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.
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 ID.
Filter by the order change's status.
Filter by the order change's 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.
OK
The details of an order's changes.
An order's changes.
Show child attributes