Skip to main content
PATCH
/
v1
/
config
/
fee-rules
/
{feeRuleId}
Update a fee rule
curl --request PATCH \
  --url https://matcher.sandbox.lerian.net/v1/config/fee-rules/{feeRuleId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "feeScheduleId": "<string>",
  "name": "Updated Rule",
  "side": "LEFT",
  "priority": 1,
  "predicates": [
    {
      "field": "institution",
      "operator": "EQUALS",
      "value": "Banco do Brasil",
      "values": [
        "<string>"
      ]
    }
  ]
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "contextId": "550e8400-e29b-41d4-a716-446655440000",
  "feeScheduleId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "BB Right-Side Rule",
  "side": "RIGHT",
  "priority": 0,
  "predicates": [
    {
      "field": "institution",
      "operator": "EQUALS",
      "value": "Banco do Brasil",
      "values": [
        "<string>"
      ]
    }
  ],
  "createdAt": "2025-01-15T10:30:00Z",
  "updatedAt": "2025-01-15T10:30:00Z"
}

Authorizations

Authorization
string
header
required

Bearer token authentication (format: "Bearer {token}")

Headers

X-Request-Id
string

A unique identifier for tracing the request across services.

X-Idempotency-Key
string

Optional idempotency key for safe retries. Also accepts Idempotency-Key as an alternative header name. If the same key is sent again and the original request was already processed, the cached response is returned with X-Idempotency-Replayed: true.

See Retries and idempotency for details.

Path Parameters

feeRuleId
string<uuid>
required

The unique identifier of the fee rule.

Body

application/json

Fee rule updates

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

Maximum string length: 100
Example:

"Updated Rule"

side
enum<string>

Updated transaction side

Available options:
LEFT,
RIGHT,
ANY
Example:

"LEFT"

priority
integer

Updated evaluation priority (must remain unique within the context)

Required range: x >= 0
predicates
object[]

Updated conditions for this rule

Maximum array length: 50

Response

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 for more details.

A fee rule that maps transaction metadata to a fee schedule within a reconciliation context

id
string<uuid>

Unique identifier for the fee rule

Example:

"550e8400-e29b-41d4-a716-446655440000"

contextId
string<uuid>

Reconciliation context this rule belongs to

Example:

"550e8400-e29b-41d4-a716-446655440000"

feeScheduleId
string<uuid>

Fee schedule applied when this rule matches

Example:

"550e8400-e29b-41d4-a716-446655440000"

name
string

Display name for the fee rule

Example:

"BB Right-Side Rule"

side
enum<string>

Which transaction side this rule applies to

Available options:
LEFT,
RIGHT,
ANY
Example:

"RIGHT"

priority
integer

Evaluation priority (lower numbers are evaluated first; LEFT, RIGHT, and ANY rules share the same priority space)

Example:

0

predicates
object[]

Conditions that must all match for this rule to apply

createdAt
string<date-time>

Creation timestamp in RFC 3339 format

Example:

"2025-01-15T10:30:00Z"

updatedAt
string<date-time>

Last update timestamp in RFC 3339 format

Example:

"2025-01-15T10:30:00Z"