curl --request GET \
--url https://api.paygentic.io/v0/sourceRules/{ruleId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/sourceRules/{ruleId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/sourceRules/{ruleId}', 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.paygentic.io/v0/sourceRules/{ruleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.paygentic.io/v0/sourceRules/{ruleId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.paygentic.io/v0/sourceRules/{ruleId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/sourceRules/{ruleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "rule_345678",
"conditions": [
{
"operator": "domain",
"type": "customerEmail",
"value": "@trusted.com"
}
],
"createdAt": "2024-03-01T10:00:00Z",
"createdBy": "usr_platform",
"description": "Automatically approve events from customers with @trusted.com email domain",
"enabled": true,
"evaluationCount": 200,
"lastEvaluatedAt": "2024-03-10T14:30:00Z",
"matchCount": 60,
"name": "Auto-approve trusted customers",
"order": 0,
"sourceId": "src_x3y4z5a6b7c8d9e0",
"updatedAt": "2024-03-10T14:00:00Z"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Get Rule
curl --request GET \
--url https://api.paygentic.io/v0/sourceRules/{ruleId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/sourceRules/{ruleId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/sourceRules/{ruleId}', 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.paygentic.io/v0/sourceRules/{ruleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.paygentic.io/v0/sourceRules/{ruleId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.paygentic.io/v0/sourceRules/{ruleId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/sourceRules/{ruleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "rule_345678",
"conditions": [
{
"operator": "domain",
"type": "customerEmail",
"value": "@trusted.com"
}
],
"createdAt": "2024-03-01T10:00:00Z",
"createdBy": "usr_platform",
"description": "Automatically approve events from customers with @trusted.com email domain",
"enabled": true,
"evaluationCount": 200,
"lastEvaluatedAt": "2024-03-10T14:30:00Z",
"matchCount": 60,
"name": "Auto-approve trusted customers",
"order": 0,
"sourceId": "src_x3y4z5a6b7c8d9e0",
"updatedAt": "2024-03-10T14:00:00Z"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Authorizations
API key authentication
Path Parameters
Response
Rule details
An auto-acceptance rule that automatically approves source events matching specified conditions. Rules help automate the approval process for trusted customers or specific transaction patterns.
Unique identifier for the rule
List of conditions that must ALL be met (AND logic)
Show child attributes
Show child attributes
When the rule was created
Detailed description of what this source rule does
Whether this rule is currently active
Total number of times this rule has been evaluated
Number of times this rule has matched and auto-accepted an invoice
Human-readable name for the source rule
Priority order for rule evaluation (lower numbers are evaluated first)
ID of the source this rule belongs to
When the rule was last updated
User ID who created the rule
Last time this rule was evaluated against an invoice
Was this page helpful?