Versions Compared

Key

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

Beskrivning

Funktion som hanterar utgående kommunikation till våra intressenter.

Kommunikationsmöjligheter:

Bubblare:

  • letter

  • App-push

Dessutom sparas, för identifierade mottagare, kommunikationshistorik.

Livscykelstatus

Produktion

Lösningsbeskrivning

Gliffy
imageAttachmentIdatt29425686
macroId5403c848-f47c-4944-9cae-039096781462
baseUrlhttps://sundsvall.atlassian.net/wiki
namemessagingAPI
diagramAttachmentIdatt30179333
containerId30081025
timestamp1641819939751

Hantering av personuppgifter

Vilka personuppgifter hanteras och varför?

API-specifikation

Swagger ui
openapi: 3.0.1
info:
  title: Messaging
  contact: {}
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  version: '@project.version@'
servers:
- url: http://localhost:8080
  description: Generated server url
paths:
  /webmessage:
    post:
      tags:
      - Sending Resources
      summary: Send a single web message
      operationId: sendWebMessage
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebMessageRequest'
        required: true
      responses:
        "500":
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
        "200":
          description: Successful Operation
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MessageResponse'
        "400":
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
  /sms:
    post:
      tags:
      - Sending Resources
      summary: Send a single SMS
      operationId: sendSms
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmsRequest'
        required: true
      responses:
        "500":
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
        "200":
          description: Successful Operation
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MessageResponse'
        "400":
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
  /messages:
    post:
      tags:
      - Sending Resources
      summary: Send a batch of messages as e-mail or SMS to a list of parties
      operationId: sendMessage
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageRequest'
        required: true
      responses:
        "500":
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
        "200":
          description: Successful Operation
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MessagesResponse'
        "400":
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
  /email:
    post:
      tags:
      - Sending Resources
      summary: Send a single e-mail
      operationId: sendEmail
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailRequest'
        required: true
      responses:
        "500":
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
        "200":
          description: Successful Operation
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MessageResponse'
        "400":
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
  /digitalmail:
    post:
      tags:
      - Sending Resources
      summary: Send a single digital mail to one or more parties
      operationId: sendDigitalMail
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DigitalMailRequest'
        required: true
      responses:
        "500":
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
        "200":
          description: Successful Operation
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MessageResponse'
        "400":
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
  /status/{messageId}:
    get:
      tags:
      - Status and History Resources
      summary: Get the status for a single message
      operationId: getMessageStatus
      parameters:
      - name: messageId
        in: path
        required: true
        schema:
          type: string
      responses:
        "500":
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
        "200":
          description: Successful Operation
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MessageStatusResponse'
        "404":
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
  /conversationHistory/{partyId}:
    get:
      tags:
      - Status and History Resources
      summary: Get the entire conversation history for a given party
      operationId: getConversationHistory
      parameters:
      - name: partyId
        in: path
        required: true
        schema:
          type: string
      - name: fromDate
        in: query
        description: "Format: yyyy-MM-dd (ISO8601)"
        required: false
        schema:
          type: string
          format: date
      - name: toDate
        in: query
        description: "Format: yyyy-MM-dd (ISO8601)"
        required: false
        schema:
          type: string
          format: date
      responses:
        "500":
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
        "200":
          description: Successful Operation
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/HistoryResponse'
  /batchStatus/{batchId}:
    get:
      tags:
      - Status and History Resources
      summary: Get the status for a message batch
      operationId: getBatchStatus
      parameters:
      - name: batchId
        in: path
        required: true
        schema:
          type: string
      responses:
        "500":
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
        "200":
          description: Successful Operation
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/BatchStatusResponse'
        "404":
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Problem'
  /api-docs:
    get:
      tags:
      - API
      summary: OpenAPI
      operationId: getApiDocs
      responses:
        "200":
          description: OK
          content:
            application/yaml:
              schema:
                type: string
      x-auth-type: None
      x-throttling-tier: Unlimited
      x-wso2-mutual-ssl: Optional
