curl --request PATCH \
--url https://api.fintoc.com/v1/links/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": false
}
'import requests
url = "https://api.fintoc.com/v1/links/{id}"
payload = { "active": False }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({active: false})
};
fetch('https://api.fintoc.com/v1/links/{id}', 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.fintoc.com/v1/links/{id}",
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([
'active' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.fintoc.com/v1/links/{id}"
payload := strings.NewReader("{\n \"active\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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))
}HttpResponse<String> response = Unirest.patch("https://api.fintoc.com/v1/links/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/links/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "link_nMNejK7BT8oGbvO4",
"object": "link",
"accounts": null,
"active": false,
"created_at": "2020-04-22T21:10:19.254Z",
"holder_id": "111111111",
"holder_type": "individual",
"institution": {
"id": "cl_banco_de_chile",
"country": "cl",
"name": "Banco de Chile"
},
"last_time_refreshed": "2020-11-18T18:43:54.591Z",
"link_token": null,
"mode": "live",
"refresh_status": "idle",
"status": "inactive",
"username": "111111111"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_boolean",
"param": "active",
"message": "Invalid boolean: 'hola'. You need to provide a boolean value, not a string.",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}Update a link
Updates a link using its link_token as identifier. You can update only the active field: Fintoc stops refreshing deactivated links.
curl --request PATCH \
--url https://api.fintoc.com/v1/links/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": false
}
'import requests
url = "https://api.fintoc.com/v1/links/{id}"
payload = { "active": False }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({active: false})
};
fetch('https://api.fintoc.com/v1/links/{id}', 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.fintoc.com/v1/links/{id}",
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([
'active' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.fintoc.com/v1/links/{id}"
payload := strings.NewReader("{\n \"active\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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))
}HttpResponse<String> response = Unirest.patch("https://api.fintoc.com/v1/links/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/links/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "link_nMNejK7BT8oGbvO4",
"object": "link",
"accounts": null,
"active": false,
"created_at": "2020-04-22T21:10:19.254Z",
"holder_id": "111111111",
"holder_type": "individual",
"institution": {
"id": "cl_banco_de_chile",
"country": "cl",
"name": "Banco de Chile"
},
"last_time_refreshed": "2020-11-18T18:43:54.591Z",
"link_token": null,
"mode": "live",
"refresh_status": "idle",
"status": "inactive",
"username": "111111111"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_boolean",
"param": "active",
"message": "Invalid boolean: 'hola'. You need to provide a boolean value, not a string.",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}Link activos.active en false para desactivar un Link. Fintoc entonces deja de actualizarlo automáticamente. Esto no sirve para dejar el Link disponible solo para actualizaciones bajo demanda. Para crear Refresh Intents, tu organización necesita tener habilitadas las actualizaciones bajo demanda.Parámetros de ruta
Cuerpo
Whether the link is active. Fintoc does not refresh inactive links, and deactivating a link does not revoke the link_token's access to already-collected data. Reactivating a link triggers a full historical refresh if Fintoc has never refreshed the link or if the last refresh happened more than 20 days ago.
true
Respuesta
The updated link. accounts and link_token are always null in this response.
Whether the link is active. Fintoc does not refresh inactive links, and deactivating a link does not revoke the link_token's access to already-collected data. Reactivating a link triggers a full historical refresh if Fintoc has never refreshed the link or if the last refresh happened more than 20 days ago.
true
Refresh status of the link's accounts. idle means no refresh is in progress, refreshing means every account is refreshing, partially_refreshing means only some accounts are refreshing, and interrupted means no account is currently refreshing.
idle, refreshing, interrupted, partially_refreshing, null "idle"
¿Esta página le ayudó?