Fusionar contactos duplicados
curl --request POST \
--url https://api.qbank.cl/platform/v1/contacts/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact_ids": [
"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b",
"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"
],
"surviving_contact_id": "3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b"
}
'import requests
url = "https://api.qbank.cl/platform/v1/contacts/merge"
payload = {
"contact_ids": ["3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b", "9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"],
"surviving_contact_id": "3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact_ids: ['3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b', '9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f'],
surviving_contact_id: '3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b'
})
};
fetch('https://api.qbank.cl/platform/v1/contacts/merge', 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.qbank.cl/platform/v1/contacts/merge",
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([
'contact_ids' => [
'3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b',
'9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f'
],
'surviving_contact_id' => '3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b'
]),
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.qbank.cl/platform/v1/contacts/merge"
payload := strings.NewReader("{\n \"contact_ids\": [\n \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\",\n \"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f\"\n ],\n \"surviving_contact_id\": \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.qbank.cl/platform/v1/contacts/merge")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contact_ids\": [\n \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\",\n \"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f\"\n ],\n \"surviving_contact_id\": \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/contacts/merge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact_ids\": [\n \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\",\n \"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f\"\n ],\n \"surviving_contact_id\": \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\"\n}"
response = http.request(request)
puts response.read_body{
"contact_id": "3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b",
"display_name": "Carlos Soto",
"phone": "+56987654321",
"has_cbpay": true,
"source": "import",
"favorite": true,
"destinations": [
{
"destination_id": "aa11bb22-cc33-44dd-8899-aabbccddeeff",
"type": "payout",
"country": "CL",
"currency": "CLP",
"method": "bank_transfer"
},
{
"destination_id": "bb22c3d4-5e6f-7a80-9b0c-1d2e3f4a5b6c",
"type": "crypto",
"chain": "tron",
"address": "TVJ6njG5Fyrq6XwYok3xPQx8kR7HQx6vXk"
}
],
"merged_contact_ids": [
"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"
],
"created_at": "2026-07-07T12:00:00Z",
"updated_at": "2026-11-13T12:00:00Z"
}{
"error": "invalid_payload",
"message": "contact_ids must include at least 2 distinct contacts"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "not_found",
"message": "resource not found"
}{
"error": "duplicate",
"message": "duplicate"
}Fusionar contactos duplicados
Fusiona de 2 a 20 contactos en un sobreviviente (una persona = un contacto con muchos destinos). Los destinos se mueven al sobreviviente; un id inexistente o ajeno responde 404 y no fusiona nada (sin fusión parcial). No es idempotente: reintentar tras el éxito responde 404 (fuentes ya borradas), así que el cliente no debe reintentar a ciegas.
POST
/
v1
/
contacts
/
merge
Fusionar contactos duplicados
curl --request POST \
--url https://api.qbank.cl/platform/v1/contacts/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact_ids": [
"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b",
"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"
],
"surviving_contact_id": "3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b"
}
'import requests
url = "https://api.qbank.cl/platform/v1/contacts/merge"
payload = {
"contact_ids": ["3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b", "9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"],
"surviving_contact_id": "3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact_ids: ['3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b', '9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f'],
surviving_contact_id: '3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b'
})
};
fetch('https://api.qbank.cl/platform/v1/contacts/merge', 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.qbank.cl/platform/v1/contacts/merge",
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([
'contact_ids' => [
'3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b',
'9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f'
],
'surviving_contact_id' => '3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b'
]),
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.qbank.cl/platform/v1/contacts/merge"
payload := strings.NewReader("{\n \"contact_ids\": [\n \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\",\n \"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f\"\n ],\n \"surviving_contact_id\": \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.qbank.cl/platform/v1/contacts/merge")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contact_ids\": [\n \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\",\n \"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f\"\n ],\n \"surviving_contact_id\": \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/contacts/merge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact_ids\": [\n \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\",\n \"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f\"\n ],\n \"surviving_contact_id\": \"3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b\"\n}"
response = http.request(request)
puts response.read_body{
"contact_id": "3f8a1b2c-4d5e-6f70-8a9b-0c1d2e3f4a5b",
"display_name": "Carlos Soto",
"phone": "+56987654321",
"has_cbpay": true,
"source": "import",
"favorite": true,
"destinations": [
{
"destination_id": "aa11bb22-cc33-44dd-8899-aabbccddeeff",
"type": "payout",
"country": "CL",
"currency": "CLP",
"method": "bank_transfer"
},
{
"destination_id": "bb22c3d4-5e6f-7a80-9b0c-1d2e3f4a5b6c",
"type": "crypto",
"chain": "tron",
"address": "TVJ6njG5Fyrq6XwYok3xPQx8kR7HQx6vXk"
}
],
"merged_contact_ids": [
"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"
],
"created_at": "2026-07-07T12:00:00Z",
"updated_at": "2026-11-13T12:00:00Z"
}{
"error": "invalid_payload",
"message": "contact_ids must include at least 2 distinct contacts"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "not_found",
"message": "resource not found"
}{
"error": "duplicate",
"message": "duplicate"
}Autorizaciones
Cuerpo
application/json
Respuesta
Contacto fusionado con todos sus destinos.