Explicitly create or link a canonical account lineage
curl --request PUT \
--url https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"expected_version": 1,
"name": "<string>",
"institution_name": "<string>",
"currency": "<string>",
"subtype": "<string>",
"ledger_timezone": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"observed_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id}"
payload = {
"expected_version": 1,
"name": "<string>",
"institution_name": "<string>",
"currency": "<string>",
"subtype": "<string>",
"ledger_timezone": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"observed_at": "2023-11-07T05:31:56Z"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_version: 1,
name: '<string>',
institution_name: '<string>',
currency: '<string>',
subtype: '<string>',
ledger_timezone: '<string>',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
lineage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
observed_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_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://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expected_version' => 1,
'name' => '<string>',
'institution_name' => '<string>',
'currency' => '<string>',
'subtype' => '<string>',
'ledger_timezone' => '<string>',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'lineage_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'observed_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id}"
payload := strings.NewReader("{\n \"expected_version\": 1,\n \"name\": \"<string>\",\n \"institution_name\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtype\": \"<string>\",\n \"ledger_timezone\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lineage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"observed_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-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))
}HttpResponse<String> response = Unirest.put("https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 1,\n \"name\": \"<string>\",\n \"institution_name\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtype\": \"<string>\",\n \"ledger_timezone\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lineage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"observed_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_version\": 1,\n \"name\": \"<string>\",\n \"institution_name\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtype\": \"<string>\",\n \"ledger_timezone\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lineage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"observed_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mapping_version": 2,
"name": "<string>",
"institution_name": "<string>",
"currency": "<string>",
"accountable_type": "<string>",
"subtype": "<string>",
"ledger_timezone": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}FinanceKit
Explicitly create or link a canonical account lineage
PUT
/
api
/
v1
/
financekit
/
connections
/
{connection_id}
/
account_mappings
/
{source_id}
Explicitly create or link a canonical account lineage
curl --request PUT \
--url https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"expected_version": 1,
"name": "<string>",
"institution_name": "<string>",
"currency": "<string>",
"subtype": "<string>",
"ledger_timezone": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"observed_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id}"
payload = {
"expected_version": 1,
"name": "<string>",
"institution_name": "<string>",
"currency": "<string>",
"subtype": "<string>",
"ledger_timezone": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"observed_at": "2023-11-07T05:31:56Z"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_version: 1,
name: '<string>',
institution_name: '<string>',
currency: '<string>',
subtype: '<string>',
ledger_timezone: '<string>',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
lineage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
observed_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_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://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expected_version' => 1,
'name' => '<string>',
'institution_name' => '<string>',
'currency' => '<string>',
'subtype' => '<string>',
'ledger_timezone' => '<string>',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'lineage_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'observed_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id}"
payload := strings.NewReader("{\n \"expected_version\": 1,\n \"name\": \"<string>\",\n \"institution_name\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtype\": \"<string>\",\n \"ledger_timezone\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lineage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"observed_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-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))
}HttpResponse<String> response = Unirest.put("https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expected_version\": 1,\n \"name\": \"<string>\",\n \"institution_name\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtype\": \"<string>\",\n \"ledger_timezone\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lineage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"observed_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sure.am/api/v1/financekit/connections/{connection_id}/account_mappings/{source_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_version\": 1,\n \"name\": \"<string>\",\n \"institution_name\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtype\": \"<string>\",\n \"ledger_timezone\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lineage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"observed_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mapping_version": 2,
"name": "<string>",
"institution_name": "<string>",
"currency": "<string>",
"accountable_type": "<string>",
"subtype": "<string>",
"ledger_timezone": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
apiKeyAuthoauth2
API key for authentication. Generate one from your account settings.
Body
application/json
create requires booked_balance and observed_at; link requires a writable same-family account_id and may carry a prior lineage_id
Required range:
x >= 0Available options:
create, link Maximum string length:
255Maximum string length:
255Available options:
Depository, CreditCard Pattern:
^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$Pattern:
^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$Show child attributes
Show child attributes
Response
Stable account lineage binding
Pattern:
^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$Pattern:
^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$Required range:
x >= 1Pattern:
^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$Was this page helpful?