Versions Compared

Key

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

Beskrivning

En

Beskrivning

CaseManagement är en tjänst som hanterar ärenden mot ByggR och Ecos2 (fas 1) samt läser historik från E-arkiv (fas 2).

Behov

Idag när en medborgare använder en e-tjänst för bygglovsärenden eller miljökontorärenden så skickas en PDF-fil innehållandes all information från E-tjänsten till handläggarna som manuellt får mata in dessa uppgifter i ByggR eller Ecos2. Detta tar mycket tid från handläggarna. Tid som kan användas till mer värdeskapande aktiviteter. Detta är dessutom ett repetitivt och inte särskilt utvecklande arbete för individen.
Denna hantering vill vi automatisera genom att E-tjänsten istället anropar vårt CaseManagement-API som skapar ett ärende maskinellt i ByggR eller Ecos2.
Ett ärende som skapas i e-tjänster består alltid av två olika ärenden. Ett i Open ePlatform(OeP) och ett annat i antingen ByggR eller Ecos2. Ärendet i OeP har varit kundens perspektiv på ärendet. Detta ärende har inte uppdaterats i takt med att ärendet handläggs i antingen ByggR eller Ecos2. Idag kan inte intressenterna i ett ärende (t.ex. den sökande) hitta information om sitt ärende på webben. Idag behöver intressenten kontakta en handläggare för information om sitt ärende. Detta är krångligt, ineffektivt och inte särskilt användarvänligt för våra kunder, samtidigt som det är en belastning för handläggarna.
Detta vill vi lösa genom att CaseManagement föder OeP med information om de underliggande ärendena. Då kommer intressenterna kunna komma åt sina ärenden på webben.

Livscykelstatus

Under utveckling

Lösningsbeskrivning

Gliffy
imageAttachmentIdatt88113155
macroId9964760a-a025-4804-a896-4e790a78cba0
baseUrlhttps://sundsvall.atlassian.net/wiki
namecaseMan-API
diagramAttachmentIdatt88080400
containerId47317017
timestamp1613026839430

CaseManagement(CM) kommer lagra en koppling mellan ärendet i OeP och underliggande handläggningssystem. Denna lagring kommer ske i samband med att ärendet skapas från e-tjänsten. Detta kommer möjliggöra att CM kommer kunna hämta upp ärendet från underliggande system när OeP ber om information.

Anropsflöden

POST /cases

“Underliggande_system” syftar på antingen ByggR eller Ecos2 för närvarande. Anropet “Skapa ärende” kan bestå av ett flertal anrop för att skapa ett komplett ärende.

Image Removed

GET /cases (ej klar)

Image Removed

Datamodeller

Cases

Denna datamodell är en visuell överblick över Java-klasserna. Detta motsvarar ett komplett ärende. Detta är inget som lagras idag.

Gliffy
imageAttachmentIdatt357138446
macroIdb4c422c2-aedf-49d8-8da1-e7ce845bf7cf
baseUrlhttps://sundsvall.atlassian.net/wiki
nameCaseManagement datamodell
diagramAttachmentIdatt357531655
containerId47317017
timestamp1619174516603

CaseMapping

Detta är databastabellen vi använder för att lagra kopplingen mellan OeP-ärendet och ärendet i det underliggande systemet.

Image Removed
  • caseId - ID på ärendet i det underliggande systemet

  • externalCaseId - ID på OeP-ärendet

  • system - Det underliggande systemet (BYGGR, ECOS)

  • timestamp - tidsstämpel på när raden senast ändrades

Hantering av personuppgifter

Vi tar in ett personId , Ecos2 och vårt egna ärendehanteringssystem CaseData. CaseManagement fungerar som en ärendeförmedlare mellan ett externt system (idag främst Open ePlatform) och de underliggande systemen. CaseManagement tar emot ärenden i ett generiskt format och formaterar om ärendet så att det passar just det specifika system som det ska registreras i. CaseManagement håller även koll på kopplingen mellan det externa ärendet och det underliggande systemet och på så vis möjliggörs hämtning av status från det underliggande systemet, uppdateringar av ärendet med nya bilagor o.s.v. 

Livscykelstatus

Produktion

Lösningsbeskrivning

Gliffy
displayNamecaseMan-API Copy
namecaseMan-API Copy
pagePin1

Hantering av personuppgifter

