API Documentation

Introduction

Welcome to the Operational Monitoring API of CropOM. The scope of this RESTful API is to support agriculture related software development projects with Earth Observation data based operational monitoring services. The API makes it possible to analyze remote sensing data and derive vector geometries of management zones and Variable Rate tasks in a seamless fashion. All you need to start working with our API is a Partner Key.

Partner key

By subscribing to our services, each partner gets a Partner Key. The key is unique to each subscriber. With the Partner Key, the subscriber entity can create users. For a Partner Key contact us: info@cropom.com

cropom api data and link structure

Vector geometries

The concept is to get geometries only by calling single object endpoints. List endpoints do not return geometries. However, hyperlinks to related objects are always returned. GET Parcels endpoint (2.2.) is an exception, as it does return geometries in the current version of the API.

1. User endpoints

1.1 Create user

A User must be created first to add parcels. User is created with the Partner Key granted by CropOM to the subscriber. Partners can have multiple users.

Method: POST

Request URL

https://api.cropom.com/v1/<partner_key>/create/user

Request parameters

Parameter Type Mandatory Description
Name text yes Name of user
email text no E-mail address of user

Response object (JSON)

Field Description
api_key User’s API key provided by CropOM

Example request

https://api.cropom.com/v1/0123/create/user

Example response

						
							{
								"api_key": "0123"						
							}							
						
					

1.2 Get users

List all users for a partner.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/users

Request parameters

None

Response object (JSON)

Field Description
id User ID
name User name
created_at Timestamp of user creation
updated_at Timesatamp of latest update
api_key User’s API key provided by CropOM
links List of user related API links. Find list below
Rel Description
self Link to the individual user
parcels Link to the user’s parcels list

Example request

https://api.cropom.com/v1/0123/users

Example response

						
							[
								{
									"id": "1",
									"name": "user1",
									"created_at": "2017-08-22 00:00:00",
									"updated_at": "2017-08-22 00:00:00",
									"api_key": "0123",
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/users/1"
										},
										{
											"rel": "parcels",
											"href": "/v1/0123/parcels"
										}
									]
								},
								{
									"id": "2",
									"name": "user2",
									"created_at": "2018-01-01 14:06:00",
									"updated_at": "2018-01-01 14:06:00",
									"api_key": "0123",
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/users/2"
										},
										{
											"rel": "parcels",
											"href": "/v1/0123/parcels"
										}
									]
								}
							]
							
						
					

1.3 Get single user

Get a specific users for a partner.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/users/<user_id>

Request parameters

None

Response object (JSON)

Field Description
id User ID
name User name
created_at Timestamp of user creation
updated_at Timesatamp of latest update
api_key User’s API key provided by CropOM
links List of user related API links. Find list below
Rel Description
self Link to the individual user
parcels Link to the user’s parcels list

Example request

https://api.cropom.com/v1/0123/users/1

Example response

						
							[
								{
									"id": "1",
									"name": "user1",
									"created_at": "2017-08-22 00:00:00",
									"updated_at": "2017-08-22 00:00:00",
									"api_key": "0123",
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/users/1"
										},
										{
											"rel": "parcels",
											"href": "/v1/0123/parcels"
										}
									]
								}
							]							
						
					

2. Parcel endpoints

2.1 Create parcel

Parcels are polygon geometries. Satellite data is gatherered automatically for added parcels. Parcel geometries must be in WGS84 (EPSG:4326) coordinate system

Method: POST

Request URL

https://api.cropom.com/v1/<partner_key>/create/parcel

Request parameters

Parameter Type Mandatory Description
name text yes Name of parcel
geometry WKT yes Polygon geometry in WKT form. Coordinates must be in WGS84 (EPSG:4326) coordinate system.
crop id integer no Crop type code. Find the list of available crop types in appendix

Response object (JSON)

Field Description
id ID of the created parcel
link API Link to the created parcel

Example request

https://api.cropom.com/v1/0123/create/parcel

Example response

						
							{
								"id": 123,
    							"link": "/v1/0123/parcels/123"						
							}							
						
					

2.2 Get parcels

Get all parcels of a user.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/parcels

Request parameters

None

Response object (JSON)

Field Description
id Parcel ID
name Parcel name
culture Plant culture of the parcel
created_at Timestamp of parcel creation
updated_at Timesatamp of latest update
area Area of the parcel in hectares (ha)
geometry Geometry of the parcel in GeoJSON format. Coordinate system: WGS84 (EPSG:4326). GeoJSON specification: http://geojson.org/
links List of user related API links. Find list below
Rel Description
self Link to the individual parcel
rasters Link to the parcel’s raster list
tasks Link to the parcel’s task list
alerts Link to the parcel’s alert list
latest_raster Latest raster acquired for the parcel
current_management_zone Latest Management Zones created for the parcel

