> ## 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.

# updateCommissionRatesWorkflow

> Update one or more commission rates.

Applies partial updates to existing commission rates by ID. Triggered by `POST /admin/commission-rates/:id`.

## Usage

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

const { result } = await updateCommissionRatesWorkflow(container).run({
  input: [{ id: "comrate_123", value: 12, is_enabled: true }],
})
```

## Input

The input is an array of commission rate updates.

<ParamField body="id" type="string" required>The commission rate to update.</ParamField>
<ParamField body="name" type="string">Display name of the rate.</ParamField>
<ParamField body="code" type="string">Unique code of the rate.</ParamField>
<ParamField body="type" type="string">One of `fixed`, `percentage`.</ParamField>
<ParamField body="value" type="number">Rate value — a percentage for `percentage`, an amount for `fixed`.</ParamField>
<ParamField body="currency_code" type="string | null">Currency of a `fixed` rate.</ParamField>
<ParamField body="include_tax" type="boolean">Include tax totals in the commission base.</ParamField>
<ParamField body="include_shipping" type="boolean">Also apply the rate to shipping methods.</ParamField>
<ParamField body="is_enabled" type="boolean">Whether the rate is active.</ParamField>
<ParamField body="is_default" type="boolean">Marks the rate as the platform-wide fallback.</ParamField>

## Result

<ResponseField name="result" type="CommissionRateDTO[]">The updated commission rates.</ResponseField>
