Skip to main content
GET
/
v1
/
rules
List Rules
curl --request GET \
  --url https://tracer.sandbox.lerian.net/v1/rules \
  --header 'Content-Type: <content-type>' \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://tracer.sandbox.lerian.net/v1/rules"

headers = {
"Content-Type": "<content-type>",
"X-API-Key": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', 'X-API-Key': '<api-key>'}
};

fetch('https://tracer.sandbox.lerian.net/v1/rules', 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://tracer.sandbox.lerian.net/v1/rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-API-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 := "https://tracer.sandbox.lerian.net/v1/rules"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-API-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("https://tracer.sandbox.lerian.net/v1/rules")
.header("Content-Type", "<content-type>")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://tracer.sandbox.lerian.net/v1/rules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "rules": [
    {
      "ruleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "description": "<string>",
      "expression": "<string>",
      "scopes": [
        {
          "segmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "portfolioId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "merchantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "subType": "<string>"
        }
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "activatedAt": "2023-11-07T05:31:56Z",
      "deactivatedAt": "2023-11-07T05:31:56Z",
      "deletedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "hasMore": true,
  "nextCursor": "<string>"
}

Authorizations

X-API-Key
string
header
required

API Key authentication. Used by single-tenant deployments (MULTI_TENANT_ENABLED=false). Sent on every /v1/* request.

Headers

Content-Type
string
required

The type of media of the resource. Must be application/json.

X-API-Key
string
required

The API Key for authentication. This header is required for all endpoints except health checks.

X-Request-Id
string<uuid>

A unique identifier used to trace and track each request.

Query Parameters

limit
integer
default:10

The maximum number of items to include in the response. Default: 10, Max: 100

Required range: 1 <= x <= 100
cursor
string

Pagination cursor from previous response.

name
string

Filter by name (case-insensitive partial match).

Maximum string length: 255
status
enum<string>

Filter by status (DRAFT, ACTIVE, INACTIVE). DELETED rules are not listable.

Available options:
DRAFT,
ACTIVE,
INACTIVE
action
enum<string>

Filter by action (ALLOW, DENY, REVIEW).

Available options:
ALLOW,
DENY,
REVIEW
account_id
string<uuid>

Filter by account ID (UUID).

segment_id
string<uuid>

Filter by segment ID (UUID).

portfolio_id
string<uuid>

Filter by portfolio ID (UUID).

merchant_id
string<uuid>

Filter by merchant ID (UUID).

transaction_type
enum<string>

Filter by transaction type.

Available options:
CARD,
WIRE,
Pix,
CRYPTO
sub_type
string

Filter by transaction subtype (e.g., debit, credit, prepaid).

Maximum string length: 50
sort_by
enum<string>
default:created_at

The field used to sort the results.

Available options:
created_at,
updated_at,
name,
status
sort_order
enum<string>
default:DESC

The order used to sort the results.

Available options:
ASC,
DESC

Response

Indicates that the request was successful and the response contains the expected data.

Paginated list of rules.

rules
object[]

List of rule records.

hasMore
boolean

Whether there are more results available.

nextCursor
string | null

Cursor for fetching the next page. Null if no more results.