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
imageAttachmentIdatt88113155
macroId9964760a-a025-4804-a896-4e790a78cba0
baseUrlhttps://sundsvall.atlassian.net/wiki
namecaseMan-API
diagramAttachmentIdatt88080400
containerId47317017
timestamp1644496395387

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
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.

  • 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
titleAPI-nyckel för sandbox-miljö. Klicka på "Authorize" nedan och ange denna nyckel för att testa API:et.

eyJ4NXQiOiJOVGRtWmpNNFpEazNOalkwWXpjNU1tWm1PRGd3TVRFM01XWXdOREU1TVdSbFpEZzROemM0WkE9PSIsImtpZCI6ImdhdGV3YXlfY2VydGlmaWNhdGVfYWxpYXMiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbkBjYXJib24uc3VwZXIiLCJhcHBsaWNhdGlvbiI6eyJvd25lciI6ImFkbWluIiwidGllclF1b3RhVHlwZSI6bnVsbCwidGllciI6IjEwUGVyTWluIiwibmFtZSI6IkNvbmZsdWVuY2UtQ2FzZU1hbmFnZW1lbnQiLCJpZCI6NTIsInV1aWQiOiI0NjZiNTYwNi0zMjhiLTRmZmUtOWY0OS0zZjdjOTI3MWJkYmIifSwiaXNzIjoiaHR0cHM6XC9cL2FwaS1pbS10ZXN0LnN1bmRzdmFsbC5zZTo0NDNcL29hdXRoMlwvdG9rZW4iLCJ0aWVySW5mbyI6eyJVbmxpbWl0ZWQiOnsidGllclF1b3RhVHlwZSI6InJlcXVlc3RDb3VudCIsImdyYXBoUUxNYXhDb21wbGV4aXR5IjowLCJncmFwaFFMTWF4RGVwdGgiOjAsInN0b3BPblF1b3RhUmVhY2giOnRydWUsInNwaWtlQXJyZXN0TGltaXQiOjAsInNwaWtlQXJyZXN0VW5pdCI6bnVsbH19LCJrZXl0eXBlIjoiU0FOREJPWCIsInBlcm1pdHRlZFJlZmVyZXIiOiIiLCJzdWJzY3JpYmVkQVBJcyI6W3sic3Vic2NyaWJlclRlbmFudERvbWFpbiI6ImNhcmJvbi5zdXBlciIsIm5hbWUiOiJDYXNlTWFuYWdlbWVudCIsImNvbnRleHQiOiJcL2Nhc2VtYW5hZ2VtZW50XC8zLjIiLCJwdWJsaXNoZXIiOiJhZG1pbiIsInZlcnNpb24iOiIzLjIiLCJzdWJzY3JpcHRpb25UaWVyIjoiVW5saW1pdGVkIn1dLCJwZXJtaXR0ZWRJUCI6IiIsImlhdCI6MTY0NjI5NDcwOSwianRpIjoiZGM1MTkzNWMtOTk5OC00MjAzLThmM2QtYjNjNjlkNDA0ZjQwIn0=.TOgb3v6Ld8QSPnwCXbdhDHo6cvhj9fQj-Lwu-WIhcfTZzOHAJBKsGfKp27rrfFHnoJvY_k9DUo_mTlJw-e3RmJDIu3Fd9ZgBcs0yU8A0scDrUEZ0PN3HERGVJNYxTz7KJKDuVWbLznnb5cAMURMSS6gir3StG7kzhS7S8SLdprhZuuEJRr3TQWc6dwN90Nk_AoksxxoprlaL-0zMyqMq6CB62y83X59EEbTjENDR-_2V3ZWOERqOalnRNDW5VLRVUtXuFZhSDT4zFgYvAFef-ucek95WRaIgVJglBBtKYa3NnOr03Zwh_4NZp8OqWfZF82XT8fNTTQxy2EnWQ8t8gQ==

Swagger ui
---
openapi: 3.0.2
info:
  title: CaseManagement
  description: >-
    A service that manage cases against ByggR (building permit cases) and
Ecos2    Ecos2 (environmental office cases).
  contact:
    name: Sundsvalls kommun - Team Dynasty
    email: teamdynasty@sundsvall.se
  version: '"3.3'"