Example request

https://api.cropom.com/v1/0123/parcels

Example response

						
							[
								{
									"id": "123",
									"name": "Parcel-1",
									"culture": “corn”,
									"created_at": "2017-11-26 00:00:00",
									"area": "134.28",
									"geometry": {
										"type": "Polygon",
										"coordinates": [
											[
												[
													19.600172240117,
													46.698410470595
												],
												[
													19.62022674202,
													46.687783040558
												],
												[
													19.602978701025,
													46.675468648348
												],
												[
													19.585438320351,
													46.687823147999
												],
												[
													19.600172240117,
													46.698410470595
												]
											]
										]
									},
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/parcels/123"
										},
										{
											"rel": "rasters",
											"href": "/v1/0123/parcels/123/rasters"
										},
										{
											"rel": "tasks",
											"href": "/v1/0123/parcels/123/tasks"
										},
										{
											"rel": "alerts",
											"href": "/v1/0123/parcels/123/alerts"
										},
										{
											"rel": "latest_raster",
											"href": "/v1/0123/parcels/123/rasters/5678"
										},
										{
											"rel": "current_management_zone",
											"href": "/v1/0123/parcels/123/management_zones/12"
										}
									]
								},
								{
									"id": "124",
									"name": "Parcel-2",
									"culture": "winter wheat",
									"created_at": "2018-05-15 21:23:40",
									"area": "114.91",
									"geometry": {
										"type": "Polygon",
										"coordinates": [
											[
												[
													20.766264113962,
													47.358299715587
												],
												[
													20.803885727024,
													47.358640818118
												],
												[
													20.803310253019,
													47.347968137063
												],
												[
													20.76957308949,
													47.347968137063
												],
												[
													20.766264113962,
													47.358299715587
												]
											]
										]
									},
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/parcels/124"
										},
										{
											"rel": "rasters",
											"href": "/v1/0123/parcels/124/rasters"
										},
										{
											"rel": "tasks",
											"href": "/v1/0123/parcels/124/tasks"
										},
										{
											"rel": "alerts",
											"href": "/v1/0123/parcels/124/alerts"
										},
										{
											"rel": "latest_raster",
											"href": "/v1/0123/parcels/124/rasters/6789"
										},
										{
											"rel": "current_management_zone",
											"href": "/v1/0123/parcels/124/management_zones/23"
										}
									]
								}
							]
							
						
					

2.3 Get single parcel

Get a specific parcel of a user.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>

Request parameters

None

Response object (JSON)

Field Description
id Parcel ID
name Parcel name
culture Plant culture of the parcel
created_at Timestamp of parcel creation
updated_at Timesatamp of latest update
area Area of the parcel in hectares (ha)
geometry Geometry of the parcel in GeoJSON format. Coordinate system: WGS84 (EPSG:4326). GeoJSON specification: http://geojson.org/
links List of user related API links. Find list below
Rel Description
self Link to the individual parcel
rasters Link to the parcel’s raster list
tasks Link to the parcel’s task list
alerts Link to the parcel’s alert list
latest_raster Latest raster acquired for the parcel
current_management_zone Latest Management Zones created for the parcel

Example request

https://api.cropom.com/v1/0123/parcels/123

Example response

						
							[
								{
									"id": "123",
									"name": "Parcel-1",
									"culture": “corn”,
									"created_at": "2017-11-26 00:00:00",
									"area": "134.28",
									"geometry": {
										"type": "Polygon",
										"coordinates": [
											[
												[
													19.600172240117,
													46.698410470595
												],
												[
													19.62022674202,
													46.687783040558
												],
												[
													19.602978701025,
													46.675468648348
												],
												[
													19.585438320351,
													46.687823147999
												],
												[
													19.600172240117,
													46.698410470595
												]
											]
										]
									},
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/parcels/123"
										},
										{
											"rel": "rasters",
											"href": "/v1/0123/parcels/123/rasters"
										},
										{
											"rel": "tasks",
											"href": "/v1/0123/parcels/123/tasks"
										},
										{
											"rel": "alerts",
											"href": "/v1/0123/parcels/123/alerts"
										},
								{
											"rel": "latest_raster",
											"href": "/v1/0123/rasters/99"
										},
										{
											"rel": "current_management_zone",
											"href": "/v1/0123/parcels/123/management_zones/11"
										}
									]
								}
							]							
						
					

