Skip to main content
POST
/
api
/
v1
/
crops
curl -X POST https://www.wiseyield.co/api/v1/crops \
  -H "Authorization: Bearer $WISEYIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "farmId": "11111111-2222-3333-4444-555555555555",
    "fieldId": "88888888-9999-aaaa-bbbb-cccccccccccc",
    "cropType": "date palm",
    "variety": "Medjool",
    "plantedArea": 4.2,
    "plantingDate": "2024-03-15T00:00:00.000Z",
    "season": "spring",
    "seasonYear": 2024,
    "status": "growing"
  }'
{
  "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",
    "plantingDate": "2024-03-15T00:00:00.000Z",
    "season": "spring",
    "seasonYear": 2024,
    "status": "growing",
    "createdAt": "2026-05-17T16:00:00.000Z",
    "updatedAt": "2026-05-17T16:00: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.

POST https://www.wiseyield.co/api/v1/crops

Authentication

Requires a key with the crops:write scope. See Authentication.

Request body

farmId
string
required
UUID of the parent farm. Must be owned by the authenticated user.
fieldId
string
required
UUID of the field. Must belong to farmId. Required per the Operations Attachment Principle.
cropType
string
required
1–200 characters. Free-text crop name (e.g. "wheat", "date palm").
plantedArea
number | string
required
Positive number in the farm’s areaUnit. Accepts string or number.
variety
string
Up to 200 characters. Free-text variety.
adminCropId
string
UUID linking to the admin Crop Library. Prefer this over cropType when the crop is in the catalog.
adminCropVarietyId
string
UUID linking to the admin variety record.
plantingDate
string
ISO 8601 datetime.
expectedHarvestDate
string
ISO 8601 datetime.
season
string
One of winter, summer, autumn, spring, year_round.
seasonYear
integer
2000–2100.
expectedYield
number | string
Tons.
estimatedCost
number | string
In the farm’s currency.
estimatedRevenue
number | string
In the farm’s currency.
status
string
default:"planned"
One of planned, planted, growing, harvested, failed.
notes
string
Up to 5,000 characters.

Response

Returns the created crop wrapped under data. See List crops for the full field reference.
curl -X POST https://www.wiseyield.co/api/v1/crops \
  -H "Authorization: Bearer $WISEYIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "farmId": "11111111-2222-3333-4444-555555555555",
    "fieldId": "88888888-9999-aaaa-bbbb-cccccccccccc",
    "cropType": "date palm",
    "variety": "Medjool",
    "plantedArea": 4.2,
    "plantingDate": "2024-03-15T00:00:00.000Z",
    "season": "spring",
    "seasonYear": 2024,
    "status": "growing"
  }'
{
  "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",
    "plantingDate": "2024-03-15T00:00:00.000Z",
    "season": "spring",
    "seasonYear": 2024,
    "status": "growing",
    "createdAt": "2026-05-17T16:00:00.000Z",
    "updatedAt": "2026-05-17T16:00:00.000Z"
  }
}

Errors

StatusWhen
400 VALIDATION_ERRORSchema validation failed (details carries per-field messages), OR fieldId doesn’t belong to farmId
401Missing, malformed, expired, or revoked API key
403 INSUFFICIENT_SCOPEKey lacks crops:write scope
404 NOT_FOUNDfarmId not owned by the authenticated user (or soft-deleted)
429 RATE_LIMIT_EXCEEDEDPer-user rate limit reached
5xxServer error