Cropwise
powered by syngenta

CROPWISE SERVICES

Working with Seasons 🌱

Overview

Seasons enable you to organize crop production into time-bounded cycles for comprehensive yield tracking and agronomic planning.

Cardinality summary

  • Workspace ➜ 1..* Organizations
  • Organization ➜ 1..* Seasons
Workspace
└── Organization
  └── Seasons 1..*

Key Concepts

ConceptDescription
SeasonTime-bounded crop production period (start_date, end_date)
Crop ZoneUnique seasonal instance of a Field (created via Crop Zones API)

API Documentation

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

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

Available Endpoints

Method & PathPurpose
POST /v2/seasonsCreate a season
GET /v2/seasons/{id}Retrieve season details
PUT /v2/seasons/{id}Update season metadata
DELETE /v2/seasons/{id}Soft-delete a season

Best Practices

PracticeBenefit
Enforce unique season names per org earlyAvoid failed POST retries
Keep season timeframe realisticAccurate aggregation & reporting

Business Rules

  • Permission required: caller must have appropriate season create/update rights for the organization.
  • Optional client-supplied id must be unused; existing ID causes rejection (no overwrite).
  • name must be unique within the organization (case-insensitive) on both create and update.
  • start_date must be strictly before end_date (validated on create and update).
  • crop_id (if provided) must reference an existing crop.
  • Changing crop_id is only allowed when no fields / crop zones are linked to the season.
  • Season must exist for update operations.
  • Persistence enforces uniqueness (duplicate id or name triggers conflict codes).
  • Invalid date ordering immediately rejects the request (no partial persistence).
  • Crop change guard prevents altering historical agronomic context inconsistently.

Error Codes

Detailed (non-exhaustive) errors for create and update flows.

Creation

Code / ExceptionHTTPMessageTrigger
ESEA025409 CONFLICTSeason already existsSeason with same ID already present
ESEA008400 BAD_REQUESTStart date cannot be after end dateend_date <= start_date
ESEA005409 CONFLICTSeason duplicatedSeason name already exists in organization
ESEA006400 BAD_REQUESTInvalid varietyVarieties not valid for the crop
ESEA016404 NOT_FOUNDCrop does not existProvided crop_id not found

Update

Code / ExceptionHTTPMessageTrigger
ESEA009404 NOT_FOUNDSeason does not existTarget season to update missing
ESEA008400 BAD_REQUESTStart date cannot be after end dateend_date <= start_date after change
ESEA005409 CONFLICTSeason duplicatedNew name clashes in organization
ESEA011400 BAD_REQUESTCannot change crop if there are fields linked to itAttempt to change crop with linked fields
ESEA016404 NOT_FOUNDCrop does not existNew crop_id not found

Next Steps