Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Beskrivning

Skapa en ny post. Defaultvärden kan hämtas via GET /{edit}

Exempel

/edit.salesarea

Request-Body

Code Block
languagejson
{
  "geometry": {
    "coordinates": [
      20.25,
      63.82
    ],
    "type": "Point"
  },
  "type": "Feature",
  "properties": {
    "intern_id": "test1",
    "administration": 240,
    "operation": 302,
    "description": "EnLaptop till laptop kvarlömd",
    "cost_prel": 3500,
    "damage_date": "2023-09-01",
    "status": 1,
    "policereport": false,
    "incident": false
  }
}

...

Beskrivning

Uppdatera en post med id. Enbart fält som ska uppdateras behöver komma med i anropet. Geometri är dock ett krav i nuläget och får inte lämnas tomt.

Exempel

/edit.salesarea/160343

...

En JSON-array med grundläggande metadata om tillgängliga regigeringstjänsterredigeringstjänster.

Exempelsvar

Code Block
languagejson
[
  {
    "id": "edit.salesarea",
    "label": "Säljområden",
    "entity": "entity.salesarea",
    "description": "Redigera regionala säljområden",
    "published": true,
    "creatable": true,
    "updatable": true,
    "deletable": false
  }
]

...

Code Block
languagejson
{
  "id": "edit.salesarea",
  "label": "Säljområden",
  "entity": "entity.salesarea",
  "description": "Redigera regionala säljområden",
  "published": true,
  "creatable": true,
  "updatable": true,
  "deletable": false,
  "parameters": [
    {
      "id": "created_date",
      "label": "%skfab_damage_dateDatum",
      "dataType": "date",
      "allowBlank": false,
      "allowNew": false,
      "allowNull": false,
      "readonly": false,
      "readonlyOnInsert": false,
      "readonlyOnUpdate": false,
      "type": "scalar"
    },
    {
      "id": "policereport",
      "label": "%skfab_police_reportPolisanmäld",
      "dataType": "string",
      "allowBlank": true,
      "allowNew": false,
      "allowNull": false,
      "defaultValue": "0",
      "readonly": false,
      "readonlyOnInsert": false,
      "readonlyOnUpdate": false,
      "type": "scalar"
    },
    {
      "id": "administration",
      "label": "%skfab_administrationOrganisation",
      "dataType": "integer",
      "allowBlank": true,
      "allowNew": false,
      "allowNull": false,
      "readonly": false,
      "readonlyOnInsert": false,
      "readonlyOnUpdate": false,
      "list": true,
      "type": "scalar"
    },
    {
      "id": "operation",
      "label": "%skfab_operationAvdelning",
      "dataType": "integer",
      "allowBlank": true,
      "allowNew": false,
      "allowNull": false,
      "readonly": false,
      "readonlyOnInsert": false,
      "readonlyOnUpdate": false,
      "list": true,
      "type": "scalar"
    },
    {
      "id": "categoriesandtype",
      "label": "%skfab_damage_categoriesKategori och typ",
      "parameters": [
        {
          "id": "damage_category",
          "label": "%skfab_categoryKategori",
          "dataType": "integer",
          "allowBlank": true,
          "allowNew": false,
          "allowNull": true,
          "readonly": false,
          "readonlyOnInsert": false,
          "readonlyOnUpdate": false,
          "selectionList": [
            [
              65,
              "Fastighet"
            ],
            [
              66,
              "Försäkring"
            ]
          ],
          "type": "scalar"
        },
        {
          "id": "damage_type",
          "label": "%skfab_typeTyp",
          "dataType": "integer",
          "allowBlank": true,
          "allowNew": false,
          "allowNull": true,
          "readonly": false,
          "readonlyOnInsert": false,
          "readonlyOnUpdate": false,
          "selectionList": [
            [
              353,
              "Brand",
              65
            ],
            [
              359,
              "Egendom",
              66
            ],
            [
              355,
              "Skadegörelse",
              65
            ]
          ],
          "type": "scalar"
        }
      ],
      "type": "cascade"
    },
    {
      "id": "description",
      "label": "%skfab_descriptionBeskrivning",
      "dataType": "string",
      "allowBlank": true,
      "allowNew": false,
      "allowNull": true,
      "readonly": false,
      "readonlyOnInsert": false,
      "readonlyOnUpdate": false,
      "type": "scalar"
    },
    {
      "id": "intern_id",
      "label": "%skfab_internal_idIntern-ID",
      "dataType": "string",
      "allowBlank": false,
      "allowNew": false,
      "allowNull": false,
      "readonly": false,
      "readonlyOnInsert": false,
      "readonlyOnUpdate": false,
      "type": "scalar"
    },
    {
      "id": "cost",
      "label": "%skfab_actual_costKostnad",
      "dataType": "integer",
      "allowBlank": true,
      "allowNew": false,
      "allowNull": true,
      "readonly": false,
      "readonlyOnInsert": false,
      "readonlyOnUpdate": false,
      "type": "scalar"
    },
    {
      "id": "status",
      "label": "%skfab_statusStatus",
      "dataType": "string",
      "allowBlank": false,
      "allowNew": false,
      "allowNull": false,
      "defaultValue": "2",
      "readonly": false,
      "readonlyOnInsert": false,
      "readonlyOnUpdate": false,
      "selectionList": [
        [
          1,
          "Mottagen"
        ],
        [
          2,
          "Registrerad"
        ],
        [
          3,
          "Strängd"
        ],
        [
          0,
          "Avbruten"
        ]
      ],
      "type": "scalar"
    }
  ],
  "geometry": {
    "geometry": {
      "maximum": 2147483647,
      "minimum": 0
    },
    "linestring": {
      "maximum": 0,
      "minimum": 0
    },
    "polygon": {
      "maximum": 0,
      "minimum": 0
    },
    "point": {
      "maximum": 1,
      "minimum": 1
    }
  }
}

...