Vi tar in fältet “personId” och hämtar sedan det tillhörande personnumret från CitizenMapping för att kunna anropa Ecos2 och ByggR med personnummer. Vi kan inte påverka det faktum att dessa system kräver detta som indata. Ecos2 och ByggR ligger på det interna nätet på Sundsvalls kommun.

API specifikation

Swagger ui
{
  "openapi" : "3.0.2",
  "info" : {
    "title" : "CaseManagement",
    "description" : "En tjänst som hanterar ärenden mot ByggR(bygglovsärenden) och Ecos2(miljökontorärenden).",
    "contact" : {
      "name" : "Sundsvalls kommun - Dennis Nilsson",
      "email" : "dennis.nilsson@sundsvall.se"
    },
    "version" : "2.1"
  },
  "servers" : [ {
    "url" : "https://api-test.sundsvall.se/casemanagement/2.1"
  } ],
  "security" : [ {
    "default" : [ ]
  } ],
  "paths" : {
    "/cases" : {
      "post" : {
        "tags" : [ "Cases" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/Case"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CaseResourceResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Information"
                }
              }
            }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Information"
                }
              }
            }
          }
        },
        "security" : [ {
          "default" : [ ]
        } ],
        "x-auth-type" : null,
        "x-throttling-tier" : null
      }
    },
    "/cases/case-mappings" : {
      "get" : {
        "tags" : [ "CaseMapping" ],
        "parameters" : [ {
          "name" : "external-case-id",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CaseMapping"
                }
              }
            }
          }
        },
        "security" : [ {
          "default" : [ ]
        } ],
        "x-auth-type" : null,
        "x-throttling-tier" : null
      }
    },
    "/cases/closed/documents/archive" : {
      "get" : {
        "tags" : [ "Documents" ],
        "parameters" : [ {
          "name" : "search-end",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string",
            "description" : "Slutdatum på sökningen. Default = dagens datum.",
            "format" : "date"
          }
        }, {
          "name" : "search-start",
          "in" : "query",
          "required" : true,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string",
            "description" : "Startdatum på sökningen.",
            "format" : "date",
            "nullable" : false
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/Attachment"
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "Bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Information"
                }
              }
            }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Information"
                }
              }
            }
          }
        },
        "security" : [ {
          "default" : [ ]
        } ],
        "x-auth-type" : null,
        "x-throttling-tier" : null
      }
    },
    "/cases/{externalCaseId}/status" : {
      "get" : {
        "tags" : [ "Status" ],
        "parameters" : [ {
          "name" : "externalCaseId",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK"
          }
        },
        "security" : [ {
          "default" : [ ]
        } ],
        "x-auth-type" : null,
        "x-throttling-tier" : null
      }
    },
    "/organization/{organizationNumber}/cases/status" : {
      "get" : {
        "tags" : [ "Status" ],
        "parameters" : [ {
          "name" : "organizationNumber",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string",
            "description" : "Organisationsnummer bestående av 10 eller 12 siffror.",
            "example" : "19901010-1234"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK"
          }
        },
        "security" : [ {
          "default" : [ ]
        } ],
        "x-auth-type" : null,
        "x-throttling-tier" : null
      }
    }
  },
  "components" : {
    "schemas" : {
      "Address" : {
        "required" : [ "addressCategories" ],
        "type" : "object",
        "properties" : {
          "addressCategories" : {
            "minItems" : 1,
            "type" : "array",
            "description" : "En adress kan ha en eller flera adresskategorier. Det kan exempelvis vara samma adress som ska användas för post och fakturor.",
            "items" : {
              "$ref" : "#/components/schemas/AddressCategory"
            }
          },
          "street" : {
            "type" : "string",
            "example" : "Testvägen"
          },
          "houseNumber" : {
            "type" : "string",
            "example" : "18"
          },
          "postalCode" : {
            "type" : "string",
            "example" : "123 45"
          },
          "city" : {
            "type" : "string",
            "example" : "Sundsvall"
          },
          "country" : {
            "type" : "string",
            "example" : "Sverige"
          },
          "careOf" : {
            "type" : "string",
            "description" : "c/o",
            "example" : "Test Testorsson"
          },
          "attention" : {
            "type" : "string",
            "example" : "Test Testorsson"
          },
          "propertyDesignation" : {
            "type" : "string",
            "description" : "Fastighetsbeteckning",
            "example" : "SUNDSVALL LJUSTA 7:2"
          },
          "appartmentNumber" : {
            "type" : "string",
            "example" : "LGH 1001"
          },
          "location" : {
            "$ref" : "#/components/schemas/Coordinates"
          },
          "isZoningPlanArea" : {
            "type" : "boolean",
            "description" : "Ligger inom detaljplanerat område"
          },
          "invoiceMarking" : {
            "type" : "string",
            "description" : "Märkning av faktura (anges endast i samband med addressCategory INVOICE_ADDRESS)"
          }
        }
      },
      "AddressCategory" : {
        "type" : "string",
        "description" : "Kategorisering av adresser. <li>POSTAL_ADDRESS(Postadress)</li><li>INVOICE_ADDRESS(Fakturaadress)</li><li>VISITING_ADDRESS(Besöksadress)</li>",
        "enum" : [ "INVOICE_ADDRESS", "POSTAL_ADDRESS", "VISITING_ADDRESS" ]
      },
      "Attachment" : {
        "required" : [ "category", "extension", "file", "name" ],
        "type" : "object",
        "properties" : {
          "category" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/AttachmentCategory"
            }, {
              "nullable" : false
            } ]
          },
          "name" : {
            "pattern" : "\\S",
            "type" : "string",
            "nullable" : false,
            "example" : "Namn på dokumentet"
          },
          "extension" : {
            "pattern" : "\\S",
            "type" : "string",
            "nullable" : false,
            "example" : ".pdf"
          },
          "mimeType" : {
            "type" : "string",
            "example" : "application/pdf"
          },
          "note" : {
            "type" : "string",
            "example" : "En anteckning."
          },
          "file" : {
            "pattern" : "\\S",
            "type" : "string",
            "description" : "Base64-encoded file (plain text)",
            "format" : "byte",
            "nullable" : false
          }
        }
      },
      "AttachmentCategory" : {
        "type" : "string",
        "description" : "Kategorisering av bilagor. <br><br><h3>Bygglovsärende-kategorier:</h3><li>ANSOKAN_OM_BYGGLOV(Ansökan om bygglov)</li><li>GENERAL_ARRANGEMENT(Situationsplan)</li><li>APPLICATION(Anmälan)</li><li>REPORT_OF_CONTROL_OFFICIAL(Anmälan av kontrollansvarig)</li><li>CONSTRUCTION_DOCUMENT(Konstruktionshandling)</li><li>FLOOR_PLAN(Planritning)</li><li>ELEVATION(Fasadritning)</li><li>PLAN_FACADE_DESIGN(Plan- och fasadritning)</li><li>PROPOSED_CONTROL_PLAN(Förslag till kontrollplan)</li><li>NEW_CONSTRUCTION_MAP(Nybyggnadskarta)</li><li>SECTION_DESIGN(Sektionsritning)</li><li>CONSTRUCTION_DESIGN(Konstruktionsritning)</li><li>NEIGHBOR_CONSENT(Grannemedgivande)</li><li>DECLARATION_OF_PERFORMANCE(Prestandadeklaration)</li><li>PROXY(Fullmakt)</li><li>DESIGN(Ritning)</li><li>FIRE_PROTECTION_DOCUMENT(Brandskyddsdokumentation)</li><li>ATTACHMENT(Övriga bilagor)</li><br><h3>Miljökontorärende-kategorier:</h3><li>ANMALAN_LIVSMEDELSANLAGGNING(Anmälan livsmedelsanläggning)</li>",
        "enum" : [ "ANMALAN_LIVSMEDELSANLAGGNING", "ANSOKAN_OM_BYGGLOV", "APPLICATION", "ATTACHMENT", "CONSTRUCTION_DESIGN", "CONSTRUCTION_DOCUMENT", "DECLARATION_OF_PERFORMANCE", "DESIGN", "ELEVATION", "FIRE_PROTECTION_DOCUMENT", "FLOOR_PLAN", "GENERAL_ARRANGEMENT", "NEIGHBOR_CONSENT", "NEW_CONSTRUCTION_MAP", "PLAN_FACADE_DESIGN", "PROPOSED_CONTROL_PLAN", "PROXY", "REPORT_OF_CONTROL_OFFICIAL", "SECTION_DESIGN" ]
      },
      "CalendarDate" : {
        "type" : "object",
        "properties" : {
          "era" : {
            "$ref" : "#/components/schemas/Era"
          },
          "year" : {
            "type" : "integer",
            "format" : "int32"
          },
          "month" : {
            "type" : "integer",
            "format" : "int32"
          },
          "dayOfMonth" : {
            "type" : "integer",
            "format" : "int32"
          },
          "dayOfWeek" : {
            "type" : "integer",
            "format" : "int32"
          },
          "leapYear" : {
            "type" : "boolean"
          },
          "hours" : {
            "type" : "integer",
            "format" : "int32"
          },
          "minutes" : {
            "type" : "integer",
            "format" : "int32"
          },
          "seconds" : {
            "type" : "integer",
            "format" : "int32"
          },
          "millis" : {
            "type" : "integer",
            "format" : "int32"
          },
          "fraction" : {
            "type" : "integer",
            "format" : "int64"
          },
          "normalized" : {
            "type" : "boolean"
          },
          "zoneinfo" : {
            "$ref" : "#/components/schemas/TimeZone"
          },
          "zoneOffset" : {
            "type" : "integer",
            "format" : "int32"
          },
          "daylightSaving" : {
            "type" : "integer",
            "format" : "int32"
          },
          "forceStandardTime" : {
            "type" : "boolean"
          },
          "locale" : {
            "$ref" : "#/components/schemas/Locale"
          },
          "timeOfDay" : {
            "type" : "integer",
            "format" : "int64"
          },
          "standardTime" : {
            "type" : "boolean"
          },
          "daylightTime" : {
            "type" : "boolean"
          },
          "zone" : {
            "$ref" : "#/components/schemas/TimeZone"
          }
        }
      },
      "Case" : {
        "required" : [ "attachments", "caseType", "externalCaseId", "stakeholders" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "integer",
            "format" : "int64",
            "readOnly" : true
          },
          "externalCaseId" : {
            "type" : "string",
            "description" : "ÄrendeId från Open-E",
            "nullable" : false,
            "example" : "1"
          },
          "caseType" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/CaseType"
            }, {
              "nullable" : false
            } ]
          },
          "description" : {
            "type" : "string",
            "description" : "Beskriv kort vad du vill bygga",
            "example" : "En fritextbeskrivning av case."
          },
          "stakeholders" : {
            "minItems" : 1,
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Stakeholder"
            }
          },
          "attachments" : {
            "minItems" : 1,
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Attachment"
            }
          }
        },
        "oneOf" : [ {
          "$ref" : "#/components/schemas/PlanningPermissionCase"
        }, {
          "$ref" : "#/components/schemas/EnvironmentalCase"
        } ]
      },
      "CaseMapping" : {
        "required" : [ "system" ],
        "type" : "object",
        "properties" : {
          "externalCaseId" : {
            "type" : "string"
          },
          "caseId" : {
            "type" : "string"
          },
          "system" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/SystemType"
            }, {
              "nullable" : false
            } ]
          },
          "timestamp" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/Timestamp"
            }, {
              "readOnly" : true
            } ]
          }
        }
      },
      "CaseResourceResponse" : {
        "type" : "object",
        "properties" : {
          "caseId" : {
            "type" : "string"
          }
        }
      },
      "CaseType" : {
        "type" : "string",
        "description" : "Sätts till den enum som hör ihop med den anropande e-tjänsten.",
        "example" : "NYBYGGNAD_ANSOKAN_OM_BYGGLOV",
        "enum" : [ "LIVSMEDELSVERKSAMHET_ANMALAN_OM_REGISTRERING", "NYBYGGNAD_ANSOKAN_OM_BYGGLOV" ]
      },
      "Coordinates" : {
        "type" : "object",
        "properties" : {
          "latitude" : {
            "type" : "number",
            "description" : "Decimal Degrees (DD)",
            "format" : "double",
            "example" : 62.390205
          },
          "longitude" : {
            "type" : "number",
            "description" : "Decimal Degrees (DD)",
            "format" : "double",
            "example" : 17.306616
          }
        }
      },
      "Date" : {
        "type" : "object",
        "properties" : {
          "era" : {
            "$ref" : "#/components/schemas/Era"
          },
          "year" : {
            "type" : "integer",
            "format" : "int32"
          },
          "month" : {
            "type" : "integer",
            "format" : "int32"
          },
          "dayOfMonth" : {
            "type" : "integer",
            "format" : "int32"
          },
          "dayOfWeek" : {
            "type" : "integer",
            "format" : "int32"
          },
          "leapYear" : {
            "type" : "boolean"
          },
          "hours" : {
            "type" : "integer",
            "format" : "int32"
          },
          "minutes" : {
            "type" : "integer",
            "format" : "int32"
          },
          "seconds" : {
            "type" : "integer",
            "format" : "int32"
          },
          "millis" : {
            "type" : "integer",
            "format" : "int32"
          },
          "fraction" : {
            "type" : "integer",
            "format" : "int64"
          },
          "normalized" : {
            "type" : "boolean"
          },
          "zoneinfo" : {
            "$ref" : "#/components/schemas/TimeZone"
          },
          "zoneOffset" : {
            "type" : "integer",
            "format" : "int32"
          },
          "daylightSaving" : {
            "type" : "integer",
            "format" : "int32"
          },
          "forceStandardTime" : {
            "type" : "boolean"
          },
          "locale" : {
            "$ref" : "#/components/schemas/Locale"
          },
          "timeOfDay" : {
            "type" : "integer",
            "format" : "int64"
          },
          "standardTime" : {
            "type" : "boolean"
          },
          "daylightTime" : {
            "type" : "boolean"
          },
          "zone" : {
            "$ref" : "#/components/schemas/TimeZone"
          },
          "cachedYear" : {
            "type" : "integer",
            "format" : "int32"
          },
          "cachedFixedDateJan1" : {
            "type" : "integer",
            "format" : "int64"
          },
          "cachedFixedDateNextJan1" : {
            "type" : "integer",
            "format" : "int64"
          },
          "normalizedYear" : {
            "type" : "integer",
            "format" : "int32"
          },
          "cachedJan1" : {
            "type" : "integer",
            "format" : "int64"
          }
        }
      },
      "EnvironmentalCase" : {
        "required" : [ "attachments", "caseType", "externalCaseId", "stakeholders", "startDate" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "integer",
            "format" : "int64",
            "readOnly" : true
          },
          "externalCaseId" : {
            "type" : "string",
            "description" : "ÄrendeId från Open-E",
            "nullable" : false,
            "example" : "1"
          },
          "caseType" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/CaseType"
            }, {
              "nullable" : false
            } ]
          },
          "description" : {
            "type" : "string",
            "description" : "Beskriv kort vad du vill bygga",
            "example" : "En fritextbeskrivning av case."
          },
          "stakeholders" : {
            "minItems" : 1,
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Stakeholder"
            }
          },
          "attachments" : {
            "minItems" : 1,
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Attachment"
            }
          },
          "startDate" : {
            "type" : "string",
            "description" : "Startdatum på verksamheten.",
            "format" : "date",
            "nullable" : false
          },
          "endDate" : {
            "type" : "string",
            "description" : "Slutdatum på verksamheten vid det fall den är tidsbegränsad.",
            "format" : "date"
          },
          "facilities" : {
            "maxItems" : 1,
            "minItems" : 1,
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/EnvironmentalFacility"
            }
          }
        },
        "description" : "Miljökontorärende (Ecos2)"
      },
      "EnvironmentalFacility" : {
        "required" : [ "facilityCollectionName" ],
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string",
            "example" : "En fritextbeskrivning av facility."
          },
          "address" : {
            "$ref" : "#/components/schemas/Address"
          },
          "facilityCollectionName" : {
            "pattern" : "\\S",
            "type" : "string",
            "description" : "Skyltnamn",
            "nullable" : false,
            "example" : "Sundsvalls testfabrik"
          }
        }
      },
      "Era" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string"
          },
          "abbr" : {
            "type" : "string"
          },
          "since" : {
            "type" : "integer",
            "format" : "int64"
          },
          "sinceDate" : {
            "$ref" : "#/components/schemas/CalendarDate"
          },
          "localTime" : {
            "type" : "boolean"
          },
          "hash" : {
            "type" : "integer",
            "format" : "int32"
          },
          "abbreviation" : {
            "type" : "string"
          }
        }
      },
      "Facility" : {
        "type" : "object",
        "properties" : {
          "description" : {
            "type" : "string",
            "example" : "En fritextbeskrivning av facility."
          },
          "address" : {
            "$ref" : "#/components/schemas/Address"
          }
        },
        "oneOf" : [ {
          "$ref" : "#/components/schemas/PlanningPermissionFacility"
        }, {
          "$ref" : "#/components/schemas/EnvironmentalFacility"
        } ]
      },
      "FacilityType" : {
        "type" : "string",
        "description" : "Typ av byggnad.<br><br>Typer:<li>ONE_FAMILY_HOUSE(enbostadshus)</li><li>APARTMENT_BLOCK(flerbostadshus)</li><li>WEEKEND_COTTAGE(fritidshus)</li><li>OFFICE_BUILDING(kontorsbyggnad)</li><li>INDUSTRIAL_BUILDING(industribyggnad)</li><li>GARAGE(garage)</li><li>CARPORT(carport)</li><li>STOREHOUSE(förråd)</li><li>GREENHOUSE(växthus)</li><li>GUEST_HOUSE(gäststuga)</li><li>WAREHOUSE(lagerbyggnad)</li><li>WORKSHOP_BUILDING(Verkstadsbyggnad)</li><li>RESTAURANT(Restaurang)</li><li>SCHOOL(Skola)</li><li>PRESCHOOL(Förskola)</li><li>PARKING(Parkering, Cykelparkering)</li><li>DEPOT(Upplag)</li><li>MARINA(Småbåtshamn)</li><li>WALL(Mur)</li><li>PALING(Plank)</li><li>OTHER(övrigt)</li>",
        "enum" : [ "APARTMENT_BLOCK", "CARPORT", "DEPOT", "GARAGE", "GREENHOUSE", "GUEST_HOUSE", "INDUSTRIAL_BUILDING", "MARINA", "OFFICE_BUILDING", "ONE_FAMILY_HOUSE", "OTHER", "PALING", "PARKING", "PRESCHOOL", "RESTAURANT", "SCHOOL", "STOREHOUSE", "WALL", "WAREHOUSE", "WEEKEND_COTTAGE", "WORKSHOP_BUILDING" ]
      },
      "Information" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string"
          },
          "status" : {
            "type" : "integer",
            "format" : "int32"
          },
          "title" : {
            "type" : "string"
          },
          "detail" : {
            "type" : "string"
          },
          "instance" : {
            "type" : "string"
          }
        }
      },
      "Locale" : {
        "type" : "object",
        "properties" : {
          "language" : {
            "type" : "string"
          },
          "script" : {
            "type" : "string"
          },
          "country" : {
            "type" : "string"
          },
          "variant" : {
            "type" : "string"
          },
          "extensionKeys" : {
            "uniqueItems" : true,
            "type" : "array",
            "items" : {
              "type" : "string",
              "format" : "byte"
            }
          },
          "unicodeLocaleAttributes" : {
            "uniqueItems" : true,
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "unicodeLocaleKeys" : {
            "uniqueItems" : true,
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "iSO3Language" : {
            "type" : "string"
          },
          "iSO3Country" : {
            "type" : "string"
          },
          "displayLanguage" : {
            "type" : "string"
          },
          "displayScript" : {
            "type" : "string"
          },
          "displayCountry" : {
            "type" : "string"
          },
          "displayVariant" : {
            "type" : "string"
          },
          "displayName" : {
            "type" : "string"
          }
        }
      },
      "Organization" : {
        "required" : [ "organizationName", "organizationNumber", "roles", "type" ],
        "type" : "object",
        "properties" : {
          "type" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/StakeholderType"
            }, {
              "nullable" : false
            } ]
          },
          "roles" : {
            "type" : "array",
            "description" : "En intressent kan ha en eller flera roller.",
            "nullable" : false,
            "items" : {
              "$ref" : "#/components/schemas/StakeholderRole"
            }
          },
          "organizationName" : {
            "pattern" : "\\S",
            "type" : "string",
            "nullable" : false,
            "example" : "Sundsvalls testfabrik"
          },
          "organizationNumber" : {
            "pattern" : "\\S",
            "type" : "string",
            "description" : "Organisationsnummer bestående av 10 eller 12 siffror.",
            "nullable" : false,
            "example" : "19901010-1234"
          },
          "phoneNumber" : {
            "type" : "string",
            "example" : "060121212"
          },
          "emailAddress" : {
            "type" : "string",
            "example" : "test.testorsson@test.se"
          },
          "cellphoneNumber" : {
            "type" : "string",
            "example" : "0701231212"
          },
          "addresses" : {
            "type" : "array",
            "description" : "En intressent kan ha en eller flera adresser. T.ex. en adress av typen POSTAL_ADDRESS och en annan av typen INVOICE_ADDRESS.",
            "items" : {
              "$ref" : "#/components/schemas/Address"
            }
          },
          "authorizedSignatory" : {
            "type" : "string",
            "description" : "Firmatecknare",
            "example" : "Test Testorsson"
          }
        }
      },
      "Person" : {
        "required" : [ "firstName", "lastName", "roles", "type" ],
        "type" : "object",
        "properties" : {
          "type" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/StakeholderType"
            }, {
              "nullable" : false
            } ]
          },
          "roles" : {
            "type" : "array",
            "description" : "En intressent kan ha en eller flera roller.",
            "nullable" : false,
            "items" : {
              "$ref" : "#/components/schemas/StakeholderRole"
            }
          },
          "firstName" : {
            "pattern" : "\\S",
            "type" : "string",
            "nullable" : false,
            "example" : "Test"
          },
          "lastName" : {
            "pattern" : "\\S",
            "type" : "string",
            "nullable" : false,
            "example" : "Testorsson"
          },
          "personId" : {
            "type" : "string",
            "example" : "3ed5bc30-6308-4fd5-a5a7-78d7f96f4438"
          },
          "phoneNumber" : {
            "type" : "string",
            "example" : "060121212"
          },
          "emailAddress" : {
            "type" : "string",
            "example" : "test.testorsson@test.se"
          },
          "cellphoneNumber" : {
            "type" : "string",
            "example" : "0701231212"
          },
          "addresses" : {
            "type" : "array",
            "description" : "En intressent kan ha en eller flera adresser. T.ex. en adress av typen POSTAL_ADDRESS och en annan av typen INVOICE_ADDRESS.",
            "items" : {
              "$ref" : "#/components/schemas/Address"
            }
          }
        }
      },
      "PlanningPermissionCase" : {
        "required" : [ "attachments", "caseType", "externalCaseId", "stakeholders" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "integer",
            "format" : "int64",
            "readOnly" : true
          },
          "externalCaseId" : {
            "type" : "string",
            "description" : "ÄrendeId från Open-E",
            "nullable" : false,
            "example" : "1"
          },
          "caseType" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/CaseType"
            }, {
              "nullable" : false
            } ]
          },
          "description" : {
            "type" : "string",
            "description" : "Beskriv kort vad du vill bygga",
            "example" : "En fritextbeskrivning av case."
          },
          "stakeholders" : {
            "minItems" : 1,
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Stakeholder"
            }
          },
          "attachments" : {
            "minItems" : 1,
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Attachment"
            }
          },
          "facilities" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PlanningPermissionFacility"
            }
          },
          "diaryNumber" : {
            "type" : "string",
            "description" : "Diarienummer"
          }
        },
        "description" : "Bygglovsärende (ByggR)"
      },
      "PlanningPermissionFacility" : {
        "required" : [ "facilityType" ],
        "type" : "object",
        "properties" : {
          "facilityType" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/FacilityType"
            }, {
              "nullable" : false
            } ]
          },
          "description" : {
            "type" : "string",
            "example" : "En fritextbeskrivning av facility."
          },
          "address" : {
            "$ref" : "#/components/schemas/Address"
          },
          "mainFacility" : {
            "type" : "boolean"
          }
        }
      },
      "Stakeholder" : {
        "required" : [ "roles", "type" ],
        "type" : "object",
        "properties" : {
          "type" : {
            "allOf" : [ {
              "$ref" : "#/components/schemas/StakeholderType"
            }, {
              "nullable" : false
            } ]
          },
          "roles" : {
            "type" : "array",
            "description" : "En intressent kan ha en eller flera roller.",
            "nullable" : false,
            "items" : {
              "$ref" : "#/components/schemas/StakeholderRole"
            }
          },
          "phoneNumber" : {
            "type" : "string",
            "example" : "060121212"
          },
          "emailAddress" : {
            "type" : "string",
            "example" : "test.testorsson@test.se"
          },
          "cellphoneNumber" : {
            "type" : "string",
            "example" : "0701231212"
          },
          "addresses" : {
            "type" : "array",
            "description" : "En intressent kan ha en eller flera adresser. T.ex. en adress av typen POSTAL_ADDRESS och en annan av typen INVOICE_ADDRESS.",
            "items" : {
              "$ref" : "#/components/schemas/Address"
            }
          }
        },
        "oneOf" : [ {
          "$ref" : "#/components/schemas/Person"
        }, {
          "$ref" : "#/components/schemas/Organization"
        } ]
      },
      "StakeholderRole" : {
        "type" : "string",
        "description" : "<h3>Generella-roller:</h3><li>CONTACT_PERSON(Kontaktperson)</li><br><br><h3>Bygglovsärende-roller:</h3><li>CONTROL_OFFICIAL(Kontrollansvarig)</li><li>APPLICANT(Sökande)<li>PROPERTY_OWNER(Fastighetsägare)</li><li>PAYMENT_PERSON(Betalningsansvarig)</li><br><br><h3>Miljökontorärende-roller:</h3><li>INVOICE_RECIPENT(Fakturamottagare)</li><li>OPERATOR(Verksamhetsutövare)</li>",
        "enum" : [ "APPLICANT", "CONTACT_PERSON", "CONTROL_OFFICIAL", "INVOICE_RECIPENT", "OPERATOR", "PAYMENT_PERSON", "PROPERTY_OWNER" ]
      },
      "StakeholderType" : {
        "type" : "string",
        "enum" : [ "ORGANIZATION", "PERSON" ]
      },
      "SystemType" : {
        "type" : "string",
        "enum" : [ "BYGGR", "ECOS" ]
      },
      "TimeZone" : {
        "type" : "object",
        "properties" : {
          "ID" : {
            "type" : "string"
          },
          "rawOffset" : {
            "type" : "integer",
            "format" : "int32"
          },
          "iD" : {
            "type" : "string"
          },
          "displayName" : {
            "type" : "string"
          },
          "dSTSavings" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "Timestamp" : {
        "type" : "object",
        "properties" : {
          "year" : {
            "type" : "integer",
            "format" : "int32"
          },
          "month" : {
            "type" : "integer",
            "format" : "int32"
          },
          "date" : {
            "type" : "integer",
            "format" : "int32"
          },
          "day" : {
            "type" : "integer",
            "format" : "int32"
          },
          "hours" : {
            "type" : "integer",
            "format" : "int32"
          },
          "minutes" : {
            "type" : "integer",
            "format" : "int32"
          },
          "seconds" : {
            "type" : "integer",
            "format" : "int32"
          },
          "timeImpl" : {
            "type" : "integer",
            "format" : "int64"
          },
          "timezoneOffset" : {
            "type" : "integer",
            "format" : "int32"
          },
          "calendarDate" : {
            "$ref" : "#/components/schemas/Date"
          },
          "nanos" : {
            "type" : "integer",
            "format" : "int32"
          },
          "time" : {
            "type" : "integer",
            "format" : "int64"
          }
        }
      }
    },
    "securitySchemes" : {
      "default" : {
        "type" : "oauth2",
        "flows" : {
          "implicit" : {
            "authorizationUrl" : "https://api-test.sundsvall.se/authorize",
            "scopes" : { }
          }
        }
      }
    }
  }
}

