Save beginning balance
curl --request POST \
--url https://sandbox.hurdlr.com/rest/v5/banks/beginningBalance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--data '
{
"bankAccountId": 52320,
"balance": 234.56,
"date": "2020-12-31",
"description": "Beginning Balance"
}
'import requests
url = "https://sandbox.hurdlr.com/rest/v5/banks/beginningBalance"
payload = {
"bankAccountId": 52320,
"balance": 234.56,
"date": "2020-12-31",
"description": "Beginning Balance"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "*/*"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': '*/*'},
body: JSON.stringify({
bankAccountId: 52320,
balance: 234.56,
date: '2020-12-31',
description: 'Beginning Balance'
})
};
fetch('https://sandbox.hurdlr.com/rest/v5/banks/beginningBalance', 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://sandbox.hurdlr.com/rest/v5/banks/beginningBalance",
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([
'bankAccountId' => 52320,
'balance' => 234.56,
'date' => '2020-12-31',
'description' => 'Beginning Balance'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*"
],
]);
$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://sandbox.hurdlr.com/rest/v5/banks/beginningBalance"
payload := strings.NewReader("{\n \"bankAccountId\": 52320,\n \"balance\": 234.56,\n \"date\": \"2020-12-31\",\n \"description\": \"Beginning Balance\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hurdlr.com/rest/v5/banks/beginningBalance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "*/*")
.body("{\n \"bankAccountId\": 52320,\n \"balance\": 234.56,\n \"date\": \"2020-12-31\",\n \"description\": \"Beginning Balance\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hurdlr.com/rest/v5/banks/beginningBalance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = '*/*'
request.body = "{\n \"bankAccountId\": 52320,\n \"balance\": 234.56,\n \"date\": \"2020-12-31\",\n \"description\": \"Beginning Balance\"\n}"
response = http.request(request)
puts response.read_body[
{
"result": "SUCCESS",
"errors": {
"fieldErrors": {},
"globalErrors": [
{
"type": "DUPLICATE",
"errorMessage": "<string>"
}
]
},
"id": "<string>",
"webhook": {
"userId": "<string>",
"accountantUserId": "<string>",
"type": "ENTITY_UPDATE"
}
}
]Banks
Save beginning balance
Set the beginning balance on a user’s bank account (i.e. syntactic sugar for a more complicated POST to /accounting/journalEntry)
POST
/
v5
/
banks
/
beginningBalance
Save beginning balance
curl --request POST \
--url https://sandbox.hurdlr.com/rest/v5/banks/beginningBalance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--data '
{
"bankAccountId": 52320,
"balance": 234.56,
"date": "2020-12-31",
"description": "Beginning Balance"
}
'import requests
url = "https://sandbox.hurdlr.com/rest/v5/banks/beginningBalance"
payload = {
"bankAccountId": 52320,
"balance": 234.56,
"date": "2020-12-31",
"description": "Beginning Balance"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "*/*"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': '*/*'},
body: JSON.stringify({
bankAccountId: 52320,
balance: 234.56,
date: '2020-12-31',
description: 'Beginning Balance'
})
};
fetch('https://sandbox.hurdlr.com/rest/v5/banks/beginningBalance', 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://sandbox.hurdlr.com/rest/v5/banks/beginningBalance",
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([
'bankAccountId' => 52320,
'balance' => 234.56,
'date' => '2020-12-31',
'description' => 'Beginning Balance'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*"
],
]);
$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://sandbox.hurdlr.com/rest/v5/banks/beginningBalance"
payload := strings.NewReader("{\n \"bankAccountId\": 52320,\n \"balance\": 234.56,\n \"date\": \"2020-12-31\",\n \"description\": \"Beginning Balance\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hurdlr.com/rest/v5/banks/beginningBalance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "*/*")
.body("{\n \"bankAccountId\": 52320,\n \"balance\": 234.56,\n \"date\": \"2020-12-31\",\n \"description\": \"Beginning Balance\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hurdlr.com/rest/v5/banks/beginningBalance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = '*/*'
request.body = "{\n \"bankAccountId\": 52320,\n \"balance\": 234.56,\n \"date\": \"2020-12-31\",\n \"description\": \"Beginning Balance\"\n}"
response = http.request(request)
puts response.read_body[
{
"result": "SUCCESS",
"errors": {
"fieldErrors": {},
"globalErrors": [
{
"type": "DUPLICATE",
"errorMessage": "<string>"
}
]
},
"id": "<string>",
"webhook": {
"userId": "<string>",
"accountantUserId": "<string>",
"type": "ENTITY_UPDATE"
}
}
]Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
*/*
Beginning balance data
Id of the bank account account (from Tight's API) for which we are setting the beginning balance. Either this or apiAccountId is required.
Example:
52320
The balance of this account on the date specified in the date field
Example:
234.56
The date on which to apply this beginning balance; generally the day before the user started tracking their accounting in your system
Example:
"2020-12-31"
The description of this beginning balance. Defaults to 'Beginning Balance'.
Example:
"Beginning Balance"
Response
200 - application/json
Successful operation