„api-v1-ecoaccount-post_de“ hinzufügen
parent
781b16ad61
commit
1b397908f9
115
api-v1-ecoaccount-post_de.md
Normal file
115
api-v1-ecoaccount-post_de.md
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
## Spezifikation
|
||||||
|
### Ökokonto
|
||||||
|
#### Codes
|
||||||
|
Folgende Attribute referenzieren die `atomId` eines oKey Eintrags für Ökokonten:
|
||||||
|
1. `biotope`
|
||||||
|
2. `action`
|
||||||
|
|
||||||
|
#### POST
|
||||||
|
Mit `POST` kann ein neues Ökokonto angelegt werden. Die Daten werden im Request body als `application/json` gesendet. War der Request erfolgreich, erhält der Sender die `id` des neu angelegten Eintrags.
|
||||||
|
|
||||||
|
|
||||||
|
`/api/v1/ecoaccount`
|
||||||
|
|
||||||
|
#### Beispiel Body
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type": "MultiPolygon",
|
||||||
|
"coordinates": [
|
||||||
|
[
|
||||||
|
[
|
||||||
|
[
|
||||||
|
7.764930725097654,
|
||||||
|
50.530801443594385
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.763471603393552,
|
||||||
|
50.52709125717179
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.761154174804686,
|
||||||
|
50.524581259743805
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.762441635131831,
|
||||||
|
50.52141629007823
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.766475677490232,
|
||||||
|
50.51950629189859
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.770338058471677,
|
||||||
|
50.51868769758818
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.778749465942381,
|
||||||
|
50.51928800147066
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.780122756958003,
|
||||||
|
50.52763689111973
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.775144577026365,
|
||||||
|
50.533965783820754
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.768535614013667,
|
||||||
|
50.533965783820754
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7.764930725097654,
|
||||||
|
50.530801443594385
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"title": "Tolles Ökokonto",
|
||||||
|
"deductable_surface": 10000.0,
|
||||||
|
"responsible": {
|
||||||
|
"conservation_office": null,
|
||||||
|
"conservation_file_number": "123-TEST",
|
||||||
|
"handler": "Landkreis Ahrweiler"
|
||||||
|
},
|
||||||
|
"legal": {
|
||||||
|
"agreement_date": "2022-01-11"
|
||||||
|
},
|
||||||
|
"before_states": [
|
||||||
|
{
|
||||||
|
"biotope": "136155",
|
||||||
|
"surface": 10000.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"after_states": [
|
||||||
|
{
|
||||||
|
"biotope": "136156",
|
||||||
|
"surface": 10000.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"action": "709234",
|
||||||
|
"amount": 1.0,
|
||||||
|
"unit": "cm",
|
||||||
|
"comment": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"deadlines": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Beispiel Response
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "75c656e3-fdb9-46d5-bbd2-8dd26b6d295f"
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user