Logs in a group
Membership and bulk edits.
List the items in a group#
GET/v1/groups/{id}/items
Returns the group's active items, oldest first. An item that moved to another group is listed there; its history keeps this group (GET /items/{id}/groups).
Keys: secret key; restricted key with groups:read or items:read.
Parameters
| Field | Description |
|---|---|
id requiredstring, path | Group id. |
statusactive \| removed, query | Filter by item status. |
speciesstring, query | Filter by species code. |
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
for await (const log of timbereye.groups.items.list("grp_7QxV3m")) {
// every page, one at a time
}curl https://api.timbereye.com/v1/groups/grp_7QxV3m/items \
-H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"timbereye groups items list grp_7QxV3m --jsonResponse
// 200
{
"object": "list",
"data": [
{
"id": "itm_5Lw2Nc",
"object": "item",
"livemode": true,
"client_id": null,
"type": "log",
"group_id": "grp_7QxV3m",
"tag": {
"payload": "DEMO-0001",
"symbology": "qr",
"side_mm": 62
},
"species": "PINE_TAEDA",
"length": {
"value_m": 5.8,
"source": "operator",
"entered": { "value": 5.8, "unit": "m" }
},
"grade": null,
"weight": null,
"measurement": {
"id": "msr_8Rt4Vb",
"object": "measurement",
"livemode": true,
"item_id": "itm_5Lw2Nc",
"stage": "server_refined",
"method": "qr_scale",
"diameter_short_m": 0.477,
"diameter_long_m": 0.492,
"adjustments": [],
"effective_short_m": 0.477,
"effective_long_m": 0.492,
"perimeter": [
[0.21, 0.5],
[0.5, 0.2],
[0.8, 0.5],
[0.5, 0.81]
],
"scale": {
"source": "qr_tag",
"side_mm": 62,
"m_per_unit_x": 0.81,
"m_per_unit_y": 0.8
},
"quality": {
"confidence": 0.94,
"rejection_gates": {}
},
"provenance": {
"detector": {
"id": "log-detector",
"version": "2.1.0"
},
"segmenter": {
"id": "log-segmenter",
"version": "1.3.0"
},
"sdk_version": "timbereye-ios 1.4.0",
"app_version": "3.2.1",
"device_model": "iPhone15,3",
"os": "iOS 18.2",
"actor": {
"type": "system",
"id": null
}
},
"reason": null,
"image_id": "img_K3s9",
"scan_id": "scn_9a2Lk",
"created_at": "2027-02-03T14:40:52Z"
},
"refinement": { "status": "succeeded" },
"outline": {
"status": "ready",
"reason": null,
"source": "segmentation",
"points": [
[0.21, 0.5],
[0.5, 0.17],
[0.79, 0.5],
[0.5, 0.83]
],
"measurement_id": "msr_8Rt4Vb",
"segmenter": {
"id": "vertex-sawlog-segmentation",
"version": "unknown"
}
},
"status": "active",
"scan_id": "scn_9a2Lk",
"origin": null,
"measured": null,
"metadata": {},
"created_at": "2027-02-03T14:12:40Z"
}
],
"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. |
503 | api_error: isolation_unavailable (the resource's account isolation is not in place), service_unavailable (for example image storage not available in this environment) or model_unavailable (no on-device detector to offer in this environment). Retry later. |
Add items to a group#
POST/v1/groups/{id}/items/add
Moves items into the group by id or tag payload (at most 500 ids and tags together). A tag payload that matches no item creates the item, as a qr_count scan with intent add does: from the group's defaults (species, length, diameter class, grade) with an assigned measurement, or 422 assignment_required when the spec cannot supply them; the items belong to an implicit completed qr_count scan. An item already in the group is left alone. The move is recorded in the item's history. All of it happens in one transaction: if any item is refused, nothing changes. Emits item.updated for moved items, item.created for new ones and group.updated for every group whose items changed.
Keys: secret key; restricted key with groups:write.
Parameters
| Field | Description |
|---|---|
id requiredstring, path | Group id. |
Body
| Field | Description |
|---|
Request
const result = await timbereye.groups.items.add("grp_7QxV3m", { tags: ["TE-4F7K2Q1", "TE-4F7K2Q2"] })curl -X POST https://api.timbereye.com/v1/groups/grp_7QxV3m/items/add \
-H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"tags":["TE-4F7K2Q1","TE-4F7K2Q2"]}'timbereye groups items add grp_7QxV3m \
--data '{"tags":["TE-4F7K2Q1","TE-4F7K2Q2"]}' \
--jsonResponse
// 200
{
"id": "grp_7QxV3m",
"object": "group",
"livemode": true,
"client_id": null,
"kind": "container",
"name": "MSKU1234567",
"external_ref": "ctr_4821",
"parent_id": null,
"origin_place_id": "plc_4Hk2pT",
"origin": {
"place_id": "plc_4Hk2pT",
"source": "assigned",
"determined_at": "2027-02-03T14:00:00Z",
"assigned_by": { "type": "key", "id": "key_1a2B3c" },
"evidence": null
},
"defaults": {
"species": "PINE_TAEDA",
"length_m": 11.8,
"grade": null,
"diameter_class_m": null
},
"weight": null,
"summary": {
"items": 0,
"measured": 0,
"refined": 0,
"volume": { "rule": "jas", "m3": 0 },
"net_kg": null,
"density_kg_m3": null,
"weight_allocation": "none",
"assigned_count": 0
},
"version": 0,
"metadata": { "erp_booking": "BK-2231" },
"created_at": "2027-02-03T14:05:11Z"
}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. |
402 | invalid_request_error: new live work is refused for billing. payment_overdue: an invoice is unpaid past its grace period; pay it or change the card in the console (Billing). spend_cap_reached: the monthly spend cap set to pause is reached; raise it or wait for the next month. Reads, and finishing scans already started, still work. |
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. |
503 | api_error: isolation_unavailable (the resource's account isolation is not in place), service_unavailable (for example image storage not available in this environment) or model_unavailable (no on-device detector to offer in this environment). Retry later. |
Remove items from a group#
POST/v1/groups/{id}/items/remove
Takes items out of the group by id or tag payload (at most 500 together). The items keep existing and become detached (group_id null); the move is in their history and they emit item.updated. A tag or id that is not an active item of this group is a 404, and nothing changes. Use DELETE /items/{id} to mark an item removed.
Keys: secret key; restricted key with groups:write.
Parameters
| Field | Description |
|---|---|
id requiredstring, path | Group id. |
Body
| Field | Description |
|---|
Request
const result = await timbereye.groups.items.remove("grp_7QxV3m", { tags: ["TE-4F7K2Q1", "TE-4F7K2Q2"] })curl -X POST https://api.timbereye.com/v1/groups/grp_7QxV3m/items/remove \
-H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"tags":["TE-4F7K2Q1","TE-4F7K2Q2"]}'timbereye groups items remove grp_7QxV3m \
--data '{"tags":["TE-4F7K2Q1","TE-4F7K2Q2"]}' \
--yes \
--jsonResponse
// 200
{
"id": "grp_7QxV3m",
"object": "group",
"livemode": true,
"client_id": null,
"kind": "container",
"name": "MSKU1234567",
"external_ref": "ctr_4821",
"parent_id": null,
"origin_place_id": "plc_4Hk2pT",
"origin": {
"place_id": "plc_4Hk2pT",
"source": "assigned",
"determined_at": "2027-02-03T14:00:00Z",
"assigned_by": { "type": "key", "id": "key_1a2B3c" },
"evidence": null
},
"defaults": {
"species": "PINE_TAEDA",
"length_m": 11.8,
"grade": null,
"diameter_class_m": null
},
"weight": null,
"summary": {
"items": 0,
"measured": 0,
"refined": 0,
"volume": { "rule": "jas", "m3": 0 },
"net_kg": null,
"density_kg_m3": null,
"weight_allocation": "none",
"assigned_count": 0
},
"version": 0,
"metadata": { "erp_booking": "BK-2231" },
"created_at": "2027-02-03T14:05:11Z"
}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. |
503 | api_error: isolation_unavailable (the resource's account isolation is not in place), service_unavailable (for example image storage not available in this environment) or model_unavailable (no on-device detector to offer in this environment). Retry later. |
Change many items at once#
POST/v1/groups/{id}/items/bulk_update
Applies one patch (species, length, grade, diameter class, metadata) to the items the selector matches (keys combine with AND; at most 500 matched). Values set this way carry source: bulk; length changes recompute volume and reallocate the group's weight. Answers { matched, updated }: updated counts items that actually changed. Emits item.updated for each changed item.
Keys: secret key; restricted key with items:write.
Parameters
| Field | Description |
|---|---|
id requiredstring, path | Group id. |
Body
| Field | Description |
|---|---|
selector requiredBulkUpdateSelector | Which items the patch applies to, among the group's active items that your account owns. Supply at least one key (all: true selects every item); when several are supplied an item must match all of them. At most 500 items may be matched in one request, otherwise the request is refused with limit_exceeded; narrow the selector. |
selector.allboolean | true selects every active item in the group. |
selector.item_idsarray of string | Select these items. |
selector.tagsarray of string | Select items carrying these tag payloads. |
selector.scan_idstring | Select items created by this scan. |
selector.speciesstring | Select items of this species code. |
patch requiredItemPatch | Attributes to change. Length updates recompute the volume and the item's commodity match. A diameter class applies only to items whose best measurement is assigned (or that have none): PATCH /items/{id} answers 409 state_conflict for any other item, a bulk update leaves those items' diameters alone. Values set by PATCH /items/{id} get source: operator, by a bulk update source: bulk; a later group default change with apply_to_existing: defaulted overwrites neither. |
patch.speciesstring | Species code from your catalogue. |
patch.lengthItemLengthInput | Length input for items: { value, unit } or { value_m }, optionally with source. source is normally set by the server (operator on PATCH /items/{id}, bulk on bulk update). A capture client may send operator (the user typed the length; the default when source is omitted), group_default (the length was taken from the group spec the host app supplied) or measured (a device measured it); the server validates the value, stores it as sent and does not compare the number with the group spec. bulk is refused with 400 parameter_invalid. Omit the length entirely to get the group's default length with source group_default. |
patch.gradestring | Grade, free text such as A; your own grading. null clears it. |
patch.diameter_class_mnumber | Nominal diameter class in metres. Records an assigned measurement on items that have no measurement better than assigned. |
patch.metadataMetadata | Free-form string map for your own data (an ERP booking number, a yard row). At most 50 keys; keys up to 40 characters; values up to 500 characters. Use this instead of asking for customer-specific fields. On update, supplied keys are merged into the existing map and a key set to an empty string is removed. |
Request
const result = await timbereye.groups.items.bulkUpdate("grp_7QxV3m", { selector: { scanId: "scn_2Pq8" }, patch: { length: { valueM: 5.8 } } })curl -X POST https://api.timbereye.com/v1/groups/grp_7QxV3m/items/bulk_update \
-H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"selector": { "scan_id": "scn_2Pq8" },
"patch": { "length": { "value_m": 5.8 } }
}'timbereye groups items bulk-update grp_7QxV3m \
--data '{"selector":{"scan_id":"scn_2Pq8"},"patch":{"length":{"value_m":5.8}}}' \
--yes \
--jsonResponse
// 200
{
"object": "bulk_update_result",
"livemode": true,
"matched": 142,
"updated": 142
}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. |
503 | api_error: isolation_unavailable (the resource's account isolation is not in place), service_unavailable (for example image storage not available in this environment) or model_unavailable (no on-device detector to offer in this environment). Retry later. |