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.
| Field | Description |
|---|---|
idstring | Unique identifier, prefixed spc_. Global species have readable ids such as spc_seed_PINE_TAEDA. |
objectspecies | String representing the object type. Always species. |
livemodeboolean | true for objects in the live account, false for objects in the test account. Test and live data never mix. |
codestring | Species code used everywhere else in the API, for example on items and group defaults. |
trade_namestring | Trade name. |
scientific_namestring, nullable | Scientific name. |
default_density_kg_m3number, nullable | Default wood density in kg per cubic metre, used for weight checks and rules that need it. |
scopeglobal \| account | global entries are Timbereye's defaults and are read-only. account entries belong to your account and can be edited. |
created_atstring | Creation 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
| Field | Description |
|---|---|
limitinteger, query | Page size, 1 to 100. |
starting_afterstring, query | Opaque cursor: pass the next_cursor of the previous page. Results are ordered by (created_at, id). |
expand[]array of string, query | Replace 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.
for await (const species of timbereye.species.list()) {
// every page, one at a time
}curl https://api.timbereye.com/v1/species \
-H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"timbereye species list --jsonResponse
// 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
| Status | When |
|---|---|
400 | invalid_request_error: the request was malformed or a field was invalid. |
401 | authentication_error: missing, malformed, expired or revoked key. |
403 | permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you. |
404 | invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404. |
429 | rate_limit_error: slow down and retry after the Retry-After delay. |
500 | api_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
| Field | Description |
|---|---|
code requiredstring | Unique species code within your account. |
trade_name requiredstring | Trade name. |
scientific_namestring | Scientific name. |
default_density_kg_m3number | Default density in kg per cubic metre. |
Request
const result = await timbereye.species.create({
code: "OKOUME",
tradeName: "Okoume",
scientificName: "Aucoumea klaineana",
defaultDensityKgM3: 440,
})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
}'timbereye species create \
--code OKOUME \
--trade-name Okoume \
--scientific-name 'Aucoumea klaineana' \
--data '{"default_density_kg_m3":440}' \
--jsonResponse
// 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
| Status | When |
|---|---|
400 | invalid_request_error: the request was malformed or a field was invalid. |
401 | authentication_error: missing, malformed, expired or revoked key. |
403 | permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you. |
404 | invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404. |
409 | invalid_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. |
413 | invalid_request_error, payload_too_large: the upload is over the size limit (10 MB for multipart). |
422 | invalid_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. |
429 | rate_limit_error: slow down and retry after the Retry-After delay. |
500 | api_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
| Field | Description |
|---|---|
id requiredstring, path | Species id. |
Body
| Field | Description |
|---|---|
trade_namestring | Trade name. |
scientific_namestring | Scientific name. |
default_density_kg_m3number | Default density in kg per cubic metre. |
Request
const result = await timbereye.species.update("spc_3Kd9Pq", { defaultDensityKgM3: 450 })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}'timbereye species update spc_3Kd9Pq --data '{"default_density_kg_m3":450}' --jsonResponse
// 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
| Status | When |
|---|---|
400 | invalid_request_error: the request was malformed or a field was invalid. |
401 | authentication_error: missing, malformed, expired or revoked key. |
403 | permission_error: the key lacks the scope, the capture token is limited to other groups, or the resource is read-only to you. |
404 | invalid_request_error, resource_missing: no such object. Objects in another account are also reported as 404. |
409 | invalid_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. |
413 | invalid_request_error, payload_too_large: the upload is over the size limit (10 MB for multipart). |
422 | invalid_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. |
429 | rate_limit_error: slow down and retry after the Retry-After delay. |
500 | api_error: something went wrong on our side. Safe to retry with the same Idempotency-Key. |