curl --request PUT \
--url https://api.raul.ugps.io/api/v1/cases/config \
--header 'Content-Type: application/json' \
--data '
{
"version": 1,
"columns": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"order": 50,
"isFinal": true
}
],
"stageMap": {},
"entryRules": {},
"dueAlerts": {
"blinkSeconds": 8,
"default": {
"warnHours": 2,
"criticalHours": 0
},
"byType": {}
},
"replyAlert": {
"warnHours": 2,
"criticalHours": 9,
"windowDays": null
},
"waitingStages": {
"stageKeys": [],
"warnHours": 9,
"criticalHours": 18
},
"mentionAlert": {
"warnHours": 4,
"criticalHours": 9
},
"updatedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.raul.ugps.io/api/v1/cases/config"
payload = {
"version": 1,
"columns": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"order": 50,
"isFinal": True
}
],
"stageMap": {},
"entryRules": {},
"dueAlerts": {
"blinkSeconds": 8,
"default": {
"warnHours": 2,
"criticalHours": 0
},
"byType": {}
},
"replyAlert": {
"warnHours": 2,
"criticalHours": 9,
"windowDays": None
},
"waitingStages": {
"stageKeys": [],
"warnHours": 9,
"criticalHours": 18
},
"mentionAlert": {
"warnHours": 4,
"criticalHours": 9
},
"updatedAt": "2023-11-07T05:31:56Z"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
version: 1,
columns: [
{id: '<string>', name: '<string>', color: '<string>', order: 50, isFinal: true}
],
stageMap: {},
entryRules: {},
dueAlerts: {blinkSeconds: 8, default: {warnHours: 2, criticalHours: 0}, byType: {}},
replyAlert: {warnHours: 2, criticalHours: 9, windowDays: null},
waitingStages: {stageKeys: [], warnHours: 9, criticalHours: 18},
mentionAlert: {warnHours: 4, criticalHours: 9},
updatedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.raul.ugps.io/api/v1/cases/config', 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/cases/config",
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([
'version' => 1,
'columns' => [
[
'id' => '<string>',
'name' => '<string>',
'color' => '<string>',
'order' => 50,
'isFinal' => true
]
],
'stageMap' => [
],
'entryRules' => [
],
'dueAlerts' => [
'blinkSeconds' => 8,
'default' => [
'warnHours' => 2,
'criticalHours' => 0
],
'byType' => [
]
],
'replyAlert' => [
'warnHours' => 2,
'criticalHours' => 9,
'windowDays' => null
],
'waitingStages' => [
'stageKeys' => [
],
'warnHours' => 9,
'criticalHours' => 18
],
'mentionAlert' => [
'warnHours' => 4,
'criticalHours' => 9
],
'updatedAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"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/cases/config"
payload := strings.NewReader("{\n \"version\": 1,\n \"columns\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"order\": 50,\n \"isFinal\": true\n }\n ],\n \"stageMap\": {},\n \"entryRules\": {},\n \"dueAlerts\": {\n \"blinkSeconds\": 8,\n \"default\": {\n \"warnHours\": 2,\n \"criticalHours\": 0\n },\n \"byType\": {}\n },\n \"replyAlert\": {\n \"warnHours\": 2,\n \"criticalHours\": 9,\n \"windowDays\": null\n },\n \"waitingStages\": {\n \"stageKeys\": [],\n \"warnHours\": 9,\n \"criticalHours\": 18\n },\n \"mentionAlert\": {\n \"warnHours\": 4,\n \"criticalHours\": 9\n },\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.raul.ugps.io/api/v1/cases/config")
.header("Content-Type", "application/json")
.body("{\n \"version\": 1,\n \"columns\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"order\": 50,\n \"isFinal\": true\n }\n ],\n \"stageMap\": {},\n \"entryRules\": {},\n \"dueAlerts\": {\n \"blinkSeconds\": 8,\n \"default\": {\n \"warnHours\": 2,\n \"criticalHours\": 0\n },\n \"byType\": {}\n },\n \"replyAlert\": {\n \"warnHours\": 2,\n \"criticalHours\": 9,\n \"windowDays\": null\n },\n \"waitingStages\": {\n \"stageKeys\": [],\n \"warnHours\": 9,\n \"criticalHours\": 18\n },\n \"mentionAlert\": {\n \"warnHours\": 4,\n \"criticalHours\": 9\n },\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/cases/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 1,\n \"columns\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"order\": 50,\n \"isFinal\": true\n }\n ],\n \"stageMap\": {},\n \"entryRules\": {},\n \"dueAlerts\": {\n \"blinkSeconds\": 8,\n \"default\": {\n \"warnHours\": 2,\n \"criticalHours\": 0\n },\n \"byType\": {}\n },\n \"replyAlert\": {\n \"warnHours\": 2,\n \"criticalHours\": 9,\n \"windowDays\": null\n },\n \"waitingStages\": {\n \"stageKeys\": [],\n \"warnHours\": 9,\n \"criticalHours\": 18\n },\n \"mentionAlert\": {\n \"warnHours\": 4,\n \"criticalHours\": 9\n },\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"config": {
"version": 1,
"columns": [
{
"id": "pending",
"name": "Pendiente",
"color": "#F59E0B",
"order": 123,
"isFinal": true
}
],
"stageMap": {},
"entryRules": {},
"dueAlerts": {
"blinkSeconds": 123,
"default": {
"warnHours": 123,
"criticalHours": 123
},
"byType": {}
},
"replyAlert": {
"warnHours": 123,
"criticalHours": 123,
"windowDays": 123
},
"waitingStages": {
"stageKeys": [
"<string>"
],
"warnHours": 123,
"criticalHours": 123
},
"mentionAlert": {
"warnHours": 123,
"criticalHours": 123
}
},
"isDefault": true,
"updatedAt": "2023-11-07T05:31:56Z",
"pipelines": [
{
"kind": "opportunity",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"isDefault": true,
"stages": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"order": 123,
"isFinal": true,
"isWon": true,
"isLost": true,
"probability": 123
}
],
"columnByStage": {},
"entryRule": {
"type": "minStageOrder",
"minStageOrder": 123
}
}
],
"dueAlerts": {
"blinkSeconds": 123,
"default": {
"warnHours": 123,
"criticalHours": 123
},
"byType": {}
},
"replyAlert": {
"warnHours": 123,
"criticalHours": 123,
"windowDays": 123
},
"waitingStages": {
"stageKeys": [
"<string>"
],
"warnHours": 123,
"criticalHours": 123
},
"mentionAlert": {
"warnHours": 123,
"criticalHours": 123
},
"activityTypes": [
{
"id": 123,
"name": "<string>"
}
],
"warnings": [
{
"key": "<string>",
"pipelineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stageId": "<string>",
"stageName": "<string>"
}
],
"defaults": {
"dueAlerts": {
"blinkSeconds": 123,
"default": {
"warnHours": 123,
"criticalHours": 123
},
"byType": {}
},
"replyAlert": {
"warnHours": 123,
"criticalHours": 123,
"windowDays": 123
},
"waitingStages": {
"stageKeys": [
"<string>"
],
"warnHours": 123,
"criticalHours": 123
},
"mentionAlert": {
"warnHours": 123,
"criticalHours": 123
}
}
}Guardar fases, mapeo, reglas de entrada y alertas
Reemplaza la configuración completa. Enviar el updatedAt leído para detectar cambios concurrentes; null si se editó la semilla. Las alertas omitidas toman sus valores por defecto.
curl --request PUT \
--url https://api.raul.ugps.io/api/v1/cases/config \
--header 'Content-Type: application/json' \
--data '
{
"version": 1,
"columns": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"order": 50,
"isFinal": true
}
],
"stageMap": {},
"entryRules": {},
"dueAlerts": {
"blinkSeconds": 8,
"default": {
"warnHours": 2,
"criticalHours": 0
},
"byType": {}
},
"replyAlert": {
"warnHours": 2,
"criticalHours": 9,
"windowDays": null
},
"waitingStages": {
"stageKeys": [],
"warnHours": 9,
"criticalHours": 18
},
"mentionAlert": {
"warnHours": 4,
"criticalHours": 9
},
"updatedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.raul.ugps.io/api/v1/cases/config"
payload = {
"version": 1,
"columns": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"order": 50,
"isFinal": True
}
],
"stageMap": {},
"entryRules": {},
"dueAlerts": {
"blinkSeconds": 8,
"default": {
"warnHours": 2,
"criticalHours": 0
},
"byType": {}
},
"replyAlert": {
"warnHours": 2,
"criticalHours": 9,
"windowDays": None
},
"waitingStages": {
"stageKeys": [],
"warnHours": 9,
"criticalHours": 18
},
"mentionAlert": {
"warnHours": 4,
"criticalHours": 9
},
"updatedAt": "2023-11-07T05:31:56Z"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
version: 1,
columns: [
{id: '<string>', name: '<string>', color: '<string>', order: 50, isFinal: true}
],
stageMap: {},
entryRules: {},
dueAlerts: {blinkSeconds: 8, default: {warnHours: 2, criticalHours: 0}, byType: {}},
replyAlert: {warnHours: 2, criticalHours: 9, windowDays: null},
waitingStages: {stageKeys: [], warnHours: 9, criticalHours: 18},
mentionAlert: {warnHours: 4, criticalHours: 9},
updatedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.raul.ugps.io/api/v1/cases/config', 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/cases/config",
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([
'version' => 1,
'columns' => [
[
'id' => '<string>',
'name' => '<string>',
'color' => '<string>',
'order' => 50,
'isFinal' => true
]
],
'stageMap' => [
],
'entryRules' => [
],
'dueAlerts' => [
'blinkSeconds' => 8,
'default' => [
'warnHours' => 2,
'criticalHours' => 0
],
'byType' => [
]
],
'replyAlert' => [
'warnHours' => 2,
'criticalHours' => 9,
'windowDays' => null
],
'waitingStages' => [
'stageKeys' => [
],
'warnHours' => 9,
'criticalHours' => 18
],
'mentionAlert' => [
'warnHours' => 4,
'criticalHours' => 9
],
'updatedAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"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/cases/config"
payload := strings.NewReader("{\n \"version\": 1,\n \"columns\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"order\": 50,\n \"isFinal\": true\n }\n ],\n \"stageMap\": {},\n \"entryRules\": {},\n \"dueAlerts\": {\n \"blinkSeconds\": 8,\n \"default\": {\n \"warnHours\": 2,\n \"criticalHours\": 0\n },\n \"byType\": {}\n },\n \"replyAlert\": {\n \"warnHours\": 2,\n \"criticalHours\": 9,\n \"windowDays\": null\n },\n \"waitingStages\": {\n \"stageKeys\": [],\n \"warnHours\": 9,\n \"criticalHours\": 18\n },\n \"mentionAlert\": {\n \"warnHours\": 4,\n \"criticalHours\": 9\n },\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.raul.ugps.io/api/v1/cases/config")
.header("Content-Type", "application/json")
.body("{\n \"version\": 1,\n \"columns\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"order\": 50,\n \"isFinal\": true\n }\n ],\n \"stageMap\": {},\n \"entryRules\": {},\n \"dueAlerts\": {\n \"blinkSeconds\": 8,\n \"default\": {\n \"warnHours\": 2,\n \"criticalHours\": 0\n },\n \"byType\": {}\n },\n \"replyAlert\": {\n \"warnHours\": 2,\n \"criticalHours\": 9,\n \"windowDays\": null\n },\n \"waitingStages\": {\n \"stageKeys\": [],\n \"warnHours\": 9,\n \"criticalHours\": 18\n },\n \"mentionAlert\": {\n \"warnHours\": 4,\n \"criticalHours\": 9\n },\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/cases/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 1,\n \"columns\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"color\": \"<string>\",\n \"order\": 50,\n \"isFinal\": true\n }\n ],\n \"stageMap\": {},\n \"entryRules\": {},\n \"dueAlerts\": {\n \"blinkSeconds\": 8,\n \"default\": {\n \"warnHours\": 2,\n \"criticalHours\": 0\n },\n \"byType\": {}\n },\n \"replyAlert\": {\n \"warnHours\": 2,\n \"criticalHours\": 9,\n \"windowDays\": null\n },\n \"waitingStages\": {\n \"stageKeys\": [],\n \"warnHours\": 9,\n \"criticalHours\": 18\n },\n \"mentionAlert\": {\n \"warnHours\": 4,\n \"criticalHours\": 9\n },\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"config": {
"version": 1,
"columns": [
{
"id": "pending",
"name": "Pendiente",
"color": "#F59E0B",
"order": 123,
"isFinal": true
}
],
"stageMap": {},
"entryRules": {},
"dueAlerts": {
"blinkSeconds": 123,
"default": {
"warnHours": 123,
"criticalHours": 123
},
"byType": {}
},
"replyAlert": {
"warnHours": 123,
"criticalHours": 123,
"windowDays": 123
},
"waitingStages": {
"stageKeys": [
"<string>"
],
"warnHours": 123,
"criticalHours": 123
},
"mentionAlert": {
"warnHours": 123,
"criticalHours": 123
}
},
"isDefault": true,
"updatedAt": "2023-11-07T05:31:56Z",
"pipelines": [
{
"kind": "opportunity",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"isDefault": true,
"stages": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"order": 123,
"isFinal": true,
"isWon": true,
"isLost": true,
"probability": 123
}
],
"columnByStage": {},
"entryRule": {
"type": "minStageOrder",
"minStageOrder": 123
}
}
],
"dueAlerts": {
"blinkSeconds": 123,
"default": {
"warnHours": 123,
"criticalHours": 123
},
"byType": {}
},
"replyAlert": {
"warnHours": 123,
"criticalHours": 123,
"windowDays": 123
},
"waitingStages": {
"stageKeys": [
"<string>"
],
"warnHours": 123,
"criticalHours": 123
},
"mentionAlert": {
"warnHours": 123,
"criticalHours": 123
},
"activityTypes": [
{
"id": 123,
"name": "<string>"
}
],
"warnings": [
{
"key": "<string>",
"pipelineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stageId": "<string>",
"stageName": "<string>"
}
],
"defaults": {
"dueAlerts": {
"blinkSeconds": 123,
"default": {
"warnHours": 123,
"criticalHours": 123
},
"byType": {}
},
"replyAlert": {
"warnHours": 123,
"criticalHours": 123,
"windowDays": 123
},
"waitingStages": {
"stageKeys": [
"<string>"
],
"warnHours": 123,
"criticalHours": 123
},
"mentionAlert": {
"warnHours": 123,
"criticalHours": 123
}
}
}Body
1 2 - 8 elementsShow child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Response
Configuración guardada, con su nueva revisión updatedAt
Show child attributes
Show child attributes
true si no hay configuración guardada (semilla)
Revisión guardada; se reenvía en el PUT para detectar conflictos (409). null sin fila
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Etapas abiertas sin fase en la configuración guardada; vacío en la semilla
Show child attributes
Show child attributes
Umbrales por defecto de las alertas del caso
Show child attributes
Show child attributes