Skip to the page
Docs menu

Docs API reference

Places

Tracts, landings, yards, mills, ports.

The place object#

A location: a tract, landing, yard, mill or port. Used as a group's origin. Ports shared across accounts are readable but cannot be modified; writing to one is a 403 permission_error with code shared_resource_read_only. Names are unique among an account's active places (409 place_name_taken).

FieldDescription
idstringUnique identifier, prefixed plc_.
objectplaceString representing the object type. Always place.
livemodebooleantrue for objects in the live account, false for objects in the test account. Test and live data never mix.
client_idstring, nullableCaller-chosen identifier. Places do not store one yet, so this is always null; it is kept so the shape matches the other resources.
typeenum (tract, landing, yard, mill, port, warehouse, other)What the place is.
namestringDisplay name.
external_refstring, nullableYour own reference for the place.
pointLatLonA WGS84 point.
point.latnumberLatitude, WGS84 degrees.
point.lonnumberLongitude, WGS84 degrees.
geometryGeometry, nullableGeoJSON geometry: Point, Polygon or MultiPolygon. WGS84 only.
area_hanumber, nullableArea in hectares. Computed from geometry for a Polygon or MultiPolygon; the value you stated (area_ha on create or update) for a Point or a place with no geometry; null when neither exists.
eudrEudrValidationEUDR validation of geometry. A place with no geometry is valid unless it is known to exceed 4 ha (the origin export still flags a bare point with no stated area, see GET /groups/{id}/origin).
eudr.validbooleantrue when the geometry satisfies the EU Deforestation Regulation GeoJSON description: WGS84, closed rings, at least four positions per ring, at most six decimals, no self-intersections, and a Polygon (not a Point) for plots above 4 hectares.
eudr.issuesarray of EudrIssueWhy the geometry is not valid. Empty when valid is true.
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.
created_atstringCreation time.
sharedbooleantrue for a port Timbereye shares with every account: readable and usable as an origin, but not yours to change or delete. false for your own places.
JSON
{
  "id": "plc_4Hk2pT",
  "object": "place",
  "livemode": true,
  "client_id": null,
  "type": "tract",
  "name": "Tract 14 North",
  "external_ref": "T-14N",
  "point": { "lat": 31.905, "lon": -82.405 },
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [-82.41, 31.9],
        [-82.4, 31.9],
        [-82.4, 31.91],
        [-82.41, 31.91],
        [-82.41, 31.9]
      ]
    ]
  },
  "area_ha": 105.1,
  "eudr": { "valid": true, "issues": [] },
  "metadata": {},
  "created_at": "2027-01-28T09:30:00Z",
  "shared": false
}

Create a place#

POST/v1/places

Creates a tract, landing, yard, mill, port or warehouse. Geometry is validated for EUDR and coordinates are rounded to six decimals. A Point or a place without geometry may state area_ha; a Polygon or MultiPolygon has its area computed and a stated area_ha is 422 area_ha_not_allowed.

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

Body

FieldDescription
type requiredenum (tract, landing, yard, mill, port, warehouse, other)What the place is.
name requiredstringDisplay name.
external_refstringYour own reference.
point requiredLatLonA WGS84 point.
point.lat requirednumberLatitude, WGS84 degrees.
point.lon requirednumberLongitude, WGS84 degrees.
geometryGeometryGeoJSON geometry: Point, Polygon or MultiPolygon. WGS84 only.
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.
area_hanumberArea in hectares that you state, for a place whose geometry is a Point or that has no geometry; the 4 ha rule then applies to it (above 4 ha, eudr.valid is false until the place has a Polygon or MultiPolygon). For a Polygon or MultiPolygon the area is computed and a stated area_ha is rejected with 422 area_ha_not_allowed.

Request

TypeScript
const result = await timbereye.places.create({
    type: "tract",
    name: "Tract 14 North",
    externalRef: "T-14N",
    point: { lat: 31.905, lon: -82.405 },
    geometry: {
        type: "Polygon",
        coordinates: [[[-82.41, 31.9], [-82.4, 31.9], [-82.4, 31.91], [-82.41, 31.91], [-82.41, 31.9]]],
    },
})
curl
curl -X POST https://api.timbereye.com/v1/places \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "tract",
    "name": "Tract 14 North",
    "external_ref": "T-14N",
    "point": { "lat": 31.905, "lon": -82.405 },
    "geometry": {
      "type": "Polygon",
      "coordinates": [
        [
          [-82.41, 31.9],
          [-82.4, 31.9],
          [-82.4, 31.91],
          [-82.41, 31.91],
          [-82.41, 31.9]
        ]
      ]
    }
  }'
