Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Beskrivning
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 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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.
Datamodeller
Cases
Denna datamodell är en visuell överblick över Java-klasserna. Detta motsvarar ett komplett ärende. Detta är inget som lagras idag.
Gliffy | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
CaseMapping
Detta är databastabellen vi använder för att lagra kopplingen mellan OeP-ärendet och ärendet i det underliggande systemet.
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 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
Expand | ||
---|---|---|
| ||
eyJ4NXQiOiJOVGRtWmpNNFpEazNOalkwWXpjNU1tWm1PRGd3TVRFM01XWXdOREU1TVdSbFpEZzROemM0WkE9PSIsImtpZCI6ImdhdGV3YXlfY2VydGlmaWNhdGVfYWxpYXMiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbkBjYXJib24uc3VwZXIiLCJhcHBsaWNhdGlvbiI6eyJvd25lciI6ImFkbWluIiwidGllclF1b3RhVHlwZSI6bnVsbCwidGllciI6IjUwUGVyTWluIiwibmFtZSI6IkNvbmZsdWVuY2UiLCJpZCI6NDksInV1aWQiOiI5MTc3ZGYxZC1hMDQwLTQwMTYtOGVjZC05NGM1OGI1NmFjYTYifSwiaXNzIjoiaHR0cHM6XC9cL2FwaS1pbS10ZXN0LnN1bmRzdmFsbC5zZTo0NDNcL29hdXRoMlwvdG9rZW4iLCJ0aWVySW5mbyI6eyJVbmxpbWl0ZWQiOnsidGllclF1b3RhVHlwZSI6InJlcXVlc3RDb3VudCIsImdyYXBoUUxNYXhDb21wbGV4aXR5IjowLCJncmFwaFFMTWF4RGVwdGgiOjAsInN0b3BPblF1b3RhUmVhY2giOnRydWUsInNwaWtlQXJyZXN0TGltaXQiOjAsInNwaWtlQXJyZXN0VW5pdCI6bnVsbH19LCJrZXl0eXBlIjoiUFJPRFVDVElPTiIsInBlcm1pdHRlZFJlZmVyZXIiOiIiLCJzdWJzY3JpYmVkQVBJcyI6W3sic3Vic2NyaWJlclRlbmFudERvbWFpbiI6ImNhcmJvbi5zdXBlciIsIm5hbWUiOiJEaXN0dXJiYW5jZXMiLCJjb250ZXh0IjoiXC9kaXN0dXJiYW5jZXNcLzEuMSIsInB1Ymxpc2hlciI6ImFkbWluIiwidmVyc2lvbiI6IjEuMSIsInN1YnNjcmlwdGlvblRpZXIiOiJVbmxpbWl0ZWQifV0sInBlcm1pdHRlZElQIjoiIiwiaWF0IjoxNjQyMDc2OTAyLCJqdGkiOiI2MzUyNDM0NS01MmNlLTQyMzUtODNmZC0yOWIxNTY1ZWYxOTEifQ==.S8mFnktBSgU6HJ4SBk3Q6RLGtX_oQnaFQLzy6zzU9rU5J73o4D1j61YpOWuGYYFTLPmN9PbvLe_LkpWR5oRj4Fig7yIqUJ-YGkg0hNE8BXJLMb-2MUmRD6tvZFFI1ZVSwzDG_bDgoWPnoUTqxyni7gYfVgK0b_4CF7m6iVXNulUqzCLx-cOabJFB2QTFCNvDVlsXursf9SfEY5rhbyPyqWxRaiotGxXz0PnIlub5bvL5HEOuUdafj8ozMDGB2Wz2_0W4H8XBwjZnfLPQcyCEZ_WeDaFAd9mcDsQ4MiqexBdHPKv1dikzqJKOOBR4213KqQ2W2dDUwwthP3QCVxxqvQ== |
Swagger ui |
---|
{ "openapi" : "3.0.2", "info" : { "title" : "CaseManagement", "description" : "A service that manage cases against ByggR (building permit cases) and Ecos2 (environmental office cases).", "contact" : { "name" : "Sundsvalls kommun - Team Dynasty", "email" : "teamdynasty@sundsvall.se" }, "version" : "3.2" }, "servers" : [ { "url" : "https://api-test.sundsvall.se/casemanagement/3.2" } ], "security" : [ { "default" : [ ] } ], "paths" : { "/cases" : { "post" : { "tags" : [ "Cases" ], "description" : "Creates a case in ByggR or Ecos2 based on caseType. Also persists a connection between externalCaseId and the created case.", "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" : [ "CaseMappings" ], "description" : "Returns the connection between externalCaseId and the case in the underlying system.", "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" } } } }, "400" : { "description" : "Bad request", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Information" } } } }, "404" : { "description" : "Not found", "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/{external-case-id}/attachments" : { "post" : { "tags" : [ "Attachments" ], "description" : "Add attachments to existing case.", "parameters" : [ { "name" : "external-case-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/Attachment" } } } } }, "responses" : { "204" : { "description" : "No content - Successful request." }, "400" : { "description" : "Bad request", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Information" } } } }, "404" : { "description" : "Not found", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Information" } } } }, "500" : { "description" : "Internal Server Error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Information" } } } }, "501" : { "description" : "Not Implemented", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Information" } } } } }, "security" : [ { "default" : [ ] } ], "x-auth-type" : null, "x-throttling-tier" : null } }, "/cases/{external-case-id}/status" : { "get" : { "tags" : [ "Status" ], "description" : "Returns the latest status for the case in the underlying system connected to the specified externalCaseId.", "parameters" : [ { "name" : "external-case-id", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CaseStatus" } } } }, "400" : { "description" : "Bad request", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Information" } } } }, "404" : { "description" : "Not found", "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 } }, "/organization/{organizationNumber}/cases/status" : { "get" : { "tags" : [ "Status" ], "description" : "Returns the latest status for each of the cases where the specified organization has the role \"applicant\".", "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", "content" : { "application/json" : { "schema" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/CaseStatus" } } } } }, "400" : { "description" : "Bad request", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/Information" } } } }, "404" : { "description" : "Not found", "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 } } }, "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" }, "note" : { "type" : "string", "example" : "En anteckning." }, "extension" : { "pattern" : "\\S", "type" : "string", "nullable" : false, "example" : ".pdf" }, "mimeType" : { "type" : "string", "example" : "application/pdf" }, "file" : { "pattern" : "\\S", "type" : "string", "description" : "Base64-encoded file (plain text)", "format" : "byte", "nullable" : false } } }, "AttachmentCategory" : { "type" : "string", "description" : "Kategorisering av bilagor.", "enum" : [ "ADRESS", "ANKVU", "ANM", "ANMALAN_LIVSMEDELSANLAGGNING", "ANMÄ", "ANNO", "ANS", "ANSF", "ANSFÖ", "ANSM", "ANSR", "ANSS", "ANSSL", "ANSUP", "ANSUPA", "ANV", "ARBI", "ARIT", "ARK", "AVPLAN", "BANK", "BEGLST", "BEGSTART", "BEHA", "BEK", "BEKMOTANS", "BEMÖ", "BERBSA", "BESKA", "BESLUT", "BIL", "BLST", "BRAB", "BRAD", "BRAU", "BROS", "BRS", "BULL", "DEB", "DEL", "DELK", "DELSLU", "DELSTA", "DETALJ", "DHBHUR", "DOM", "DPH", "ELD", "ENEDEK", "ENER", "EPOS", "EXRIT", "FAKTU", "FAKTUS", "FAP", "FAPL", "FAS", "FAS2", "FASSIT", "FASSIT2", "FAST", "FOTO", "FOTOMON", "FPSS", "FS", "FS2", "FSF", "FUM", "FÄRG", "FÖLJ", "FÖLJREVRIT", "FÖRB", "FÖRG2", "FÖRGARBO", "FÖRK", "FÖRR", "GBLAD", "GEO", "GODFÄ", "GRA", "GRAM", "GRAN", "GRUNDP", "GRUNDR", "HBB", "HISSINT", "HUR", "INFOSS", "INTFAK", "INTSLUT", "INTY", "KA", "KART", "KLA", "KM", "KOMP", "KOND", "KONR", "KONT", "KP", "KPLAN", "KPR", "KPV", "KR", "KVAL", "LUFT", "LUTE", "MAIL", "MAPL", "MAST", "MATINV", "MEDDEL", "MINN", "MIRP", "MOTBKR", "MUR", "MÅTT", "NYKA", "OMPLÄ", "OVK", "PERSPEKTIV", "PFS2", "PFSI2", "PFSS2", "PLA", "PLA2", "PLAN", "PLANK", "PLASIT", "PLFA", "PLFA2", "PLFASE", "PLFASESI", "PLFASI", "PLSE", "PLSE2", "PM", "PMINN", "POIT", "PRES", "PRESENTA", "PROARB", "PROSS", "PROT", "PROTAU", "PROTKS", "PROTPLU", "PROTS", "PROTSBN", "PSI2", "PSS", "PSS2", "PÅMINNTB", "RAP", "RAPP", "REL", "REMISS", "REMS", "REMUA", "REVRIT", "RIT", "RITNING", "RIVA", "RIVP", "RUE", "RÄTT", "SAK", "SAKNAS", "SAKUT", "SBES", "SBN", "SCB", "SEK", "SEK2", "SEKSIT", "SEKT", "SESI2", "SIN", "SITU", "SKP", "SKR", "SKY", "SKYL", "SLUT", "STAB", "STIM", "STOMR", "SVAR", "SVAR2år", "SÅF", "TAPL", "TEBY", "TEKN", "TEKRAP", "TEVS", "TILL", "TILLVR", "TJ", "TJÄ", "TOMTPLBE", "TSR", "UBGARBO", "UKA", "UKON", "UKP", "UKR", "UND", "UNDER", "UNDUT", "UPLA", "UPPM", "URÖR", "UTBEU", "UTSK", "UTSKP", "UTSKS", "UVEN", "VAH", "VENT", "VS", "VVSH", "ÄRB", "ÅTG", "ÖVER" ] }, "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" } }, "caseTitleAddition" : { "type" : "string", "description" : "Additions to the case title. Right now only applicable to cases of CaseType: NYBYGGNAD_ANSOKAN_OM_BYGGLOV.", "example" : "Eldstad/rökkanal, Skylt" } }, "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" : { "type" : "string", "format" : "date-time", "readOnly" : true } } }, "CaseResourceResponse" : { "type" : "object", "properties" : { "caseId" : { "type" : "string" } } }, "CaseStatus" : { "type" : "object", "properties" : { "system" : { "$ref" : "#/components/schemas/SystemType" }, "externalCaseId" : { "type" : "string" }, "caseId" : { "type" : "string" }, "status" : { "type" : "string", "description" : "Status på ärendet", "example" : "Pågående" } } }, "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 } } }, "EnvironmentalCase" : { "required" : [ "attachments", "caseType", "externalCaseId", "facilities", "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" }, "caseTitleAddition" : { "type" : "string", "description" : "Additions to the case title. Right now only applicable to cases of CaseType: NYBYGGNAD_ANSOKAN_OM_BYGGLOV.", "example" : "Eldstad/rökkanal, Skylt" }, "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" } } }, "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>RECYCLING_STATION(Återvinningsstation)</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", "RECYCLING_STATION", "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" } } }, "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" } }, "personalNumber" : { "type" : "string", "readOnly" : true } } }, "PlanningPermissionCase" : { "required" : [ "attachments", "caseType", "externalCaseId", "facilities", "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" } }, "caseTitleAddition" : { "type" : "string", "description" : "Additions to the case title. Right now only applicable to cases of CaseType: NYBYGGNAD_ANSOKAN_OM_BYGGLOV.", "example" : "Eldstad/rökkanal, Skylt" }, "facilities" : { "minItems" : 1, "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" ] } }, "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
Säkerhetsklassning
Säkerhetsklass 1
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 Dynasty
För tekniska frågor: teamdynasty@sundsvall.se
Länkar
Länkar till dev-portal;
Test & Sandbox: https://api-im-test.sundsvall.se/devportal/apis/2b5a18bc-0e6e-4afb-92d9-92743aa37a5c/overview
Produktion: https://api-im.sundsvall.se/devportal/apis/a74e0ba9-9888-4ee0-a831-8df08df3ce20/overview
FAQ
<FAQ>