curl -X POST 'https://www.wiseyield.co/api/v1/farms/11111111.../fields/88888888.../blocks/aaaaaaaa.../plants' \
-H "Authorization: Bearer $WISEYIELD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"label": "Row 1, Tree 4",
"tagId": "QR-MDJ-0247",
"position": { "lat": 30.0444, "lng": 31.2357 },
"plantedAt": "2024-03-15",
"status": "alive"
}'
const res = await fetch(
`https://www.wiseyield.co/api/v1/farms/${farmId}/fields/${fieldId}/blocks/${blockId}/plants`,
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WISEYIELD_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
label: 'Row 1, Tree 4',
tagId: 'QR-MDJ-0247',
position: { lat: 30.0444, lng: 31.2357 },
}),
}
);
const { data: plant } = await res.json();
{
"data": {
"id": "ffffffff-1111-2222-3333-444444444444",
"blockId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"label": "Row 1, Tree 4",
"tagId": "QR-MDJ-0247",
"position": { "lat": 30.0444, "lng": 31.2357 },
"plantedAt": "2024-03-15T00:00:00.000Z",
"status": "alive",
"createdAt": "2026-05-17T17:20:00.000Z"
}
}
{
"error": "Conflict",
"code": "CONFLICT",
"message": "Tag ID \"QR-MDJ-0247\" is already assigned to another plant in this block"
}
Plants
Create plant
Create a per-plant record under a block. Tag IDs are unique within a block.
POST
/
api
/
v1
/
farms
/
{id}
/
fields
/
{fieldId}
/
blocks
/
{blockId}
/
plants
curl -X POST 'https://www.wiseyield.co/api/v1/farms/11111111.../fields/88888888.../blocks/aaaaaaaa.../plants' \
-H "Authorization: Bearer $WISEYIELD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"label": "Row 1, Tree 4",
"tagId": "QR-MDJ-0247",
"position": { "lat": 30.0444, "lng": 31.2357 },
"plantedAt": "2024-03-15",
"status": "alive"
}'
const res = await fetch(
`https://www.wiseyield.co/api/v1/farms/${farmId}/fields/${fieldId}/blocks/${blockId}/plants`,
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WISEYIELD_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
label: 'Row 1, Tree 4',
tagId: 'QR-MDJ-0247',
position: { lat: 30.0444, lng: 31.2357 },
}),
}
);
const { data: plant } = await res.json();
{
"data": {
"id": "ffffffff-1111-2222-3333-444444444444",
"blockId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"label": "Row 1, Tree 4",
"tagId": "QR-MDJ-0247",
"position": { "lat": 30.0444, "lng": 31.2357 },
"plantedAt": "2024-03-15T00:00:00.000Z",
"status": "alive",
"createdAt": "2026-05-17T17:20:00.000Z"
}
}
{
"error": "Conflict",
"code": "CONFLICT",
"message": "Tag ID \"QR-MDJ-0247\" is already assigned to another plant in this block"
}
POST https://www.wiseyield.co/api/v1/farms/{id}/fields/{fieldId}/blocks/{blockId}/plants
Authentication
Requires a key with thefields:write scope.
Path parameters
string
required
Farm UUID.
string
required
Field UUID.
string
required
Block UUID.
Request body
string
required
1–100 characters. Within-block identifier (e.g.
"Row 1, Tree 4", "P-0001").string
1–200 characters. QR / RFID / barcode identifier. Unique within the block — duplicate returns
409 CONFLICT.object
{ lat: number, lng: number }. GPS position. Pass null to clear.string
Calendar date as
YYYY-MM-DD. A full ISO 8601 datetime is accepted too, but only its date part is kept.string
default:"alive"
One of
alive, sick, dead, replaced, removed.string
Up to 2,000 characters.
Response
Returns the created plant wrapped underdata.
curl -X POST 'https://www.wiseyield.co/api/v1/farms/11111111.../fields/88888888.../blocks/aaaaaaaa.../plants' \
-H "Authorization: Bearer $WISEYIELD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"label": "Row 1, Tree 4",
"tagId": "QR-MDJ-0247",
"position": { "lat": 30.0444, "lng": 31.2357 },
"plantedAt": "2024-03-15",
"status": "alive"
}'
const res = await fetch(
`https://www.wiseyield.co/api/v1/farms/${farmId}/fields/${fieldId}/blocks/${blockId}/plants`,
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WISEYIELD_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
label: 'Row 1, Tree 4',
tagId: 'QR-MDJ-0247',
position: { lat: 30.0444, lng: 31.2357 },
}),
}
);
const { data: plant } = await res.json();
{
"data": {
"id": "ffffffff-1111-2222-3333-444444444444",
"blockId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"label": "Row 1, Tree 4",
"tagId": "QR-MDJ-0247",
"position": { "lat": 30.0444, "lng": 31.2357 },
"plantedAt": "2024-03-15T00:00:00.000Z",
"status": "alive",
"createdAt": "2026-05-17T17:20:00.000Z"
}
}
{
"error": "Conflict",
"code": "CONFLICT",
"message": "Tag ID \"QR-MDJ-0247\" is already assigned to another plant in this block"
}
Errors
| Status | When |
|---|---|
400 INVALID_ID | Any path UUID is malformed |
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 block doesn’t exist or belongs to another user |
409 CONFLICT | tagId already exists for another plant in this block |
429 RATE_LIMIT_EXCEEDED | Per-user rate limit reached |
5xx | Server error |