Preview a rule against transactions (dry-run)
curl --request POST \
--url https://api.synci.io/api/v1/rules/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rule": {
"trigger_on_any_condition": true,
"conditions": [
{
"field_name": "<string>",
"value": "<string>"
}
],
"actions": [
{
"field_name": "<string>",
"value": "<string>",
"order": 123
}
]
},
"transaction_ids": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rule: {
trigger_on_any_condition: true,
conditions: [{field_name: '<string>', value: '<string>'}],
actions: [{field_name: '<string>', value: '<string>', order: 123}]
},
transaction_ids: ['<string>']
})
};
fetch('https://api.synci.io/api/v1/rules/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.synci.io/api/v1/rules/preview"
payload = {
"rule": {
"trigger_on_any_condition": True,
"conditions": [
{
"field_name": "<string>",
"value": "<string>"
}
],
"actions": [
{
"field_name": "<string>",
"value": "<string>",
"order": 123
}
]
},
"transaction_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.synci.io/api/v1/rules/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rule' => [
'trigger_on_any_condition' => true,
'conditions' => [
[
'field_name' => '<string>',
'value' => '<string>'
]
],
'actions' => [
[
'field_name' => '<string>',
'value' => '<string>',
'order' => 123
]
]
],
'transaction_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.synci.io/api/v1/rules/preview"
payload := strings.NewReader("{\n \"rule\": {\n \"trigger_on_any_condition\": true,\n \"conditions\": [\n {\n \"field_name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"actions\": [\n {\n \"field_name\": \"<string>\",\n \"value\": \"<string>\",\n \"order\": 123\n }\n ]\n },\n \"transaction_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"results": [
{
"transaction_id": "<string>",
"conditions_matched": true,
"transaction_summary": {
"payee": "<unknown>",
"payee_logo": "<string>",
"amount": "<string>",
"currency": "<string>",
"date": "<unknown>",
"description": "<string>"
},
"changes": [
{
"field": "<string>",
"before": "<string>",
"after": "<string>"
}
],
"error": "<string>"
}
],
"missing_transaction_ids": [
"<unknown>"
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Preview a rule against transactions (dry-run)
Accepts either a rule_id to load an existing rule, or an inline rule
definition (conditions + actions). Provide an array of transaction_ids
to test against — each transaction must belong to the authenticated user.
No data is persisted.
Action values support Liquid templates for dynamic expressions.
Use {{ transaction.field_name }} to reference fields and Liquid filters
(remove, regex_capture, date_add, remove_at, keep_at, etc.)
to transform values. Plain strings are treated as literal values.
POST
/
rules
/
preview
Preview a rule against transactions (dry-run)
curl --request POST \
--url https://api.synci.io/api/v1/rules/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rule": {
"trigger_on_any_condition": true,
"conditions": [
{
"field_name": "<string>",
"value": "<string>"
}
],
"actions": [
{
"field_name": "<string>",
"value": "<string>",
"order": 123
}
]
},
"transaction_ids": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rule: {
trigger_on_any_condition: true,
conditions: [{field_name: '<string>', value: '<string>'}],
actions: [{field_name: '<string>', value: '<string>', order: 123}]
},
transaction_ids: ['<string>']
})
};
fetch('https://api.synci.io/api/v1/rules/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.synci.io/api/v1/rules/preview"
payload = {
"rule": {
"trigger_on_any_condition": True,
"conditions": [
{
"field_name": "<string>",
"value": "<string>"
}
],
"actions": [
{
"field_name": "<string>",
"value": "<string>",
"order": 123
}
]
},
"transaction_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.synci.io/api/v1/rules/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rule' => [
'trigger_on_any_condition' => true,
'conditions' => [
[
'field_name' => '<string>',
'value' => '<string>'
]
],
'actions' => [
[
'field_name' => '<string>',
'value' => '<string>',
'order' => 123
]
]
],
'transaction_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.synci.io/api/v1/rules/preview"
payload := strings.NewReader("{\n \"rule\": {\n \"trigger_on_any_condition\": true,\n \"conditions\": [\n {\n \"field_name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"actions\": [\n {\n \"field_name\": \"<string>\",\n \"value\": \"<string>\",\n \"order\": 123\n }\n ]\n },\n \"transaction_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"results": [
{
"transaction_id": "<string>",
"conditions_matched": true,
"transaction_summary": {
"payee": "<unknown>",
"payee_logo": "<string>",
"amount": "<string>",
"currency": "<string>",
"date": "<unknown>",
"description": "<string>"
},
"changes": [
{
"field": "<string>",
"before": "<string>",
"after": "<string>"
}
],
"error": "<string>"
}
],
"missing_transaction_ids": [
"<unknown>"
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
oauth2http
Body
application/json