Get a routing A/B test
curl --request GET \
--url http://localhost:8081/v1/routing/ab-tests/{id} \
--header 'X-Org-Id: <x-org-id>' \
--header 'X-Reevit-Key: <api-key>'import requests
url = "http://localhost:8081/v1/routing/ab-tests/{id}"
headers = {
"X-Org-Id": "<x-org-id>",
"X-Reevit-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Org-Id': '<x-org-id>', 'X-Reevit-Key': '<api-key>'}
};
fetch('http://localhost:8081/v1/routing/ab-tests/{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_PORT => "8081",
CURLOPT_URL => "http://localhost:8081/v1/routing/ab-tests/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Org-Id: <x-org-id>",
"X-Reevit-Key: <api-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"
"net/http"
"io"
)
func main() {
url := "http://localhost:8081/v1/routing/ab-tests/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Org-Id", "<x-org-id>")
req.Header.Add("X-Reevit-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8081/v1/routing/ab-tests/{id}")
.header("X-Org-Id", "<x-org-id>")
.header("X-Reevit-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8081/v1/routing/ab-tests/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-Org-Id"] = '<x-org-id>'
request["X-Reevit-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"org_id": "<string>",
"mode": "<string>",
"name": "<string>",
"description": "<string>",
"status": "draft",
"variants": [
{
"name": "<string>",
"routing_rule_id": "<string>",
"weight": 123
}
],
"traffic_percentage": 123,
"target_currencies": [
"<string>"
],
"target_countries": [
"<string>"
],
"target_methods": [
"<string>"
],
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"total_transactions": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "invalid_request",
"code": "email_required",
"message": "email is required",
"details": {
"metric": "workflow_executions",
"used": "2000",
"limit": "2000",
"reset": "2025-01-01T00:00:00Z"
}
}{
"error": "invalid_request",
"code": "email_required",
"message": "email is required",
"details": {
"metric": "workflow_executions",
"used": "2000",
"limit": "2000",
"reset": "2025-01-01T00:00:00Z"
}
}Routing
Get a routing A/B test
GET
/
v1
/
routing
/
ab-tests
/
{id}
Get a routing A/B test
curl --request GET \
--url http://localhost:8081/v1/routing/ab-tests/{id} \
--header 'X-Org-Id: <x-org-id>' \
--header 'X-Reevit-Key: <api-key>'import requests
url = "http://localhost:8081/v1/routing/ab-tests/{id}"
headers = {
"X-Org-Id": "<x-org-id>",
"X-Reevit-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Org-Id': '<x-org-id>', 'X-Reevit-Key': '<api-key>'}
};
fetch('http://localhost:8081/v1/routing/ab-tests/{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_PORT => "8081",
CURLOPT_URL => "http://localhost:8081/v1/routing/ab-tests/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Org-Id: <x-org-id>",
"X-Reevit-Key: <api-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"
"net/http"
"io"
)
func main() {
url := "http://localhost:8081/v1/routing/ab-tests/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Org-Id", "<x-org-id>")
req.Header.Add("X-Reevit-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8081/v1/routing/ab-tests/{id}")
.header("X-Org-Id", "<x-org-id>")
.header("X-Reevit-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8081/v1/routing/ab-tests/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-Org-Id"] = '<x-org-id>'
request["X-Reevit-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"org_id": "<string>",
"mode": "<string>",
"name": "<string>",
"description": "<string>",
"status": "draft",
"variants": [
{
"name": "<string>",
"routing_rule_id": "<string>",
"weight": 123
}
],
"traffic_percentage": 123,
"target_currencies": [
"<string>"
],
"target_countries": [
"<string>"
],
"target_methods": [
"<string>"
],
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"total_transactions": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "invalid_request",
"code": "email_required",
"message": "email is required",
"details": {
"metric": "workflow_executions",
"used": "2000",
"limit": "2000",
"reset": "2025-01-01T00:00:00Z"
}
}{
"error": "invalid_request",
"code": "email_required",
"message": "email is required",
"details": {
"metric": "workflow_executions",
"used": "2000",
"limit": "2000",
"reset": "2025-01-01T00:00:00Z"
}
}Authorizations
API key for server-to-server authentication
Headers
Organization identifier for multi-tenancy
Path Parameters
Response
OK
Available options:
draft, running, paused, completed Show child attributes
Show child attributes

