Parcels

Parcels represent individual agricultural plots or fields within a farm. Each parcel has a geometry (polygon), name, and can include custom metadata for filtering and organization.

Parcel Metadata

The metadata field allows you to attach custom key-value data to any parcel. This is useful for storing information like supplier IDs, regions, crop types, or any other custom attributes your system needs.

Creating Parcels with Metadata

When creating parcels via the API, include a metadata object:

{
  "farm": {"id": 123},
  "parcels": [{
    "name": "Parcel A",
    "metadata": {
      "Supplier ID": "CPS-000111",
      "region": "North",
      "contract_year": "2024"
    },
    "geom": { ... }
  }]
}

Updating Parcel Metadata

Use the PATCH endpoint to update metadata:

Viewing Metadata in Embedded Maps

Metadata is visible in the embedded map in two ways:

  1. Parcel tooltips: Users can toggle which metadata fields appear when hovering over a parcel

  2. Parcel detail panel: All metadata key-value pairs are displayed when opening a parcel's details

Filtering by Metadata in Embedded Maps

You can filter the embedded map to show only parcels with specific metadata values using URL parameters:

See the Embedded Maps documentation for more filtering options.


get
Responses
chevron-right
200Success
application/json
typestring · enumOptional
  • FeatureCollection - FeatureCollection
Possible values:
get
/api/parcels/
200Success
post
Body
typestring · enumOptionalPossible values:
idintegerRead-onlyOptional
bboxnumber[] · min: 4 · max: 4OptionalExample: [12.9721,77.5933,12.9721,77.5933]
Responses
post
/api/parcels/
201Success
get
Path parameters
idstringRequired
Responses
chevron-right
200Success
application/json
typestring · enumOptionalPossible values:
idintegerRead-onlyOptional
bboxnumber[] · min: 4 · max: 4OptionalExample: [12.9721,77.5933,12.9721,77.5933]
get
/api/parcels/{id}/
200Success
delete
Path parameters
idstringRequired
Responses
delete
/api/parcels/{id}/
204

No response body

No content

patch
Path parameters
idstringRequired
Body
namestringOptional

Optional, but cannot be null.

Responses
patch
/api/parcels/{id}/

Last updated