PATCH
/
v1
/
routing-ab-tests
/
{id}
/
comparison
Update a routing rule
curl --request PATCH \
  --url http://localhost:8081/v1/routing-ab-tests/{id}/comparison \
  --header 'Content-Type: application/json' \
  --header 'X-Org-Id: <x-org-id>' \
  --header 'X-Reevit-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "countries": [
    "<string>"
  ],
  "methods": [
    "<string>"
  ],
  "connection_id": "<string>",
  "priority": 123,
  "fallback_to_default": true,
  "enabled": true
}
'
{
  "id": "<string>",
  "name": "<string>",
  "countries": [
    "<string>"
  ],
  "methods": [
    "<string>"
  ],
  "connection_id": "<string>",
  "priority": 123,
  "fallback_to_default": true,
  "enabled": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

X-Reevit-Key
string
header
required

API key for server-to-server authentication

Headers

X-Org-Id
string
required

Organization identifier for multi-tenancy

Path Parameters

id
string
required

Body

application/json
name
string
countries
string[]
methods
string[]
connection_id
string
priority
integer
fallback_to_default
boolean
enabled
boolean

Response

OK

A routing rule that explicitly routes payments from specific countries/methods to a specific connection. Rules are evaluated by priority (highest first). If no rule matches, default routing logic is used.

id
string
name
string

Human-readable name for the rule

countries
string[]

ISO 3166-1 alpha-2 country codes (e.g., US, GB, GH)

methods
string[]

Payment methods (e.g., card, mobile_money). Empty means all methods.

connection_id
string

The connection to use when this rule matches

priority
integer

Higher priority rules are evaluated first

fallback_to_default
boolean

If true, fall back to default routing if the connection is unavailable

enabled
boolean
created_at
string<date-time>
updated_at
string<date-time>