Skip to the page
Docs menu

Docs API reference

REST API

Overview of the Timbereye REST API - base URL, test and live, authentication and key types, request and response conventions - with links to each resource's reference page.

Reference for all three steps. Each resource page below says which calls you make to Create, Scan and Sync.

The API is JSON over HTTPS. The OpenAPI 3.1 document, timbereye.v1.yaml, is the source of truth; the resource pages are generated from it.

Base URL, test and live#

Text
https://api.timbereye.com/v1

There is one base URL. The key decides the mode: a te_test_ key sees only the test account, a te_live_ key only the live one, and test and live data never mix. Every object carries livemode. Test mode is free and has the simulator; an owner turns live mode on in the console by accepting the terms and adding a card. See Going live.

Authentication#

Send a key as a bearer token. The account behind the key:

TypeScript
const timbereye = new Timbereye() // reads TIMBEREYE_SECRET_KEY
const account = await timbereye.account.retrieve()
curl
curl https://api.timbereye.com/v1/account \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"
CLI
timbereye account get --json
JSON
{
    "id": "acct_1Fq8Zt",
    "object": "account",
    "livemode": false,
    "mode": "test",
    "display_units": "metric",
    "default_volume_rule": "jas"
}
CredentialLooks likeWhere it livesReach
Secret keyte_test_sk_...Your server onlyEverything in the account
Restricted keyte_test_rk_...Your server, a script or CIThe scopes you gave it (groups:write, scans:write)
Capture tokente_test_ct_...A phone, for a short timeScanning into the groups your server minted it for
Publishable keyte_test_pk_...Built into your appCapture only, with daily limits; never reads your data

No key gives 401 authentication_required; a key without the scope gives 403 scope_missing. Keys, scopes and capture tokens are in Keys.

A request with a publishable key also sends Timbereye-Installation-Id, a lowercase UUID the app creates once per install (required: 400 installation_id_required without it), and Timbereye-App-Id, the bundle id or package name (required when the key restricts apps). The mobile SDKs send both. See Keys.

Conventions#

  • JSON in and out, UTF-8. Field names are snake_case. POST /groups also accepts form encoding.
  • ID prefixes say the type: grp_ group, itm_ item (a piece: a log), msr_ measurement, scn_ scan, img_ image, plc_ place, spc_ species, tgb_ tag batch, lbt_ label template, evt_ event, whk_ webhook endpoint, whd_ webhook delivery, acct_ account. Every object has id, object and livemode.
  • Units the API uses: sawlog lengths and diameters in metres (value_m, diameter_short_m), volume in cubic metres (m3), weight in kilograms (net_kg). Inputs may carry a unit ({ "value": 19, "unit": "ft" }); a bare ton is refused as ambiguous. Lumber and panel sizes keep the unit they were entered in, such as { "value": 2, "unit": "in" }, with board feet beside nominal m³.
  • Timestamps are ISO 8601 in UTC (2027-02-03T14:41:09Z).
  • How much metadata you can attach: it is your own string map on groups, items, scans and places, up to 50 keys, keys up to 40 characters, values up to 500. GET /groups?metadata[booking]=B123 filters on it.
  • expand[] on some reads embeds a related object, for example GET /groups/{id}?expand[]=origin_place. Each resource lists what it allows.
  • version on a group increases with every change. Send it as If-Match to avoid overwriting someone else's edit (412 version_mismatch).
  • Unknown fields and enum values may appear within v1. Ignore them. Breaking changes need a new major version.

Idempotency, errors and paging#

  • Every POST that changes state needs an Idempotency-Key header; a retry with the same key returns the first result.
  • Every error has one shape, { "error": { "type", "code", "message", "param", "request_id" } }; switch on code.
  • Lists are cursor-paginated with limit and starting_after.
  • Every response has a Request-Id header. Rate limits are per account and per second.

All of it, with every error code: Errors, idempotency and pagination.

Resources#

ResourceWhat it is for
GroupsCreate: the container, truck load or stack; open one by reference
Group itemsMove logs into and out of a group; change many at once
ItemsRead: the pieces
MeasurementsA log's measurement history; manual overrides
VolumeVolume of a group or a log under a rule; the rules
OriginA group's origin places as GeoJSON
ScansScan: the record of a sitting of scanning. The scanner calls these
ImagesPhotos of groups and log ends
Capture tokensScan: short-lived credentials for phones
EventsSync: the event feed, and the webhook payloads
Webhook endpointsSync: where events are sent
PlacesTracts, yards, mills and ports, with geometry checks
SpeciesYour species catalogue
Test modeThe simulator
ModelsThe log detector download for phones
UsageWhat has been counted for billing
AccountYour account, mode and defaults
API keysKey management, from the developer console
TeamMembers and invitations, from the developer console
Audit logWho did what in the account; console only, never an API key

The TypeScript SDK has one method per operation: see TypeScript SDK. The CLI has one command per operation: see Command line.