Skip to the page
Docs menu

Docs API reference

Species

Per-account species catalogue.

The species object#

An entry in the per-account species catalogue. It is the global default list plus the species you add (okoume, sapelli, ayous). Codes outside the global list are valid once they are in your catalogue.

FieldDescription
idstringUnique identifier, prefixed spc_. Global species have readable ids such as spc_seed_PINE_TAEDA.
objectspeciesString representing the object type. Always species.
livemodebooleantrue for objects in the live account, false for objects in the test account. Test and live data never mix.
codestringSpecies code used everywhere else in the API, for example on items and group defaults.
trade_namestringTrade name.
scientific_namestring, nullableScientific name.
default_density_kg_m3number, nullableDefault wood density in kg per cubic metre, used for weight checks and rules that need it.
scopeglobal \| accountglobal entries are Timbereye's defaults and are read-only. account entries belong to your account and can be edited.
created_atstringCreation time.

List species#

GET/v1/species

Returns the catalogue: global defaults plus your own species.

Keys: secret key; restricted key with species:read; capture token (Allowed); publishable key (Allowed (the spec sheet's catalogue)).

Parameters

FieldDescription
limitinteger, queryPage size, 1 to 100.
starting_afterstring, queryOpaque cursor: pass the next_cursor of the previous page. Results are ordered by (created_at, id).
expand[]array of string, queryReplace an id field with the full object, e.g. expand[]=origin_place. Allowed values are listed on each resource.

Request

A phone does not call this itself: the Swift and Kotlin SDKs make this call for the scanner, with the app's key. See Scan in your app. The samples are for your server.

TypeScript
for await (const species of timbereye.species.list()) {
    // every page, one at a time
}
curl
curl https://api.timbereye.com/v1/species \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"
CLI
timbereye species list --json

Response

JSON
// 200
{
  "object": "list",
  "data": [
    {
      "id": "spc_seed_PINE_TAEDA",
      "object": "species",
      "livemode": true,
      "code": "PINE_TAEDA",
      "trade_name": "Loblolly pine",
      "scientific_name": "Pinus taeda",
      "default_density_kg_m3": 560,
      "scope": "global",
      "created_at": "2026-06-01T00:00:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.

Add a species#

POST/v1/species

Adds a species to your account's catalogue.

Keys: secret key; restricted key with species:write.

Body

FieldDescription
code requiredstringUnique species code within your account.
trade_name requiredstringTrade name.
scientific_namestringScientific name.
default_density_kg_m3numberDefault density in kg per cubic metre.

Request

TypeScript
const result = await timbereye.species.create({
    code: "OKOUME",
    tradeName: "Okoume",
    scientificName: "Aucoumea klaineana",
    defaultDensityKgM3: 440,
})
curl
curl -X POST https://api.timbereye.com/v1/species \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "OKOUME",
    "trade_name": "Okoume",
    "scientific_name": "Aucoumea klaineana",
    "default_density_kg_m3": 440
  }'
CLI
timbereye species create \
  --code OKOUME \
  --trade-name Okoume \
  --scientific-name 'Aucoumea klaineana' \
  --data '{"default_density_kg_m3":440}' \
  --json

Response

JSON
// 200
{
  "id": "spc_3Kd9Pq",
  "object": "species",
  "livemode": true,
  "code": "OKOUME",
  "trade_name": "Okoume",
  "scientific_name": "Aucoumea klaineana",
  "default_density_kg_m3": 440,
  "scope": "account",
  "created_at": "2027-01-20T10:00:00Z"
}
Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
409invalid_request_error: idempotency_key_reused, idempotency_request_in_progress, group_not_empty, group_billed, place_in_use, resource_exists, place_name_taken or another state conflict.
413invalid_request_error, payload_too_large: the upload is over the size limit (10 MB for multipart).
422invalid_request_error: the request was well formed but cannot be applied. Codes: group_cycle, group_depth_exceeded, unit_ambiguous, weight_inconsistent, area_ha_not_allowed, assignment_required.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.

Update a species#

PATCH/v1/species/{id}

Changes an account-owned species. Global defaults cannot be changed (403).

Keys: secret key; restricted key with species:write.

Parameters

FieldDescription
id requiredstring, pathSpecies id.

Body

FieldDescription
trade_namestringTrade name.
scientific_namestringScientific name.
default_density_kg_m3numberDefault density in kg per cubic metre.

Request

TypeScript
const result = await timbereye.species.update("spc_3Kd9Pq", { defaultDensityKgM3: 450 })
curl
curl -X PATCH https://api.timbereye.com/v1/species/spc_3Kd9Pq \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"default_density_kg_m3":450}'
CLI
timbereye species update spc_3Kd9Pq --data '{"default_density_kg_m3":450}' --json

Response

JSON
// 200
{
  "id": "spc_3Kd9Pq",
  "object": "species",
  "livemode": true,
  "code": "OKOUME",
  "trade_name": "Okoume",
  "scientific_name": "Aucoumea klaineana",
  "default_density_kg_m3": 450,
  "scope": "account",
  "created_at": "2027-01-20T10:00:00Z"
}
Errors
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
403permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you.
404invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404.
409invalid_request_error: idempotency_key_reused, idempotency_request_in_progress, group_not_empty, group_billed, place_in_use, resource_exists, place_name_taken or another state conflict.
413invalid_request_error, payload_too_large: the upload is over the size limit (10 MB for multipart).
422invalid_request_error: the request was well formed but cannot be applied. Codes: group_cycle, group_depth_exceeded, unit_ambiguous, weight_inconsistent, area_ha_not_allowed, assignment_required.
429rate_limit_error: slow down and retry after the Retry-After delay.
500api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key.