3. Raster endpoints

3.1 Get rasters

Get all rasters for a parcel.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>/rasters

Request parameters

Parameter Type Mandatory Description
start date no Start date of time interval in yyyy-mm-dd fromat
stop date no End date of time intervall in yyyy-mm-dd fromat
type text no Raster type code in AAAA format (e.g. NDVI). Link to available rater types: LINK

Response object (JSON)

Field Description
id Raster ID
type Rasters type ( e.g. NDVI )
name Name of raster file. ( e.g. 123_NDVI_2018-01-01.tif )
acq_date Date of acquisition in yyyy-mm-dd format
bbox Bounding box of the raster in EPSG:3857 coordinate system.
min Minimum pixel value
max Maximum pixel value
mean Mean pixel value
stddev Standard deviation of pixel values.
links List of task-related API links. Find list below.
Rel Description
self Link to the individual raster

Example request

https://api.cropom.com/v1/0123/parcels/123/rasters

Example response

						
							[
								{
									"id": "118",
									"type": "NDVI",
									"name": "268_NDVI_2017-09-12.tif",
									"acq_date": "2017-09-12 00:00:00",
									"bbox": "2180241.0207846,5889262.2427,2184113.65017028,5892985.17380691",
									"min": "-0.0585242",
									"max": "0.986346",
									"mean": "0.0838137",
									"stddev": "0.0751254",
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/rasters/118"
										}
									]
								},
								{
									"id": "119",
									"type": "NDVI",
									"name": "268_NDVI_2017-09-22.tif",
									"acq_date": "2017-09-22 00:00:00",
									"bbox": "2180241.0207846,5889262.2427,2184113.65017028,5892985.17380691",
									"min": "-0.171717",
									"max": "0.98544",
									"mean": "0.00140798",
									"stddev": "0.0765537",
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/rasters/119"
										}
									]
								}
							]
						
						
					

3.2 Get single raster

Get a specific raster for a parcel.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>/rasters/<raster_id>

Request parameters

Parameter Type Mandatory Description
start date no Start date of time interval in yyyy-mm-dd fromat
stop date no End date of time intervall in yyyy-mm-dd fromat
type text no Raster type code in AAAA format (e.g. NDVI). Link to available rater types: LINK

Response object (JSON)

Field Description
id Raster ID
type Rasters type ( e.g. NDVI )
name Name of raster file. ( e.g. 123_NDVI_2018-01-01.tif )
acq_date Date of acquisition in yyyy-mm-dd format
bbox Bounding box of the raster in EPSG:3857 coordinate system.
min Minimum pixel value
max Maximum pixel value
mean Mean pixel value
stddev Standard deviation of pixel values.
links List of task-related API links. Find list below.
Rel Description
self Link to the individual raster

Example request

https://api.cropom.com/v1/0123/parcels/123/rasters/987

Example response

						
							[
								{
									"id": "987",
									"type": "NDVI",
									"name": "123_NDVI_2017-01-01.tif",
									"acq_date": "2017-01-01 00:00:00",
									"bbox": "2180241.0207846,5889262.2427,2184113.65017028,5892985.17380691",
									"min": "-0.1584325",
									"max": "0.884766",
									"mean": "0.0845673",
									"stddev": "0.0734534",
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/rasters/987"
										}
									]
								}
							]						
						
					

4. Management zone endpoints

4.1 Create management zone

Management Zones are created from raster time series between user defined dates and with user defined categorization method for a given parcel.

Currently the API supports the following categorization methods:

Code Description
0 Default categories, splitting the value range to 5 equal parts between the absolute minimum and the absolute maximum values. These are predefined categories
1 Relative categories, splitting the value range to 5 equal parts between the relative minimum and the relative maximum values. These are dynamic categories
2 User defined categories, splitting the value range to 5 equal parts according to the user defined category limits. It is required to use the ‘category’ parameter for this method

Method: POST

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>/create/management_zones/<method>

Request parameters

Parameter Type Mandatory Description
start date yes Start date of time series in yyyy-mm-dd fromat
stop date yes End date of time series in yyyy-mm-dd fromat
category string no Six float values between -1.0 and 1.0 separated by “,”. Example: “0.0,0.1,0.23,0.4,0.65,1.0”

Response object (JSON)

Field Description
id ID of the created Management Zones
link API Link to the created Management Zones

