Get an account
curl --request GET \
--url https://api.fintoc.com/v1/accounts/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/accounts/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v1/accounts/{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/accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v1/accounts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fintoc.com/v1/accounts/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "acc_nMNejK7BT8oGbvO4",
"object": "account",
"balance": {
"available": 500000,
"current": 500000,
"limit": 500000
},
"currency": "CLP",
"holder_id": "111111111",
"holder_name": "Jon Snow",
"name": "Cuenta Corriente",
"next_refresh": "2023-04-06T13:30:00.000Z",
"number": "9530516286",
"official_name": "Cuenta Corriente Moneda Local",
"refresh_status": "refreshing",
"refreshed_at": "2020-11-18T18:43:54.591Z",
"removed_from_link": false,
"type": "checking_account"
}{
"error": {
"type": "invalid_request_error",
"code": "empty_string",
"param": "link_token",
"message": "Empty string is invalid: link_token",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_link_token",
"param": "link_token",
"message": "Invalid access token for link: link_nMNejK7BT8oGbvO4_token_****",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such account: acc_nMNejK7BT8oGbvO4",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Cuentas
Get an account
Retrieves an account of a link, using the link’s link_token to authenticate the request. The next_refresh, refresh_status, and removed_from_link fields appear only when the link has the movements product.
GET
/
v1
/
accounts
/
{id}
Get an account
curl --request GET \
--url https://api.fintoc.com/v1/accounts/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/accounts/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v1/accounts/{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/accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v1/accounts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fintoc.com/v1/accounts/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "acc_nMNejK7BT8oGbvO4",
"object": "account",
"balance": {
"available": 500000,
"current": 500000,
"limit": 500000
},
"currency": "CLP",
"holder_id": "111111111",
"holder_name": "Jon Snow",
"name": "Cuenta Corriente",
"next_refresh": "2023-04-06T13:30:00.000Z",
"number": "9530516286",
"official_name": "Cuenta Corriente Moneda Local",
"refresh_status": "refreshing",
"refreshed_at": "2020-11-18T18:43:54.591Z",
"removed_from_link": false,
"type": "checking_account"
}{
"error": {
"type": "invalid_request_error",
"code": "empty_string",
"param": "link_token",
"message": "Empty string is invalid: link_token",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_link_token",
"param": "link_token",
"message": "Invalid access token for link: link_nMNejK7BT8oGbvO4_token_****",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such account: acc_nMNejK7BT8oGbvO4",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Parámetros de consulta
Respuesta
The account.
Refresh status of the account. starting means the account was just connected and has not been refreshed yet, refreshing means a refresh is in progress, and interrupted means the account is not currently being refreshed. Only present when the link has the movements product.
Opciones disponibles:
refreshing, interrupted, starting Ejemplo:
"refreshing"
¿Esta página le ayudó?