CLI
timbereye places create \
  --type tract \
  --name 'Tract 14 North' \
  --external-ref T-14N \
  --geometry '{"type":"Polygon","coordinates":[[[-82.41,31.9],[-82.4,31.9],[-82.4,31.91],[-82.41,31.91],[-82.41,31.9]]]}' \
  --data '{"point":{"lat":31.905,"lon":-82.405}}' \
  --json

Response

JSON
// 200
{
  "id": "plc_4Hk2pT",
  "object": "place",
  "livemode": true,
  "client_id": null,
  "type": "tract",
  "name": "Tract 14 North",
  "external_ref": "T-14N",
  "point": { "lat": 31.905, "lon": -82.405 },
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [-82.41, 31.9],
        [-82.4, 31.9],
        [-82.4, 31.91],
        [-82.41, 31.91],
        [-82.41, 31.9]
      ]
    ]
  },
  "area_ha": 105.1,
  "eudr": { "valid": true, "issues": [] },
  "metadata": {},
  "created_at": "2027-01-28T09:30:00Z",
  "shared": false
}
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.

List places#

GET/v1/places

Returns your places and the ports Timbereye shares, newest first. owner=account returns only your own places; owner=shared only the shared ports.

Keys: secret key; restricted key with places:read.

Parameters

FieldDescription
qstring, querySearch. A place id (plc_…) finds that place; any other text is found, ignoring case, anywhere in the name or the external reference.
typeenum (tract, landing, yard, mill, port, warehouse, other), queryFilter by type.
external_refstring, queryFilter by external reference.
owneraccount \| shared, queryaccount for only your own places, shared for only the ports Timbereye shares. Both when omitted.
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 place of timbereye.places.list()) {
    // every page, one at a time
}
curl
curl https://api.timbereye.com/v1/places \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"
CLI
timbereye places list --json

Response

JSON
// 200
{
  "object": "list",
  "data": [
    {
      "id": "plc_4Hk2pT",
      "object": "place",
      "livemode": true,
      "client_id": null,
      "type": "tract",
      "name": "Tract 14 North",
      "external_ref": "T-14N",
      "point": { "lat": 31.905, "lon": -82.405 },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [-82.41, 31.9],
            [-82.4, 31.9],
            [-82.4, 31.91],
            [-82.41, 31.91],
            [-82.41, 31.9]
          ]
        ]
      },
      "area_ha": 105.1,
      "eudr": { "valid": true, "issues": [] },
      "metadata": {},
      "created_at": "2027-01-28T09:30:00Z",
      "shared": false
    }
  ],
  "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.

Validate a geometry#

POST/v1/places/validate

Checks a GeoJSON geometry against the EUDR rules without saving anything. It only computes, so Idempotency-Key is ignored here.

Keys: secret key; restricted key with places:read.

Body

FieldDescription
geometry requiredGeometryGeoJSON geometry: Point, Polygon or MultiPolygon. WGS84 only.

Request

TypeScript
const result = await timbereye.places.validate({
    geometry: {
        type: "Polygon",
        coordinates: [[[-82.41, 31.9], [-82.4, 31.9], [-82.4, 31.91], [-82.41, 31.91], [-82.41, 31.9]]],
    },
})
curl
curl -X POST https://api.timbereye.com/v1/places/validate \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "geometry": {
      "type": "Polygon",
      "coordinates": [
        [
          [-82.41, 31.9],
          [-82.4, 31.9],
          [-82.4, 31.91],
          [-82.41, 31.91],
          [-82.41, 31.9]
        ]
      ]
    }
  }'
CLI
timbereye places validate \
  --geometry '{"type":"Polygon","coordinates":[[[-82.41,31.9],[-82.4,31.9],[-82.4,31.91],[-82.41,31.91],[-82.41,31.9]]]}' \
  --json

Response

JSON
// 200
{
  "object": "place_validation",
  "livemode": true,
  "eudr": { "valid": true, "issues": [] },
  "normalized_geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [-82.41, 31.9],
        [-82.4, 31.9],
        [-82.4, 31.91],
        [-82.41, 31.91],
        [-82.41, 31.9]
      ]
    ]
  },
  "area_ha": 105.1
}
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.

Retrieve a place#

