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).
| Field | Description |
|---|---|
idstring | Unique identifier, prefixed plc_. |
objectplace | String representing the object type. Always place. |
livemodeboolean | true for objects in the live account, false for objects in the test account. Test and live data never mix. |
client_idstring, nullable | Caller-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. |
namestring | Display name. |
external_refstring, nullable | Your own reference for the place. |
pointLatLon | A WGS84 point. |
point.latnumber | Latitude, WGS84 degrees. |
point.lonnumber | Longitude, WGS84 degrees. |
geometryGeometry, nullable | GeoJSON geometry: Point, Polygon or MultiPolygon. WGS84 only. |
area_hanumber, nullable | Area 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. |
eudrEudrValidation | EUDR 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.validboolean | true 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 EudrIssue | Why the geometry is not valid. Empty when valid is true. |
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. |
created_atstring | Creation time. |
sharedboolean | true 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. |
{
"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
| Field | Description |
|---|---|
type requiredenum (tract, landing, yard, mill, port, warehouse, other) | What the place is. |
name requiredstring | Display name. |
external_refstring | Your own reference. |
point requiredLatLon | A WGS84 point. |
point.lat requirednumber | Latitude, WGS84 degrees. |
point.lon requirednumber | Longitude, WGS84 degrees. |
geometryGeometry | GeoJSON geometry: Point, Polygon or MultiPolygon. WGS84 only. |
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. |
area_hanumber | Area 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
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 -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]
]
]
}
}'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}}' \
--jsonResponse
// 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
| 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. |
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
| Field | Description |
|---|---|
qstring, query | Search. 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), query | Filter by type. |
external_refstring, query | Filter by external reference. |
owneraccount \| shared, query | account for only your own places, shared for only the ports Timbereye shares. Both when omitted. |
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 place of timbereye.places.list()) {
// every page, one at a time
}curl https://api.timbereye.com/v1/places \
-H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"timbereye places list --jsonResponse
// 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
| 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. |
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
| Field | Description |
|---|---|
geometry requiredGeometry | GeoJSON geometry: Point, Polygon or MultiPolygon. WGS84 only. |
Request
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 -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]
]
]
}
}'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]]]}' \
--jsonResponse
// 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
| 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. |
Retrieve a place#
GET/v1/places/{id}
Returns one place.
Keys: secret key; restricted key with places:read.
Parameters
| Field | Description |
|---|---|
id requiredstring, path | Place id. |
Request
const result = await timbereye.places.retrieve("plc_4Hk2pT")curl https://api.timbereye.com/v1/places/plc_4Hk2pT \
-H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"timbereye places get plc_4Hk2pT --jsonResponse
// 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
| 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. |
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
| Field | Description |
|---|---|
id requiredstring, path | Place id. |
Body
| Field | Description |
|---|---|
typeenum (tract, landing, yard, mill, port, warehouse, other) | What the place is. |
namestring | Display name. |
external_refstring | Your own reference. |
pointLatLon | A WGS84 point. |
point.lat requirednumber | Latitude, WGS84 degrees. |
point.lon requirednumber | Longitude, WGS84 degrees. |
geometryGeometry, nullable | GeoJSON geometry: Point, Polygon or MultiPolygon. WGS84 only. |
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. |
area_hanumber, nullable | Area 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
const result = await timbereye.places.update("plc_4Hk2pT", { metadata: { certificate: "FSC-C123456" } })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"}}'timbereye places update plc_4Hk2pT \
--data '{"metadata":{"certificate":"FSC-C123456"}}' \
--jsonResponse
// 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
| 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. |
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
| Field | Description |
|---|---|
id requiredstring, path | Place id. |
detachboolean, query | Test mode only: clear the origin of the groups that use the place, then delete it. Refused with 400 parameter_invalid in live mode. |
Request
const result = await timbereye.places.delete("plc_4Hk2pT")curl -X DELETE https://api.timbereye.com/v1/places/plc_4Hk2pT \
-H "Authorization: Bearer $TIMBEREYE_SECRET_KEY"timbereye places delete plc_4Hk2pT --yes --jsonResponse
// 200
{ "id": "plc_4Hk2pT", "object": "place", "deleted": true }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: place_in_use (groups use the place as their origin, or shipping or transport records refer to it). |
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. |