Example request

https://api.cropom.com/v1/0123/parcels/123/create/management_zones/0

Example response

						
							{
								"id": 456,
								"link": "/v1/0123/parcels/123/management_zones/456"
							}											
						
					

4.2 Get management zone

Get all management zones for a parcel with meta data and link to single management zones

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>/management_zones

Request parameters

Parameter Type Mandatory Description
start date no Start date of time interval in yyyy-mm-dd fromat
stop date no End date of time interval in yyyy-mm-dd fromat

Response object (JSON)

Field Description
id ID of the Management Zone
parcel_id Parcel ID
start_time Timestamp of time series start
stop_time Timestamp of time series end
creation_time Timestamp of management zones creation
links List of task-related API links. Find list below.
Rel Description
self Link to the individual management zone

Example request

https://api.cropom.com/v1/0123/parcels/123/management_zones

Example response

						
							[
								{
									"id": "21",
									"parcel_id": "123",
									"start_time": "2017-01-01 00:00:00",
									"stop_time": "2018-01-01 00:00:00",
									"creation_time": "2018-05-22 22:18:25",
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/parcels/123/management_zones/21"
										}
									]
								},
								{
									"id": "22",
									"parcel_id": "123",
									"start_time": "2017-01-01 00:00:00",
									"stop_time": "2018-06-21 00:00:00",
									"creation_time": "2018-06-21 11:12:56",
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/parcels/265/management_zones/26"
										}
									]
								}
							]
											
						
					

4.3 Get single management zone

Get a specific management zone for a parcel with polygon geometries and values.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>/management_zones/<management_zone_id>

Request parameters

None

Response object (JSON)

Field Description
id Management Zone ID
parcel_id Parcel ID
start_time Timestamp of time series start
stop_time Timestamp of time series end
creation_time Timestamp of management zone creation
zones Feature collection of the management zones in GeoJSON format. Coordinate system: WGS84 (EPSG:4326). GeoJSON specification: http://geojson.org/
links List of task-related API links. Find list below.
Rel Description
self Link to the individual management zone

Example request

https://api.cropom.com/v1/0123/parcels/123/management_zones/21

Example response

						
							[
								{
									"id": "21",
									"parcel_id": "123",
									"start_time": "2017-01-01 00:00:00",
									"stop_time": "2018-01-01 00:00:00",
									"creation_time": "2018-05-22 22:18:25",
								"zones": [
										{
											"type": "FeatureCollection",
											"features": [
												{
													"type": "Feature",
													"geometry": {
														"type": "Polygon",
														"coordinates": [
															[
																[
																	19.865328959956,
																	47.669068306853
																],
																[
																	19.865328959956,
																	47.668977857974
																],
																[
																	19.86546291338,
																	47.668977857974
																],
																[
																	19.86546291338,
																	47.669068306853
																],
																[
																	19.865328959956,
																	47.669068306853
																]
															]
														]
													},
													"properties": {
														"value": 2
													}
												},
												{
													"type": "Feature",
													"geometry": {
														"type": "Polygon",
														"coordinates": [
															[
																[
																	19.86546291338,
																	47.669068306853
																],
																[
																	19.86546291338,
																	47.668977857974
																],
																[
																	19.865596866805,
																	47.668977857974
																],
																[
																	19.865596866805,
																	47.669068306853
																],
																[
																	19.86546291338,
																	47.669068306853
																]
															]
														]
													},
													"properties": {
														"value": 4
													}
												}
											]
										}
									],
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/parcels/123/management_zones/21"
										}
									]
								}
							]											
						
					

5. Task endpoints

5.1 Create task

Tasks are actual prescription maps.
To create tasks, management zones are required, therefore prior to the task creation, management zones have to be created first. However, task type 1 (Irrigation) can be created without predefined management zones as it is always created from the latest available raster data.In the case of other task types where management zones are mandatory, always the latest one isused by default. If there is no management zones created for the given parcel, the task creation endpoint creates one with default management zone creation parameters. With the optional management_zones_idparameter, any management zones can be selected as input for task creation.

Currently the API supports the following task types:

Name Task type id Unit
Irrigation 1 l/ha
Seeding 2 kg/ha
Fertilizer output 3 kg/ha

Method: POST

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>/create/task/<task_type_id>

Request parameters

Parameter Type Mandatory Description
values text yes Five values correspondig to the five classes of the task. Values are separated with “,” . Example: 1,2,3,4,5
management_zones_id integer no Management zones ID

Response object (JSON)

