---
title: "Update a fee rule"
method: PATCH
path: "/v1/fee-rules/{feeRuleId}"
tags: ["Configuration Fee Rules"]
---

# Update a fee rule

`PATCH /v1/fee-rules/{feeRuleId}`

Use this endpoint to update the fields of a specific fee rule by its identifier. If the referenced fee schedule changes, the caller must also be allowed to read that fee schedule.

## Path parameters

- `feeRuleId` string, uuid, required

## Headers

- `X-Request-Id` string
- `X-Idempotency-Key` string

## Request body

- UpdateFeeRuleRequest — Request payload for updating a fee rule
  - `feeScheduleId` string — Updated fee schedule to apply when this rule matches
  - `name` string — Updated display name for the fee rule
  - `side` 'LEFT' | 'RIGHT' | 'ANY' — Updated transaction side
  - `priority` integer — Updated evaluation priority (must remain unique within the context)
  - `predicates` FieldPredicateRequest[] — Updated conditions for this rule
    - `field` string, required — Transaction field to evaluate
    - `operator` 'EQUALS' | 'IN' | 'EXISTS', required — Comparison operator
    - `value` string — Single value to compare against (used with EQUALS and EXISTS operators)
    - `values` string[] — List of values to compare against (used with IN operator)

## Response `200`

Successfully updated fee rule.

The response includes the `X-Idempotency-Replayed` header.

If the value is false, the request was just processed. If the value is true, the response is a replay of a previously processed request.

See [Retries and idempotency](/en/reference/retries-idempotency) for more details.

- FeeRuleResponse — A fee rule that maps transaction metadata to a fee schedule within a reconciliation context
  - `id` string, uuid — Unique identifier for the fee rule
  - `contextId` string, uuid — Reconciliation context this rule belongs to
  - `feeScheduleId` string, uuid — Fee schedule applied when this rule matches
  - `name` string — Display name for the fee rule
  - `side` 'LEFT' | 'RIGHT' | 'ANY' — Which transaction side this rule applies to
  - `priority` integer — Evaluation priority (lower numbers are evaluated first; LEFT, RIGHT, and ANY rules share the same priority space)
  - `predicates` FieldPredicateResponse[] — Conditions that must all match for this rule to apply
    - `field` string — Transaction field being evaluated
    - `operator` 'EQUALS' | 'IN' | 'EXISTS' — Comparison operator
    - `value` string — Single value being compared
    - `values` string[] — List of values being compared
  - `createdAt` string, date-time — Creation timestamp in RFC 3339 format
  - `updatedAt` string, date-time — Last update timestamp in RFC 3339 format

## Other responses

- `400` — Invalid request payload
- `401` — The request lacks valid authentication credentials.
- `403` — You do not have permission to access this resource.
- `404` — Fee rule not found
- `409` — Conflict — duplicate priority or name
- `500` — An unexpected error occurred on the server.

---

[API](https://skmtc.net/lerian/apis/identity-plugin.md) · [All operations](https://skmtc.net/lerian/apis/identity-plugin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lerian/identity-plugin/versions/25daba385532/schema)
