37 lines
1.5 KiB
Markdown
37 lines
1.5 KiB
Markdown
## Create croppingscheme with the farmmaps API
|
|
* Create a 'vnd.farmmaps.itemtype.croppingscheme' item as a child of the 'USER_IN' item.
|
|
The data property can be used to add some information about the farm and the geometry can be used as location of the farm.
|
|
|
|
> Request
|
|
```javascript
|
|
POST /api/v1/items
|
|
{
|
|
"parentCode": "{USER_IN_item_code}",
|
|
"itemType": "vnd.farmmaps.itemtype.croppingscheme",
|
|
"name": "Name for the scheme",
|
|
"data": {},
|
|
"geometry": {"type":"Polygon","coordinates":[[[6.09942873984307,53.070025028087],[6.09992507404607,53.0705617890585],[6.10036959220086,53.0710679529031],[6.10065149010421,53.0714062774307],[6.10087493644271,53.0716712354474],[6.10091082982487,53.0716936039203],[6.10165087441291,53.0712041549161],[6.10204994718318,53.0709349338005],[6.10263143118855,53.0705789370018],[6.10311578125011,53.0702657538294],[6.10331686552072,53.0701314102389],[6.103326530575,53.070119463569],[6.10309137950343,53.0699829669055],[6.10184241586523,53.0692902201371],[6.10168497998891,53.0691984306747],[6.10092987659869,53.0694894453514],[6.09942873984307,53.070025028087]]]}
|
|
}
|
|
```
|
|
> Response 201 Created
|
|
```Javascript
|
|
{
|
|
"parentCode": "string",
|
|
"geometry": {},
|
|
"data": {},
|
|
"tags": [
|
|
"string"
|
|
],
|
|
"url": "string",
|
|
"code": "string",
|
|
"name": "string",
|
|
"created": "2019-12-18T10:16:21.455Z",
|
|
"updated": "2019-12-18T10:16:21.455Z",
|
|
"dataDate": "2019-12-18T10:16:21.455Z",
|
|
"itemType": "string",
|
|
"sourceTask": "string",
|
|
"size": 0,
|
|
"state": 0,
|
|
"thumbnail": true
|
|
}
|
|
``` |