curl --request PUT \
--url https://api.ugps.io/api/maintenance/schedules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conditions": {},
"recipients": {
"userIds": [
"507f1f77bcf86cd799439011"
],
"emails": [
"taller@empresa.cl"
]
}
}
'import requests
url = "https://api.ugps.io/api/maintenance/schedules/{id}"
payload = {
"conditions": {},
"recipients": {
"userIds": ["507f1f77bcf86cd799439011"],
"emails": ["taller@empresa.cl"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conditions: {},
recipients: {userIds: ['507f1f77bcf86cd799439011'], emails: ['taller@empresa.cl']}
})
};
fetch('https://api.ugps.io/api/maintenance/schedules/{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.ugps.io/api/maintenance/schedules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'conditions' => [
],
'recipients' => [
'userIds' => [
'507f1f77bcf86cd799439011'
],
'emails' => [
'taller@empresa.cl'
]
]
]),
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.ugps.io/api/maintenance/schedules/{id}"
payload := strings.NewReader("{\n \"conditions\": {},\n \"recipients\": {\n \"userIds\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"emails\": [\n \"taller@empresa.cl\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.ugps.io/api/maintenance/schedules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conditions\": {},\n \"recipients\": {\n \"userIds\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"emails\": [\n \"taller@empresa.cl\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ugps.io/api/maintenance/schedules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"conditions\": {},\n \"recipients\": {\n \"userIds\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"emails\": [\n \"taller@empresa.cl\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {}
}{
"error": "El email es requerido"
}{
"error": "Token inválido o expirado"
}{
"error": "No tiene permisos para realizar esta acción"
}{
"error": "Recurso no encontrado"
}{
"status": "failed",
"code": "TRACKER_SENSOR_DIN_CONFLICT",
"message": "Esa entrada digital ya está asignada a otro sensor del dispositivo"
}{
"message": "Error interno del servidor"
}Actualizar programación
recurrence no cambia: se acepta el mismo valor y otro responde 409 MAINTENANCE_SCHEDULE_RECURRENCE_IMMUTABLE. Las conditions se leen con el tipo guardado; si no son las de ese tipo responde 400 MAINTENANCE_SCHEDULE_CONDITIONS_INVALID. Pausar (isActive: false) cierra las mantenciones abiertas con status: unassigned; si una está en una orden de trabajo abierta responde 409 MAINTENANCE_SCHEDULE_CHANGE_IN_OPEN_WORK_ORDER con la mantención y la orden en el mensaje. Al reactivar, la evaluación las abre de nuevo.
curl --request PUT \
--url https://api.ugps.io/api/maintenance/schedules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conditions": {},
"recipients": {
"userIds": [
"507f1f77bcf86cd799439011"
],
"emails": [
"taller@empresa.cl"
]
}
}
'import requests
url = "https://api.ugps.io/api/maintenance/schedules/{id}"
payload = {
"conditions": {},
"recipients": {
"userIds": ["507f1f77bcf86cd799439011"],
"emails": ["taller@empresa.cl"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conditions: {},
recipients: {userIds: ['507f1f77bcf86cd799439011'], emails: ['taller@empresa.cl']}
})
};
fetch('https://api.ugps.io/api/maintenance/schedules/{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.ugps.io/api/maintenance/schedules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'conditions' => [
],
'recipients' => [
'userIds' => [
'507f1f77bcf86cd799439011'
],
'emails' => [
'taller@empresa.cl'
]
]
]),
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.ugps.io/api/maintenance/schedules/{id}"
payload := strings.NewReader("{\n \"conditions\": {},\n \"recipients\": {\n \"userIds\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"emails\": [\n \"taller@empresa.cl\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.ugps.io/api/maintenance/schedules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conditions\": {},\n \"recipients\": {\n \"userIds\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"emails\": [\n \"taller@empresa.cl\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ugps.io/api/maintenance/schedules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"conditions\": {},\n \"recipients\": {\n \"userIds\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"emails\": [\n \"taller@empresa.cl\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {}
}{
"error": "El email es requerido"
}{
"error": "Token inválido o expirado"
}{
"error": "No tiene permisos para realizar esta acción"
}{
"error": "Recurso no encontrado"
}{
"status": "failed",
"code": "TRACKER_SENSOR_DIN_CONFLICT",
"message": "Esa entrada digital ya está asignada a otro sensor del dispositivo"
}{
"message": "Error interno del servidor"
}Authorizations
Token de sesión Better Auth o API token (atk_...) en el header Authorization: Bearer <token>. Los JWT legacy ya no son válidos.
Path Parameters
ID del recurso
Body
Con conditions, el backend calcula triggerType y los campos viejos de la regla (intervalValue, intervalUnit, anticipationValue, anticipationUnit) desde la condición principal. Sin conditions se aceptan los campos viejos. Con recurrence: once, conditions lleva valores absolutos y es obligatorio.
«Una vez» (once) o «Se repite» (repeat). Sin el campo, la programación se repite (las anteriores a #3663 y el MCP). Se elige al crear y no cambia: la edición acepta el mismo valor y responde 409 MAINTENANCE_SCHEDULE_RECURRENCE_IMMUTABLE si cambia.
once, repeat Regla como condiciones, cada una con su propio valor; vence con la primera que se cumpla. Exige al menos una. Las lecturas la devuelven siempre, resuelta desde los campos viejos si la programación no la tiene.
- Option 1
- Option 2
Show child attributes
Show child attributes
Destinatarios del aviso por correo cuando un activo pasa a próxima a vencer o vence. Al enviarlo se reemplazan las dos listas. Hasta 50 usuarios y 20 correos.
Show child attributes
Show child attributes

