Crear link bancario
curl --request POST \
--url https://api.rail.cl/v1/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credentials": {
"rut": "<string>",
"password": "",
"rut_empresa": "<string>"
},
"external_user_id": "<string>",
"consent_version": "<string>",
"consent_text_hash": "<string>"
}
'import requests
url = "https://api.rail.cl/v1/links"
payload = {
"credentials": {
"rut": "<string>",
"password": "",
"rut_empresa": "<string>"
},
"external_user_id": "<string>",
"consent_version": "<string>",
"consent_text_hash": "<string>"
}
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({
credentials: {rut: '<string>', password: '', rut_empresa: '<string>'},
external_user_id: '<string>',
consent_version: '<string>',
consent_text_hash: '<string>'
})
};
fetch('https://api.rail.cl/v1/links', 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.rail.cl/v1/links",
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([
'credentials' => [
'rut' => '<string>',
'password' => '',
'rut_empresa' => '<string>'
],
'external_user_id' => '<string>',
'consent_version' => '<string>',
'consent_text_hash' => '<string>'
]),
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.rail.cl/v1/links"
payload := strings.NewReader("{\n \"credentials\": {\n \"rut\": \"<string>\",\n \"password\": \"\",\n \"rut_empresa\": \"<string>\"\n },\n \"external_user_id\": \"<string>\",\n \"consent_version\": \"<string>\",\n \"consent_text_hash\": \"<string>\"\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.rail.cl/v1/links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"credentials\": {\n \"rut\": \"<string>\",\n \"password\": \"\",\n \"rut_empresa\": \"<string>\"\n },\n \"external_user_id\": \"<string>\",\n \"consent_version\": \"<string>\",\n \"consent_text_hash\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rail.cl/v1/links")
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 \"credentials\": {\n \"rut\": \"<string>\",\n \"password\": \"\",\n \"rut_empresa\": \"<string>\"\n },\n \"external_user_id\": \"<string>\",\n \"consent_version\": \"<string>\",\n \"consent_text_hash\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyLinks
Crear link bancario
Crea un link con credenciales del usuario y dispara el primer sync en background. Requiere secret key (rail_sk_*). Para flujo white-label sin pasar credenciales por tu servidor, usar /v1/widget_tokens en su lugar.
POST
/
v1
/
links
Crear link bancario
curl --request POST \
--url https://api.rail.cl/v1/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credentials": {
"rut": "<string>",
"password": "",
"rut_empresa": "<string>"
},
"external_user_id": "<string>",
"consent_version": "<string>",
"consent_text_hash": "<string>"
}
'import requests
url = "https://api.rail.cl/v1/links"
payload = {
"credentials": {
"rut": "<string>",
"password": "",
"rut_empresa": "<string>"
},
"external_user_id": "<string>",
"consent_version": "<string>",
"consent_text_hash": "<string>"
}
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({
credentials: {rut: '<string>', password: '', rut_empresa: '<string>'},
external_user_id: '<string>',
consent_version: '<string>',
consent_text_hash: '<string>'
})
};
fetch('https://api.rail.cl/v1/links', 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.rail.cl/v1/links",
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([
'credentials' => [
'rut' => '<string>',
'password' => '',
'rut_empresa' => '<string>'
],
'external_user_id' => '<string>',
'consent_version' => '<string>',
'consent_text_hash' => '<string>'
]),
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.rail.cl/v1/links"
payload := strings.NewReader("{\n \"credentials\": {\n \"rut\": \"<string>\",\n \"password\": \"\",\n \"rut_empresa\": \"<string>\"\n },\n \"external_user_id\": \"<string>\",\n \"consent_version\": \"<string>\",\n \"consent_text_hash\": \"<string>\"\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.rail.cl/v1/links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"credentials\": {\n \"rut\": \"<string>\",\n \"password\": \"\",\n \"rut_empresa\": \"<string>\"\n },\n \"external_user_id\": \"<string>\",\n \"consent_version\": \"<string>\",\n \"consent_text_hash\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rail.cl/v1/links")
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 \"credentials\": {\n \"rut\": \"<string>\",\n \"password\": \"\",\n \"rut_empresa\": \"<string>\"\n },\n \"external_user_id\": \"<string>\",\n \"consent_version\": \"<string>\",\n \"consent_text_hash\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
API key emitida desde el dashboard. Servidor-a-servidor con sk_, browser-to-server con pk_. El prefijo identifica modo (test/live).
Body
application/json
Available options:
santander, banco_chile, banco_estado, banco_falabella, bci, itau, scotia, bice, cencosud, mercado_pago, liderbci Show child attributes
Show child attributes
Minimum string length:
1Available options:
individual, business Response
200
Default Response
⌘I