Update investment settings
curl --request PUT \
--url https://api.synci.io/api/v1/finance/accounts/{accountId}/investment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cash_tracking_enabled": true,
"paying_financial_account_id": 123
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cash_tracking_enabled: true, paying_financial_account_id: 123})
};
fetch('https://api.synci.io/api/v1/finance/accounts/{accountId}/investment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.synci.io/api/v1/finance/accounts/{accountId}/investment"
payload = {
"cash_tracking_enabled": True,
"paying_financial_account_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.synci.io/api/v1/finance/accounts/{accountId}/investment",
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([
'cash_tracking_enabled' => true,
'paying_financial_account_id' => 123
]),
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.synci.io/api/v1/finance/accounts/{accountId}/investment"
payload := strings.NewReader("{\n \"cash_tracking_enabled\": true,\n \"paying_financial_account_id\": 123\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"message": "Investment settings updated.",
"data": {
"base_currency": "<string>",
"cash_tracking_enabled": true,
"paying_financial_account_id": "<string>",
"positions_count": 1,
"cash_anchor": {
"balance": 123,
"date": "<string>"
},
"last_priced_at": "2023-11-07T05:31:56Z",
"last_valued_on": "<string>",
"history_rebuild": {
"status": "QUEUED",
"from": "<string>",
"failed_at": "2023-11-07T05:31:56Z"
},
"stale_positions": [
"<string>"
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Update investment settings
Everything on the investment object: cash tracking and the paying bank account.
PUT
/
finance
/
accounts
/
{accountId}
/
investment
Update investment settings
curl --request PUT \
--url https://api.synci.io/api/v1/finance/accounts/{accountId}/investment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cash_tracking_enabled": true,
"paying_financial_account_id": 123
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cash_tracking_enabled: true, paying_financial_account_id: 123})
};
fetch('https://api.synci.io/api/v1/finance/accounts/{accountId}/investment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.synci.io/api/v1/finance/accounts/{accountId}/investment"
payload = {
"cash_tracking_enabled": True,
"paying_financial_account_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.synci.io/api/v1/finance/accounts/{accountId}/investment",
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([
'cash_tracking_enabled' => true,
'paying_financial_account_id' => 123
]),
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.synci.io/api/v1/finance/accounts/{accountId}/investment"
payload := strings.NewReader("{\n \"cash_tracking_enabled\": true,\n \"paying_financial_account_id\": 123\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"message": "Investment settings updated.",
"data": {
"base_currency": "<string>",
"cash_tracking_enabled": true,
"paying_financial_account_id": "<string>",
"positions_count": 1,
"cash_anchor": {
"balance": 123,
"date": "<string>"
},
"last_priced_at": "2023-11-07T05:31:56Z",
"last_valued_on": "<string>",
"history_rebuild": {
"status": "QUEUED",
"from": "<string>",
"failed_at": "2023-11-07T05:31:56Z"
},
"stale_positions": [
"<string>"
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
oauth2http
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The financial account ID
Body
application/json