paths:
  /api-docs:
    get:
      tags:
        - API
      summary: OpenAPI-definition
      parameters: []
      responses:
        '"200'":
          description: ok
      x-auth-type: None
  /cases:
    post:
      tags:
        - Cases
      description: >-
        Creates a case in ByggR or Ecos2 based on caseType. Also persists
a        a connection between externalCaseId and the created case.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '"#/components/schemas/Case'"
       responses:     example:
   '200':           descriptionexternalCaseId: OKcaa230c6-abb4-4592-ad9a-34e263c2787b
          content:    caseType: NYBYGGNAD_ANSOKAN_OM_BYGGLOV
       application/json:       facilities:
       schema:         - facilityType: STOREHOUSE
     $ref: '#/components/schemas/CaseResourceResponse'         '400':   address:
       description: Bad request           contentaddressCategories:
            application/json:          - VISITING_ADDRESS
   schema:                 $refpropertyDesignation: '#/components/schemas/Information'
 SUNDSVALL BIRSTA 36:14
      '500':        stakeholders:
  description:  Internal Server Error          - contenttype: ORGANIZATION
           application/json:       roles:
       schema:             - APPLICANT
  $ref: '#/components/schemas/Information'   /cases/case-mappings:     get:       tags:  - PAYMENT_PERSON
     - CaseMappings       description: >-    organizationName: Testorganisationen
   Returns the connection between externalCaseId and the case in the         underlying system.organizationNumber: 723456-1321
       parameters:         - nametype: external-case-idPERSON
          in: query           schemaroles:
            type: string       responses:- CONTACT_PERSON
       '200':           descriptionfirstName: OKTest
          content:        lastName: Testsson
   application/json:               schemapersonId:  7988710e-7c5c-4db9-ae77-41752baa2381
              $refattachments: '#/components/schemas/CaseMapping'
             '400':   - category: ANS
     description: Bad request           content:name: Some_name_2022-03-07
             application/json:     extension: .pdf
         schema:         file: dGVzdA==
      $ref: '#/components/schemas/Information'responses:
        '404'"400":
          description: NotBad foundrequest
          content:
            application/json:
              schema:
                $ref: '"#/components/schemas/Information'"
        '"500'":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '"#/components/schemas/Information'"
   /cases/{external-case-id}/attachments:     post"200":
      tags:    description: OK
   - Attachments       descriptioncontent:
Add  attachments to existing case.       parametersapplication/json:
        - name: external-case-id    schema:
      in: path         $ref:  required"#/components/schemas/CaseResourceResponse"
  /cases/case-mappings:
true    get:
      schematags:
        - CaseMappings
  type: string   description:
   requestBody:     Returns the connection between content:externalCaseId and the case in  the
    application/json:    underlying system.
       schemaparameters:
        - name: external-case-id
   type: array      in: query
       items:   schema:
             $reftype: '#/components/schemas/Attachment'string
      responses:
        '204'"200":
          description: NoOK
content - Successful request.         '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '"#/components/schemas/Information'CaseMapping"
        '404'"400":
          description: NotBad foundrequest
          content:
            application/json:
              schema:
                $ref: '"#/components/schemas/Information'"
        '500'"404":
          description: InternalNot Server Errorfound
          content:
            application/json:
              schema:
                $ref: '"#/components/schemas/Information'"
        '501'"500":
          description: Internal NotServer ImplementedError
          content:
            application/json:
              schema:
                $ref: '"#/components/schemas/Information'"
  /cases/{external-case-id}/statusattachments:
    getpost:
      tags:
        - StatusAttachments
      description: >-Add attachments to existing case.
    Returns the latestparameters:
status for the case in the underlying system - name: external-case-id
     connected to the specified externalCaseId. in: path
    parameters:      required: true
 - name: external-case-id       schema:
   in: path        type: string
 required: true    requestBody:
      schema:  content:
          typeapplication/json:
string       responses:     schema:
   '200':           descriptiontype: array
   OK           contentitems:
             application/json:
   $ref: "#/components/schemas/Attachment"
      responses:
      schema:  "204":
          description: No content - $ref: '#/components/schemas/CaseStatus'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'"
   /organization/{organizationNumber}/cases/status:     get"501":
      tags:    description: Not Implemented
  - Status       descriptioncontent:
