Skip to main content
POST
/
api
/
v1
/
farms
/
{id}
/
fields
/
{fieldId}
/
blocks
curl -X POST 'https://www.wiseyield.co/api/v1/farms/11111111.../fields/88888888.../blocks' \
  -H "Authorization: Bearer $WISEYIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cropId": "33333333-4444-5555-6666-777777777777",
    "name": "North block — Medjool",
    "plantingDate": "2024-03-15T00:00:00.000Z",
    "plantCount": 60,
    "spacingX": 10,
    "spacingY": 10,
    "status": "mature"
  }'
{
  "data": {
    "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    "cropId": "33333333-4444-5555-6666-777777777777",
    "fieldId": "88888888-9999-aaaa-bbbb-cccccccccccc",
    "name": "North block — Medjool",
    "plantCount": 60,
    "spacingX": "10",
    "spacingY": "10",
    "status": "planned",
    "createdAt": "2026-05-17T17: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.

POST https://www.wiseyield.co/api/v1/farms/{id}/fields/{fieldId}/blocks

Authentication

Requires a key with the fields:write scope.

Path parameters

id
string
required
Farm UUID.
fieldId
string
required
Field UUID.

Request body

cropId
string
required
UUID of the crop. Must belong to fieldId (so the block is consistent with the field’s planting).
name
string
required
1–200 characters.
varietyId
string
UUID of an admin variety record. Pulls spacing / density defaults if provided.
description
string
Up to 2,000 characters.
plantingDate
string
ISO 8601 datetime.
plantCount
integer
1–1,000,000.
spacingX
number
Row spacing in meters, 0–10,000.
spacingY
number
Plant spacing in meters, 0–10,000.
plantDensity
number
Plants per hectare, 0–1,000,000.
area
number
Block area, 0–1,000,000 (in the farm’s areaUnit).
geometry
object
GeoJSON Polygon or Point covering the block. Polygon: { type: "Polygon", coordinates: number[][][] }. Point: { type: "Point", coordinates: [lng, lat] }.
plantingGrid
object
Grid metadata. { pattern: "square" | "hexagonal" | "triangular" | "custom", rowCount, columnCount, rowOrientation, originLatLng: [lat, lng] }.
status
string
default:"planned"
One of planned, planted, established, mature, declined, harvested, removed.
notes
string
Up to 5,000 characters.

Response

Returns the created block wrapped under data.
curl -X POST 'https://www.wiseyield.co/api/v1/farms/11111111.../fields/88888888.../blocks' \
  -H "Authorization: Bearer $WISEYIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cropId": "33333333-4444-5555-6666-777777777777",
    "name": "North block — Medjool",
    "plantingDate": "2024-03-15T00:00:00.000Z",
    "plantCount": 60,
    "spacingX": 10,
    "spacingY": 10,
    "status": "mature"
  }'
{
  "data": {
    "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    "cropId": "33333333-4444-5555-6666-777777777777",
    "fieldId": "88888888-9999-aaaa-bbbb-cccccccccccc",
    "name": "North block — Medjool",
    "plantCount": 60,
    "spacingX": "10",
    "spacingY": "10",
    "status": "planned",
    "createdAt": "2026-05-17T17:10:00.000Z"
  }
}

Errors

StatusWhen
400 VALIDATION_ERRORBody validation failed
401Missing, malformed, expired, or revoked API key
403 INSUFFICIENT_SCOPEKey lacks fields:write scope
404 NOT_FOUNDFarm, field, or cropId doesn’t exist, is soft-deleted, or doesn’t belong to the resolved hierarchy
429 RATE_LIMIT_EXCEEDEDPer-user rate limit reached
5xxServer error