Cropwise
powered by syngenta

CROPWISE SERVICES

Working with Fields 🌾

Overview

Fields are digital representations of your farming areas within the Cropwise platform, combining geographic data and seasonal context. Fields are essential for precise agricultural management, enabling you to store information and gain valuable insights about smaller, delimited portions of land throughout your farming operation.

Field Hierarchy

Workspace
└── Organization
    └── Property
        └── Field ← You are here

API Documentation

For complete API reference including request/response schemas, authentication, and interactive testing, visit:

πŸ“š Fields API Documentation - Interactive API documentation with request/response examples

Available Endpoints

  • POST /v2/fields - Create a new field
  • GET /v2/fields/{id} - Get field by ID
  • PUT /v2/fields/{id} - Update field information
  • DELETE /v2/fields/{id} - Delete a field
  • GET /v2/properties/{property_id}/fields - List fields by property

Field Attributes

Core Attributes

AttributeTypeRequiredDescription
namestringYesField name (max 255 characters)
property_idUUIDYesParent property identifier
declared_areanumberYesField area in hectares (β‰₯ 0)
parent_region_idUUIDNoRegion identifier (defaults to property root)
geometryGeoJSONNoField boundary (Polygon/MultiPolygon)
reference_pointGeoJSONNoReference point (Point)
event_datestringNoEvent date (yyyy-MM-dd)
valid_sincestringNoValidity start date
valid_untilstringNoValidity end date

Read-only Attributes

AttributeTypeDescription
idUUIDUnique field identifier
calculated_areanumberSystem-calculated area from geometry
created_atdatetimeCreation timestamp
updated_atdatetimeLast update timestamp
deletedbooleanSoft deletion status

Best Practices

Field Creation

  • Ensure property_id exists before creating fields
  • Use descriptive and consistent field names
  • Provide accurate declared_area in hectares
  • Set appropriate validity periods using event_date

Geometry Management

  • Use valid GeoJSON Polygon format for field boundaries
  • Ensure coordinates are in [longitude, latitude] format
  • Close polygon boundaries (first and last coordinates must match)
  • Use precise GPS coordinates for accuracy
  • Include reference points for better field identification
  • Coordinates should have 6 decimal places for optimal precision (10⁻⁢ degrees β‰ˆ 0.11 meters at the equator)

Data Organization

  • Apply consistent naming conventions (e.g., "Field 1A", "Field 1B")
  • Keep field data updated when conditions change
  • Monitor calculated vs declared area discrepancies

Performance Optimization

  • Cache field data locally when possible
  • Use reference_date parameter for historical queries
  • Keep geometry complexity reasonable for performance, use the minimum coordinates as possible

Field Creation Rules & Limitations

Business Logic & Constraints

Name Uniqueness

  • name must be unique within the same parent_region_id (case-insensitive)
  • name cannot be null, blank, or exceed 255 characters

Area Constraints

  • declared_area must be greater than or equal to 0
  • The sum of all field areas may be limited by licensing or contract quotas

Region & Property

  • parent_region_id must refer to an existing, non-deleted region
  • The region must belong to the same property_id as the field
  • The region must be a leaf region (cannot have sub-regions)

Geometry Constraints

  • If geometry is provided, it must be a valid Polygon or MultiPolygon (GeoJSON)
  • Geometry coordinates must be within allowed ranges (longitude ≀ 180, latitude ≀ 90)
  • Geometry must not self-intersect
  • Geometry must not overlap with other fields in the same period and Property
  • If geometry is omitted, the region must still be a leaf and name must be unique

Date Constraints

  • event_date must be in valid yyyy-MM-dd format
  • event_date cannot be greater than 2038-01-19 (system limitation)
  • valid_until cannot be before valid_since

Quota & Licensing

  • If the workspace has limited field creation enabled, the total area of fields must not exceed the allowed quota for the contract or plan

Error Codes

Field Errors (Business/DTO)

CodeMessageHTTP StatusWhen Triggered
EFLD001Invalid size400 BAD REQUESTdeclared_area < 0
EFLD002Field name already exists for this region400 BAD REQUESTname not unique in region
EFLD003Field does not exist404 NOT FOUNDField not found
EFLD004Region does not exist404 NOT FOUNDRegion not found
EFLD006Field name should be less than 256 characters400 BAD REQUESTname too long
EFLD010Region parent id cannot be null400 BAD REQUESTparent_region_id is null
EFLD014Field already exists409 CONFLICTField with same ID and event_date exists
EFLD015Field name cannot be null400 BAD REQUESTname is null
EFLD018Region's and field's should be on the same property400 BAD REQUESTRegion and field property mismatch
EFLD021The field has an active link to a season400 BAD REQUESTField is linked to an active season
EFLD022User has exceeded the limit of field creation400 BAD REQUESTArea quota exceeded
EFLD024Field valid_until cannot be before valid_since400 BAD REQUESTValidity period error

Geometry Errors (Geometry/Spatial)

CodeMessageHTTP StatusWhen Triggered
EGEO002Cannot update field! It does not exist404 NOT FOUNDUpdate on non-existent field
EGEO003Cannot create field. It already exists400 BAD REQUESTField already exists
EGEO004Field geometry is invalid or intersects with itself400 BAD REQUESTInvalid/self-intersecting geometry
EGEO005Geometry intersection found400 BAD REQUESTOverlapping geometry
EGEO008Declared area cannot be negative400 BAD REQUESTdeclared_area < 0
EGEO010Specified region either doesn't exist, not in property, or not a leaf400 BAD REQUESTInvalid region for field
EGEO011Invalid date format400 BAD REQUESTevent_date format invalid
EGEO012Date is not valid. The date cannot be greater than 2038-01-19400 BAD REQUESTevent_date out of range
EGEO022The dimensions of the geometries exceed the maximum allowable limits400 BAD REQUESTGeometry coordinates out of bounds

Common Error Categories

CategoryDescriptionExample Codes
Field ValidationErrors related to invalid field dataEFLD001, EFLD002, EFLD006, EFLD015
Resource Not FoundResource does not existEFLD003, EFLD004, EGEO002
Geometry ValidationErrors related to invalid geometriesEGEO004, EGEO005, EGEO022
Date ValidationErrors related to invalid datesEGEO011, EGEO012, EFLD024
ConflictResource already exists or conflictsEFLD014, EGEO003
QuotaExceeded usage limitsEFLD022

Common Use Cases

For complete implementation examples including API calls, authentication, and error handling, visit our interactive API documentation:

πŸ“š Fields API Examples β†’ - Interactive examples with code samples

Typical Workflows

Basic Field Management

  1. Create Field - Set up new cultivation areas with boundaries and metadata
  2. Update Field - Modify field properties like area, name, or geometry
  3. Retrieve Field - Get field details for analysis or display
  4. List Fields - Query fields by property or organization

Working with Geometry

  • Field Boundaries - Define precise field boundaries using GeoJSON Polygon format
  • Reference Points - Set center points for field identification and mapping
  • Coordinate Systems - Use WGS84 datum with [longitude, latitude] format
  • Area Calculation - Compare declared vs calculated areas for validation

Temporal Field Management

  • Seasonal Fields - Create fields with specific validity periods
  • Historical Queries - Retrieve field data as of specific dates
  • Field Evolution - Track changes to field boundaries over time
  • Event Dating - Associate field changes with specific agricultural events

Next Steps

After creating your fields, you can:

  1. Managing Properties β†’
  2. Working with Organizations β†’