Upsert a dashboard subscription goal slot (admin only)
curl --request PATCH \
--url https://api.raul.ugps.io/api/v1/analytics/subscription-growth/goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"year": 2026,
"periodIndex": 3,
"netSubsGoal": 123,
"mrrGoal": 123
}
'import requests
url = "https://api.raul.ugps.io/api/v1/analytics/subscription-growth/goals"
payload = {
"year": 2026,
"periodIndex": 3,
"netSubsGoal": 123,
"mrrGoal": 123
}
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({year: 2026, periodIndex: 3, netSubsGoal: 123, mrrGoal: 123})
};
fetch('https://api.raul.ugps.io/api/v1/analytics/subscription-growth/goals', 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/analytics/subscription-growth/goals",
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([
'year' => 2026,
'periodIndex' => 3,
'netSubsGoal' => 123,
'mrrGoal' => 123
]),
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/analytics/subscription-growth/goals"
payload := strings.NewReader("{\n \"year\": 2026,\n \"periodIndex\": 3,\n \"netSubsGoal\": 123,\n \"mrrGoal\": 123\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/analytics/subscription-growth/goals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"year\": 2026,\n \"periodIndex\": 3,\n \"netSubsGoal\": 123,\n \"mrrGoal\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/analytics/subscription-growth/goals")
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 \"year\": 2026,\n \"periodIndex\": 3,\n \"netSubsGoal\": 123,\n \"mrrGoal\": 123\n}"
response = http.request(request)
puts response.read_body{
"year": 123,
"periodType": "month",
"periodIndex": 123,
"netSubsGoal": 123,
"mrrGoal": 123
}Analytics - Dashboard
Upsert a dashboard subscription goal slot (admin only)
Writes a goal for the (tenant, year, periodType, periodIndex) tuple. Pass null on netSubsGoal or mrrGoal to clear that field.
PATCH
/
api
/
v1
/
analytics
/
subscription-growth
/
goals
Upsert a dashboard subscription goal slot (admin only)
curl --request PATCH \
--url https://api.raul.ugps.io/api/v1/analytics/subscription-growth/goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"year": 2026,
"periodIndex": 3,
"netSubsGoal": 123,
"mrrGoal": 123
}
'import requests
url = "https://api.raul.ugps.io/api/v1/analytics/subscription-growth/goals"
payload = {
"year": 2026,
"periodIndex": 3,
"netSubsGoal": 123,
"mrrGoal": 123
}
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({year: 2026, periodIndex: 3, netSubsGoal: 123, mrrGoal: 123})
};
fetch('https://api.raul.ugps.io/api/v1/analytics/subscription-growth/goals', 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/analytics/subscription-growth/goals",
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([
'year' => 2026,
'periodIndex' => 3,
'netSubsGoal' => 123,
'mrrGoal' => 123
]),
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/analytics/subscription-growth/goals"
payload := strings.NewReader("{\n \"year\": 2026,\n \"periodIndex\": 3,\n \"netSubsGoal\": 123,\n \"mrrGoal\": 123\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/analytics/subscription-growth/goals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"year\": 2026,\n \"periodIndex\": 3,\n \"netSubsGoal\": 123,\n \"mrrGoal\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/analytics/subscription-growth/goals")
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 \"year\": 2026,\n \"periodIndex\": 3,\n \"netSubsGoal\": 123,\n \"mrrGoal\": 123\n}"
response = http.request(request)
puts response.read_body{
"year": 123,
"periodType": "month",
"periodIndex": 123,
"netSubsGoal": 123,
"mrrGoal": 123
}Authorizations
Token de sesión Better Auth para rutas de backoffice; las rutas de portal usan su token propio.
Headers
UUID v4 estable por intento lógico. Durante el rollout compatible el header es opcional.
Pattern:
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$Body
application/json
Año del slot
Example:
2026
Tipo de período
Available options:
month, quarter, year Índice de período (1..12 month, 1..4 quarter, 1 year)
Example:
3
Objetivo neto de suscripciones (entero 0..2_147_483_647). null = limpiar, omitido = no toca.
Objetivo de MRR (Decimal(18,2) — 0 ≤ value ≤ 90_071_992_547_409.91, ≤ 2 decimales). admin only. null = limpiar, omitido = no toca.