CropSense

Search documentation

Search for a command to run...

API Reference

Field Crops

Track which crops are planted in a field across a growing season.

get/field-crops/{field_crop_id}

Get a field crop by id

Requires an Authorization: Bearer header.

Parameters

field_crop_idstringpathrequired

Response 200

field_crop_idstringrequired
farm_idstringrequired
field_idstringrequired
field_namestringoptional
crop_idstringrequired
crop_namestringrequired
crop_categorystringrequired
variantstringoptional
planting_datestring<date-time>required
harvest_datestring<date-time>optional
current_growth_stageenum<string>optional
GerminationSeedlingVegetativeReproductiveMaturityHarvesting
growth_stages_dataobjectoptional
area_covered_pctnumberoptional
average_yieldnumberoptional
statusenum<string>optional
ActiveHarvestedAbandonedOther
is_activebooleanrequired
created_atstring<date-time>required
updated_atstring<date-time>required
GET /field-crops/{field_crop_id}
curl -X GET "https://api.cropsense.africa/field-crops/5c9a3e7b-1d2f-4a6c-9e8d-7b6a5c4d3e2f" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Example response · 200
{
  "field_crop_id": "5c9a3e7b-1d2f-4a6c-9e8d-7b6a5c4d3e2f",
  "farm_id": "3fa2c9e1-6b3a-4d2e-9c11-4a8e5f9d2b7a",
  "field_id": "8b6e1a2f-2d4c-4e9a-9b0f-1c7d3e5a6f42",
  "field_name": "field_name",
  "crop_id": "cassava-01",
  "crop_name": "crop_name",
  "crop_category": "crop_category",
  "variant": "variant",
  "planting_date": "2026-06-15T09:30:00Z",
  "harvest_date": "2026-06-15T09:30:00Z",
  "current_growth_stage": "Germination",
  "growth_stages_data": {},
  "area_covered_pct": 1.5,
  "average_yield": 1.5,
  "status": "Active",
  "is_active": true,
  "created_at": "2026-06-15T09:30:00Z",
  "updated_at": "2026-06-15T09:30:00Z"
}
put/field-crops/{field_crop_id}

Update a field crop by id

Requires an Authorization: Bearer header.

Parameters

field_crop_idstringpathrequired

Request body

crop_idstringoptional
variantstringoptional
planting_datestring<date-time>optional
harvest_datestring<date-time>optional
current_growth_stageenum<string>optional
GerminationSeedlingVegetativeReproductiveMaturityHarvesting
growth_stages_dataobjectoptional
area_covered_pctnumberoptional
average_yieldnumberoptional
statusenum<string>optional
ActiveHarvestedAbandonedOther

Response 200

field_crop_idstringrequired
farm_idstringrequired
field_idstringrequired
field_namestringoptional
crop_idstringrequired
crop_namestringrequired
crop_categorystringrequired
variantstringoptional
planting_datestring<date-time>required
harvest_datestring<date-time>optional
current_growth_stageenum<string>optional
GerminationSeedlingVegetativeReproductiveMaturityHarvesting
growth_stages_dataobjectoptional
area_covered_pctnumberoptional
average_yieldnumberoptional
statusenum<string>optional
ActiveHarvestedAbandonedOther
is_activebooleanrequired
created_atstring<date-time>required
updated_atstring<date-time>required
PUT /field-crops/{field_crop_id}
curl -X PUT "https://api.cropsense.africa/field-crops/5c9a3e7b-1d2f-4a6c-9e8d-7b6a5c4d3e2f" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "crop_id": "cassava-01",
    "variant": "variant",
    "planting_date": "2026-06-15T09:30:00Z",
    "harvest_date": "2026-06-15T09:30:00Z",
    "current_growth_stage": "Germination",
    "growth_stages_data": {},
    "area_covered_pct": 1.5,
    "average_yield": 1.5,
    "status": "Active"
  }'
Example response · 200
{
  "field_crop_id": "5c9a3e7b-1d2f-4a6c-9e8d-7b6a5c4d3e2f",
  "farm_id": "3fa2c9e1-6b3a-4d2e-9c11-4a8e5f9d2b7a",
  "field_id": "8b6e1a2f-2d4c-4e9a-9b0f-1c7d3e5a6f42",
  "field_name": "field_name",
  "crop_id": "cassava-01",
  "crop_name": "crop_name",
  "crop_category": "crop_category",
  "variant": "variant",
  "planting_date": "2026-06-15T09:30:00Z",
  "harvest_date": "2026-06-15T09:30:00Z",
  "current_growth_stage": "Germination",
  "growth_stages_data": {},
  "area_covered_pct": 1.5,
  "average_yield": 1.5,
  "status": "Active",
  "is_active": true,
  "created_at": "2026-06-15T09:30:00Z",
  "updated_at": "2026-06-15T09:30:00Z"
}
delete/field-crops/{field_crop_id}

Delete a field crop by id

Requires an Authorization: Bearer header.

Parameters

field_crop_idstringpathrequired

Response 200

