Update a rule
curl --request PATCH \
--url https://app.equated.co/api/automations/rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"priority": 123,
"stopProcessing": true,
"effects": [
{
"kind": "SET_CURRENCY",
"currency": "<string>",
"sortOrder": 1
}
]
}
'import requests
url = "https://app.equated.co/api/automations/rules/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"priority": 123,
"stopProcessing": True,
"effects": [
{
"kind": "SET_CURRENCY",
"currency": "<string>",
"sortOrder": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
priority: 123,
stopProcessing: true,
effects: [{kind: 'SET_CURRENCY', currency: '<string>', sortOrder: 1}]
})
};
fetch('https://app.equated.co/api/automations/rules/{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_URL => "https://app.equated.co/api/automations/rules/{id}",
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([
'name' => '<string>',
'description' => '<string>',
'priority' => 123,
'stopProcessing' => true,
'effects' => [
[
'kind' => 'SET_CURRENCY',
'currency' => '<string>',
'sortOrder' => 1
]
]
]),
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://app.equated.co/api/automations/rules/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123,\n \"stopProcessing\": true,\n \"effects\": [\n {\n \"kind\": \"SET_CURRENCY\",\n \"currency\": \"<string>\",\n \"sortOrder\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://app.equated.co/api/automations/rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123,\n \"stopProcessing\": true,\n \"effects\": [\n {\n \"kind\": \"SET_CURRENCY\",\n \"currency\": \"<string>\",\n \"sortOrder\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.equated.co/api/automations/rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123,\n \"stopProcessing\": true,\n \"effects\": [\n {\n \"kind\": \"SET_CURRENCY\",\n \"currency\": \"<string>\",\n \"sortOrder\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"rule": null
}{
"error": "<string>"
}Automations
Update a rule
PATCH
/
api
/
automations
/
rules
/
{id}
Update a rule
curl --request PATCH \
--url https://app.equated.co/api/automations/rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"priority": 123,
"stopProcessing": true,
"effects": [
{
"kind": "SET_CURRENCY",
"currency": "<string>",
"sortOrder": 1
}
]
}
'import requests
url = "https://app.equated.co/api/automations/rules/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"priority": 123,
"stopProcessing": True,
"effects": [
{
"kind": "SET_CURRENCY",
"currency": "<string>",
"sortOrder": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
priority: 123,
stopProcessing: true,
effects: [{kind: 'SET_CURRENCY', currency: '<string>', sortOrder: 1}]
})
};
fetch('https://app.equated.co/api/automations/rules/{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_URL => "https://app.equated.co/api/automations/rules/{id}",
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([
'name' => '<string>',
'description' => '<string>',
'priority' => 123,
'stopProcessing' => true,
'effects' => [
[
'kind' => 'SET_CURRENCY',
'currency' => '<string>',
'sortOrder' => 1
]
]
]),
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://app.equated.co/api/automations/rules/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123,\n \"stopProcessing\": true,\n \"effects\": [\n {\n \"kind\": \"SET_CURRENCY\",\n \"currency\": \"<string>\",\n \"sortOrder\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://app.equated.co/api/automations/rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123,\n \"stopProcessing\": true,\n \"effects\": [\n {\n \"kind\": \"SET_CURRENCY\",\n \"currency\": \"<string>\",\n \"sortOrder\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.equated.co/api/automations/rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": 123,\n \"stopProcessing\": true,\n \"effects\": [\n {\n \"kind\": \"SET_CURRENCY\",\n \"currency\": \"<string>\",\n \"sortOrder\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"rule": null
}{
"error": "<string>"
}Authorizations
API token issued from the Equated app under Settings → API Tokens.
Path Parameters
Required range:
x > 0Body
application/json
Required string length:
1 - 255Maximum string length:
500Available options:
RECEIPT, TRANSACTION Available options:
RECEIPT_PARSED, TRANSACTION_INGESTED, TRANSACTION_UPDATED, MANUAL_PREVIEW, MANUAL_APPLY Show child attributes
Show child attributes
Minimum array length:
1- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Response
Updated