Back to Medusa

Order Module Events Reference

www/apps/resources/references/module_events/module_events.Order/page.mdx

2.14.218.1 KB
Original Source

import { TypeList } from "docs-ui"

Order Module Events Reference

This reference shows all the events emitted by the Medusa application related to the Order Module. If you use the module outside the Medusa application, these events aren't emitted.

Order Edit Events

Summary

<Table> <Table.Header> <Table.Row> <Table.HeaderCell> Event </Table.HeaderCell> <Table.HeaderCell> Description </Table.HeaderCell> </Table.Row> </Table.Header> <Table.Body> <Table.Row> <Table.Cell> [order-edit.requested](#order-editrequested) <Tooltip text="This event was added in version v2.8.0"><Badge variant="blue">v2.8.0</Badge></Tooltip> </Table.Cell> <Table.Cell> Emitted when an order edit is requested. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order-edit.confirmed](#order-editconfirmed) <Tooltip text="This event was added in version v2.8.0"><Badge variant="blue">v2.8.0</Badge></Tooltip> </Table.Cell> <Table.Cell> Emitted when an order edit request is confirmed. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order-edit.canceled](#order-editcanceled) <Tooltip text="This event was added in version v2.8.0"><Badge variant="blue">v2.8.0</Badge></Tooltip> </Table.Cell> <Table.Cell> Emitted when an order edit request is canceled. </Table.Cell> </Table.Row> </Table.Body> </Table>

<EventHeader headerLvl="3" headerProps={{ id: "order-editrequested", children: (<>order-edit.requested <Tooltip text="This event was added in version v2.8.0"> <Badge variant="blue">v2.8.0</Badge> </Tooltip></>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.requested" payload={\``ts { order_id, // The ID of the order actions, // (array) The actions to edit the order } ````} />

Emitted when an order edit is requested.

Payload

ts
{
  order_id, // The ID of the order
  actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "order-editconfirmed", children: (<>order-edit.confirmed <Tooltip text="This event was added in version v2.8.0"> <Badge variant="blue">v2.8.0</Badge> </Tooltip></>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.confirmed" payload={\``ts { order_id, // The ID of the order actions, // (array) The actions to edit the order } ````} />

Emitted when an order edit request is confirmed.

Payload

ts
{
  order_id, // The ID of the order
  actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "order-editcanceled", children: (<>order-edit.canceled <Tooltip text="This event was added in version v2.8.0"> <Badge variant="blue">v2.8.0</Badge> </Tooltip></>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order-edit.canceled" payload={\``ts { order_id, // The ID of the order actions, // (array) The actions to edit the order } ````} />

Emitted when an order edit request is canceled.

Payload

ts
{
  order_id, // The ID of the order
  actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


Order Events

Summary

<Table> <Table.Header> <Table.Row> <Table.HeaderCell> Event </Table.HeaderCell> <Table.HeaderCell> Description </Table.HeaderCell> </Table.Row> </Table.Header> <Table.Body> <Table.Row> <Table.Cell> [order.updated](#orderupdated) </Table.Cell> <Table.Cell> Emitted when the details of an order or draft order is updated. This doesn't include updates made by an edit. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order.placed](#orderplaced) </Table.Cell> <Table.Cell> Emitted when an order is placed, or when a draft order is converted to an order. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order.canceled](#ordercanceled) </Table.Cell> <Table.Cell> Emitted when an order is canceld. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order.completed](#ordercompleted) </Table.Cell> <Table.Cell> Emitted when orders are completed. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order.archived](#orderarchived) </Table.Cell> <Table.Cell> Emitted when an order is archived. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order.fulfillment_created](#orderfulfillment_created) </Table.Cell> <Table.Cell> Emitted when a fulfillment is created for an order. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order.fulfillment_canceled](#orderfulfillment_canceled) </Table.Cell> <Table.Cell> Emitted when an order's fulfillment is canceled. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order.return_requested](#orderreturn_requested) </Table.Cell> <Table.Cell> Emitted when a return request is confirmed. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order.return_received](#orderreturn_received) </Table.Cell> <Table.Cell> Emitted when a return is marked as received. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order.claim_created](#orderclaim_created) </Table.Cell> <Table.Cell> Emitted when a claim is created for an order. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order.exchange_created](#orderexchange_created) </Table.Cell> <Table.Cell> Emitted when an exchange is created for an order. </Table.Cell> </Table.Row> <Table.Row> <Table.Cell> [order.transfer_requested](#ordertransfer_requested) </Table.Cell> <Table.Cell> Emitted when an order is requested to be transferred to another customer. </Table.Cell> </Table.Row> </Table.Body> </Table>

<EventHeader headerLvl="3" headerProps={{ id: "orderupdated", children: (<>order.updated</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.updated" payload={\``ts { id, // The ID of the order } ````} />

Emitted when the details of an order or draft order is updated. This doesn't include updates made by an edit.

Payload

ts
{
  id, // The ID of the order
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "orderplaced", children: (<>order.placed</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.placed" payload={\``ts { id, // The ID of the order } ````} />

Emitted when an order is placed, or when a draft order is converted to an order.

Payload

ts
{
  id, // The ID of the order
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "ordercanceled", children: (<>order.canceled</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.canceled" payload={\``ts { id, // The ID of the order } ````} />

Emitted when an order is canceld.

Payload

ts
{
  id, // The ID of the order
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "ordercompleted", children: (<>order.completed</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.completed" payload={\``ts { id, // The ID of the order } ````} />

Emitted when orders are completed.

Payload

ts
{
  id, // The ID of the order
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "orderarchived", children: (<>order.archived</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.archived" payload={\``ts { id, // The ID of the order } ````} />

Emitted when an order is archived.

Payload

ts
{
  id, // The ID of the order
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "orderfulfillment_created", children: (<>order.fulfillment_created</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.fulfillment_created" payload={\``ts { order_id, // The ID of the order fulfillment_id, // The ID of the fulfillment no_notification, // (boolean) Whether to notify the customer } ````} />

Emitted when a fulfillment is created for an order.

Payload

ts
{
  order_id, // The ID of the order
  fulfillment_id, // The ID of the fulfillment
  no_notification, // (boolean) Whether to notify the customer
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "orderfulfillment_canceled", children: (<>order.fulfillment_canceled</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.fulfillment_canceled" payload={\``ts { order_id, // The ID of the order fulfillment_id, // The ID of the fulfillment no_notification, // (boolean) Whether to notify the customer } ````} />

Emitted when an order's fulfillment is canceled.

Payload

ts
{
  order_id, // The ID of the order
  fulfillment_id, // The ID of the fulfillment
  no_notification, // (boolean) Whether to notify the customer
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "orderreturn_requested", children: (<>order.return_requested</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.return_requested" payload={\``ts { order_id, // The ID of the order return_id, // The ID of the return } ````} />

Emitted when a return request is confirmed.

Payload

ts
{
  order_id, // The ID of the order
  return_id, // The ID of the return
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "orderreturn_received", children: (<>order.return_received</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.return_received" payload={\``ts { order_id, // The ID of the order return_id, // The ID of the return } ````} />

Emitted when a return is marked as received.

Payload

ts
{
  order_id, // The ID of the order
  return_id, // The ID of the return
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "orderclaim_created", children: (<>order.claim_created</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.claim_created" payload={\``ts { order_id, // The ID of the order claim_id, // The ID of the claim } ````} />

Emitted when a claim is created for an order.

Payload

ts
{
  order_id, // The ID of the order
  claim_id, // The ID of the claim
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "orderexchange_created", children: (<>order.exchange_created</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.exchange_created" payload={\``ts { order_id, // The ID of the order exchange_id, // The ID of the exchange } ````} />

Emitted when an exchange is created for an order.

Payload

ts
{
  order_id, // The ID of the order
  exchange_id, // The ID of the exchange
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.


<EventHeader headerLvl="3" headerProps={{ id: "ordertransfer_requested", children: (<>order.transfer_requested</>), className: "flex flex-wrap justify-center gap-docs_0.25" }} eventName="order.transfer_requested" payload={\``ts { id, // The ID of the order order_change_id, // The ID of the order change created for the transfer } ````} />

Emitted when an order is requested to be transferred to another customer.

Payload

ts
{
  id, // The ID of the order
  order_change_id, // The ID of the order change created for the transfer
}

Workflows Emitting this Event

The following workflows emit this event when they're executed. These workflows are executed by Medusa's API routes. You can also view the events emitted by API routes in the Store and Admin API references.