GET/v1/places/{id}

Returns one place.

Keys: secret key; restricted key with places:read.

Parameters

FieldDescription
id requiredstring, pathPlace id.

Request

TypeScript
const result = await timbereye.places.retrieve("plc_4Hk2pT")
curl
curl https://api.timbereye.com/v1/places/plc_4Hk2pT \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"
CLI
timbereye places get plc_4Hk2pT --json

Response

JSON
// 200
{
  "id": "plc_4Hk2pT",
  "object": "place",
  "livemode": true,
  "client_id": null,
  "type": "tract",
  "name": "Tract 14 North",
  "external_ref": "T-14N",
  "point": { "lat": 31.905, "lon": -82.405 },
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [-82.41, 31.9],
        [-82.4, 31.9],
        [-82.4, 31.91],
        [-82.41, 31.91],
        [-82.41, 31.9]
      ]
    ]
  },
  "area_ha": 105.1,
  "eudr": { "valid": true, "issues": [] },
  "metadata": {},
  "created_at": "2027-01-28T09:30:00Z",
  "shared": false
}
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.

Update a place#

PATCH/v1/places/{id}

Changes a place. Shared ports are read-only: 403. area_ha follows the same rule as on create (422 area_ha_not_allowed for a Polygon or MultiPolygon).

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

Parameters

FieldDescription
id requiredstring, pathPlace id.

Body

FieldDescription
typeenum (tract, landing, yard, mill, port, warehouse, other)What the place is.
namestringDisplay name.
external_refstringYour own reference.
pointLatLonA WGS84 point.
point.lat requirednumberLatitude, WGS84 degrees.
point.lon requirednumberLongitude, WGS84 degrees.
geometryGeometry, nullableGeoJSON geometry: Point, Polygon or MultiPolygon. WGS84 only.
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.
area_hanumber, nullableArea in hectares that you state, for a place whose geometry is a Point or that has no geometry; the 4 ha rule then applies to it (above 4 ha, eudr.valid is false until the place has a Polygon or MultiPolygon). For a Polygon or MultiPolygon the area is computed and a stated area_ha is rejected with 422 area_ha_not_allowed. null clears a stated area.

Request

TypeScript
const result = await timbereye.places.update("plc_4Hk2pT", { metadata: { certificate: "FSC-C123456" } })
curl
curl -X PATCH https://api.timbereye.com/v1/places/plc_4Hk2pT \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"metadata":{"certificate":"FSC-C123456"}}'
CLI
timbereye places update plc_4Hk2pT \
  --data '{"metadata":{"certificate":"FSC-C123456"}}' \
  --json

Response

JSON
// 200
{
  "id": "plc_4Hk2pT",
  "object": "place",
  "livemode": true,
  "client_id": null,
  "type": "tract",
  "name": "Tract 14 North",
  "external_ref": "T-14N",
  "point": { "lat": 31.905, "lon": -82.405 },
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [-82.41, 31.9],
        [-82.4, 31.9],
        [-82.4, 31.91],
        [-82.41, 31.91],
        [-82.41, 31.9]
      ]
    ]
  },
  "area_ha": 105.1,
  "eudr": { "valid": true, "issues": [] },
  "metadata": { "certificate": "FSC-C123456" },
  "created_at": "2027-01-28T09:30:00Z",
  "shared": false
}
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.

Delete a place#

DELETE/v1/places/{id}

Deletes one of your places while no group uses it as its origin; otherwise 409 place_in_use: change those groups' origin first. A place that shipping or transport records refer to is kept (409 place_in_use), and shared ports cannot be deleted (403). In test mode, detach=true clears the origin of the groups that use it (each emits group.updated) and then deletes it; in live mode detach is 400 parameter_invalid. Emits place.deleted. A second delete is 404 resource_missing.

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

Parameters

FieldDescription
id requiredstring, pathPlace id.
detachboolean, queryTest mode only: clear the origin of the groups that use the place, then delete it. Refused with 400 parameter_invalid in live mode.

Request

TypeScript
const result = await timbereye.places.delete("plc_4Hk2pT")
curl
curl -X DELETE https://api.timbereye.com/v1/places/plc_4Hk2pT \
  -H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"
CLI
timbereye places delete plc_4Hk2pT --yes --json

Response

JSON
// 200
{ "id": "plc_4Hk2pT", "object": "place", "deleted": true }
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: place_in_use (groups use the place as their origin, or shipping or transport records refer to it).
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.