Field Description
id ID of the created Task
link API Link to the created Task

Example request

https://api.cropom.com/v1/0123/parcels/123/create/task/1

Example response

						
							{
								"id": 789,
								"link": "/v1/0123/parcels/123/tasks/789"
							}						
						
					

5.2 Get tasks

Get all tasks for a parcel with meta data and link to single tasks.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>/tasks/<

Request parameters

Parameter Type Mandatory Description
start date no Start date of time interval in yyyy-mm-dd fromat
stop date no End date of time interval in yyyy-mm-dd fromat

Response object (JSON)

Field Description
id Task id
task_type_id Task type ID
parcel_id Parcel ID
created_at Timestamp of task creation
applied_at Timestamp of task application
links List of task-related API links. Find list below.
Rel Description
self Link to the individual task

Example request

https://api.cropom.com/v1/0123/parcels/123/tasks

Example response

						
							[
								{
									"id": "2",
									"task_id": "1",
									"parcel_id": "123",
									"created_at": "2018-04-25 22:36:37",
									"applied_at": “2018-04-27 10:00:00”,
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/parcels/123/tasks/2"
										}
									]
								},
								{
									"id": "3",
									"task_id": "1",
									"parcel_id": "123",
									"created_at": "2018-05-26 07:48:11",
									"applied_at": null,
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/parcels/123/tasks/3"
										}
									}
							]						
						
					

5.3 Get single task

Get a specific task for a parcel with polygon geometries and values.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>/tasks/<task_id>

Request parameters

None

Response object (JSON)

Field Description
id Task id
task_type_id Task type ID
parcel_id Parcel ID
created_at Timestamp of task creation
applied_at Timestamp of task application
zones Feature collection of the task in GeoJSON format. Coordinate system: WGS84 (EPSG:4326). GeoJSON specification: http://geojson.org/
links List of task-related API links. Find list below.
Rel Description
self Link to the individual task

Example request

https://api.cropom.com/v1/0123/parcels/123/tasks/2

Example response

						
							[
								{
									"id": "2",
									"task_id": "1",
									"parcel_id": "123",
									"created_at": "2018-04-25 22:36:37",
									"applied_at": “2018-04-27 10:00:00”,
									"zones": [
										{
											"type": "FeatureCollection",
											"features": [
												{
													"type": "Feature",
													"geometry": {
														"type": "Polygon",
														"coordinates": [
															[
																[
																	19.865328959956,
																	47.669068306853
																],
																[
																	19.865328959956,
																	47.668977857974
																],
																[
																	19.86546291338,
																	47.668977857974
																],
																[
																	19.86546291338,
																	47.669068306853
																],
																[
																	19.865328959956,
																	47.669068306853
																]
															]
														]
													},
													"properties": {
														"value": "42",
														"unit": "kg/ha"
													}
												},
												{
													"type": "Feature",
													"geometry": {
														"type": "Polygon",
														"coordinates": [
															[
																[
																	19.86546291338,
																	47.669068306853
																],
																[
																	19.86546291338,
																	47.668977857974
																],
																[
																	19.865596866805,
																	47.668977857974
																],
																[
																	19.865596866805,
																	47.669068306853
																],
																[
																	19.86546291338,
																	47.669068306853
																]
															]
														]
													},
													"properties": {
														"value": "20",
														"unit": "kg/ha"
													}
												}
											]
										}
									],
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/parcels/123/tasks/2"
										}
									]
								}
							]
				
						
					

Alert endpoints

6.1 Get alerts

Get all alerts for a parcel with meta data and link to single alerts.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>/alerts

Request parameters

Parameter Type Mandatory Description
start date no Start date of time interval in yyyy-mm-dd fromat
stop date no End date of time interval in yyyy-mm-dd fromat
alert_flag integer no If the parameter is set to 1, only true alerts are returned

Response object (JSON)

Field Description
id Alert ID
alert_type_id Alert type ID
parcel_id Parcel ID
true_alert Binary value. Returns 0 if the alert refers to positive changes and 1 if the alert refers to negative changes in plant growth / health
value Alert value (category number)
descript Alert category legend
alert_date Date of alert in yyyy-mm-dd format.
index_name Name of vegetation index, used for the alert
affected_area Area affected by the alert in hectares (ha)
parcel_area Area of the parcel
affected_percent Area affected by the alert in percentages (%)
links List of task-related API links. Find list below
Rel Description
self Link to the individual alert

Example request

https://api.cropom.com/v1/0123/parcels/123/alerts

