Update a Routing
Replaces the routing’s full configuration. The body has the same shape as Create a Routing — the new default_route and condition_sets[] entirely supersede the previous live state. There is no field-level merge.
account_id and payment_method are sticky to the routing_id — they’re set at creation and cannot be changed by PATCH.
Path Parameters
The id returned by Create a Routing.
Body
Free-form label.
The route used when no condition_sets[] matches.
Optional. Ordered by sort_number — first matching set wins.
Response
Unique identifier for the routing.
Unique identifier for the account.
The payment method this routing applies to (e.g., CARD).
Label for the routing.
The default routing logic.
Optional conditional logic.
ISO 8601 timestamp.
ISO 8601 timestamp.
curl -X PATCH 'https://api.whitelabel.com/v1/routing/r_8f2c1d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f' \
-H 'public-api-key: <YOUR_PUBLIC_KEY>' \
-H 'private-secret-key: <YOUR_SECRET_KEY>' \
-H 'Content-Type: application/json' \
-H 'X-Idempotency-Key: <UUID>' \
-d '{
"payment_method": "CARD",
"name": "Card routing v2 — adds BR installments rule",
"default_route": {
"steps": [
{
"index": 1,
"provider_id": "STRIPE",
"connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
"output": [
{ "status": "DECLINED", "next": 2 }
]
},
{
"index": 2,
"provider_id": "ADYEN",
"connection_id": "b2c4d5e6-1a2b-3c4d-5e6f-7a8b9c0d1e2f"
}
]
},
"condition_sets": [
{
"sort_number": 1,
"name": "Brazil — BRL 300 to 600 via Adyen",
"description": "BR card transactions between BRL 300 and 600 go to Adyen directly",
"conditions": [
{ "condition_type": "COUNTRY", "conditional": "EQUAL", "values": ["BR"] },
{ "condition_type": "AMOUNT", "conditional": "BETWEEN", "values": ["300.00", "600.00"], "currency": "BRL" }
],
"route": {
"steps": [
{ "index": 1, "provider_id": "ADYEN", "connection_id": "b2c4d5e6-..." }
]
}
}
]
}'{
"id": "r_8f2c1d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f",
"account_id": "acc-uuid",
"payment_method": "CARD",
"name": "Card routing v2 — adds BR installments rule",
"default_route": {
"steps": [
{
"index": 1,
"provider_id": "STRIPE",
"connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e",
"output": [ { "status": "DECLINED", "next": 2 } ]
},
{ "index": 2, "provider_id": "ADYEN", "connection_id": "b2c4d5e6-..." }
]
},
"condition_sets": [
{
"sort_number": 1,
"name": "Brazil — BRL 300 to 600 via Adyen",
"conditions": [
{ "condition_type": "COUNTRY", "conditional": "EQUAL", "values": ["BR"] }
],
"route": { "steps": ["..."] }
}
],
"created_at": "2026-05-12T14:30:00Z",
"updated_at": "2026-05-13T09:18:42Z"
}{
"code": "ROUTING_PAYMENT_METHOD_IMMUTABLE",
"messages": ["payment_method cannot be changed on an existing routing"]
}Errors
| HTTP | code |
|---|---|
404 | ROUTING_NOT_FOUNDUnknown routing_id, or id belongs to a different account. |
400 | ROUTING_VALIDATION_FAILEDSchema or rule violation. |
400 | ROUTING_PROVIDER_NOT_AVAILABLEA step references an inactive/unknown connection. |
400 | ROUTING_PAYMENT_METHOD_IMMUTABLEBody’s payment_method doesn’t match the routing’s payment_method. |
409 | ROUTING_VERSION_CONFLICTAnother concurrent PATCH won the publish race. |
401 | NOT_AUTHENTICATEDMissing public-api-key or private-secret-key header. |
401 | INVALID_CREDENTIALSWrong key pair, or a Dashboard Customized API key was used. Use an account key or organization key instead. |
/routing/{routing_id}Replaces the routing’s full configuration.
Header Parameters
Path Parameters
Response
OK
Bad Request
Unauthorized
Not Found
Conflict