Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Beskrivning
Funktion för att registrera påminnelser, och skicka ut dem.
I kommande steg kan påminnelser komma att triggas utifrån.
Livscykelstatus
Design
Lösningsbeskrivning
Gliffy | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Datamodell reminders (draft)
personId (den som vill ha påminnelsen)
companyId (vilket av de företag personen representerar som påminnelsen avser - är tom om den är en privat påminnelse)
todo (fritext - exempel: “Förnya ansökan skyltlov”)
caseId (ärendenummer i Open-E t ex - exempel: “23456” - ej obligatoriskt)
caseLink (länk till ärendet i Open-E t ex för ärendet med caseId ovan - ej obligatorisk)
note (fritext - notering kopplad till påminnelsen. Ingår ej i påminnelsenutskicket)
reminderDate (när skall påminnelsen skickas ut)
Utskick av påminnelser
Att köras en gång per dygn:
För alla reminders i databasen som har reminderDate idag:
Hämta kontaktuppgifter via Messaging från feedbackSettings
Skicka påminnelsen som e-post eller SMS (beroende på uppgifterna från feedbackSettings) via messaging
Hantering av personuppgifter
PersonId används för att knyta påminnelser till en specifik individ.
API specifikation
Expand | ||
---|---|---|
| ||
eyJ4NXQiOiJOVGRtWmpNNFpEazNOalkwWXpjNU1tWm1PRGd3TVRFM01XWXdOREU1TVdSbFpEZzROemM0WkE9PSIsImtpZCI6ImdhdGV3YXlfY2VydGlmaWNhdGVfYWxpYXMiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbkBjYXJib24uc3VwZXIiLCJhcHBsaWNhdGlvbiI6eyJvd25lciI6ImFkbWluIiwidGllclF1b3RhVHlwZSI6bnVsbCwidGllciI6IlVubGltaXRlZCIsIm5hbWUiOiJNaWNrZVRlc3QiLCJpZCI6NDgsInV1aWQiOiIyMDJmNzkyZS01Y2VlLTRmYzQtYmQ1My01YWJhYWRiNjYzM2EifSwiaXNzIjoiaHR0cHM6XC9cL2FwaS1pbS10ZXN0LnN1bmRzdmFsbC5zZTo0NDNcL29hdXRoMlwvdG9rZW4iLCJ0aWVySW5mbyI6eyJVbmxpbWl0ZWQiOnsidGllclF1b3RhVHlwZSI6InJlcXVlc3RDb3VudCIsImdyYXBoUUxNYXhDb21wbGV4aXR5IjowLCJncmFwaFFMTWF4RGVwdGgiOjAsInN0b3BPblF1b3RhUmVhY2giOnRydWUsInNwaWtlQXJyZXN0TGltaXQiOjAsInNwaWtlQXJyZXN0VW5pdCI6bnVsbH19LCJrZXl0eXBlIjoiU0FOREJPWCIsInBlcm1pdHRlZFJlZmVyZXIiOiIiLCJzdWJzY3JpYmVkQVBJcyI6W3sic3Vic2NyaWJlclRlbmFudERvbWFpbiI6ImNhcmJvbi5zdXBlciIsIm5hbWUiOiJSZW1pbmRBbmRJbmZvcm0iLCJjb250ZXh0IjoiXC9yZW1pbmRlcnNcLzEuMCIsInB1Ymxpc2hlciI6ImFkbWluIiwidmVyc2lvbiI6IjEuMCIsInN1YnNjcmlwdGlvblRpZXIiOiJVbmxpbWl0ZWQifV0sInBlcm1pdHRlZElQIjoiIiwiaWF0IjoxNjM5NDk4MDM4LCJqdGkiOiIxOTJmNzhiNS1jMGE5LTRmNDUtYmIzNy0yOTNjZTgwOWFiNDQifQ==.rOIOMlF8IhewdAV2hyIVoeI0RRQ91ERyZaosrij5ADsiBhOrv30roKVOZ5uNuIDrzo-VXwv2Ym7TvdU_C3LI6Dw1bDbdLYBgUYSU361xjr8NcS7DeXy3L1_unQdDj9cX6hdFvFcAzNhoz_laGKvO9mMpdwRcDopFIOHRt5UTlEiPQVoy5rHNh3oy5yN9na0aCY_0J_cbkL_hBRXpq7ftXKndcL35_B6AYV_UDJu-E6zosD1i39E_SLwLJEIsCgG9-lv5ni29MDV-c-XinDYCU7amLBOPJsC3B2VUfzFC7AtDnKVyrhcIsahsyAGrcQcL0i4qx2u9WPAB2Bc9K81g-Q== |
Swagger ui |
---|
--- openapi: 3.0.21 info: title: api-remindandinform-dev API contact: {} license: name: MIT License url: https://opensource.org/licenses/MIT version: 1"2.0.0-SNAPSHOT" servers: - url: https://api-test.sundsvall.se/reminders/12.0 tags: - name: Reminder description: Remind operations paths: /api-docsreminders: getpost: tags: - APIReminder summary: OpenAPI-definitionCreate a new reminder. parameters: [] operationId: createReminder responsesrequestBody: "200"content: descriptionapplication/json: ok x-auth-type: None /remindersschema: post: tags$ref: '#/components/schemas/ReminderRequest' - Reminder required: true summaryresponses: Create a new reminder. "201": requestBody: contentdescription: Created application/json headers: schemaLocation: $refstyle: '#/components/schemas/ReminderRequest'simple required: true responsesschema: "201": descriptiontype: Successfulstring operation content: application/problem+json: schema: $ref: '#/components/schemas/Reminder' "400": description: Bad request content: application/problem+json: schema: $ref: '#/components/schemas/ServiceErrorResponseProblem' "500": description: Internal Server error content: application/problem+json: schema: $ref: '#/components/schemas/ServiceErrorResponseProblem' /reminders/persons/{personId}send: getpost: tags: - Reminder summary: ReturnsSend all reminders for a person. parametersoperationId: sendReminders - namerequestBody: personId content: in: path descriptionapplication/json: Person ID required: true schema: schema: $ref: '#/components/schemas/SendRemindersRequest' type: string example: 81471222-5798-11e9-ae24-57fa13b361e1required: true responses: "200204": description: Successful operation content"400": application/jsondescription: Bad request schemacontent: type: arrayapplication/problem+json: itemsschema: $ref: '#/components/schemas/ReminderProblem' "400500": description: Internal BadServer requesterror content: application/problem+json: schema: $ref: '#/components/schemas/ServiceErrorResponseProblem' /reminders/{reminderId}: "404"get: tags: description: Not Found - Reminder contentsummary: Returns a reminder by reminder-id application/json:operationId: getReminderByReminderId parameters: - schemaname: reminderId in: path $ref: '#/components/schemas/ServiceErrorResponse' description: Reminder ID "500": required: true description: Internal Server errorschema: contenttype: string example: R-81471222-5798-11e9-ae24-57fa13b361e1 application/json: responses: schema"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/Reminder' application/problem+json: schema: $ref: '#/components/schemas/Reminder' "500": description: Internal Server error content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' "404": description: Not Found content: application/json: schema: $ref: '#/components/schemas/Problem' application/problem+json: schema: $ref: '#/components/schemas/Problem' delete: tags: - Reminder summary: Deletes a reminder. operationId: deleteReminder parameters: - name: reminderId in: path description: Reminder ID required: true schema: type: string example: R-81471222-5798-11e9-ae24-57fa13b361e1 responses: "204": description: Successful operation "400": description: Bad request content: application/problem+json: schema: $ref: '#/components/schemas/Problem' "500": description: Internal Server error content: application/problem+json: schema: $ref: '#/components/schemas/Problem' "404": description: Not Found content: application/problem+json: schema: $ref: '#/components/schemas/Problem' patch: tags: - Reminder summary: Manage updates of a reminder. operationId: updateReminder parameters: - name: reminderId in: path description: Reminder ID required: true schema: type: string example: R-81471222-5798-11e9-ae24-57fa13b361e1 requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateReminderRequest' 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/Reminder' application/problem+json: schema: $ref: '#/components/schemas/ServiceErrorResponseReminder' /reminders/persons/{personId}/companies/{companyId}: get"500": tags description: Internal Server error - Reminder summarycontent: Returns all reminders for a person and a company which the person represent. application/json: parameters: - nameschema: companyId in: path $ref: '#/components/schemas/Problem' description: Company ID requiredapplication/problem+json: true schema: schema: pattern: \S type$ref: string'#/components/schemas/Problem' "404": nullable: false description: example:Not 5565112233Found - name: personId content: in: path application/json: description: Person ID requiredschema: true schema: $ref: '#/components/schemas/Problem' type: string exampleapplication/problem+json: 81471222-5798-11e9-ae24-57fa13b361e1 responses: schema: "200": description: Successful operation $ref: '#/components/schemas/Problem' /reminders/persons/{personId}: contentget: tags: application/json: - Reminder summary: Returns all reminders for a schema: person. operationId: getRemindersByPersonId typeparameters: array - name: personId itemsin: path description: Person ID $ref required: '#/components/schemas/Reminder'true "400"schema: descriptiontype: Badstring request contentexample: 81471222-5798-11e9-ae24-57fa13b361e1 responses: application/json: "200": schemadescription: Successful operation content: $ref: '#/components/schemas/ServiceErrorResponse' "404"application/json: description: Not Found schema: content: type: array application/json: items: schema: $ref: '#/components/schemas/ServiceErrorResponseReminder' "500": application/problem+json: description: Internal Server error schema: content: type: array application/json: schemaitems: $ref: '#/components/schemas/ServiceErrorResponseReminder' /reminders/send: post: tags "400": - Reminder summary: Send reminders. description: Bad request requestBody: content: application/json: schema: $ref: '#/components/schemas/SendRemindersRequestProblem' required: true responses: application/problem+json: "204": descriptionschema: Successful operation "400": description: Bad request$ref: '#/components/schemas/Problem' "500": content: {} "500"description: Internal Server error description: Internal Server error content: content: {} application/reminders/{reminderId}json: get: tags: schema: - Reminder summary: Returns a reminder by reminder-id $ref: '#/components/schemas/Problem' parameters: - name: reminderIdapplication/problem+json: in: path schema: description: Reminder ID required$ref: true'#/components/schemas/Problem' schema"404": patterndescription: \SNot Found typecontent: string nullableapplication/json: false example: R-81471222-5798-11e9-ae24-57fa13b361e1 schema: responses: "200": $ref: '#/components/schemas/Problem' description: Successful operation application/problem+json: content: schema: application/json: schema$ref: '#/components/schemas/Problem' /reminders/persons/{personId}/organizations/{organizationId}: get: typetags: array - Reminder itemssummary: Returns all reminders for a person and an organization which the person $ref: '#/components/schemas/Reminder' represent. "400"operationId: getRemindersByPersonIdAndOrganizationId descriptionparameters: Bad request content- name: personId application/jsonin: path description: Person ID schema: required: true $ref: '#/components/schemas/ServiceErrorResponse'schema: "404":type: string example: 81471222-5798-11e9-ae24-57fa13b361e2 description: Not Found - name: organizationId content: in: path application/jsondescription: Organization ID required: true schema: schema: $reftype: '#/components/schemas/ServiceErrorResponse'string "500"example: 81471222-5798-11e9-ae24-57fa13b361e3 responses: description: Internal Server error"200": contentdescription: Successful operation application/jsoncontent: schemaapplication/json: $refschema: '#/components/schemas/ServiceErrorResponse' delete: tags: type: array - Reminder summary: Deletes a reminder. items: parameters: - name: reminderId in$ref: path'#/components/schemas/Reminder' description: Reminder ID application/problem+json: required: true schema: pattern: \S type: array type: string nullableitems: false example: R-81471222-5798-11e9-ae24-57fa13b361e1 responses$ref: '#/components/schemas/Reminder' "204400": description: Bad request Successful operation "400"content: description application/json: Bad request contentschema: {} "404": $ref: '#/components/schemas/Problem' description: Not Found application/problem+json: content: {} "500"schema: description: Internal Server error $ref: '#/components/schemas/Problem' content: {} "500": patch: tagsdescription: Internal Server error - Reminder content: summary: Manage updates of a reminder. parametersapplication/json: - name: reminderId schema: in: path description: Reminder ID $ref: '#/components/schemas/Problem' required: true application/problem+json: schema: patternschema: \S type: string $ref: '#/components/schemas/Problem' nullable: false "404": example: R-81471222-5798-11e9-ae24-57fa13b361e1 description: Not Found requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateReminderRequestProblem' required: true application/problem+json: responses: "200": schema: description: Successful operation $ref: '#/components/schemas/Problem' content/api-docs: get: application/jsontags: - API schemasummary: OpenAPI operationId: getApiDocs $ref: '#/components/schemas/Reminder'responses: "400200": description: BadOK request content: application/jsonyaml: schema: $reftype: '#/components/schemas/ServiceErrorResponse' "404"string security: description: Not Found - ApiKeyAuth: [] components: contentschemas: ReminderRequest: application/jsonrequired: - action schema:- personId - reminderDate $reftype: '#/components/schemas/ServiceErrorResponse'object "500"properties: descriptionpersonId: Internal Server error type: string content: description: Person Id application/json: example: 81471222-5798-11e9-ae24-57fa13b361e2 schema: organizationId: $reftype: '#/components/schemas/ServiceErrorResponse' security:string - ApiKeyAuth: [] components: securitySchemesdescription: Organization Id ApiKeyAuth: type: apiKeyexample: 81471222-5798-11e9-ae24-57fa13b361e3 inaction: header namemaxLength: apikey8192 schemasminLength: 0 Reminder: descriptiontype: Reminderstring model type: object description: What should be done properties: reminderIdexample: Renew application descriptionnote: Reminder ID maxLength: 2048 type: string minLength: 0 example: R-81471222-5798-11e9-ae24-57fa13b361e1 personIdtype: string description: PersonReminder IDnote typeexample: string A short note about the reminder examplecaseId: 81471222-5798-11e9-ae24-57fa13b361e2 companyIdmaxLength: 255 descriptionminLength: Company0 ID type: string exampledescription: "5565112233"Id for the case action: example: "12345" description: What should be donecaseLink: typemaxLength: string512 exampleminLength: Renew0 application caseIdtype: string description: CaseLink IDto the case type: string example: http://test.sundsvall.se/case1337 examplereminderDate: "12345" caseLinktype: string description: LinkDate tofor thereminding case typeformat: stringdate example: http://test.sundsvall.se/case12345 2021-11-01 description: Reminder creation request model reminderDateReminder: type: object format: date properties: descriptionreminderId: Date for reminding type: string exampledescription: 2021-11-01Reminder ID ReminderRequest: descriptionexample: Reminder creation request modelR-81471222-5798-11e9-ae24-57fa13b361e1 requiredpersonId: - personId type: string - action -description: reminderDatePerson ID type: object example: 81471222-5798-11e9-ae24-57fa13b361e2 properties: personIdorganizationId: descriptiontype: Personstring Id description: type:Organization stringID example: 81471222-5798-11e9-ae24-57fa13b361e2 57fa13b361e3 nullableaction: false companyIdtype: string description: What should Companybe Iddone maxLengthexample: 10Renew application typenote: string type: example: "5565445566"string actiondescription: Reminder note description example: WhatA shouldshort benote doneabout the reminder maxLengthcaseId: 8192 type: string exampledescription: RenewCase applicationID nullableexample: false "12345" caseId: description: Id for the casecaseLink: maxLengthtype: 255string typedescription: string Link to the case example: "12345"http://test.sundsvall.se/case12345 caseLinkreminderDate: descriptiontype: Linkstring to the case description: Date for maxLength:reminding 512 typeformat: stringdate example: http://test.sundsvall.se/case13372021-11-01 description: Reminder model reminderDate: Problem: formattype: object date properties: description: Date for remindinginstance: type: string exampleformat: 2021-11-01uri nullabletype: false SendRemindersRequest: type: string description: Request model for sending reminders of a specified date format: uri required: parameters: - reminderDate type: object properties: additionalProperties: reminderDatetype: object format: datestatus: $ref: '#/components/schemas/StatusType' description: Date for remindingtitle: type: string example: 2021-11-01detail: nullabletype: falsestring ServiceErrorResponseStatusType: type: object properties: httpCodestatusCode: formattype: int32integer typeformat: integerint32 messagereasonPhrase: type: string SendRemindersRequest: technicalDetailsrequired: - reminderDate $ref: '#/components/schemas/TechnicalDetails' type: object TechnicalDetailsproperties: type reminderDate: object propertiestype: string rootCode description: Date for reminding format: int32date typeexample: integer 2021-11-01 rootCausedescription: Request model for sending reminders of a specified date type: string UpdateReminderRequest: serviceIdtype: object typeproperties: string detailspersonId: type: arraystring itemsdescription: Person Id typeexample: string81471222-5798-11e9-ae24-57fa13b361e2 UpdateReminderRequestorganizationId: description: Reminder update requesttype: modelstring type: object description: Organization Id properties: personIdexample: 81471222-5798-11e9-ae24-57fa13b361e3 descriptionaction: Person Id maxLength: 8192 type: string minLength: 0 example: 81471222-5798-11e9-ae24-57fa13b361e1 companyIdtype: string description: What should Companybe Iddone maxLengthexample: 10Renew application typenote: string maxLength: example: "5565445566"2048 actionminLength: 0 descriptiontype: Whatstring should be done description: Reminder note maxLength: 8192 example: A short type:note stringabout the reminder examplecaseId: Renew application caseIdmaxLength: 255 description minLength: Id0 for the case type: string maxLength: 255 description: Id for type:the stringcase example: "12345" caseLink: description: Link to the casemaxLength: 512 minLength: 0 maxLengthtype: 512string type: stringdescription: Link to the case example: http://test.sundsvall.se/case1337 reminderDate: formattype: datestring description: Date for reminding typeformat: stringdate example: 2021-11-01 description: Reminder update request model |
Säkerhetsklassning
Säkerhetsklass 1
Autentiseringsmetod: 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
FAQ
<FAQ>