> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# confirmExchangeRequestWorkflow

> Confirm an exchange request and fix reservations for offer bundles.

Wraps Medusa's `confirmExchangeRequestWorkflow` and then rewrites the reservations created for the exchange's additional items when those items come from offers: single-link offers get their reservation quantity scaled by `required_quantity`, multi-link (bundle) offers have the default reservation replaced with one reservation per linked inventory item. Triggered by `POST /admin/exchanges/:id/request` and `POST /vendor/exchanges/:id/request`. Events are emitted by the wrapped Medusa workflow.

## Usage

```ts theme={null}
import { confirmExchangeRequestWorkflow } from "@mercurjs/core/workflows"

const { result } = await confirmExchangeRequestWorkflow(container).run({
  input: { exchange_id: "exchange_123", confirmed_by: "user_123" },
})
```

## Input

<ParamField body="exchange_id" type="string" required>The exchange whose pending request is confirmed.</ParamField>
<ParamField body="confirmed_by" type="string">Id of the user confirming the exchange.</ParamField>

## Result

<ResponseField name="result" type="OrderPreviewDTO">Preview of the order with the confirmed exchange applied.</ResponseField>
