Versions Compared

Key

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

Beskrivning

<Beskriv vad din applikation/mikrotjänst gör>

Livscykelstatus

<någon av: design, under utveckling, test, produktion, under avveckling, avvecklad>

Lösningsbeskrivning

<Infoga en Gliffy-bild som visuellt beskriver lösningen>

Hantering av personuppgifter

<Vilka personuppgifter hanteras och varför?>

API specifikation (wip)

Swagger ui
{
    "openapicomponents":"3.0.1","info":{"title":"Digital Mail API","contact":{},"license":{"name":"MIT License","url":"https://opensource.org/licenses/MIT"},"version":"1.0"},"servers":[{"url":"http://localhost:4040","description":"Generated server url"}],"tags":[{"name":"Digital Mail"}],"paths":{"/digitalmail/{partyId}":{"post":{"tags":["Digital Mail"],"operationId":"sendDigitalMail","parameters":[{"name":"partyId","in":"path","required":true,"schema":{"type":"string","description":"partyId","example":"6a5c3d04-412d-11ec-973a-0242ac130003"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDigitalMailRequest"}}},"required":true},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigitalMailResponse"}}}}}}}},"components":{"schemas":{"BodyInformation":{"type":"object","properties":{"contentType":{"type":"string","description":"The content type for the message, text/plain for only text, text/html for html messages.","example":"TEXT_PLAIN","enum":["text/plain","text/html"]},"body":{"type":"string","description":"Base64 encoded representation of the message, must be UTF-8 encoded.","example":"QmFzZTY0IGVuY29kZWQgZXhhbXBsZSB0ZXh0Lg=="}},"description":"The body of the message, base64 encoded"},"Header":{"type":"object","properties":{"subject":{"type":"string","description":"The subject of the digital mail.","example":"Viktig information från Sundsvalls kommun"}},"description":"The header of the mail"},"SendDigitalMailRequest":{"required":["bodyInformation","header"],"type":"object","properties":{"header":{"$ref":"#/components/schemas/Header"},"supportInfo":{"$ref":"#/components/schemas/SupportInfo"},"bodyInformation":{"$ref":"#/components/schemas/BodyInformation"}},"description":"Digital mail request."},"SupportInfo":{"type":"object","properties":{"supportText":{"type":"string","description":"Information text describing the different ways the recipient may contact the sender.","example":"Det går bara att komma i kontakt via e-post"},"contactInformationUrl":{"type":"string","description":"Url where the recipient may find more information.","example":"https://sundsvall.se/"},"contactInformationPhoneNumber":{"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 the sender.","example":"someone@sundsvall.se"}},"description":"Contains contact information and where the recipient may turn to for questions."},"Problem":{"type":"object","properties":{"instance":{"type":"string","format":"uri"},"type":{"type":"string","format":"uri"},"parameters":{"type":"object","additionalProperties":{"type":"object"}},"title":{"type":"string"},"detail":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusType"}}},"StatusType":{"type":"object","properties":{"reasonPhrase":{"type":"string"},"statusCode":{"type":"integer","format":"int32"}}},"DigitalMailResponse":{"type":"object","properties":{"distributionId":{"type":"string"}}}},"securitySchemes":{}} {
        "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"
                    },
                    "supportInfo": {
                        "$ref": "#/components/schemas/SupportInfo"
                    }
                },
                "required": [
                    "bodyInformation",
                    "header"
                ],
                "type": "object"
            },
            "StatusType": {
                "properties": {
                    "reasonPhrase": {
                        "type": "string"
                    },
                    "statusCode": {
                        "format": "int32",
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "SupportInfo": {
                "description": "Contains contact information and where the recipient may turn to for questions.",
                "properties": {
                    "contactInformationEmail": {
                        "description": "Email address the recipient may use to get in contact with the sender.",
                        "example": "someone@sundsvall.se",
                        "type": "string"
                    },
                    "contactInformationPhoneNumber": {
                        "description": "Phone number the recipient may call to get in contact with the sender.",
                        "example": "+46701234567",
                        "type": "string"
                    },
                    "contactInformationUrl": {
                        "description": "Url where the recipient may find more information.",
                        "example": "https://sundsvall.se/",
                        "type": "string"
                    },
                    "supportText": {
                        "description": "Information text describing the different ways the recipient may contact the sender.",
                        "example": "Det går bara att komma i kontakt via e-post",
                        "type": "string"
                    }
                },
                "type": "object"
            }
        },
        "securitySchemes": {}
    },
    "info": {
        "contact": {},
        "license": {
            "name": "MIT License",
            "url": "https://opensource.org/licenses/MIT"
        },
        "title": "Digital Mail API",
        "version": "1.0"
    },
    "openapi": "3.0.1",
    "paths": {
        "/digitalmail/{partyId}": {
            "post": {
                "operationId": "sendDigitalMail",
                "parameters": [
                    {
                        "in": "path",
                        "name": "partyId",
                        "required": true,
                        "schema": {
                            "description": "partyId",
                            "example": "6a5c3d04-412d-11ec-973a-0242ac130003",
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SendDigitalMailRequest"
                            }
                        }
                    },
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DigitalMailResponse"
                                }
                            }
                        },
                        "description": "Successful Operation"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        },
                        "description": "Bad Request"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        },
                        "description": "Not Found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        },
                        "description": "Internal Server Error"
                    }
                },
                "tags": [
                    "Digital Mail"
                ]
            }
        }
    },
    "servers": [
        {
            "description": "Generated server url",
            "url": "http://localhost:4040"
        }
    ],
    "tags": [
        {
            "name": "Digital Mail"
        }
    ]
}

Säkerhetsklassning

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

Autentiseringsmetod: <API Key, Oauth2>

(Ref: Säkerhetsklassning av APIer )

API-ägare

<Kontaktuppgifter till den verksamhet som äger APIets livscykel>

Teknisk ägare

<Kontaktuppgifter till utvecklare/teknisk förvaltare>

Länkar

  • Test

  • Sandbox

  • Produktion

FAQ

<FAQ>