Example response

						
							[
								{
									"id": "111",
									"alert_type_id": "3",
									"parcel_id": "123",
									"value": "2",
									"descript": "(-50%) - (-20%)",
									"alert_date": "2017-06-04",
									"true_alert": "t",
									"alert_name": "Affected Area - NDVI",
									"index_name": "NDVI",
									"affected_area": "260.15",
									"parcel_area": "339.28",
									"affected_percent": "76.68",
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/parcels/123/alerts/111"
										}
									]
								},
								{
									"id": "222",
									"alert_type_id": "3",
									"parcel_id": "123",
									"value": "3",
									"descript": "(-20%) - (+20%)",
									"alert_date": "2017-06-04",
									"true_alert": "f",
									"alert_name": "Affected Area - NDVI",
									"index_name": "NDVI",
									"affected_area": "41.79",
									"parcel_area": "339.28",
									"affected_percent": "12.32",
									"links": [
										{
											"rel": "self",
											"href": "/v1/0123/parcels/123/alerts/222"
										}
									]
								}
							]						
						
					

6.2 Get single alert

Get a specific alert for a parcel with polygon geometries and values.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>/alerts/<alert_id>

Request parameters

None

Response object (JSON)

Field Description
id Alert ID
alert_type_id Alert type ID
parcel_id Parcel ID
true_alert Binary value. Returns 0 if the alert refers to positive changes and 1 if the alert refers to negative changes in plant growth / health
value Alert value (category number)
descript Alert category legend
alert_date Date of alert in yyyy-mm-dd format.
index_name Name of vegetation index, used for the alert
affected_area Area affected by the alert in hectare (ha)
parcel_area Area of the parcel
affected_percent Area affected by the alert in percentage (%)
geometry Geometry of the alert in GeoJSON format. Coordinate system: WGS84 (EPSG:4326). GeoJSON specification: http://geojson.org/
links List of task-related API links. Find list below
Rel Description
self Link to the individual alert

Example request

https://api.cropom.com/v1/0123/parcels/123/alerts/222

Example response

						
							[
								{
									"id": "222",
									"alert_type_id": "3",
									"parcel_id": "123",
									"true_alert": "0",
									"alert_name": "Affected Area - NDVI",
									"index_name": "NDVI",
									"alert_date": "2017-06-04",
									"value": "5",
									"descript": "(+50%) - (+100%)",
									"geometry": {
										"type": "MultiPolygon",
										"coordinates":  [
											[
												[
													[
														19.611037347617,
														46.682397205876
													],
													[
														19.611037347617,
														46.682307230304
													],
													[
														19.61116862468,
														46.682307230304
													],
													[
														19.61116862468,
														46.682217254581
													],
													[
														19.611431178806,
														46.682217254581
													],
													[
														19.611431178806,
														46.682397205876
													],
													[
														19.611037347617,
														46.682397205876
													]
												]
											],
											[
												[
													[
														19.615106936567,
														46.689414838851
													],
													[
														19.615106936567,
														46.689324874967
													],
													[
														19.61523821363,
														46.689324874967
													],
													[
														19.61523821363,
														46.689234910932
													],
													[
														19.615369490693,
														46.689234910932
													],
													[
														19.615369490693,
														46.689414838851
													],
													[
														19.615106936567,
														46.689414838851
													]
												]
											]
										]
									}
								}
							]
	
						
					

VRT file endpoints

7.1 Get single task XML

Download task as XML file in standard ISO-XML format.

Method: GET

Request URL

https://api.cropom.com/v1/<partner_key>/parcels/<parcel_id>/task/<task_id>/isoxml

Request parameters

None

Response object (XML)

Standard ISO-XML according to ISO11783 specification.

Example request

https://api.cropom.com/v1/0123/parcels/123/tasks/12/isoxml

Appendix

Crop types

Crop type ID Crop name
1 Corn
2 Spring wheat
3 Winter wheat
4 Barley
5 Sunflower
6 Canola

Alert types

Alert type ID Name Index Category
1 General Crop Development NDVI General
2 Inland water WATR Specific
3 Affected Area - NDVI NDVI Zonal

Indices

Index type ID Name Description
1 NDVI Normalized Vegetation Index
2 WATR Water coverage detection on agricultural fields.
3 DYNA NDVI dynamics. Differences of two consecutive ( in a temporal sense ) NDVI coverage.

Task types

Task type ID Name Unit
1 Irrigation l/ha
2 Seeding kg/ha
3 Fertilizer output kg/ha