>-         Returns the latest statusapplication/json:
for each of the cases where the specified       schema:
 organization has the role "applicant".       parameters:    $ref: "#/components/schemas/Information"
   - name/cases/{external-case-id}/status:
organizationNumber    get:
      intags:
path        - Status
 required: true    description:
      schema:  Returns the latest status for the case in the underlying system
description: Organisationsnummer bestående av 10 eller 12 siffror. connected to the specified externalCaseId.
       typeparameters:
string        - name: external-case-id
  example: 19901010-1234       responsesin: path
          '200'required: true
          descriptionschema:
 OK           contenttype: string
      responses:
    application/json:    "200":
          schemadescription: OK
          content:
    type: array       application/json:
           items:   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"
  /organization/{organizationNumber}/cases/status:
  - ApiKeyAuth: []
components:
 get:
 securitySchemes:     ApiKeyAuthtags:
       type: apiKey- Status
     in: headerdescription:
        Returns name:the apikeylatest status for schemas:each of the cases where Address:the specified
     required:   organization has the role "applicant".
 -   addressCategories  parameters:
    type: object   - name: organizationNumber
 properties:         addressCategoriesin: path
          descriptionrequired: true
>-          schema:
   En adress kan ha en eller flera adresskategorier. Det kandescription: exempelvisOrganization number with 10 or 12 digits.
      vara samma adress som ska användas förtype: poststring
och fakturor.           minItems: 1example: 19901010-1234
      responses:
        type"200":
array          description: items:OK
          content:
 $ref: '#/components/schemas/AddressCategory'           streetapplication/json:
          type: string    schema:
      example: Testvägen         houseNumbertype: array
         type: string           exampleitems:
'18'         postalCode:           type$ref: string"#/components/schemas/CaseStatus"
        "400":
 example: 123 45       description: Bad city:request
          typecontent:
 string           exampleapplication/json:
Sundsvall         country:      schema:
    type: string           example$ref: Sverige"#/components/schemas/Information"
        careOf"404":
          description: Not c/ofound
          typecontent:
 string           exampleapplication/json:
Test Testorsson         attention:    schema:
      type: string         $ref:  example: Test Testorsson"#/components/schemas/Information"
           propertyDesignation"500":
          description: FastighetsbeteckningInternal Server Error
        type: string content:
         example: SUNDSVALL LJUSTA 7application/json:2
        appartmentNumber:      schema:
    type: string           example$ref: LGH 1001"#/components/schemas/Information"
security:
  - ApiKeyAuth: []
components:
  locationsecuritySchemes:
    ApiKeyAuth:
      $reftype: '#/components/schemas/Coordinates'apiKey
      in: header
isZoningPlanArea:      name: apikey
  schemas:
description: Ligger inom detaljplanerat områdeAddress:
      required:
   type: boolean    - addressCategories
   invoiceMarking:   type: object
      descriptionproperties:
