Enroll a FinanceKit device publisher
curl --request POST \
--url https://app.sure.am/api/v1/financekit/connections \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"protocol_version": 2,
"enrollment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consent": {
"version": 1,
"granted_at": "2023-11-07T05:31:56Z",
"selected_source_account_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"upload_authorized": true,
"family_visibility_acknowledged": true,
"remote_processing_acknowledged": true
},
"replaces_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://app.sure.am/api/v1/financekit/connections"
payload = {
"protocol_version": 2,
"enrollment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consent": {
"version": 1,
"granted_at": "2023-11-07T05:31:56Z",
"selected_source_account_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"upload_authorized": True,
"family_visibility_acknowledged": True,
"remote_processing_acknowledged": True
},
"replaces_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
protocol_version: 2,
enrollment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
consent: {
version: 1,
granted_at: '2023-11-07T05:31:56Z',
selected_source_account_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
upload_authorized: true,
family_visibility_acknowledged: true,
remote_processing_acknowledged: true
},
replaces_connection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://app.sure.am/api/v1/financekit/connections', 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",
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([
'protocol_version' => 2,
'enrollment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'consent' => [
'version' => 1,
'granted_at' => '2023-11-07T05:31:56Z',
'selected_source_account_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'upload_authorized' => true,
'family_visibility_acknowledged' => true,
'remote_processing_acknowledged' => true
],
'replaces_connection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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"
payload := strings.NewReader("{\n \"protocol_version\": 2,\n \"enrollment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"consent\": {\n \"version\": 1,\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"selected_source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"upload_authorized\": true,\n \"family_visibility_acknowledged\": true,\n \"remote_processing_acknowledged\": true\n },\n \"replaces_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.sure.am/api/v1/financekit/connections")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"protocol_version\": 2,\n \"enrollment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"consent\": {\n \"version\": 1,\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"selected_source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"upload_authorized\": true,\n \"family_visibility_acknowledged\": true,\n \"remote_processing_acknowledged\": true\n },\n \"replaces_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sure.am/api/v1/financekit/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"protocol_version\": 2,\n \"enrollment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"consent\": {\n \"version\": 1,\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"selected_source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"upload_authorized\": true,\n \"family_visibility_acknowledged\": true,\n \"remote_processing_acknowledged\": true\n },\n \"replaces_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publisher_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending_mapping",
"generation": 2,
"next_sequence": 2,
"open_conflicts": 1,
"stream_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repair_reason": "<string>",
"last_device_contact_at": "2023-11-07T05:31:56Z",
"last_accepted_at": "2023-11-07T05:31:56Z",
"last_imported_at": "2023-11-07T05:31:56Z",
"last_downstream_at": "2023-11-07T05:31:56Z",
"last_captured_at": "2023-11-07T05:31:56Z",
"accounts": [
{
"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"
}
],
"pagination": {
"page": 2,
"per_page": 2,
"total_count": 1,
"total_pages": 1
},
"purge_requested_at": "2023-11-07T05:31:56Z",
"purge_completed_at": "2023-11-07T05:31:56Z",
"disposition": "retain"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}FinanceKit
Enroll a FinanceKit device publisher
POST
/
api
/
v1
/
financekit
/
connections
Enroll a FinanceKit device publisher
curl --request POST \
--url https://app.sure.am/api/v1/financekit/connections \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"protocol_version": 2,
"enrollment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consent": {
"version": 1,
"granted_at": "2023-11-07T05:31:56Z",
"selected_source_account_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"upload_authorized": true,
"family_visibility_acknowledged": true,
"remote_processing_acknowledged": true
},
"replaces_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://app.sure.am/api/v1/financekit/connections"
payload = {
"protocol_version": 2,
"enrollment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consent": {
"version": 1,
"granted_at": "2023-11-07T05:31:56Z",
"selected_source_account_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"upload_authorized": True,
"family_visibility_acknowledged": True,
"remote_processing_acknowledged": True
},
"replaces_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
protocol_version: 2,
enrollment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
consent: {
version: 1,
granted_at: '2023-11-07T05:31:56Z',
selected_source_account_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
upload_authorized: true,
family_visibility_acknowledged: true,
remote_processing_acknowledged: true
},
replaces_connection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://app.sure.am/api/v1/financekit/connections', 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",
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([
'protocol_version' => 2,
'enrollment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'consent' => [
'version' => 1,
'granted_at' => '2023-11-07T05:31:56Z',
'selected_source_account_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'upload_authorized' => true,
'family_visibility_acknowledged' => true,
'remote_processing_acknowledged' => true
],
'replaces_connection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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"
payload := strings.NewReader("{\n \"protocol_version\": 2,\n \"enrollment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"consent\": {\n \"version\": 1,\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"selected_source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"upload_authorized\": true,\n \"family_visibility_acknowledged\": true,\n \"remote_processing_acknowledged\": true\n },\n \"replaces_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.sure.am/api/v1/financekit/connections")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"protocol_version\": 2,\n \"enrollment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"consent\": {\n \"version\": 1,\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"selected_source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"upload_authorized\": true,\n \"family_visibility_acknowledged\": true,\n \"remote_processing_acknowledged\": true\n },\n \"replaces_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sure.am/api/v1/financekit/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"protocol_version\": 2,\n \"enrollment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"consent\": {\n \"version\": 1,\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"selected_source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"upload_authorized\": true,\n \"family_visibility_acknowledged\": true,\n \"remote_processing_acknowledged\": true\n },\n \"replaces_connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publisher_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending_mapping",
"generation": 2,
"next_sequence": 2,
"open_conflicts": 1,
"stream_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repair_reason": "<string>",
"last_device_contact_at": "2023-11-07T05:31:56Z",
"last_accepted_at": "2023-11-07T05:31:56Z",
"last_imported_at": "2023-11-07T05:31:56Z",
"last_downstream_at": "2023-11-07T05:31:56Z",
"last_captured_at": "2023-11-07T05:31:56Z",
"accounts": [
{
"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"
}
],
"pagination": {
"page": 2,
"per_page": 2,
"total_count": 1,
"total_pages": 1
},
"purge_requested_at": "2023-11-07T05:31:56Z",
"purge_completed_at": "2023-11-07T05:31:56Z",
"disposition": "retain"
}{
"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
Available options:
2 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
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}$Response
Publisher enrolled pending account mapping
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}$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}$Available options:
pending_mapping, active, repair_required, revoked Required range:
x >= 1Required range:
x >= 1Required range:
x >= 0Pattern:
^[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
Show child attributes
Show child attributes
Available options:
retain, discard Was this page helpful?