curl --request POST \
--url https://api.app.lastaccountingcompany.com/portal/books/declarations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"row_id": "g-phone",
"resource_uri": "<string>",
"resource_revision": "<string>",
"note": "<string>",
"proposed_account": "phone costs",
"customer_id": "<string>"
}
'import requests
url = "https://api.app.lastaccountingcompany.com/portal/books/declarations"
payload = {
"row_id": "g-phone",
"resource_uri": "<string>",
"resource_revision": "<string>",
"note": "<string>",
"proposed_account": "phone costs",
"customer_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
row_id: 'g-phone',
resource_uri: '<string>',
resource_revision: '<string>',
note: '<string>',
proposed_account: 'phone costs',
customer_id: '<string>'
})
};
fetch('https://api.app.lastaccountingcompany.com/portal/books/declarations', 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.app.lastaccountingcompany.com/portal/books/declarations",
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([
'row_id' => 'g-phone',
'resource_uri' => '<string>',
'resource_revision' => '<string>',
'note' => '<string>',
'proposed_account' => 'phone costs',
'customer_id' => '<string>'
]),
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.app.lastaccountingcompany.com/portal/books/declarations"
payload := strings.NewReader("{\n \"row_id\": \"g-phone\",\n \"resource_uri\": \"<string>\",\n \"resource_revision\": \"<string>\",\n \"note\": \"<string>\",\n \"proposed_account\": \"phone costs\",\n \"customer_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}HttpResponse<String> response = Unirest.post("https://api.app.lastaccountingcompany.com/portal/books/declarations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"row_id\": \"g-phone\",\n \"resource_uri\": \"<string>\",\n \"resource_revision\": \"<string>\",\n \"note\": \"<string>\",\n \"proposed_account\": \"phone costs\",\n \"customer_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/books/declarations")
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"] = 'application/json'
request.body = "{\n \"row_id\": \"g-phone\",\n \"resource_uri\": \"<string>\",\n \"resource_revision\": \"<string>\",\n \"note\": \"<string>\",\n \"proposed_account\": \"phone costs\",\n \"customer_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"event_id": "<string>",
"declaration": {
"id": "<string>",
"row_id": "<string>",
"kind": "<string>",
"note": "<string>",
"proposed_account": "<string>",
"created_at": "<string>"
},
"status": {
"value": "Reviewing"
}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Record an answer about one transaction row
Records what you say about one bank-transaction row: that no receipt exists, that the payment was private, how it splits, or that it belongs in a different place in the books. The declaration is evidence for Björn, never a posting and never an edit: he reads it, acts with his own judgment, and closes it — so the row reads “Reviewing” until he does.
Declarations attach to bank-transaction rows only. Journal-entry rows (je:…), payslip rows and split constituent rows (…#L2) are refused. One open declaration exists per row: a second answer replaces it in place and returns the same declaration id. Requires a write-scoped key.
curl --request POST \
--url https://api.app.lastaccountingcompany.com/portal/books/declarations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"row_id": "g-phone",
"resource_uri": "<string>",
"resource_revision": "<string>",
"note": "<string>",
"proposed_account": "phone costs",
"customer_id": "<string>"
}
'import requests
url = "https://api.app.lastaccountingcompany.com/portal/books/declarations"
payload = {
"row_id": "g-phone",
"resource_uri": "<string>",
"resource_revision": "<string>",
"note": "<string>",
"proposed_account": "phone costs",
"customer_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
row_id: 'g-phone',
resource_uri: '<string>',
resource_revision: '<string>',
note: '<string>',
proposed_account: 'phone costs',
customer_id: '<string>'
})
};
fetch('https://api.app.lastaccountingcompany.com/portal/books/declarations', 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.app.lastaccountingcompany.com/portal/books/declarations",
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([
'row_id' => 'g-phone',
'resource_uri' => '<string>',
'resource_revision' => '<string>',
'note' => '<string>',
'proposed_account' => 'phone costs',
'customer_id' => '<string>'
]),
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.app.lastaccountingcompany.com/portal/books/declarations"
payload := strings.NewReader("{\n \"row_id\": \"g-phone\",\n \"resource_uri\": \"<string>\",\n \"resource_revision\": \"<string>\",\n \"note\": \"<string>\",\n \"proposed_account\": \"phone costs\",\n \"customer_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}HttpResponse<String> response = Unirest.post("https://api.app.lastaccountingcompany.com/portal/books/declarations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"row_id\": \"g-phone\",\n \"resource_uri\": \"<string>\",\n \"resource_revision\": \"<string>\",\n \"note\": \"<string>\",\n \"proposed_account\": \"phone costs\",\n \"customer_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/books/declarations")
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"] = 'application/json'
request.body = "{\n \"row_id\": \"g-phone\",\n \"resource_uri\": \"<string>\",\n \"resource_revision\": \"<string>\",\n \"note\": \"<string>\",\n \"proposed_account\": \"phone costs\",\n \"customer_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"event_id": "<string>",
"declaration": {
"id": "<string>",
"row_id": "<string>",
"kind": "<string>",
"note": "<string>",
"proposed_account": "<string>",
"created_at": "<string>"
},
"status": {
"value": "Reviewing"
}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Authorizations
Portal API key minted in portal Settings → API access. Scope read or write; pinned to one company. Send as Authorization: Bearer lac_sk_....
Body
Display context from the selected row; never resolved as canonical identity.
"g-phone"
Server-authored resource_ref.uri of the selected bank transaction.
Server-authored resource_ref.revision of the selected bank transaction.
Which answer this is. split must carry the parts in note; reclassify must carry proposed_account.
no_receipt, private, split, reclassify Free-text detail. Required for split (name the parts).
For reclassify only: what the row should be, in your own words ("phone costs"). It is NOT an account code — Björn maps it onto the chart of accounts. Maximum 200 characters; put longer detail in note.
200"phone costs"
Target company. Optional for API keys.