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-15",
"plantCount": 60,
"spacingX": 10,
"spacingY": 10,
"status": "mature"
}'
const res = await fetch(
`https://www.wiseyield.co/api/v1/farms/${farmId}/fields/${fieldId}/blocks`,
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WISEYIELD_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
cropId, name: 'North block — Medjool',
plantCount: 60, spacingX: 10, spacingY: 10,
}),
}
);
const { data: block } = await res.json();
{
"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"
}
}
{ "error": "Not found", "code": "NOT_FOUND", "message": "Crop not found on this field" }
Blocks
Create block
Create a block on a field. Block must belong to a crop that already lives on the field.
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-15",
"plantCount": 60,
"spacingX": 10,
"spacingY": 10,
"status": "mature"
}'
const res = await fetch(
`https://www.wiseyield.co/api/v1/farms/${farmId}/fields/${fieldId}/blocks`,
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WISEYIELD_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
cropId, name: 'North block — Medjool',
plantCount: 60, spacingX: 10, spacingY: 10,
}),
}
);
const { data: block } = await res.json();
{
"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"
}
}
{ "error": "Not found", "code": "NOT_FOUND", "message": "Crop not found on this field" }
POST https://www.wiseyield.co/api/v1/farms/{id}/fields/{fieldId}/blocks
Authentication
Requires a key with thefields:write scope.
Path parameters
string
required
Farm UUID.
string
required
Field UUID.
Request body
string
required
UUID of the crop. Must belong to
fieldId (so the block is consistent with the field’s planting).string
required
1–200 characters.
string
UUID of an admin variety record. Pulls spacing / density defaults if provided.
string
Up to 2,000 characters.
string
Calendar date as
YYYY-MM-DD. A full ISO 8601 datetime is accepted too, but only its date part is kept.integer
1–1,000,000.
number
Row spacing in meters, 0–10,000.
number
Plant spacing in meters, 0–10,000.
number
Plants per hectare, 0–1,000,000.
number
Block area, 0–1,000,000 (in the farm’s
areaUnit).object
GeoJSON
Polygon or Point covering the block. Polygon: { type: "Polygon", coordinates: number[][][] }. Point: { type: "Point", coordinates: [lng, lat] }.object
Grid metadata.
{ pattern: "square" | "hexagonal" | "triangular" | "custom", rowCount, columnCount, rowOrientation, originLatLng: [lat, lng] }.string
default:"planned"
One of
planned, planted, established, mature, declined, harvested, removed.string
Up to 5,000 characters.
Response
Returns the created block wrapped underdata.
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-15",
"plantCount": 60,
"spacingX": 10,
"spacingY": 10,
"status": "mature"
}'
const res = await fetch(
`https://www.wiseyield.co/api/v1/farms/${farmId}/fields/${fieldId}/blocks`,
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WISEYIELD_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
cropId, name: 'North block — Medjool',
plantCount: 60, spacingX: 10, spacingY: 10,
}),
}
);
const { data: block } = await res.json();
{
"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"
}
}
{ "error": "Not found", "code": "NOT_FOUND", "message": "Crop not found on this field" }
Errors
| Status | When |
|---|---|
400 VALIDATION_ERROR | Body validation failed |
401 | Missing, malformed, expired, or revoked API key |
403 INSUFFICIENT_SCOPE | Key lacks fields:write scope |
404 NOT_FOUND | Farm, field, or cropId doesn’t exist, is soft-deleted, or doesn’t belong to the resolved hierarchy |
429 RATE_LIMIT_EXCEEDED | Per-user rate limit reached |
5xx | Server error |