Skip to the page
Docs menu

Docs API reference

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

FieldDescription
id requiredstring, pathGroup id.
statusactive \| removed, queryFilter by item status.
speciesstring, queryFilter by species code.
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

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

Response

JSON
// 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
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.
503api_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

FieldDescription
id requiredstring, pathGroup id.

Body

FieldDescription

Request

TypeScript
const result = await timbereye.groups.items.add("grp_7QxV3m", { tags: ["TE-4F7K2Q1", "TE-4F7K2Q2"] })
curl
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"]}'
CLI
timbereye groups items add grp_7QxV3m \
  --data '{"tags":["TE-4F7K2Q1","TE-4F7K2Q2"]}' \
  --json

Response

JSON
// 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
StatusWhen
400invalid_request_error: the request was malformed or a field was invalid.
401authentication_error: missing, malformed, expired or revoked key.
402invalid_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.
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.
503api_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

FieldDescription
id requiredstring, pathGroup id.

Body

FieldDescription

Request

TypeScript
const result = await timbereye.groups.items.remove("grp_7QxV3m", { tags: ["TE-4F7K2Q1", "TE-4F7K2Q2"] })
curl
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"]}'
CLI
timbereye groups items remove grp_7QxV3m \
  --data '{"tags":["TE-4F7K2Q1","TE-4F7K2Q2"]}' \
  --yes \
  --json

Response

JSON
// 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
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.
503api_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

FieldDescription
id requiredstring, pathGroup id.

Body

FieldDescription
selector requiredBulkUpdateSelectorWhich 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.allbooleantrue selects every active item in the group.
selector.item_idsarray of stringSelect these items.
selector.tagsarray of stringSelect items carrying these tag payloads.
selector.scan_idstringSelect items created by this scan.
selector.speciesstringSelect items of this species code.
patch requiredItemPatchAttributes 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.speciesstringSpecies code from your catalogue.
patch.lengthItemLengthInputLength 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.gradestringGrade, free text such as A; your own grading. null clears it.
patch.diameter_class_mnumberNominal diameter class in metres. Records an assigned measurement on items that have no measurement better than assigned.
patch.metadataMetadataFree-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

TypeScript
const result = await timbereye.groups.items.bulkUpdate("grp_7QxV3m", { selector: { scanId: "scn_2Pq8" }, patch: { length: { valueM: 5.8 } } })
curl
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 } }
  }'
CLI
timbereye groups items bulk-update grp_7QxV3m \
  --data '{"selector":{"scan_id":"scn_2Pq8"},"patch":{"length":{"value_m":5.8}}}' \
  --yes \
  --json

Response

JSON
// 200
{
  "object": "bulk_update_result",
  "livemode": true,
  "matched": 142,
  "updated": 142
}
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.
503api_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.