components:
  schemas:
    ExternalReference:
      required:
      - key
      - value
      type: object
      properties:
        key:
          type: string
          description: The external reference key
          example: flowInstanceId
        value:
          type: string
          description: The external reference value
          example: 356t4r34f
      description: External references
    Header:
      required:
      - name
      - values
      type: object
      properties:
        name:
          type: string
          description: The header name
        values:
          type: array
          description: The header values
          items:
            type: string
            description: The header values
      description: Headers
    Party:
      type: object
      properties:
        partyId:
          type: string
          description: The message party ID
          example: f427952b-247c-4d3b-b081-675a467b3619
        externalReferences:
          type: array
          description: External references
          items:
            $ref: '#/components/schemas/ExternalReference'
      description: Party
    WebMessageRequest:
      required:
      - message
      type: object
      properties:
        party:
          $ref: '#/components/schemas/Party'
        headers:
          type: array
          description: Headers
          items:
            $ref: '#/components/schemas/Header'
        message:
          type: string
          description: Message
    Problem:
      type: object
      properties:
        instance:
          type: string
          format: uri
        type:
          type: string
          format: uri
        parameters:
          type: object
          additionalProperties:
            type: object
        title:
          type: string
        status:
          $ref: '#/components/schemas/StatusType'
        detail:
          type: string
    StatusType:
      type: object
      properties:
        reasonPhrase:
          type: string
        statusCode:
          type: integer
          format: int32
    MessageResponse:
      type: object
      properties:
        messageId:
          type: string
    Sms:
      required:
      - name
      type: object
      properties:
        name:
          maxLength: 11
          minLength: 0
          type: string
          description: The sender of the SMS
          example: sender
      description: Sender
    SmsRequest:
      required:
      - message
      - mobileNumber
      type: object
      properties:
        party:
          $ref: '#/components/schemas/Party'
        headers:
          type: array
          description: Headers
          items:
            $ref: '#/components/schemas/Header'
        sender:
          $ref: '#/components/schemas/Sms'
        mobileNumber:
          type: string
          description: Mobile number. Should start with +467x
        message:
          type: string
          description: Message
    Email:
      required:
      - address
      - name
      type: object
      properties:
        name:
          type: string
          description: The sender of the e-mail
        address:
          type: string
          description: Sender e-mail address
          example: sender@sender.se
        replyTo:
          type: string
          description: Reply-to e-mail address
          example: sender@sender.se
    Message:
      required:
      - message
      type: object
      properties:
        party:
          $ref: '#/components/schemas/Party'
        headers:
          type: array
          description: Headers
          items:
            $ref: '#/components/schemas/Header'
        sender:
          $ref: '#/components/schemas/Sender'
        subject:
          type: string
          description: The message subject (for E-mails)
        message:
          type: string
          description: The message text
      description: A message to be sent
    MessageRequest:
      type: object
      properties:
        messages:
          type: array
          description: The messages to be sent
          items:
            $ref: '#/components/schemas/Message'
      description: Message representation
    Sender:
      type: object
      properties:
        sms:
          $ref: '#/components/schemas/Sms'
        email:
          $ref: '#/components/schemas/Email'
      description: Sender
    MessagesResponse:
      type: object
      properties:
        batchId:
          type: string
        messageIds:
          type: array
          items:
            type: string
    Attachment:
      required:
      - content
      - name
      type: object
      properties:
        content:
          type: string
          description: The attachment (file) content as a BASE64-encoded string
          example: aGVsbG8gd29ybGQK
        name:
          type: string
          description: The attachment filename
          example: test.txt
        contentType:
          type: string
          description: The attachment content type
          example: text/plain
      description: Attachments
    EmailRequest:
      required:
      - emailAddress
      - subject
      type: object
      properties:
        party:
          $ref: '#/components/schemas/Party'
        headers:
          type: array
          description: Headers
          items:
            $ref: '#/components/schemas/Header'
        emailAddress:
          type: string
          description: Recipient e-mail address
        subject:
          type: string
          description: E-mail subject
        message:
          type: string
          description: E-mail plain-text body
        htmlMessage:
          type: string
          description: E-mail HTML body (BASE64-encoded)
        sender:
          $ref: '#/components/schemas/Email'
        attachments:
          type: array
          description: Attachments
          items:
            $ref: '#/components/schemas/Attachment'
    DigitalMailAttachment:
      required:
      - content
      - filename
      type: object
      properties:
        contentType:
          type: string
          description: Content type
          enum:
          - application/pdf
        content:
          type: string
          description: Content (BASE64-encoded)
        filename:
          type: string
          description: Filename
      description: Attachments
    DigitalMailRequest:
      required:
      - body
      - contentType
      type: object
      properties:
        party:
          $ref: '#/components/schemas/Parties'
        headers:
          type: array
          description: Headers
          items:
            $ref: '#/components/schemas/Header'
        subject:
          type: string
          description: Subject
          nullable: true
        contentType:
          type: string
          description: Content type
          enum:
          - text/plain
          - text/html
        body:
          type: string
          description: Body (BASE64-encoded)
        attachments:
          type: array
          description: Attachments
          items:
            $ref: '#/components/schemas/DigitalMailAttachment'
    Parties:
      required:
      - partyIds
      type: object
      properties:
        partyIds:
          type: array
          description: The message party ID:s
          items:
            type: string
            description: The message party ID:s
        externalReferences:
          type: array
          description: External references
          items:
            $ref: '#/components/schemas/ExternalReference'
      description: Parties
    MessageStatusResponse:
      type: object
      properties:
        messageId:
          type: string
        status:
          type: string
          enum:
          - AWAITING_FEEDBACK
          - PENDING
          - SENT
          - FAILED
          - NO_FEEDBACK_SETTINGS_FOUND
          - NO_FEEDBACK_WANTED
    HistoryResponse:
      type: object
      properties:
        messageType:
          type: string
          enum:
          - MESSAGE
          - EMAIL
          - SMS
          - WEB_MESSAGE
          - DIGITAL_MAIL
        status:
          type: string
          enum:
          - AWAITING_FEEDBACK
          - PENDING
          - SENT
          - FAILED
          - NO_FEEDBACK_SETTINGS_FOUND
          - NO_FEEDBACK_WANTED
        content:
          type: object
        timestamp:
          type: string
          format: date-time
    BatchStatusResponse:
      type: object
      properties:
        messageStatuses:
          type: array
          items:
            $ref: '#/components/schemas/MessageStatusResponse'
  securitySchemes: {}

Säkerhetsklassning

Säkerhetsklass 1

Autentiseringsmetod: Oauth2

Teknisk ägare

Ansvarigt team: Team Dynasty

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

Källkod

<TBD>

FAQ

<FAQ>

Create from Template
spaceKeySK
templateName22151177
templateId22151177
buttonLabelSkapa från Template