DELETE /field-crops/{field_crop_id}
curl -X DELETE "https://api.cropsense.africa/field-crops/5c9a3e7b-1d2f-4a6c-9e8d-7b6a5c4d3e2f" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Example response · 200
null
post/field-crops/create

Create a field crop

Requires an Authorization: Bearer header.

Request body

field_idstringrequired
crop_idstringrequired
variantstringoptional
planting_datestring<date-time>required
harvest_datestring<date-time>optional
current_growth_stageenum<string>optional
GerminationSeedlingVegetativeReproductiveMaturityHarvesting
area_covered_pctnumberoptional
average_yieldnumberoptional
statusenum<string>optional
ActiveHarvestedAbandonedOther
created_atstring<date-time>optional
updated_atstring<date-time>optional

Response 200

field_crop_idstringrequired
farm_idstringrequired
field_idstringrequired
field_namestringoptional
crop_idstringrequired
crop_namestringrequired
crop_categorystringrequired
variantstringoptional
planting_datestring<date-time>required
harvest_datestring<date-time>optional
current_growth_stageenum<string>optional
GerminationSeedlingVegetativeReproductiveMaturityHarvesting
growth_stages_dataobjectoptional
area_covered_pctnumberoptional
average_yieldnumberoptional
statusenum<string>optional
ActiveHarvestedAbandonedOther
is_activebooleanrequired
created_atstring<date-time>required
updated_atstring<date-time>required
POST /field-crops/create
curl -X POST "https://api.cropsense.africa/field-crops/create" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "field_id": "8b6e1a2f-2d4c-4e9a-9b0f-1c7d3e5a6f42",
    "crop_id": "cassava-01",
    "variant": "variant",
    "planting_date": "2026-06-15T09:30:00Z",
    "harvest_date": "2026-06-15T09:30:00Z",
    "current_growth_stage": "Germination",
    "area_covered_pct": 1.5,
    "average_yield": 1.5,
    "status": "Active",
    "created_at": "2026-06-15T09:30:00Z",
    "updated_at": "2026-06-15T09:30:00Z"
  }'
Example response · 200
{
  "field_crop_id": "5c9a3e7b-1d2f-4a6c-9e8d-7b6a5c4d3e2f",
  "farm_id": "3fa2c9e1-6b3a-4d2e-9c11-4a8e5f9d2b7a",
  "field_id": "8b6e1a2f-2d4c-4e9a-9b0f-1c7d3e5a6f42",
  "field_name": "field_name",
  "crop_id": "cassava-01",
  "crop_name": "crop_name",
  "crop_category": "crop_category",
  "variant": "variant",
  "planting_date": "2026-06-15T09:30:00Z",
  "harvest_date": "2026-06-15T09:30:00Z",
  "current_growth_stage": "Germination",
  "growth_stages_data": {},
  "area_covered_pct": 1.5,
  "average_yield": 1.5,
  "status": "Active",
  "is_active": true,
  "created_at": "2026-06-15T09:30:00Z",
  "updated_at": "2026-06-15T09:30:00Z"
}
get/field-crops/supported

List supported crops available for field crops

List supported crops (from the Crops catalogue) available for creating a field crop

Requires an Authorization: Bearer header.

Response 200

cropsSupportedCrop[]required
totalintegerrequired
GET /field-crops/supported
curl -X GET "https://api.cropsense.africa/field-crops/supported" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Example response · 200
{
  "crops": [
    {
      "crop_id": "cassava-01",
      "name": "Green Valley Farm",
      "category": "category",
      "variants": [
        "variants"
      ],
      "alternative_names": [
        "alternative_names"
      ],
      "common_countries_grown": [
        "common_countries_grown"
      ]
    }
  ],
  "total": 1
}
get/field-crops/field/{field_id}

Get field crops by field id

Requires an Authorization: Bearer header.

Parameters

field_idstringpathrequired

Response 200

field_cropsFieldCrop[]required
totalintegerrequired
GET /field-crops/field/{field_id}
curl -X GET "https://api.cropsense.africa/field-crops/field/8b6e1a2f-2d4c-4e9a-9b0f-1c7d3e5a6f42" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Example response · 200
{
  "field_crops": [
    {
      "field_crop_id": "5c9a3e7b-1d2f-4a6c-9e8d-7b6a5c4d3e2f",
      "farm_id": "3fa2c9e1-6b3a-4d2e-9c11-4a8e5f9d2b7a",
      "field_id": "8b6e1a2f-2d4c-4e9a-9b0f-1c7d3e5a6f42",
      "field_name": "field_name",
      "crop_id": "cassava-01",
      "crop_name": "crop_name",
      "crop_category": "crop_category",
      "variant": "variant",
      "planting_date": "2026-06-15T09:30:00Z",
      "harvest_date": "2026-06-15T09:30:00Z",
      "current_growth_stage": "Germination",
      "growth_stages_data": {},
      "area_covered_pct": 1.5,
      "average_yield": 1.5,
      "status": "Active",
      "is_active": true,
      "created_at": "2026-06-15T09:30:00Z",
      "updated_at": "2026-06-15T09:30:00Z"
    }
  ],
  "total": 1
}