curl --request PATCH \
--url https://api.raul.ugps.io/api/v1/recurring/rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_active": true,
"supplier_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"category_id": "b2c3d4e5-f678-90ab-cdef-123456789012",
"client_id": "b2c3d4e5-f678-90ab-cdef-123456789012",
"description": "Monthly rent",
"type": "expense",
"source": "manual_user",
"projection_group": "rrhh",
"expected_amount": 500000,
"expected_day": 5,
"end_date": "2026-12-31T00:00:00.000Z",
"amount_schedule": [
{
"effective_month": "2026-05",
"amount": 2500000
}
],
"projection_months": [
{
"month": "2026-04",
"amount": 2500000,
"is_active": true
}
]
}
'import requests
url = "https://api.raul.ugps.io/api/v1/recurring/rules/{id}"
payload = {
"is_active": True,
"supplier_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"category_id": "b2c3d4e5-f678-90ab-cdef-123456789012",
"client_id": "b2c3d4e5-f678-90ab-cdef-123456789012",
"description": "Monthly rent",
"type": "expense",
"source": "manual_user",
"projection_group": "rrhh",
"expected_amount": 500000,
"expected_day": 5,
"end_date": "2026-12-31T00:00:00.000Z",
"amount_schedule": [
{
"effective_month": "2026-05",
"amount": 2500000
}
],
"projection_months": [
{
"month": "2026-04",
"amount": 2500000,
"is_active": True
}
]
}
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({
is_active: true,
supplier_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
category_id: 'b2c3d4e5-f678-90ab-cdef-123456789012',
client_id: 'b2c3d4e5-f678-90ab-cdef-123456789012',
description: 'Monthly rent',
type: 'expense',
source: 'manual_user',
projection_group: 'rrhh',
expected_amount: 500000,
expected_day: 5,
end_date: '2026-12-31T00:00:00.000Z',
amount_schedule: [{effective_month: '2026-05', amount: 2500000}],
projection_months: [{month: '2026-04', amount: 2500000, is_active: true}]
})
};
fetch('https://api.raul.ugps.io/api/v1/recurring/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://api.raul.ugps.io/api/v1/recurring/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([
'is_active' => true,
'supplier_id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'category_id' => 'b2c3d4e5-f678-90ab-cdef-123456789012',
'client_id' => 'b2c3d4e5-f678-90ab-cdef-123456789012',
'description' => 'Monthly rent',
'type' => 'expense',
'source' => 'manual_user',
'projection_group' => 'rrhh',
'expected_amount' => 500000,
'expected_day' => 5,
'end_date' => '2026-12-31T00:00:00.000Z',
'amount_schedule' => [
[
'effective_month' => '2026-05',
'amount' => 2500000
]
],
'projection_months' => [
[
'month' => '2026-04',
'amount' => 2500000,
'is_active' => true
]
]
]),
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.raul.ugps.io/api/v1/recurring/rules/{id}"
payload := strings.NewReader("{\n \"is_active\": true,\n \"supplier_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"category_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"client_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"description\": \"Monthly rent\",\n \"type\": \"expense\",\n \"source\": \"manual_user\",\n \"projection_group\": \"rrhh\",\n \"expected_amount\": 500000,\n \"expected_day\": 5,\n \"end_date\": \"2026-12-31T00:00:00.000Z\",\n \"amount_schedule\": [\n {\n \"effective_month\": \"2026-05\",\n \"amount\": 2500000\n }\n ],\n \"projection_months\": [\n {\n \"month\": \"2026-04\",\n \"amount\": 2500000,\n \"is_active\": true\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://api.raul.ugps.io/api/v1/recurring/rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_active\": true,\n \"supplier_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"category_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"client_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"description\": \"Monthly rent\",\n \"type\": \"expense\",\n \"source\": \"manual_user\",\n \"projection_group\": \"rrhh\",\n \"expected_amount\": 500000,\n \"expected_day\": 5,\n \"end_date\": \"2026-12-31T00:00:00.000Z\",\n \"amount_schedule\": [\n {\n \"effective_month\": \"2026-05\",\n \"amount\": 2500000\n }\n ],\n \"projection_months\": [\n {\n \"month\": \"2026-04\",\n \"amount\": 2500000,\n \"is_active\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/recurring/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 \"is_active\": true,\n \"supplier_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"category_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"client_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"description\": \"Monthly rent\",\n \"type\": \"expense\",\n \"source\": \"manual_user\",\n \"projection_group\": \"rrhh\",\n \"expected_amount\": 500000,\n \"expected_day\": 5,\n \"end_date\": \"2026-12-31T00:00:00.000Z\",\n \"amount_schedule\": [\n {\n \"effective_month\": \"2026-05\",\n \"amount\": 2500000\n }\n ],\n \"projection_months\": [\n {\n \"month\": \"2026-04\",\n \"amount\": 2500000,\n \"is_active\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"rule_id": "<string>",
"supplier_id": {},
"description": "<string>",
"type": "expense",
"expected_amount": 123,
"expected_day": 123,
"end_date": {},
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"category_id": {},
"client_id": {},
"source": {},
"projection_group": {},
"amount_schedule": [
{
"effective_month": "2026-05",
"amount": 2500000
}
],
"projection_months": [
{
"month": "2026-04",
"amount": 2500000,
"is_active": true
}
]
}Update recurring rule
Operacion: Update recurring rule.
curl --request PATCH \
--url https://api.raul.ugps.io/api/v1/recurring/rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_active": true,
"supplier_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"category_id": "b2c3d4e5-f678-90ab-cdef-123456789012",
"client_id": "b2c3d4e5-f678-90ab-cdef-123456789012",
"description": "Monthly rent",
"type": "expense",
"source": "manual_user",
"projection_group": "rrhh",
"expected_amount": 500000,
"expected_day": 5,
"end_date": "2026-12-31T00:00:00.000Z",
"amount_schedule": [
{
"effective_month": "2026-05",
"amount": 2500000
}
],
"projection_months": [
{
"month": "2026-04",
"amount": 2500000,
"is_active": true
}
]
}
'import requests
url = "https://api.raul.ugps.io/api/v1/recurring/rules/{id}"
payload = {
"is_active": True,
"supplier_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"category_id": "b2c3d4e5-f678-90ab-cdef-123456789012",
"client_id": "b2c3d4e5-f678-90ab-cdef-123456789012",
"description": "Monthly rent",
"type": "expense",
"source": "manual_user",
"projection_group": "rrhh",
"expected_amount": 500000,
"expected_day": 5,
"end_date": "2026-12-31T00:00:00.000Z",
"amount_schedule": [
{
"effective_month": "2026-05",
"amount": 2500000
}
],
"projection_months": [
{
"month": "2026-04",
"amount": 2500000,
"is_active": True
}
]
}
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({
is_active: true,
supplier_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
category_id: 'b2c3d4e5-f678-90ab-cdef-123456789012',
client_id: 'b2c3d4e5-f678-90ab-cdef-123456789012',
description: 'Monthly rent',
type: 'expense',
source: 'manual_user',
projection_group: 'rrhh',
expected_amount: 500000,
expected_day: 5,
end_date: '2026-12-31T00:00:00.000Z',
amount_schedule: [{effective_month: '2026-05', amount: 2500000}],
projection_months: [{month: '2026-04', amount: 2500000, is_active: true}]
})
};
fetch('https://api.raul.ugps.io/api/v1/recurring/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://api.raul.ugps.io/api/v1/recurring/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([
'is_active' => true,
'supplier_id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'category_id' => 'b2c3d4e5-f678-90ab-cdef-123456789012',
'client_id' => 'b2c3d4e5-f678-90ab-cdef-123456789012',
'description' => 'Monthly rent',
'type' => 'expense',
'source' => 'manual_user',
'projection_group' => 'rrhh',
'expected_amount' => 500000,
'expected_day' => 5,
'end_date' => '2026-12-31T00:00:00.000Z',
'amount_schedule' => [
[
'effective_month' => '2026-05',
'amount' => 2500000
]
],
'projection_months' => [
[
'month' => '2026-04',
'amount' => 2500000,
'is_active' => true
]
]
]),
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.raul.ugps.io/api/v1/recurring/rules/{id}"
payload := strings.NewReader("{\n \"is_active\": true,\n \"supplier_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"category_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"client_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"description\": \"Monthly rent\",\n \"type\": \"expense\",\n \"source\": \"manual_user\",\n \"projection_group\": \"rrhh\",\n \"expected_amount\": 500000,\n \"expected_day\": 5,\n \"end_date\": \"2026-12-31T00:00:00.000Z\",\n \"amount_schedule\": [\n {\n \"effective_month\": \"2026-05\",\n \"amount\": 2500000\n }\n ],\n \"projection_months\": [\n {\n \"month\": \"2026-04\",\n \"amount\": 2500000,\n \"is_active\": true\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://api.raul.ugps.io/api/v1/recurring/rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_active\": true,\n \"supplier_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"category_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"client_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"description\": \"Monthly rent\",\n \"type\": \"expense\",\n \"source\": \"manual_user\",\n \"projection_group\": \"rrhh\",\n \"expected_amount\": 500000,\n \"expected_day\": 5,\n \"end_date\": \"2026-12-31T00:00:00.000Z\",\n \"amount_schedule\": [\n {\n \"effective_month\": \"2026-05\",\n \"amount\": 2500000\n }\n ],\n \"projection_months\": [\n {\n \"month\": \"2026-04\",\n \"amount\": 2500000,\n \"is_active\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/recurring/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 \"is_active\": true,\n \"supplier_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"category_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"client_id\": \"b2c3d4e5-f678-90ab-cdef-123456789012\",\n \"description\": \"Monthly rent\",\n \"type\": \"expense\",\n \"source\": \"manual_user\",\n \"projection_group\": \"rrhh\",\n \"expected_amount\": 500000,\n \"expected_day\": 5,\n \"end_date\": \"2026-12-31T00:00:00.000Z\",\n \"amount_schedule\": [\n {\n \"effective_month\": \"2026-05\",\n \"amount\": 2500000\n }\n ],\n \"projection_months\": [\n {\n \"month\": \"2026-04\",\n \"amount\": 2500000,\n \"is_active\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"rule_id": "<string>",
"supplier_id": {},
"description": "<string>",
"type": "expense",
"expected_amount": 123,
"expected_day": 123,
"end_date": {},
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"category_id": {},
"client_id": {},
"source": {},
"projection_group": {},
"amount_schedule": [
{
"effective_month": "2026-05",
"amount": 2500000
}
],
"projection_months": [
{
"month": "2026-04",
"amount": 2500000,
"is_active": true
}
]
}Authorizations
Token de sesión Better Auth para rutas de backoffice; las rutas de portal usan su token propio.
Path Parameters
Body
Whether the rule is active
Supplier ID (optional)
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Category ID (optional for income rules)
"b2c3d4e5-f678-90ab-cdef-123456789012"
Client ID (optional, mainly used by manual income rules)
"b2c3d4e5-f678-90ab-cdef-123456789012"
Rule description
255"Monthly rent"
Rule type
expense, income "expense"
Rule source metadata
"manual_user"
Optional grouping hint for projections
"rrhh"
Expected amount (legacy format, optional when projection_months is sent)
x >= 0500000
Expected day of the month
1 <= x <= 315
End date for the recurring rule (optional)
"2026-12-31T00:00:00.000Z"
Optional scheduled amount changes by month
Show child attributes
Show child attributes
Dense projection matrix used by the UI to edit projected month amounts directly
Show child attributes
Show child attributes
Response
Rule updated successfully
expense, income Show child attributes
Show child attributes
Show child attributes
Show child attributes