Skip to main content
PUT
/
api
/
v1
/
crops
/
{id}
/
status
curl -X PUT 'https://www.wiseyield.co/api/v1/crops/33333333-4444-5555-6666-777777777777/status' \
  -H "Authorization: Bearer $WISEYIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "harvested" }'
{
  "data": {
    "id": "33333333-4444-5555-6666-777777777777",
    "status": "harvested",
    "actualHarvestDate": "2026-05-17T16:10:00.000Z",
    "updatedAt": "2026-05-17T16:10: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}/status
A focused alternative to PUT /api/v1/crops/ when you only need to change status. The behavior is identical except for one convenience: transitioning to harvested auto-populates actualHarvestDate to the current timestamp if it isn’t already set.

Authentication

Requires a key with the crops:write scope.

Path parameters

id
string
required
Crop UUID.

Request body

status
string
required
One of planned, planted, growing, harvested, failed.

Response

Returns the updated crop wrapped under data. When transitioning to harvested, the returned actualHarvestDate reflects the auto-set value.
curl -X PUT 'https://www.wiseyield.co/api/v1/crops/33333333-4444-5555-6666-777777777777/status' \
  -H "Authorization: Bearer $WISEYIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "harvested" }'
{
  "data": {
    "id": "33333333-4444-5555-6666-777777777777",
    "status": "harvested",
    "actualHarvestDate": "2026-05-17T16:10:00.000Z",
    "updatedAt": "2026-05-17T16:10:00.000Z"
  }
}

Errors

StatusWhen
400 INVALID_ID{id} is not a valid UUID
400 VALIDATION_ERRORstatus not in the allowed enum
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

Notes

  • This endpoint does not trigger the dashboard’s harvest-completion notification (which only fires for session-authenticated UI users).
  • For full audit history of status transitions, see the dashboard timeline view.