getOrderGroupDetailWorkflow that fetches the group, expands
its child orders, and derives each order’s payment and fulfillment status. Run it
from any place that has access to the Medusa container.
Run the workflow
src/api/custom/order-group/[id]/route.ts
fields
you pass, so order_group.orders is populated with each seller’s slice.
The workflow only fetches heavy relations when you ask for them: include a
payment_collections field to get per-order payment_status, and a
fulfillments field to get fulfillment_status. Otherwise those collections
are stripped from the response to keep it lean.Follow the cart link
The group’s read-onlycart_id points back to the immutable cart it came from.
Expand it through the module link when you need the original basket: