Skip to main content

Business Objects Overview

Read the current state and decision history of invoices, loads, payments, contracts, leases and ledger rows, and record a decision, via /v1/objects.

Business objects hold the decisions the apps record: an invoice paid, a load ready to bill, a lease checked, a ledger row resolved. Each object has a type, a key, a current state and a history of decisions with who made them and the evidence.

Read the counts per state, the objects in one state, or one object with its history. POST /v1/objects/{type}/{key}/events records a decision; it is attributed to the credential (actor_kind: app), never to a person. Reads need read (or records:read); recording needs records:write, and the person behind the credential must be allowed to edit.

cURL: record a decision on a lease

curl -X POST "https://api.talonic.com/v1/objects/lease/LEASE-0042/events" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to_state": "checked", "note": "Rent matches the indexation clause."}'

Endpoints

GET/v1/objects/recent

Parameters

limitintegerHow many, 50 by default.
GET/v1/objects/{type}

Parameters

type*stringPath. The object type, e.g. invoice, load, payment, money_found_row.
statestringA state, e.g. paid.
limitintegerAt most this many objects (200 by default).
offsetintegerObjects to skip.
GET/v1/objects/{type}/{key}

Parameters

type*stringPath. The object type.
key*stringPath. The object key.
POST/v1/objects/{type}/{key}/events

Parameters

type*stringPath. The object type.
key*stringPath. The object key.

Body

to_state*stringThe new state (lowercase, letters, digits and underscores).
from_statestringThe state the caller expects the object to be in.
notestringA note, at most 2,000 characters.
evidencearrayPointers to what backs the decision: document_id + field, or reference_data_id, each with a label.

Frequently asked questions

Which object types exist?+
Every type an app records, such as invoice, load, payment, deduction, lease and money_found_row. GET /v1/objects/recent shows the latest decisions across types.