Profile - Activate routing algorithm
curl --request PATCH \
--url https://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"routing_algorithm_id": "routing_algorithm_123"
}
'import requests
url = "https://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm"
payload = { "routing_algorithm_id": "routing_algorithm_123" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({routing_algorithm_id: 'routing_algorithm_123'})
};
fetch('https://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm', 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://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm",
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([
'routing_algorithm_id' => 'routing_algorithm_123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm"
payload := strings.NewReader("{\n \"routing_algorithm_id\": \"routing_algorithm_123\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"routing_algorithm_id\": \"routing_algorithm_123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"routing_algorithm_id\": \"routing_algorithm_123\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"profile_id": "<string>",
"name": "<string>",
"kind": "single",
"description": "<string>",
"created_at": 123,
"modified_at": 123,
"algorithm_for": "payment",
"decision_engine_routing_id": "<string>"
}Profile
Profile - Activate routing algorithm
Activates a routing algorithm under a profile
PATCH
/
v2
/
profiles
/
{id}
/
activate-routing-algorithm
Profile - Activate routing algorithm
curl --request PATCH \
--url https://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"routing_algorithm_id": "routing_algorithm_123"
}
'import requests
url = "https://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm"
payload = { "routing_algorithm_id": "routing_algorithm_123" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({routing_algorithm_id: 'routing_algorithm_123'})
};
fetch('https://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm', 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://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm",
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([
'routing_algorithm_id' => 'routing_algorithm_123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm"
payload := strings.NewReader("{\n \"routing_algorithm_id\": \"routing_algorithm_123\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"routing_algorithm_id\": \"routing_algorithm_123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/v2/profiles/{id}/activate-routing-algorithm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"routing_algorithm_id\": \"routing_algorithm_123\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"profile_id": "<string>",
"name": "<string>",
"kind": "single",
"description": "<string>",
"created_at": 123,
"modified_at": 123,
"algorithm_for": "payment",
"decision_engine_routing_id": "<string>"
}Authorizations
api_keyjwt_key
Format: api-key=<api_key>
Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Path Parameters
The unique identifier for the profile
Body
application/json
Response
Routing Algorithm is activated
Available options:
single, priority, volume_split, advanced, dynamic, three_ds_decision_rule Available options:
payment, payout, three_ds_authentication