Versions Compared

Key

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

Beskrivning

Möjlighet att skicka enkla eller säkra (WIP) mail till en medborgares eller ett företags digitala brevlåda.

Via “enkla” mail går det endast att skicka text eller html.
“Säkra” mail har samma möjlighet som “enkla” mail men där går det även att bifoga filer, t.ex. pdf.

Livscykelstatus

Under utveckling

Lösningsbeskrivning

Gliffy
imageAttachmentIdatt975798291
macroId3aec7bee-a29e-4a2e-a8c2-e3c2e70b79f0
baseUrlhttps://sundsvall.atlassian.net/wiki
namedigital-mail-sender-gliffy
diagramAttachmentIdatt976420878
containerId892960792
timestamp1648563694238

Hantering av personuppgifter

I fallet där ett digitalt mail skall skickas till en medborgare hämtas personnummer via CitizenMapping då personnummer är tvingande för att få reda på vilken bredvlåda medborgaren har.

API specifikation (wip)

Swagger ui
{
    "components": {
        "schemas": {
            "BodyInformation": {
                "description": "The body of the message, base64 encoded",
                "properties": {
                    "body": {
                        "description": "Base64 encoded representation of the message, must be UTF-8 encoded.",
                        "example": "QmFzZTY0IGVuY29kZWQgZXhhbXBsZSB0ZXh0Lg==",
                        "type": "string"
                    },
                    "contentType": {
                        "description": "The content type for the message, text/plain for only text, text/html for html messages.",
                        "enum": [
                            "text/plain",
                            "text/html"
                        ],
                        "example": "TEXT_PLAIN",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "DigitalMailResponse": {
                "properties": {
                    "distributionId": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "Header": {
                "description": "The header of the mail",
                "properties": {
                    "subject": {
                        "description": "The subject of the digital mail.",
                        "example": "Viktig information från Sundsvalls kommun",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "Problem": {
                "properties": {
                    "detail": {
                        "type": "string"
                    },
                    "instance": {
                        "format": "uri",
                        "type": "string"
                    },
                    "parameters": {
                        "additionalProperties": {
                            "type": "object"
                        },
                        "type": "object"
                    },
                    "status": {
                        "$ref": "#/components/schemas/StatusType"
                    },
                    "title": {
                        "type": "string"
                    },
                    "type": {
                        "format": "uri",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "SendDigitalMailRequest": {
                "description": "Digital mail request.",
                "properties": {
                    "bodyInformation": {
                        "$ref": "#/components/schemas/BodyInformation"
                    },
                    "header": {
                        "$ref": "#/components/schemas/Header"
                    },
           openapi: 3.0.1
info:
  title: digital-mail
  contact: {}
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  version: "1.0"
servers:
- url: http://nowhere-for-now:8740
tags:
- name: Digital Mail
paths:
  /sendSimpleDigitalMail/{partyId}:
    post:
      tags:
      - Digital Mail
      operationId: sendSimpleDigitalMail
      parameters:
      - name: partyId
        "supportInfo"in: {path
        required: true
        schema:
      "$ref": "#/components/schemas/SupportInfo"   type: string
          description: partyId
    }      example: 6a5c3d04-412d-11ec-973a-0242ac130003
      requestBody:
  },      content:
          "required": [application/json:
            schema:
          "bodyInformation",    $ref: '#/components/schemas/SendDigitalMailRequest'
        required: true
     "header" responses:
        "400":
      ],    description: Bad Request
          "type"content:
"object"             },application/json:
              "StatusType"schema:
{                 "properties": {$ref: '#/components/schemas/Problem'
        "404":
            "reasonPhrase"description: {Not Found
          content:
            "type"application/json:
"string"              schema:
      },            $ref: '#/components/schemas/Problem'
        "statusCode200":
{          description: Successful Operation
          content:
 "format": "int32",          application/json:
              "type": "integer"schema:
                $ref: '#/components/schemas/DigitalMailResponse'
  }      "500":
          },description: Internal Server Error
          content:
  "type": "object"         application/json:
   },             "SupportInfo": {schema:
                "description"$ref: "Contains contact information and where the recipient may turn to for questions.",'#/components/schemas/Problem'
  /sendSecureDigitalMail/{partyId}:
    post:
      tags:
      - Digital Mail
"properties": {     operationId: sendSecureDigitalMail
      parameters:
      - "contactInformationEmail"name: partyId
{        in: path
        required: true
     "description": "Email address theschema:
recipient may use to get in contact with the sender.", type: string
          description: partyId
          "example": "someone@sundsvall.se",6a5c3d04-412d-11ec-973a-0242ac130003
      requestBody:
        content:
        "type": "string"
 application/json:
            schema:
      },        $ref: '#/components/schemas/SecureDigitalMailRequest'
        required: true
 "contactInformationPhoneNumber": {    responses:
        "400":
           "description": Bad "PhoneRequest
 number the recipient may call to get in contact withcontent:
the sender.",           application/json:
              "example"schema:
"+46701234567",                $ref: '#/components/schemas/Problem'
        "type404":
"string"          description: Not Found
        },  content:
            application/json:
     "contactInformationUrl": {        schema:
                "description": "Url where the recipient may find more information.",$ref: '#/components/schemas/Problem'
        "500":
          description: Internal Server Error
          "example"content:
"https://sundsvall.se/",            application/json:
            "type": "string"    schema:
                },
$ref: '#/components/schemas/Problem'
        "200":
          "supportText"description: {Successful Operation
          content:
            "description"application/json:
"Information text describing the different ways the recipient may contact the sender.",   schema:
                $ref: '#/components/schemas/SecureDigitalMailResponse'
   "example": "Det går bara att komma i kontakt via e-post",
 /api-docs:
    get:
      tags:
      - API
      summary: OpenAPI
      "type"operationId: "string"getApiDocs
        responses:
        "200":
  }        description: OK
       },   content:
             "type"application/yaml:
"object"             } schema:
       },         "securitySchemes"type: {}string
    },     "info"x-auth-type: {None
        "contact"x-throttling-tier: {},Unlimited
      x-wso2-mutual-ssl: Optional
"license"components:
{  schemas:
    BodyInformation:
      "name"required:
"MIT License",     - body
      "url": "https://opensource.org/licenses/MIT"- contentType
      type: object
},      properties:
  "title": "Digital Mail API",   contentType:
     "version": "1.0"    type: },string
    "openapi": "3.0.1",     "paths": {
        "/digitalmail/{partyId}": {description: "The content type for the message, text/plain for only text,\
            \ text/html for html messages."post":
{          example: TEXT_PLAIN
     "operationId": "sendDigitalMail",     enum:
          - text/plain
 "parameters": [        - text/html
        body:
  {        type: string
          description: "Base64 encoded representation of "in": "path"the message, must be UTF-8\
            \ encoded."
       "name": "partyId",    example: PG5hdj4KICA8dWw+Cgk8bGk+PGEgaHJlZj0iaHR0cDovL2dvb2dsZS5jb20iIHRpdGxlPSJMb3J1bSBpcHN1bSBkb2xvciBzaXQgYW1ldCI+TG9yZW08L2E+PC9saT4KCTxsaT48YSBocmVmPSIjbm93aGVyZSIgdGl0bGU9IkFsaXF1YW0gdGluY2lkdW50IG1hdXJpcyBldSByaXN1cyI+QWxpcXVhbTwvYT48L2xpPgoJPGxpPjxhIGhyZWY9IiNub3doZXJlIiB0aXRsZT0iTW9yYmkgaW4gc2VtIHF1aXMgZHVpIHBsYWNlcmF0IG9ybmFyZSI+TW9yYmk8L2E+PC9saT4KCTxsaT48YSBocmVmPSIjbm93aGVyZSIgdGl0bGU9IlByYWVzZW50IGRhcGlidXMsIG5lcXVlIGlkIGN1cnN1cyBmYXVjaWJ1cyI+UHJhZXNlbnQ8L2E+PC9saT4KCTxsaT48YSBocmVmPSIjbm93aGVyZSIgdGl0bGU9IlBlbGxlbnRlc3F1ZSBmZXJtZW50dW0gZG9sb3IiPlBlbGxlbnRlc3F1ZTwvYT48L2xpPgogIDwvdWw+CjwvbmF2Pg==
      description: "The body of the message, base64 encoded"
      "required"EmailNotification:
true,      required:
      - from
          "schema"type: {object
      properties:
        from:
            "description"type: "partyId",string
          description: Who the digital mail is from
           "example": "6a5c3d04-412d-11ec-973a-0242ac130003",someone@sundsvall.se
        subject:
          maxLength: 254
         "type" minLength: "string"0
          type: string
          description: Title for notification }email
          example: Du har ett nytt meddelande i Kivra
  }      text:
          ],type: string
          description: Notification message in the "requestBody":email
{          example: Du har ett nytt meddelande i Kivra
   "content": {  description: Email notification details
    Notification:
      type: object
      "application/json"properties:
{        emailNotification:
          $ref: '#/components/schemas/EmailNotification'
        "schema"smsNotification:
{          $ref: '#/components/schemas/SmsNotification'
      description: Setting for notifying the recipient via via sms and/or email.
    "$ref"SendDigitalMailRequest: "#/components/schemas/SendDigitalMailRequest"
      required:
      - bodyInformation
      - headerSubject
      - }municipalityId
      - supportInfo
      type: object
      properties:
 }       municipalityId:
          type: string
 },         description: MunicipalityId
          "required": trueexample: SK
        headerSubject:
          type: },string
          description: The subject of the  "responses": {digital mail.
          example: Viktig information från Sundsvalls kommun
        "200"supportInfo:
{          $ref: '#/components/schemas/SupportInfo'
        bodyInformation:
    "content": {     $ref: '#/components/schemas/BodyInformation'
        notification:
          $ref: '#/components/schemas/Notification'
 "application/json": {    description: Digital mail request
    SmsNotification:
      type: object
      properties:
     "schema": {  from:
          maxLength: 11
          minLength: 0
          "$ref"type: "#/components/schemas/DigitalMailResponse"string
          description: Number for notification
          example: "46701234567"
      }  text:
          maxLength: 160
          minLength: 0
  }        type: string
          description: Notification message in the },sms
          example: Du har ett nytt meddelande i Kivra
      "description": "Successful Operation"
: Sms notification details
    SupportInfo:
      required:
      - supportText
    },  type: object
      properties:
        supportText:
 "400": {        type: string
          description: Information text describing the "content": {
 different ways the recipient
            may contact the sender.
          "application/json"example: {Kontakta oss via epost eller telefon.
        contactInformationUrl:
          type: string
      "schema": {   description: Url where the recipient may find more  information.
          example: https://sundsvall.se/
        contactInformationPhoneNumber:
   "$ref": "#/components/schemas/Problem"      type: string
          description: Phone number the recipient may call to get in contact with
   }         the sender.
          example: "46701234567"
      }  contactInformationEmail:
          type: string
          },description: Email address the recipient may use to get in contact with
             "description": "Bad Request"the sender.
          example: someone@sundsvall.se
      description: Contains contact information },and where the recipient may turn to
        for questions.
    "404"Problem:
 {     type: object
      properties:
        instance:
  "content": {       type: string
          format: uri
        "application/json"type:
{          type: string
          format: uri
         "schema": {parameters:
          type: object
          additionalProperties:
             "$ref": "#/components/schemas/Problem"type: object
        title:
          type: string
        detail:
   }       type: string
        status:
           }$ref: '#/components/schemas/StatusType'
    StatusType:
      type: object
      properties:
    },    reasonPhrase:
          type: string
        "description"statusCode:
"Not Found"         type: integer
          },format: int32
    DigitalMailResponse:
      type: object
      "500"properties:
{        distributionId:
          type: string
    "content"Attachment:
{      required:
      - body
      - contentType
      "application/json": {- filename
      type: object
      properties:
        contentType:
        "schema": { type: string
          description: content type
        body:
            "$ref": "#/components/schemas/Problem"type: string
          description: Base64-encoded body
        filename:
          type: }string
          description: The name of the file
      description: "An attachment, e.g. pdf, docx etc."
}    SecureDigitalMailRequest:
      required:
      - bodyInformation
     }, - headerSubject
      - municipalityId
      - supportInfo
      "description"type: "Internal Server Error"
object
      properties:
        municipalityId:
          }type: string
          description: MunicipalityId
   },       example: SK
        "tags"headerSubject:
[          type: string
         "Digital Mail"description: The subject of the digital mail.
          ]example: Viktig information från Sundsvalls kommun
       } supportInfo:
       }   $ref:  },'#/components/schemas/SupportInfo'
     "servers": [  attachments:
      {    type: array
       "description": "Generated server url",items:
            "url"$ref: "http://localhost:4040"
 '#/components/schemas/Attachment'
        bodyInformation:
      }     ],$ref: '#/components/schemas/BodyInformation'
    "tags"SecureDigitalMailResponse:
[      type: object
 {     properties:
        "name"distributionId:
"Digital Mail"         }type: string
  securitySchemes: ]{}
}

Säkerhetsklassning

Säkerhetsklass <0, 1, 2, 3, 4>

Autentiseringsmetod: Oauth2

(Ref: Säkerhetsklassning av APIer )

API-ägare

TBD

Teknisk ägare

API-Teamet

För tekniska frågor:
teamdynasty@sundsvall.se

Länkar

  • Test

  • Sandbox

  • Produktion

FAQ

<FAQ>