Graniot API
  • Welcome!
  • Quick Start
  • Embedded Maps
  • Reference
    • API Reference
      • Accounts
      • Farms
        • Farm Managers
      • Parcels
        • Satellite Data
        • Plants
        • Crops
        • Weather Forecast
        • Historical weather data
      • Crops Families
      • Notes
  • Satellite Sources
    • Satellite Data Overview
    • Available Data Sources
      • Sentinel-2
      • PlanetScope
      • SkySat
      • Pleiades
      • Pléiades Neo
      • Maxar
Powered by GitBook
On this page
  1. Reference
  2. API Reference
  3. Parcels

Crops

PreviousPlantsNextWeather Forecast

Last updated 1 year ago

This object contains a mix of metadata about the crop, the parcel it's grown on, and specifics about the planting and harvesting timeline. Let's break down the elements of this response:

  • family: An object that groups crops by their botanical family or another relevant classification. This is useful for planning rotations.

    • id: A unique identifier for the crop family.

    • name: The common name of the crop family.

    • observation: Notes or observations about the crop family, which could include general advice on rotation or specific considerations.

  • name: The name of the specific crop being planted.

  • campaign: This refer to the specific planting campaign or season. In agricultural terms, a campaign often refers to the period during which a particular crop is sown and harvested.

  • area: The size of the area (likely in hectares or acres) where the crop is planted.

  • variety: The specific variety of the crop being planted, which can be crucial for understanding yield, disease resistance, and other agronomic factors.

  • harvested_qty: The quantity of crop harvested from this parcel, possibly in weight or volume units, which can be used for yield tracking and historical performance analysis.

  • sowing: The date on which the crop was sown.

  • closure: This could either refer to the harvest date or the end of the crop's growth cycle in the context of the API. It marks the completion of the crop's campaign.

  • is_active: A boolean value indicating whether this crop rotation entry is currently active. An active entry might mean the crop is currently in the ground, while inactive refer to past rotations.

  • parcel: An identifier for the specific parcel of land where the crop is grown, linking the crop data to a physical location on the farm.

This response format provides a comprehensive view of a single crop's lifecycle in the rotation plan, from planting to harvest, including specific details about the crop variety and performance metrics. It's a useful structure for an API serving users in agriculture, especially for precision farming applications where managing the details of each crop rotation is crucial for optimizing yield and soil health.

get
Path parameters
idstringRequired
Responses
200Success
application/json
get
GET /api/parcels/{id}/crops/ HTTP/1.1
Host: 
Accept: */*
200Success
[
  {
    "id": 1,
    "family": {
      "id": 1,
      "key": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "observation": "text"
    },
    "key": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "campaign": "text",
    "area": 1,
    "variety": "text",
    "harvested_qty": 1,
    "sowing": "2025-06-13",
    "closure": "2025-06-13",
    "is_active": true,
    "created": "2025-06-13T20:08:44.988Z",
    "modified": "2025-06-13T20:08:44.988Z",
    "parcel": 1
  }
]
delete
Path parameters
idstringRequired
Responses
204
No response body
delete
DELETE /api/crops/{id}/ HTTP/1.1
Host: 
Accept: */*
204

No response body

No content

  • GET/api/parcels/{id}/crops/
  • POST/api/crops/
  • DELETE/api/crops/{id}/
  • PATCH/api/crops/{id}/
post
Body
idintegerRead-onlyRequired
keystring · uuidRead-onlyRequired
namestring | nullableOptional
campaignstring | nullableOptional
areanumber · double | nullableOptional
varietystring | nullableOptional
harvested_qtynumber · double | nullableOptional
sowingstring · date | nullableOptional
closurestring · date | nullableOptional
is_activebooleanOptional
createdstring · date-timeRead-onlyRequired
modifiedstring · date-timeRead-onlyRequired
parcelinteger | nullableOptional
Responses
201Success
application/json
post
POST /api/crops/ HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 203

{
  "family": {
    "id": 1,
    "name": "text",
    "observation": "text"
  },
  "name": "text",
  "campaign": "text",
  "area": 1,
  "variety": "text",
  "harvested_qty": 1,
  "sowing": "2025-06-13",
  "closure": "2025-06-13",
  "is_active": true,
  "parcel": 1
}
201Success
{
  "id": 1,
  "family": {
    "id": 1,
    "key": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "observation": "text"
  },
  "key": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "campaign": "text",
  "area": 1,
  "variety": "text",
  "harvested_qty": 1,
  "sowing": "2025-06-13",
  "closure": "2025-06-13",
  "is_active": true,
  "created": "2025-06-13T20:08:44.988Z",
  "modified": "2025-06-13T20:08:44.988Z",
  "parcel": 1
}
patch
Path parameters
idstringRequired
Body
idintegerRead-onlyOptional
keystring · uuidRead-onlyOptional
namestring | nullableOptional
campaignstring | nullableOptional
areanumber · double | nullableOptional
varietystring | nullableOptional
harvested_qtynumber · double | nullableOptional
sowingstring · date | nullableOptional
closurestring · date | nullableOptional
is_activebooleanOptional
createdstring · date-timeRead-onlyOptional
modifiedstring · date-timeRead-onlyOptional
parcelinteger | nullableOptional
Responses
200Success
application/json
patch
PATCH /api/crops/{id}/ HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 203

{
  "family": {
    "id": 1,
    "name": "text",
    "observation": "text"
  },
  "name": "text",
  "campaign": "text",
  "area": 1,
  "variety": "text",
  "harvested_qty": 1,
  "sowing": "2025-06-13",
  "closure": "2025-06-13",
  "is_active": true,
  "parcel": 1
}
200Success
{
  "id": 1,
  "family": {
    "id": 1,
    "key": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "observation": "text"
  },
  "key": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "campaign": "text",
  "area": 1,
  "variety": "text",
  "harvested_qty": 1,
  "sowing": "2025-06-13",
  "closure": "2025-06-13",
  "is_active": true,
  "created": "2025-06-13T20:08:44.988Z",
  "modified": "2025-06-13T20:08:44.988Z",
  "parcel": 1
}