Update a Routing
curl --request PATCH \
--url https://api-sandbox.y.uno/v1/routing/{routing_id} \
--header 'Content-Type: application/json' \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"name": "Updated Card routing",
"default_route": {},
"condition_sets": [
{}
]
}
'import requests
url = "https://api-sandbox.y.uno/v1/routing/{routing_id}"
payload = {
"name": "Updated Card routing",
"default_route": {},
"condition_sets": [{}]
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"PUBLIC-API-KEY": "<api-key>",
"PRIVATE-SECRET-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
'PUBLIC-API-KEY': '<api-key>',
'PRIVATE-SECRET-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Updated Card routing', default_route: {}, condition_sets: [{}]})
};
fetch('https://api-sandbox.y.uno/v1/routing/{routing_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/routing/{routing_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated Card routing',
'default_route' => [
],
'condition_sets' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"PRIVATE-SECRET-KEY: <api-key>",
"PUBLIC-API-KEY: <api-key>",
"X-Idempotency-Key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/routing/{routing_id}"
payload := strings.NewReader("{\n \"name\": \"Updated Card routing\",\n \"default_route\": {},\n \"condition_sets\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
req.Header.Add("PUBLIC-API-KEY", "<api-key>")
req.Header.Add("PRIVATE-SECRET-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-sandbox.y.uno/v1/routing/{routing_id}")
.header("X-Idempotency-Key", "<x-idempotency-key>")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Card routing\",\n \"default_route\": {},\n \"condition_sets\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/routing/{routing_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Idempotency-Key"] = '<x-idempotency-key>'
request["PUBLIC-API-KEY"] = '<api-key>'
request["PRIVATE-SECRET-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated Card routing\",\n \"default_route\": {},\n \"condition_sets\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"account_code": "<string>",
"payment_method": "<string>",
"name": "<string>",
"default_route": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Routing
Update a Routing
Replaces the routing’s full configuration.
PATCH
/
routing
/
{routing_id}
Update a Routing
curl --request PATCH \
--url https://api-sandbox.y.uno/v1/routing/{routing_id} \
--header 'Content-Type: application/json' \
--header 'PRIVATE-SECRET-KEY: <api-key>' \
--header 'PUBLIC-API-KEY: <api-key>' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"name": "Updated Card routing",
"default_route": {},
"condition_sets": [
{}
]
}
'import requests
url = "https://api-sandbox.y.uno/v1/routing/{routing_id}"
payload = {
"name": "Updated Card routing",
"default_route": {},
"condition_sets": [{}]
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"PUBLIC-API-KEY": "<api-key>",
"PRIVATE-SECRET-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
'PUBLIC-API-KEY': '<api-key>',
'PRIVATE-SECRET-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'Updated Card routing', default_route: {}, condition_sets: [{}]})
};
fetch('https://api-sandbox.y.uno/v1/routing/{routing_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/routing/{routing_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated Card routing',
'default_route' => [
],
'condition_sets' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"PRIVATE-SECRET-KEY: <api-key>",
"PUBLIC-API-KEY: <api-key>",
"X-Idempotency-Key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/routing/{routing_id}"
payload := strings.NewReader("{\n \"name\": \"Updated Card routing\",\n \"default_route\": {},\n \"condition_sets\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
req.Header.Add("PUBLIC-API-KEY", "<api-key>")
req.Header.Add("PRIVATE-SECRET-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-sandbox.y.uno/v1/routing/{routing_id}")
.header("X-Idempotency-Key", "<x-idempotency-key>")
.header("PUBLIC-API-KEY", "<api-key>")
.header("PRIVATE-SECRET-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Card routing\",\n \"default_route\": {},\n \"condition_sets\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/routing/{routing_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Idempotency-Key"] = '<x-idempotency-key>'
request["PUBLIC-API-KEY"] = '<api-key>'
request["PRIVATE-SECRET-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated Card routing\",\n \"default_route\": {},\n \"condition_sets\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"account_code": "<string>",
"payment_method": "<string>",
"name": "<string>",
"default_route": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}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_code and payment_method are sticky to the routing_id — they’re set at creation and cannot be changed by PATCH.
Path Parameters
string
required
The id returned by Create a Routing.
Response
string
Unique identifier for the routing.
curl --request PATCH \
--url https://api.y.uno/v1/routing/{routing_id} \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <UUID>' \
--header 'private-secret-key: <YOUR_SECRET_KEY>' \
--header 'public-api-key: <YOUR_PUBLIC_KEY>' \
--data '
{
"name": "Updated Card routing",
"default_route": {
"steps": [
{
"index": 1,
"provider_id": "ADYEN",
"connection_id": "b2c4d5e6-1a2b-3c4d-5e6f-7a8b9c0d1e2f"
}
]
}
}
'
{
"id": "r_8f2c1d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f",
"account_code": "acc-uuid",
"payment_method": "CARD",
"name": "Updated Card routing",
"default_route": {
"steps": [
{ "index": 1, "provider_id": "ADYEN", "connection_id": "b2c4d5e6-1a2b-3c4d-5e6f-7a8b9c0d1e2f" }
]
},
"created_at": "2026-05-12T14:30:00Z",
"updated_at": "2026-05-12T15:00:00Z"
}
Errors
| HTTP | code | When |
|---|---|---|
404 | ROUTING_NOT_FOUND | Unknown routing_id, or id belongs to a different account. |
400 | ROUTING_VALIDATION_FAILED | Schema or rule violation. |
400 | ROUTING_PROVIDER_NOT_AVAILABLE | A step references an inactive/unknown connection. |
400 | ROUTING_PAYMENT_METHOD_IMMUTABLE | Body’s payment_method doesn’t match the routing’s payment_method. |
409 | ROUTING_VERSION_CONFLICT | Another concurrent PATCH won the publish race. |
403 | INSUFFICIENT_SCOPE | API key missing routing:write. |
Authorizations
Headers
Path Parameters
Body
application/json
Was this page helpful?
⌘I