>-        addressCategories:
    Märkning av faktura (anges endast i samband med addressCategory
      description:
            "An address can have one or more address categories. For example,\
            \ it can be the same address that is to be used for mail and invoices."
          minItems: 1
          type: array
          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:
          description: c/o
          type: string
          example: Test Testorsson
        attention:
          type: string
          example: Test Testorsson
        propertyDesignation:
          type: string
          example: SUNDSVALL LJUSTA 7:2
        INVOICE_ADDRESS)appartmentNumber:
          type: string
           AddressCategory:example: LGH 1001
        location:
          $ref: "#/components/schemas/Coordinates"
        isZoningPlanArea:
          type: boolean
        invoiceMarking:
          description: >-"Only in combination with addressCategory: INVOICE_ADDRESS"
   Kategorisering   av adresser.   type: string
    <li>POSTAL_ADDRESS(Postadress)</li><li>INVOICE_ADDRESS(Fakturaadress)</li><li>VISITING_ADDRESS(Besöksadress)</li>AddressCategory:
      enum:
        - INVOICE_ADDRESS
        - POSTAL_ADDRESS
        - VISITING_ADDRESS
      type: string
    Attachment:
      required:
        - category
        - name
        - extension
        - file
      type: object
      properties:
        category:
          allOf:
            - $ref: '"#/components/schemas/AttachmentCategory'"
            - nullable: false
        name:
          pattern: \S
          type: string
          example: NamnThe attachment dokumentetname
          nullable: false
        note:
          type: string
          example: En anteckning A note on an attachment.
        extension:
          pattern: \S
          type: string
          example: .pdf
          nullable: false
        mimeType:
          type: string
          example: application/pdf
        file:
          format: byte
          description: Base64-encoded file (plain text)
          pattern: \S
          type: string
          example: dGVzdA==
          nullable: false
    AttachmentCategory:

     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
      type: string
    Case:
      required:
        - externalCaseId
        - caseType
        - stakeholders
        - attachments
      type: object
      properties:
        id:
       
  format: int64
          type: integer   type: object
      readOnlyproperties: true
        externalCaseId:
          description: Case ID ÄrendeIdfrom från Open-Ethe client.
          pattern: \S
          type: string
          example: '1'caa230c6-abb4-4592-ad9a-34e263c2787b
          nullable: false
        caseType:
          allOf:
            - $ref: '"#/components/schemas/CaseType'"
            - nullable: false
        description:
    
     description: Beskriv kort vad du vill bygga
          type: string
          example: EnSome description fritextbeskrivningof avthe case.
        caseTitleAddition:
          description: >-
            "Additions to the case title. Right now only applicable to\
cases of           \ cases of CaseType: NYBYGGNAD_ANSOKAN_OM_BYGGLOV."
          type: string
          example: "Eldstad/rökkanal, Skylt"
        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:
          format: date-time
          type: string
          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:
          description: Status  ärendetstatus:
          type: string
          example: Pågående
        timestamp:
          format: date-time
          type: string
    CaseType:
   
  description: Sätts till den enum som hör ihop med den anropande e-tjänsten.
      enum:
        - ANMALAN_ATTEFALL
        - LIVSMEDELSVERKSAMHET_ANMALAN_OM_REGISTRERING
        - NYBYGGNAD_ANSOKAN_OM_BYGGLOV
      type: string
      example: NYBYGGNAD_ANSOKAN_OM_BYGGLOV
    Coordinates:
      type: object
      properties:
        latitude:
          format: double
          description: Decimal Degrees (DD)
          type: number
          example: 62.390205
        longitude:
          format: double
          description: Decimal Degrees (DD)
          type: number
          example: 17.306616
    EnvironmentalCase:
      description: Miljökontorärende (Ecos2)
      required:
        - startDate
        - externalCaseId
        - caseType

       - stakeholders  example: 17.306616
    EnvironmentalCase:
- attachments     description: Ecos2-cases
  - facilities   required:
   type: object    - externalCaseId
 properties:       - caseType
startDate:        - stakeholders
 format: date      - attachments
   description: Startdatum  verksamheten.  - facilities
       type: string- startDate
      type: object
 example: {}    properties:
      nullable: false externalCaseId:
       endDate:   description: Case ID from the client.
  format: date       pattern: \S
  description: Slutdatum  verksamheten vid det fall den ärtype: tidsbegränsad.string
          typeexample: stringcaa230c6-abb4-4592-ad9a-34e263c2787b
          examplenullable: {}false
        idcaseType:
          formatallOf:
int64            - $ref: "#/components/schemas/CaseType"
 type: integer          - readOnlynullable: truefalse
        externalCaseIddescription:
          descriptiontype: ÄrendeIdstring
från Open-E         example: Some pattern:description \Sof the case.
        typecaseTitleAddition: string
          exampledescription:
'1'           nullable: false"Additions to the case title. Right now only applicable caseType:to\
          allOf:  \ cases of CaseType: NYBYGGNAD_ANSOKAN_OM_BYGGLOV."
      - $ref: '#/components/schemas/CaseType'  type: string
         - nullable: falseexample: "Eldstad/rökkanal, Skylt"
        descriptionstakeholders:
          description: Beskriv kort vad du vill byggaminItems: 1
          type: stringarray
          exampleitems:
En fritextbeskrivning av case.         caseTitleAddition$ref: "#/components/schemas/Stakeholder"
         descriptionattachments:
>-          minItems: 1
 Additions to the case title. Right now only applicable totype: casesarray
of          items:
  CaseType: NYBYGGNAD_ANSOKAN_OM_BYGGLOV.           type$ref: string"#/components/schemas/Attachment"
          examplefacilities:
