v1

latestOpenAPI 3.1.02026-07-263644911022.4 KB
Configuration Fee Rules

Create a fee rule

Use this endpoint to create a new fee rule that maps transaction metadata to a fee schedule within a context.

Priority must be unique within a context across all sides (LEFT, RIGHT, and ANY rules share the same priority space). The caller must also be allowed to read the referenced fee schedule.

post/v1/contexts/{contextId}/fee-rules

Path parameters

contextIdstring uuid required

The unique identifier of the reconciliation context.

Headers

X-Request-Idstring

A unique identifier for tracing the request across services.

X-Idempotency-Keystring

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.

Request body

feeScheduleIdstring required

The fee schedule to apply when this rule matches

namestring required

Display name for the fee rule

side'LEFT' | 'RIGHT' | 'ANY' required

Which transaction side this rule applies to

priorityinteger

Evaluation priority (must be unique within the context; LEFT, RIGHT, and ANY rules share the same priority space)

Example request

{
  "feeScheduleId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "BB Right-Side Rule",
  "side": "RIGHT",
  "predicates": [
    {
      "field": "institution",
      "operator": "EQUALS",
      "value": "Banco do Brasil"
    }
  ]
}

Response

Successfully created 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.

idstring uuid

Unique identifier for the fee rule

contextIdstring uuid

Reconciliation context this rule belongs to

feeScheduleIdstring uuid

Fee schedule applied when this rule matches

namestring

Display name for the fee rule

side'LEFT' | 'RIGHT' | 'ANY'

Which transaction side this rule applies to

priorityinteger

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

createdAtstring date-time

Creation timestamp in RFC 3339 format

updatedAtstring date-time

Last update timestamp in RFC 3339 format

Example response

{
  "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",
  "predicates": [
    {
      "field": "institution",
      "operator": "EQUALS",
      "value": "Banco do Brasil"
    }
  ],
  "createdAt": "2025-01-15T10:30:00Z",
  "updatedAt": "2025-01-15T10:30:00Z"
}