Actualizar campo
Modifica la configuración editable de un campo.
curl --request PATCH \
--url https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId} \
--header 'Content-Type: application/json' \
--header 'x-ib-api-key: <api-key>' \
--data '
{
"name": "Estado de póliza"
}
'import requests
url = "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}"
payload = { "name": "Estado de póliza" }
headers = {
"x-ib-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Estado de póliza'})
};
fetch('https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PATCH',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Estado de póliza'})
};
fetch('https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}';
const options = {
method: 'PATCH',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Estado de póliza'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}")
.header("x-ib-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Estado de póliza\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{\n \"name\": \"Estado de póliza\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{\n \"name\": \"Estado de póliza\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}"
payload := strings.NewReader("{\n \"name\": \"Estado de póliza\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-ib-api-key", "<api-key>")
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))
}require 'uri'
require 'net/http'
url = URI("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-ib-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Estado de póliza\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}",
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' => 'Estado de póliza'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ib-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"Estado de póliza\"\n}")
val request = Request.Builder()
.url("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}")
.patch(body)
.addHeader("x-ib-api-key", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let parameters = ["name": "Estado de póliza"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}")!
var request = URLRequest(url: url)
request.httpMethod = "PATCH"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"x-ib-api-key": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("x-ib-api-key", "<api-key>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"name": "Estado de póliza"
}'{
"name": "<string>",
"key": "<string>",
"type": "string",
"id": "<string>",
"required": false,
"description": "<string>",
"defaultValue": "<unknown>",
"dateConfig": {
"includeTime": false
},
"options": [
{
"label": "<string>",
"id": "<string>",
"color": "<string>",
"order": 1
}
],
"toDatabaseId": "<string>",
"displayFieldId": "<string>",
"bidirectional": false,
"inverseField": {
"id": "<string>",
"name": "<string>",
"key": "<string>",
"type": "relation_single",
"displayFieldId": "<string>"
},
"relationFieldId": "<string>",
"targetFieldId": "<string>",
"multipleValuesBehavior": "allValues",
"maxFiles": 2,
"accept": [
"<string>"
],
"numberFormat": {
"type": "none",
"currencyCode": "USD",
"decimalPlaces": 2,
"thousandsSeparator": true
},
"pdfTemplateConfig": {
"buttonLabel": "<string>",
"templates": [
{
"id": "<string>",
"name": "<string>",
"orientation": "portrait",
"fileNameTemplate": "<string>"
}
]
},
"inverseFieldId": "<string>",
"relationPairId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"error": "<string>"
}{
"code": "<string>",
"message": "<string>",
"error": "<string>"
}{
"code": "<string>",
"message": "<string>",
"error": "<string>"
}{
"code": "<string>",
"message": "<string>",
"error": "<string>"
}{
"code": "<string>",
"message": "<string>",
"error": "<string>"
}Endpoint
PATCH /databases/{databaseId}/fields/{fieldId}
key ni type. Para usar otra clave o tipo, crea un campo nuevo y migra los valores.Propiedades comunes
| Campo | Tipo | Descripción |
|---|---|---|
name | string | Nombre visible del campo. |
description | string | Ayuda para quien captura datos. |
required | boolean | Marca el campo como obligatorio en el esquema y en la captura del tablero. |
defaultValue | Cualquiera | Valor predeterminado para tipos compatibles. |
Propiedades por tipo
| Tipo | Propiedades editables |
|---|---|
number | numberFormat |
date | dateConfig |
enum, enum_multi | options; envía la lista completa que deseas conservar |
relation_single, relation_multi | toDatabaseId, displayFieldId, bidirectional, inverseField |
contact_single, contact_multi | displayFieldId |
lookup | relationFieldId, targetFieldId, multipleValuesBehavior |
files | maxFiles, accept |
Ejemplo de solicitud
curl -X PATCH "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}" \
-H "Content-Type: application/json" \
-H "x-ib-api-key: TU_API_KEY" \
-d '{
"name": "Estado de póliza",
"options": [
{ "id": "vigente", "label": "Vigente", "color": "green" },
{ "id": "cancelada", "label": "Cancelada", "color": "red" },
{ "label": "Vencida", "color": "orange" }
]
}'
Respuesta exitosa (200)
Devuelve el campo completo con la configuración actualizada.
Errores frecuentes
| HTTP | Qué significa | Qué hacer |
|---|---|---|
400 | Configuración inválida o intento de cambiar key o type. | Envía solo propiedades compatibles con el tipo actual. |
403 | Tu integración no puede modificar el tablero. | Confirma el acceso al tablero. |
404 | El tablero o el campo no existe. | Confirma databaseId y fieldId. |
Authorizations
API key de Insurance Boosters.
Path Parameters
ID del tablero.
ID inmutable del campo.
Body
Actualización parcial. key y type no se pueden modificar.
1Valor predeterminado para tipos compatibles.
Show child attributes
Show child attributes
1Show child attributes
Show child attributes
Vincula un campo existente con id o crea uno nuevo con name y type.
Show child attributes
Show child attributes
allValues, uniqueValues, firstValue, lastValue x >= 1Show child attributes
Show child attributes
Requerido cuando type es pdf_template.
Show child attributes
Show child attributes
Response
Campo actualizado.
Nombre visible del campo.
1Clave estable; se genera desde name si la omites.
^[a-z][a-zA-Z0-9]*(?:_[a-z0-9]+)*$Tipo inmutable después de crear el campo.
string, number, boolean, date, enum, enum_multi, relation_single, relation_multi, contact_single, contact_multi, lookup, files, pdf_template Marca el campo como obligatorio en el esquema y en la captura del tablero.
Valor predeterminado para tipos compatibles.
Configuración de presentación cuando type es date.
Show child attributes
Show child attributes
Requerido para enum y enum_multi.
1Show child attributes
Show child attributes
Requerido para campos de relación.
Campo mostrado en relaciones o contactos.
Vincula un campo existente con id o crea uno nuevo con name y type.
Show child attributes
Show child attributes
Requerido para lookup.
Requerido para lookup.
Requerido para lookup.
allValues, uniqueValues, firstValue, lastValue Máximo de archivos cuando type es files.
x >= 1Tipos MIME aceptados cuando type es files.
Show child attributes
Show child attributes
Requerido cuando type es pdf_template.
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId} \
--header 'Content-Type: application/json' \
--header 'x-ib-api-key: <api-key>' \
--data '
{
"name": "Estado de póliza"
}
'import requests
url = "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}"
payload = { "name": "Estado de póliza" }
headers = {
"x-ib-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Estado de póliza'})
};
fetch('https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PATCH',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Estado de póliza'})
};
fetch('https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}';
const options = {
method: 'PATCH',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Estado de póliza'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}")
.header("x-ib-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Estado de póliza\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{\n \"name\": \"Estado de póliza\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{\n \"name\": \"Estado de póliza\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}"
payload := strings.NewReader("{\n \"name\": \"Estado de póliza\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-ib-api-key", "<api-key>")
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))
}require 'uri'
require 'net/http'
url = URI("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-ib-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Estado de póliza\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}",
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' => 'Estado de póliza'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ib-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"Estado de póliza\"\n}")
val request = Request.Builder()
.url("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}")
.patch(body)
.addHeader("x-ib-api-key", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let parameters = ["name": "Estado de póliza"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}")!
var request = URLRequest(url: url)
request.httpMethod = "PATCH"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"x-ib-api-key": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("x-ib-api-key", "<api-key>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"name": "Estado de póliza"
}'{
"name": "<string>",
"key": "<string>",
"type": "string",
"id": "<string>",
"required": false,
"description": "<string>",
"defaultValue": "<unknown>",
"dateConfig": {
"includeTime": false
},
"options": [
{
"label": "<string>",
"id": "<string>",
"color": "<string>",
"order": 1
}
],
"toDatabaseId": "<string>",
"displayFieldId": "<string>",
"bidirectional": false,
"inverseField": {
"id": "<string>",
"name": "<string>",
"key": "<string>",
"type": "relation_single",
"displayFieldId": "<string>"
},
"relationFieldId": "<string>",
"targetFieldId": "<string>",
"multipleValuesBehavior": "allValues",
"maxFiles": 2,
"accept": [
"<string>"
],
"numberFormat": {
"type": "none",
"currencyCode": "USD",
"decimalPlaces": 2,
"thousandsSeparator": true
},
"pdfTemplateConfig": {
"buttonLabel": "<string>",
"templates": [
{
"id": "<string>",
"name": "<string>",
"orientation": "portrait",
"fileNameTemplate": "<string>"
}
]
},
"inverseFieldId": "<string>",
"relationPairId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"error": "<string>"
}{
"code": "<string>",
"message": "<string>",
"error": "<string>"
}{
"code": "<string>",
"message": "<string>",
"error": "<string>"
}{
"code": "<string>",
"message": "<string>",
"error": "<string>"
}{
"code": "<string>",
"message": "<string>",
"error": "<string>"
}