Eldstad/rökkanal, Skylt         stakeholdersmaxItems: 1
          minItems: 1
          type: array
          items:
            $ref: '"#/components/schemas/Stakeholder'EnvironmentalFacility"
        startDate:
          attachmentsformat: date
          minItems: 1description: Start date for the business.
          type: arraystring
          itemsexample: 2022-01-01
           $refnullable: '#/components/schemas/Attachment'false
        facilitiesendDate:
          maxItemsformat: 1date
          minItemsdescription: 1End date of the business if it     type: arrayis time-limited.
           itemstype: string
           $ref: '#/components/schemas/EnvironmentalFacility'example: 2022-06-01
    EnvironmentalFacility:
      required:
        - facilityCollectionName
      type: object
      properties:
        description:
          type: string
          example: En fritextbeskrivning av facility.
        address:
          $ref: '"#/components/schemas/Address'"
        facilityCollectionName:
          description: Skyltnamn The name on the sign.
          pattern: \S
          type: string
          example: Sundsvalls testfabrik
          nullable: false
    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:
      description:
>-        "Type Typof avfacility.<br><br>Compatible         byggnad.<br><br>Typerwith CaseType=NYBYGGNAD_ANSOKAN_OM_BYGGLOV:<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ådfö\
        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,Fö\
        rskola)</li><li>PARKING(Parkering, Cykelparkering)</li><li>DEPOT(Upplag)</li><li>MARINA(SmåbåtshamnSmå\
        båtshamn)</li><li>WALL(Mur)</li><li>PALING(Plank)</li><li>RECYCLING_STATION(Återvinningsstation)</li><li>OTHER(övrigtSTATION(Å\
        tervinningsstation)</li><li>OTHER(övrigt)</li><br><br>Compatible with CaseType=ANMALAN_ATTEFALL:<li>FURNISHING_OF_ADDITIONAL_DWELLING(inredning\
        \ av ytterligare bostad)</li><li>ANCILLARY_BUILDING(komplementbyggnad)</li><li>ANCILLARY_HOUSING_BUILDING(komplementbostadsbyggnad)</li><li>DORMER(takkupa)</li><li>EXTENSION(tillbyggnad)</li>"
      enum:
        - ANCILLARY_BUILDING
        - ANCILLARY_HOUSING_BUILDING
        - APARTMENT_BLOCK
        - CARPORT
        - DEPOT
        - DORMER
        - EXTENSION
        - FURNISHING_OF_ADDITIONAL_DWELLING
        - 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
      type: string
    Information:
      type: object
      properties:
        type:
          type: string
        status:
          format: int32
          type: integer
        title:
          type: string
        detail:
          type: string
        instance:
          type: string
    Organization:
      required:
        - type
        - roles
        - organizationName
        - organizationNumber
      type: object
      properties:
        type:
          allOf:
            - $ref: '"#/components/schemas/StakeholderType'"
            - nullable: false
        roles:
          description: EnAn intressentstakeholder kancan hahave enone elleror fleramore rollerroles.
          type: array
          items:
            $ref: '"#/components/schemas/StakeholderRole'"
          nullable: false
        organizationName:
          pattern: \S
          type: string
          example: Sundsvalls testfabrik
          nullable: false
        organizationNumber:
          description: OrganisationsnummerOrganization beståendenumber avwith 10 elleror 12 siffrordigits.
          pattern: \S
          type: string
          example: 19901010-1234
          nullable: false
        phoneNumber:
          type: string
          example: '"060121212'"
        emailAddress:
          type: string
          example: test.testorsson@test.se
        cellphoneNumber:
          type: string
          example: '"0701231212'"
        addresses:
          description:
>-            An Enstakeholder intressentmay kanhave haone enor ellermore flera adresseraddresses. T.ex. en adress avFor example
              typenone POSTAL_ADDRESS ochand en annan av typen another INVOICE_ADDRESS.
          type: array
          items:
            $ref: '"#/components/schemas/Address'"
        authorizedSignatory:
         
description: Firmatecknare           type: string
          example: Test Testorsson
    Person:
      required:
        - type
        - roles
        - firstName
        - lastName
      type: object
      properties:
        type:
          allOf:
            - $ref: '"#/components/schemas/StakeholderType'"
            - nullable: false
        roles:
          description: EnAn intressentstakeholder kancan hahave enone elleror fleramore rollerroles.
          type: array
          items:
            $ref: '"#/components/schemas/StakeholderRole'"
          nullable: false
        firstName:
          pattern: \S
          type: string
          example: Test
          nullable: false
        lastName:
          pattern: \S
          type: string
          example: Testorsson
          nullable: false
        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:
          description:
