Versions Compared
compared with
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 SmsSenderE-post (implementerad)
Se EmailSenderDigital post (Implementerad)
Se digitalMailSenderWebb-meddelanden (implementerad)
Se webMessageSenderAnalog post (implementerad)
Se SnailmailSender
Bubblare:
letter
App-push
Dessutom sparas, för identifierade mottagare, kommunikationshistorik.
Livscykelstatus
Produktion
Lösningsbeskrivning
Gliffy | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Hantering av personuppgifter
Meddelandehistorik sparas på person-id.
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@'"2.5" 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: "500400": description: InternalBad Server ErrorRequest content: '*application/*'json: schema: $ref: '#/components/schemas/Problem' "200": description: Successful Operation content: '*/*'application/problem+json: schema: $ref: '#/components/schemas/MessageResponseProblem' "400200": description: BadSuccessful RequestOperation content: '*application/*'json: schema: $ref: '#/components/schemas/ProblemMessageResponse' /sms: post: application/problem+json: tags: - Sending Resources schema: summary$ref: Send a single SMS'#/components/schemas/MessageResponse' "500": operationId: sendSms requestBodydescription: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/SmsRequestProblem' required: true application/problem+json: responses: "500": schema: description: Internal Server Error $ref: '#/components/schemas/Problem' /snailmail: content: post: tags: '*/*': - Sending Resources schemasummary: Send a single snailmail $ref: '#/components/schemas/Problem'operationId: sendSnailmail "200"requestBody: descriptioncontent: Successful Operation contentapplication/json: '*/*'schema: schema:$ref: '#/components/schemas/SnailmailRequest' required: true $ref: '#/components/schemas/MessageResponse'responses: "400": description: Bad Request content: '*application/*'json: schema: $ref: '#/components/schemas/Problem' /messages: post: application/problem+json: tags: - Sending Resources schema: summary: Send a batch of messages as e-mail or SMS to a list of parties $ref: '#/components/schemas/Problem' operationId"200": sendMessage requestBody:description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/MessageRequest'MessageResponse' application/problem+json: required: trueschema: responses:$ref: '#/components/schemas/MessageResponse' "500": description: Internal Server Error content: '*application/*'json: schema: $ref: '#/components/schemas/Problem' "200": application/problem+json: description: Successful Operation schema: content: $ref: '*/*':#/components/schemas/Problem' /sms: post: schematags: - Sending Resources $refsummary: '#/components/schemas/MessagesResponse' Send a single SMS "400"operationId: sendSms description: Bad Request requestBody: content: '*/*': application/json: schema: $ref: '#/components/schemas/ProblemSmsRequest' /email: postrequired: true tags responses: - Sending Resources"400": summary: Send a single e-maildescription: Bad Request operationId: sendEmail content: requestBody: content: application/json: schema: $ref: '#/components/schemas/EmailRequestProblem' required: true responses: "500": description: Internal Server Error content: '*/*'application/problem+json: schema: $ref: '#/components/schemas/Problem' "200": description: Successful Operation content: '*application/*'json: schema: $ref: '#/components/schemas/MessageResponse' "400": application/problem+json: description: Bad Request schema: content: $ref: '*/*':#/components/schemas/MessageResponse' "500": schema: description: Internal Server Error $ref: '#/components/schemas/Problem' /digitalmail: content: post: tagsapplication/json: - Sending Resources summaryschema: Send a single digital mail to one or more parties operationId$ref: sendDigitalMail'#/components/schemas/Problem' requestBody: content: application/problem+json: schema: $ref: '#/components/schemas/DigitalMailRequestProblem' /messages: required: truepost: tags: - Sending Resources responsessummary: Send a batch of messages as e-mail or SMS "500":to a list of parties descriptionoperationId: InternalsendMessages Server Error requestBody: content: '*/*'application/json: schema: $ref: '#/components/schemas/ProblemMessageRequest' required: true "200 responses: "400": description: SuccessfulBad OperationRequest content: '*application/*'json: schema: $ref: '#/components/schemas/MessageResponseProblem' "400 application/problem+json: schema: $ref: '#/components/schemas/Problem' "200": description: BadSuccessful RequestOperation content: '*application/*'json: schema: $ref: '#/components/schemas/MessagesResponse' application/problem+json: schema: $ref: '#/components/schemas/MessagesResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' /letter: post: tags: - Sending Resources summary: Send a single letter as digital mail or snail mail operationId: sendLetter requestBody: content: application/json: schema: $ref: '#/components/schemas/LetterRequest' required: true responses: "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' "200": description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/MessageResponse' application/problem+json: schema: $ref: '#/components/schemas/MessageResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: 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: "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' "200": description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/MessageResponse' application/problem+json: schema: $ref: '#/components/schemas/MessageResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: 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: "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' "200": description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/MessagesResponse' application/problem+json: schema: $ref: '#/components/schemas/MessagesResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' /status/{messageId}: get: tags: - Status and History Resources summary: Get the status for a single message and its deliveries operationId: getMessageStatus parameters: - name: messageId in: path required: true schema: type: string responses: "404": description: Not Found content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' "200": description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/MessageStatusResponse' application/problem+json: schema: $ref: '#/components/schemas/MessageStatusResponse' /message/{messageId}: get: tags: - Status and History Resources summary: Get a message and all its deliveries operationId: getMessage parameters: - name: messageId in: path required: true schema: type: string responses: "404": description: Not Found content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' "200": description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/HistoryResponse' application/problem+json: schema: $ref: '#/components/schemas/HistoryResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' /conversation-history/{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: from in: query description: "From-date (inclusive). Format: yyyy-MM-dd (ISO8601)" required: false schema: type: string format: date - name: to in: query description: "To-date (inclusive). Format: yyyy-MM-dd (ISO8601)" required: false schema: type: string format: date responses: "200": description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/HistoryResponse' application/problem+json: schema: $ref: '#/components/schemas/HistoryResponse' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' /batch-status/{batchId}: get: tags: - Status and History Resources summary: "Get the status for a message batch, its messages and their deliveries" operationId: getBatchStatus parameters: - name: batchId in: path required: true schema: type: string responses: "404": description: Not Found content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' "200": description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/BatchStatusResponse' application/problem+json: schema: $ref: '#/components/schemas/BatchStatusResponse' /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: - values type: object properties: name: type: string description: The header name enum: - DISTRIBUTION_RULE - CATEGORY - FACILITY_ID - TYPE values: type: array description: The header values items: type: string description: The header values description: Headers Party: type: object properties: partyId: type: string $ref: '#/components/schemas/Problem' /status/{messageId}: getdescription: The message party ID tags: - Status and History Resourcesexample: f427952b-247c-4d3b-b081-675a467b3619 summaryexternalReferences: Get the status for a single message type: array operationId: getMessageStatus parametersdescription: External references - name: messageId items: in: path required$ref: true'#/components/schemas/ExternalReference' description: Party schema: WebMessageAttachment: type: stringobject responsesproperties: "500"fileName: descriptiontype: Internal Server Errorstring contentdescription: File name '*/*':mimeType: type: string schema: description: Mime-type $refbase64Data: '#/components/schemas/Problem' "200"type: string description: Successful Operation "BASE64-encoded file, max size 10 MB" contentdescription: Attachment WebMessageRequest: '*/*'required: - message schema: type: object $ref: '#/components/schemas/MessageStatusResponse'properties: "404"party: description$ref: Not Found'#/components/schemas/Party' headers: content: type: array '*/*': description: Headers schema: items: $ref: '#/components/schemas/ProblemHeader' /conversationHistory/{partyId}: getmessage: tags: type: string - Status and History Resources description: Message summary: Get the entire conversation history for aattachments: given party operationId: getConversationHistory maxItems: 10 parameters: type: -array name: partyId initems: path required: true $ref: '#/components/schemas/WebMessageAttachment' schemaProblem: type: stringobject - nameproperties: fromDate instance: in: query descriptiontype: "Format: yyyy-MM-dd (ISO8601)"string requiredformat: falseuri schematype: type: string format: uri date - nameparameters: toDate intype: queryobject descriptionadditionalProperties: "Format: yyyy-MM-dd (ISO8601)" requiredtype: falseobject schemastatus: type: string$ref: '#/components/schemas/StatusType' detail: format: date responsestype: string "500"title: descriptiontype: Internalstring Server Error StatusType: contenttype: object properties: '*/*': statusCode: schematype: integer $refformat: '#/components/schemas/Problem'int32 "200"reasonPhrase: descriptiontype: Successfulstring Operation MessageResponse: contenttype: object properties: '*/*': messageId: schematype: string SnailmailAttachment: required: $ref: '#/components/schemas/HistoryResponse' /batchStatus/{batchId}: - content get: tags:- name - Statustype: andobject History Resources properties: summary: Get the status for a message batchcontent: operationId: getBatchStatus type: string parameters: - namedescription: batchIdThe attachment (file) content as a BASE64-encoded string in: path requiredexample: trueaGVsbG8gd29ybGQK schemaname: type: string responses: description: The attachment filename "500": descriptionexample: Internaltest.txt Server Error contentcontentType: '*/*'type: string schemadescription: The attachment content type $refexample: '#/components/schemas/Problem'text/plain description: Attachment "200": SnailmailRequest: descriptionrequired: Successful Operation - department content: - personId '*/*'type: object properties: schema: party: $ref: '#/components/schemas/BatchStatusResponseParty' "404"headers: descriptiontype: Not Foundarray contentdescription: Headers '*/*'items: schema: $ref: '#/components/schemas/ProblemHeader' /api-docs: getdepartment: tags: type: string - API summarydescription: Department and OpenAPIunit that should be billed operationId: getApiDocs responsesexample: "SBK(Gatuavdelningen, Trafiksektionen)" "200"deviation: descriptiontype: OKstring contentdescription: If the letter to send deviates from the standard application/yaml: example: A3 Ritning schema: personId: type: string x-auth-type: None description: PersonId for x-throttling-tier: Unlimited the person to send snailmail to x-wso2-mutual-ssl: Optional components: schemasattachments: ExternalReference: type: array required: - key items: - value type: object$ref: '#/components/schemas/SnailmailAttachment' Sms: properties: required: key: - name type: stringobject properties: description: The external reference keyname: examplemaxLength: 11 flowInstanceId valueminLength: 0 type: string description: The externalsender of referencethe valueSMS example: 356t4r34fsender description: External referencesSender HeaderSmsRequest: required: - message name - valuesmobileNumber type: object properties: nameparty: type$ref: string'#/components/schemas/Party' descriptionheaders: The header name type: values:array typedescription: arrayHeaders descriptionitems: The header values items$ref: '#/components/schemas/Header' sender: type: string $ref: '#/components/schemas/Sms' description: The headermobileNumber: values description: Headers type: string Party: type: object description: Mobile number. Should start with properties:+467x partyIdmessage: type: string description: TheMessage message party ID DigitalMail: examplerequired: f427952b-247c-4d3b-b081-675a467b3619 - externalReferences:supportInfo type: arrayobject description: External referencesproperties: itemssupportInfo: $ref: '#/components/schemas/ExternalReference'SupportInfo' Email: descriptionrequired: Party WebMessageRequest: - address required: - messagename type: object properties: partyname: $reftype: '#/components/schemas/Party' string headersdescription: The sender of the e-mail type address: array descriptiontype: Headersstring itemsdescription: Sender e-mail address $refexample: '#/components/schemas/Header'sender@sender.se messagereplyTo: type: string description: Message Reply-to e-mail address Problem: typeexample: objectsender@sender.se propertiesMessage: instancerequired: - message type: string formattype: uriobject typeproperties: typeparty: string format$ref: uri'#/components/schemas/Party' parametersheaders: type: object additionalProperties:array description: Headers type: object titleitems: type$ref: string'#/components/schemas/Header' statussender: $ref: '#/components/schemas/StatusTypeSender' detailsubject: type: string StatusType description: The message subject (for E-mails) type: object message: propertiestype: string reasonPhrasedescription: Plain-text message text typehtmlMessage: string statusCodetype: string typedescription: integer"HTML message text, for e-mails (BASE64-encoded)" description: A message to format:be int32sent MessageResponseMessageRequest: type: object properties: messageIdmessages: type: stringarray Sms: description: required:The messages to be sent - name typeitems: object properties: $ref: '#/components/schemas/Message' name: description: Message representation maxLengthSender: 11 type: object minLengthproperties: 0 sms: type: string $ref: '#/components/schemas/Sms' description: The sender of the SMSemail: example$ref: sender'#/components/schemas/Email' description: Sender digitalMail: SmsRequest: required$ref: '#/components/schemas/DigitalMail' - messagedescription: Sender SupportInfo: - mobileNumber typerequired: object properties: - emailAddress party: - phoneNumber $ref: '#/components/schemas/Party' - text headers: - url type: arrayobject description: Headersproperties: itemstext: $reftype: '#/components/schemas/Header'string senderemailAddress: $reftype: '#/components/schemas/Sms'string mobileNumberphoneNumber: type: string url: description: Mobile number. Should start with +467x type: string messageMessagesResponse: type: object string properties: description: Message batchId: Email: required: type: string - address messageIds: - name type: objectarray properties: items: name: type: string DigitalMailAttachment: descriptionrequired: The sender of the e-mail - content address: - delivery mode type: string - filename descriptiontype: Sender e-mailobject address exampleproperties: sender@sender.se delivery replyTomode: type: string description: Reply-to e-mail address Is attachment for Digital or Snail mail? example: sender@sender.se Messageenum: required: - messageDIGITAL type: object - properties:SNAIL partycontentType: $reftype: '#/components/schemas/Party'string headersdescription: Content type type enum: array description: Headers- application/pdf itemscontent: type: string $ref: '#/components/schemas/Header' senderdescription: Content (BASE64-encoded) $reffilename: '#/components/schemas/Sender' subjecttype: string typedescription: stringFilename description: Attachments description LetterRequest: The message subject (for E-mails) required: message: - body type: string- contentType - description:department The message text type: object description: A message to be sentproperties: MessageRequest: party: type: object properties$ref: '#/components/schemas/Parties' messagesheaders: type: array description: TheHeaders messages to be sent items: $ref: '#/components/schemas/MessageHeader' description: Message representation subject: Sender: type: objectstring properties: description: Subject sms: nullable: true $ref: '#/components/schemas/Sms' contentType: email: type: string $ref: '#/components/schemas/Email' description: SenderContent type MessagesResponse: typeenum: object properties: - text/plain batchId: type: string- text/html messageIdsbody: type: arraystring itemsdescription: Body (BASE64-encoded) department: type: string Attachment: type: string required: -description: contentDepartment and unit that should be billed -in namecase of snailmail type: object example: properties:"SBK(Gatuavdelningen, Trafiksektionen)" contentattachments: type: stringarray description: TheAttachments attachment (file) content as a BASE64-encoded string items: example: aGVsbG8gd29ybGQK name:$ref: '#/components/schemas/DigitalMailAttachment' Parties: typerequired: string - partyIds description: The attachment filename type: object example: test.txtproperties: contentTypepartyIds: type: stringarray description: The attachmentmessage contentparty typeID:s exampleitems: text/plain descriptiontype: Attachmentsstring EmailRequest: requireddescription: The message party ID:s - emailAddress externalReferences: - subject type: array object propertiesdescription: External references party items: $ref: '#/components/schemas/PartyExternalReference' description: Parties headers: EmailAttachment: typerequired: array - content description: Headers - name items: type: object $ref: '#/components/schemas/Header'properties: emailAddresscontent: type: string description: RecipientThe e-mail address attachment (file) content as a BASE64-encoded string subject: typeexample: stringaGVsbG8gd29ybGQK descriptionname: E-mail subject messagetype: string typedescription: stringThe attachment filename description: E-mail plain-text body example: test.txt htmlMessagecontentType: type: string description: E-mail HTML body (BASE64-encoded) The attachment content type senderexample: text/plain description: Attachment $ref: '#/components/schemas/Email' EmailRequest: attachmentsrequired: - emailAddress type: array - subject descriptiontype: object Attachments properties: items: party: $ref: '#/components/schemas/AttachmentParty' DigitalMailAttachment: requiredheaders: - content type: array - filename typedescription: objectHeaders properties: items: contentType: type$ref: string'#/components/schemas/Header' emailAddress: description: Content type type: string enum: description: Recipient e-mail application/pdfaddress contentsubject: type: string description: Content (BASE64-encoded) filename:E-mail subject message: type: string type: string description: Filename description: Attachments E-mail plain-text body DigitalMailRequest: requiredhtmlMessage: - body type: string - contentType typedescription: objectE-mail HTML body (BASE64-encoded) properties: partysender: $ref: '#/components/schemas/PartiesEmail' headersattachments: type: array description: Headers items: $ref: '#/components/schemas/HeaderEmailAttachment' DigitalMailRequest: subjectrequired: - body type: string - contentType description: Subject type: object nullableproperties: true contentTypeparty: type$ref: string'#/components/schemas/Parties' headers: description: Content type type: array enum: description: Headers - text/plain items: - text/html body$ref: '#/components/schemas/Header' typesender: string description: Body (BASE64-encoded)$ref: '#/components/schemas/DigitalMail' attachmentssubject: type: arraystring description: AttachmentsSubject itemsnullable: true $refcontentType: '#/components/schemas/DigitalMailAttachment' Parties: requiredtype: string - partyIds description: Content type: object properties: partyIds: enum: type: array - text/plain description: The message party ID:s - text/html items: body: type: string description: The message party ID:sBody (BASE64-encoded) externalReferencesattachments: type: array description: ExternalAttachments references items: $ref: '#/components/schemas/ExternalReference'DigitalMailAttachment' MessageStatusResponse: descriptiontype: Partiesobject MessageStatusResponseproperties: type messageId: object propertiestype: string messageIddeliveryId: type: string status: type: string enum: - AWAITING_FEEDBACK - PENDING - SENT - FAILED - NO_FEEDBACK_SETTINGS_FOUND - NO_FEEDBACK_WANTEDWANTED HistoryResponse: type: object HistoryResponseproperties: type content: object propertiestype: object messageType: type: string enum: - MESSAGE - EMAIL - SMS - WEB_MESSAGE - DIGITAL_MAIL - SNAIL_MAIL - LETTER status: type: string enum: - AWAITING_FEEDBACK - PENDING - SENT - FAILED - NO_FEEDBACK_SETTINGS_FOUND - NO_FEEDBACK_WANTED contenttimestamp: type: objectstring timestamp: format: date-time BatchStatusResponse: type: string type: object formatproperties: date-time BatchStatusResponse: batchId: type: object type: properties:string messageStatusesmessages: 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 | ||||||||
---|---|---|---|---|---|---|---|---|
|