Medvetna avvikelser

  • Handläggarna i ByggR ville ha filnamnet på dokument i anteckningsfältet i ByggR för att få en bättre överblick. Egentligen ska fältet “note” i Attachment-objektet användas för detta i CaseManagaement's API, men p.g.a. begränsningar i OeP’s integrationsadapter som inte möjliggör att e-tjänsteutvecklaren kan konfigurera att detta skickas med så valde vi att lösa detta i CaseManagement’s backend istället.

    • Detta påverkar endast bygglovsärenden

API specifikation

Open api
showCommonExtensionstrue
deepLinkingtrue
supportedSubmitMethodsnone
locationurl
showExtensionstrue
urlhttps://api-i-test.sundsvall.se/casemanagement/8.0/api-docs



Säkerhetsklassning

Säkerhetsklass TBD1

Autentiseringsmetod: Oauth2

(Ref: Säkerhetsklassning av APIer )

API-ägare

<Kontaktuppgifter till den verksamhet som äger APIets livscykel> )

Teknisk ägare

https://sundsvall.atlassian.net/wiki/spaces/API

Ansvarigt team: Team Unmasked

För tekniska frågor:dennis.nilsson@sundsvall teamunmasked@sundsvall.se 

Länkar

Länkar till dev-portal;

FAQ

<FAQ>

Källkod

GitHub

FAQ

|