Campos
Vincular relación bidireccional
Conecta dos campos de relación existentes como un par bidireccional.
POST
/
databases
/
{databaseId}
/
fields
/
{fieldId}
/
link
Vincular relación
curl --request POST \
--url https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link \
--header 'Content-Type: application/json' \
--header 'x-ib-api-key: <api-key>' \
--data '
{
"inverseFieldId": "<inverse-field-id>"
}
'import requests
url = "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link"
payload = { "inverseFieldId": "<inverse-field-id>" }
headers = {
"x-ib-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({inverseFieldId: '<inverse-field-id>'})
};
fetch('https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({inverseFieldId: '<inverse-field-id>'})
};
fetch('https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link', 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}/link';
const options = {
method: 'POST',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({inverseFieldId: '<inverse-field-id>'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link")
.header("x-ib-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inverseFieldId\": \"<inverse-field-id>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{\n \"inverseFieldId\": \"<inverse-field-id>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{\n \"inverseFieldId\": \"<inverse-field-id>\"\n}", false);
var response = await client.PostAsync(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}/link"
payload := strings.NewReader("{\n \"inverseFieldId\": \"<inverse-field-id>\"\n}")
req, _ := http.NewRequest("POST", 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}/link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ib-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inverseFieldId\": \"<inverse-field-id>\"\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}/link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inverseFieldId' => '<inverse-field-id>'
]),
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 \"inverseFieldId\": \"<inverse-field-id>\"\n}")
val request = Request.Builder()
.url("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link")
.post(body)
.addHeader("x-ib-api-key", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let parameters = ["inverseFieldId": "<inverse-field-id>"] 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}/link")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
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}/link' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inverseFieldId": "<inverse-field-id>"
}'{
"sourceField": {
"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
},
"inverseFieldId": "<string>",
"relationPairId": "<string>"
},
"inverseField": {
"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
},
"inverseFieldId": "<string>",
"relationPairId": "<string>"
}
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}Vincula un campo
Respuesta exitosa (
relation_single o relation_multi con un campo compatible del tablero destino. A partir de ese momento, ambos lados se mantienen como un par.
Puedes vincular
relation_single con relation_single o relation_multi. No puedes vincular dos campos relation_multi.Endpoint
POST /databases/{databaseId}/fields/{fieldId}/link
Body
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
inverseFieldId | string | Sí | ID del campo de relación existente en el tablero destino. |
Ejemplo de solicitud
curl -X POST "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link" \
-H "Content-Type: application/json" \
-H "x-ib-api-key: TU_API_KEY" \
-d '{ "inverseFieldId": "<inverse-field-id>" }'
Respuesta exitosa (200)
{
"sourceField": {
"id": "<field-id>",
"type": "relation_single",
"bidirectional": true,
"inverseFieldId": "<inverse-field-id>"
},
"inverseField": {
"id": "<inverse-field-id>",
"type": "relation_multi",
"bidirectional": true,
"inverseFieldId": "<field-id>"
}
}
Errores frecuentes
| HTTP | Qué significa | Qué hacer |
|---|---|---|
400 | Falta inverseFieldId, los campos no son compatibles o alguno ya está vinculado. | Revisa ambos campos y sus tableros destino. |
403 | Tu integración no puede modificar uno de los tableros. | Confirma el acceso. |
404 | El tablero o un campo no existe. | Confirma los IDs. |
Authorizations
API key de Insurance Boosters.
Path Parameters
ID del tablero.
ID inmutable del campo.
Body
application/json
ID de un campo compatible en el tablero destino. No se admite vincular dos campos relation_multi.
Minimum string length:
1Was this page helpful?
Vincular relación
curl --request POST \
--url https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link \
--header 'Content-Type: application/json' \
--header 'x-ib-api-key: <api-key>' \
--data '
{
"inverseFieldId": "<inverse-field-id>"
}
'import requests
url = "https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link"
payload = { "inverseFieldId": "<inverse-field-id>" }
headers = {
"x-ib-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({inverseFieldId: '<inverse-field-id>'})
};
fetch('https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({inverseFieldId: '<inverse-field-id>'})
};
fetch('https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link', 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}/link';
const options = {
method: 'POST',
headers: {'x-ib-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({inverseFieldId: '<inverse-field-id>'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link")
.header("x-ib-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inverseFieldId\": \"<inverse-field-id>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{\n \"inverseFieldId\": \"<inverse-field-id>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-ib-api-key", "<api-key>");
request.AddJsonBody("{\n \"inverseFieldId\": \"<inverse-field-id>\"\n}", false);
var response = await client.PostAsync(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}/link"
payload := strings.NewReader("{\n \"inverseFieldId\": \"<inverse-field-id>\"\n}")
req, _ := http.NewRequest("POST", 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}/link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ib-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inverseFieldId\": \"<inverse-field-id>\"\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}/link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inverseFieldId' => '<inverse-field-id>'
]),
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 \"inverseFieldId\": \"<inverse-field-id>\"\n}")
val request = Request.Builder()
.url("https://api.insuranceboosters.com/api/v1/databases/{databaseId}/fields/{fieldId}/link")
.post(body)
.addHeader("x-ib-api-key", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()falseimport Foundation
let parameters = ["inverseFieldId": "<inverse-field-id>"] 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}/link")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
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}/link' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inverseFieldId": "<inverse-field-id>"
}'{
"sourceField": {
"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
},
"inverseFieldId": "<string>",
"relationPairId": "<string>"
},
"inverseField": {
"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
},
"inverseFieldId": "<string>",
"relationPairId": "<string>"
}
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}{
"message": "<string>",
"error": "<string>"
}
