5 api v1 ecoaccount put_de
mpeltriaux edited this page 2023-02-23 10:58:33 +01:00

Spezifikation

Ökokonto

Codes

Folgende Attribute referenzieren die Id eines oKey Eintrags für Ökokonten:

  1. biotope
  2. action

PUT

Mit PUT kann ein Ökokonto überarbeitet werden. Die Daten werden im Request body als application/json gesendet. War der Request erfolgreich, erhält der Sender die id des überarbeiteten Eintrags.

/api/v1/ecoaccount/<uuid>

Beispiel Body

{
        "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": "100.0",
            "responsible": {
                "conservation_office": "710123",
                "conservation_file_number": "123-TEST",
                "handler": {
                    "type": "710178",
                    "detail": "Firma Mustermann234"
                }
            },
            "legal": {
                "agreement_date": "2022-01-11"
            },
            "before_states": [
                {
                    "biotope": "136155",
                    "biotope_details": [],
                    "surface": 10000.0
                }
            ],
            "after_states": [
                {
                    "biotope": "136156",
                    "biotope_details": [],
                    "surface": 10000.0
                }
            ],
            "actions": [
                {
                    "action_types": [
                        "709297",
                        "709289",
                        "709299"
                    ],
                    "action_details": [],
                    "amount": 1.0,
                    "unit": "cm",
                    "comment": ""
                }
            ],
            "deadlines": []
        }
    }
    

Beispiel Response

{
    "id": "75c656e3-fdb9-46d5-bbd2-8dd26b6d295f"
}