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:
SMS (implementerad)
Se se SmsSenderE-post (implementerad)
Se EmailSender Digital post (under utveckling)
Se digitalMailSender se EmailSenderWebb-meddelanden (implementerad)
Se webMessageSender
se WebMessageSenderPost (digital via DigitalMailSender om mottagaren har digital brevlåda, annars analog via SnailmailSender)
Digital post och digitala fakturor
se DigitalMailSender- Slack
se Slack
Bubblare:
Analog post
App-push
Dessutom sparas, för identifierade mottagare, kommunikationshistorik.
Livscykelstatus
Under utveckling
Lösningsbeskrivning
Gliffy | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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: "2.0"
tags:
- name: Sending Resources
- name: Status and History Resources
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:
"400":
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"500":
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"200":
description: Successful Operation
content:
'*/*':
schema:
$ref: '#/components/schemas/MessageResponse'
/sms:
post:
tags:
- Sending Resources
summary: Send a single SMS
operationId: sendSms
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SmsRequest'
required: true
responses:
"400":
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"500":
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"200":
description: Successful Operation
content:
'*/*':
schema:
$ref: '#/components/schemas/MessageResponse'
/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:
"400":
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"500":
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"200":
description: Successful Operation
content:
'*/*':
schema:
$ref: '#/components/schemas/MessagesResponse'
/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:
"400":
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"500":
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"200":
description: Successful Operation
content:
'*/*':
schema:
$ref: '#/components/schemas/MessageResponse'
/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'
"404":
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"200":
description: Successful Operation
content:
'*/*':
schema:
$ref: '#/components/schemas/MessageStatusResponse'
/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:
"200":
description: Successful Operation
content:
'*/*':
schema:
$ref: '#/components/schemas/BatchStatusResponse'
"500":
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"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
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'
WebMessageRequest:
required:
- message
type: object
properties:
party:
$ref: '#/components/schemas/Party'
headers:
type: array
items:
$ref: '#/components/schemas/Header'
message:
type: string
Problem:
type: object
properties:
instance:
type: string
format: uri
type:
type: string
format: uri
parameters:
type: object
additionalProperties:
type: object
status:
$ref: '#/components/schemas/StatusType'
title:
type: string
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
SmsRequest:
required:
- message
- mobileNumber
type: object
properties:
party:
$ref: '#/components/schemas/Party'
headers:
type: array
items:
$ref: '#/components/schemas/Header'
sender:
$ref: '#/components/schemas/Sms'
mobileNumber:
pattern: "^\\+467[02369]\\d{7}$"
type: string
description: Mobile number. Should start with +467x
message:
type: string
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
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
items:
$ref: '#/components/schemas/Header'
emailAddress:
type: string
description: Recipient e-mail address
example: recipient@recipient.se
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'
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
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
(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
Produktion>
FAQ
<FAQ>
Batchfunktionalitet
För att skicka stora batcher med meddelanden via antingen SMS eller E-post finns det två resurser tillgängliga:
- /sms/batch
- /email/batch
Båda är asynkrona och för att säkerställa att meddelanden skickats kan kommunikationshistorik hämtas via resursen /status.
Spårbarhet
Samtliga endpoints under Sending Resource har stöd att ta emot x-origin och x-issuer som möjliggör en viss spårbarhet. x-origin representerar vilket system anropet skickades ifrån och x-issuer representerar vilken användare som skickat anropet.
Batchfunktionalitet
Livscykelstatus
Produktion
Lösningsbeskrivning
Gliffy | ||||||
---|---|---|---|---|---|---|
|
Hantering av personuppgifter
Meddelandehistorik sparas på person-id.
API-specifikation
Open api | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
Säkerhetsklassning
Säkerhetsklass 1
Autentiseringsmetod: Oauth2
Teknisk ägare
Ansvarigt team: Team Unmasked
För tekniska frågor: teamunmasked@sundsvall.se