Skip to main content
PUT
/
api
/
v1
/
crops
/
{id}
curl -X PUT 'https://www.wiseyield.co/api/v1/crops/33333333-4444-5555-6666-777777777777' \
  -H "Authorization: Bearer $WISEYIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "expectedYield": 195, "notes": "Bumped after spring leaf analysis" }'
{
  "data": {
    "id": "33333333-4444-5555-6666-777777777777",
    "farmId": "11111111-2222-3333-4444-555555555555",
    "fieldId": "88888888-9999-aaaa-bbbb-cccccccccccc",
    "cropType": "date palm",
    "variety": "Medjool",
    "plantedArea": "4.2",
    "expectedYield": "195",
    "notes": "Bumped after spring leaf analysis",
    "status": "growing",
    "updatedAt": "2026-05-17T16:05:00.000Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.wiseyield.co/llms.txt

Use this file to discover all available pages before exploring further.

PUT https://www.wiseyield.co/api/v1/crops/{id}

Authentication

Requires a key with the crops:write scope.

Path parameters

id
string
required
Crop UUID.

Request body

All fields are optional. Only fields you include in the body are updated; omitted fields are left unchanged. To change fieldId, the new field must belong to the same farm as the crop’s current field.
fieldId
string
UUID. Must belong to the crop’s current farm.
cropType
string
1–200 characters.
variety
string
Up to 200 characters. Pass null to clear.
adminCropId
string
UUID. Pass null to clear.
adminCropVarietyId
string
UUID. Pass null to clear.
plantedArea
number | string
In the farm’s areaUnit.
plantingDate
string
ISO 8601 datetime. Pass null to clear.
expectedHarvestDate
string
ISO 8601 datetime. Pass null to clear.
season
string
One of winter, summer, autumn, spring, year_round. Pass null to clear.
seasonYear
integer
2000–2100. Pass null to clear.
expectedYield
number | string
Tons. Pass null to clear.
estimatedCost
number | string
In the farm’s currency. Pass null to clear.
estimatedRevenue
number | string
In the farm’s currency. Pass null to clear.
status
string
One of planned, planted, growing, harvested, failed. To set harvested and auto-populate actualHarvestDate, prefer the dedicated status endpoint.
notes
string
Up to 5,000 characters. Pass null to clear.

Response

Returns the updated crop wrapped under data.
curl -X PUT 'https://www.wiseyield.co/api/v1/crops/33333333-4444-5555-6666-777777777777' \
  -H "Authorization: Bearer $WISEYIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "expectedYield": 195, "notes": "Bumped after spring leaf analysis" }'
{
  "data": {
    "id": "33333333-4444-5555-6666-777777777777",
    "farmId": "11111111-2222-3333-4444-555555555555",
    "fieldId": "88888888-9999-aaaa-bbbb-cccccccccccc",
    "cropType": "date palm",
    "variety": "Medjool",
    "plantedArea": "4.2",
    "expectedYield": "195",
    "notes": "Bumped after spring leaf analysis",
    "status": "growing",
    "updatedAt": "2026-05-17T16:05:00.000Z"
  }
}

Errors

StatusWhen
400 INVALID_ID{id} is not a valid UUID
400 VALIDATION_ERRORSchema validation failed, OR new fieldId doesn’t belong to the crop’s farm
401Missing, malformed, expired, or revoked API key
403 INSUFFICIENT_SCOPEKey lacks crops:write scope
404 NOT_FOUNDCrop doesn’t exist, is soft-deleted, or belongs to a farm the user doesn’t own
429 RATE_LIMIT_EXCEEDEDPer-user rate limit reached
5xxServer error