>-            An Enstakeholder intressentmay kanhave haone enor ellermore flera adresseraddresses. T.ex. en adress avFor example
            one  typen POSTAL_ADDRESS ochand en annan av typen another INVOICE_ADDRESS.
          type: array
          items:
            $ref: '"#/components/schemas/Address'"
        personalNumber:
          type: string
          readOnly: true
    PlanningPermissionCase:
      description: Bygglovsärende (ByggR)-cases
      required:
        - externalCaseId
        - caseType
        - stakeholders
        - attachments
 
      - facilities
      type: object     - caseType
properties:        - id:stakeholders
        - attachments
format: int64       - facilities
  type: integer   type: object
      readOnlyproperties: true
        externalCaseId:
          description: Case ID ÄrendeIdfrom från Open-Ethe client.
          pattern: \S
          type: string
          example: '1'caa230c6-abb4-4592-ad9a-34e263c2787b
          nullable: false
        caseType:
          allOf:
            - $ref: '"#/components/schemas/CaseType'"
            - nullable: false
        description:
          description: Beskriv kort vad du vill bygga
          type: string
          example: Some Endescription fritextbeskrivningof avthe case.
        caseTitleAddition:
          description:
>-             "Additions to the case title. Right now only applicable to\
 cases of          \ cases of CaseType: NYBYGGNAD_ANSOKAN_OM_BYGGLOV."
          type: string
          example: "Eldstad/rökkanal, Skylt"
        stakeholders:
          minItems: 1
          type: array
          items:
            $ref: '"#/components/schemas/Stakeholder'"
        attachments:
          minItems: 1
          type: array
          items:
            $ref: '"#/components/schemas/Attachment'"
        facilities:
          minItems: 1
          type: array
          items:
            $ref: '"#/components/schemas/PlanningPermissionFacility'
        diaryNumber:PlanningPermissionFacility"
          descriptiondiaryNumber: Diarienummer
          type: string
    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:
        - type
        - roles
      type: object
      properties:
        type:
          allOf:
            - $ref: '"#/components/schemas/StakeholderType'"
            - nullable: false
        roles:
          description: EnAn intressentstakeholder kancan hahave enone elleror fleramore rollerroles.
          type: array
          items:
            $ref: '"#/components/schemas/StakeholderRole'"
          nullable: false
        phoneNumber:
          type: string
          example: '"060121212'"
        emailAddress:
          type: string
          example: test.testorsson@test.se
        cellphoneNumber:
          type: string
          example: '"0701231212'"
        addresses:
          description:
>-            An Enstakeholder intressentmay kanhave haone enor ellermore flera adresseraddresses. T.ex. en adress avFor example
            one typen POSTAL_ADDRESS ochand en annan av typen another INVOICE_ADDRESS.
          type: array
          items:
            $ref: '"#/components/schemas/Address'"
      oneOf:
        - $ref: '"#/components/schemas/Person'"
        - $ref: '"#/components/schemas/Organization'"
    StakeholderRole:
      description: >-
        <h3>Generella-roller<h3>General roles:</h3><li>CONTACT_PERSON(Kontaktperson)</li><br><br><h3>Bygglovsärendeli><br><br><h3>ByggR-rollerroles:</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ärendeli><br><br><h3>Ecos2-rollerroles:</h3><li>INVOICE_RECIPENT(Fakturamottagare)</li><li>OPERATOR(Verksamhetsutövare)</li>
      enum:
        - APPLICANT
        - CONTACT_PERSON
        - CONTROL_OFFICIAL
        - INVOICE_RECIPENT
        - OPERATOR
        - PAYMENT_PERSON
        - PROPERTY_OWNER
      type: string
    StakeholderType:
      enum:
        - ORGANIZATION
        - PERSON
      type: string
    SystemType:
      enum:
        - BYGGR
        - ECOS
      type: string
servers:
  - url: https://api-test.sundsvall.se/casemanagement/3.3

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;

FAQ

<FAQ>