Versions Compared

Key

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

Beskrivning

Generell tjänst för att hantera medborgares och organisationers inställningar för hur återkoppling ska ske (för till exempel felanmälningar och driftstörningar).

Livscykelstatus

Under utveckling

Lösningsbeskrivning

Gliffy
imageAttachmentIdatt29949965
macroIde0cdd404-6147-48c0-b661-3cb73c11a997
baseUrlhttps://sundsvall.atlassian.net/wiki
namefeedbackSettingsAPI
diagramAttachmentIdatt29393082
containerId29065265
timestamp1643707761929

Hantering av personuppgifter

PersonId används för att knyta återkopplingsuppgifterna till en specifik individ. PersonId är obligatoriskt. I fall personen företräder en organisation så används personId i kombination med organisationsId för att knyta de återkopplingsuppgifter som gäller när personen företräder organisationen. Dvs, en person kan ha en specifik uppsättning återkopplingsuppgifter för personligt bruk samtidigt som hen har en annan uppsättning för respektive organisation som hen företräder. En organisation kan ha en eller flera företrädande personer.

En person eller företrädare för en organisation kan ha 0-n poster i listan över kontaktmetoder, men kan ej ha flera poster med samma innehåll. Dvs, hen kan tex bara ha en post med kontaktkanal SMS och destination 0701234567. Hen kan däremot ha flera poster för tex SMS, så länge destinationen skiljer sig åt mellan dem. Exempelvis:

Code Block
languagejson
{
	"id": "15aee472-46ab-4f03-9605-68bd64ebc84b",
	"personId": "49a974ea-9137-419b-bcb9-ad74c81a1d1a",
	"channels": [
		{
			"contactMethod": "SMS",
			"destination": "0701112233",
			"sendFeedback": true
		},
		{
			"contactMethod": "SMS",
			"destination": "0702223344",
			"sendFeedback": true
		},
		{
			"contactMethod": "EMAIL",
			"destination": "test.testorsson@test.se",
			"sendFeedback": true
		}
	],
	"created": "2022-01-11T16:12:33.004+01:00",
	"modified": "2022-01-20T10:30:09.469+01:00"
}

API specifikation

Expand
titleAPI-nyckel för sandbox-miljö. Klicka på "Authorize" nedan och ange denna nyckel för att testa API:et.

eyJ4NXQiOiJOVGRtWmpNNFpEazNOalkwWXpjNU1tWm1PRGd3TVRFM01XWXdOREU1TVdSbFpEZzROemM0WkE9PSIsIm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iwidmVyc2lvbiI6IjEuMCIsInN1YnNjcmlwdGlvblRpZXIiOiJVbmxpbWl0ZWQifV0sInBlcm1pdHRlZElQIjoiIiwiaWF0IjoxNjQzODczMTQzLCJqdGkiOiJlMWY5MDE2Ny0wY2YyLTQzNjEtYTNkMy0wMjI3OTI2ZDdkZjAifQ==.QwZ-BqBVR0ltQmcLYeZBEfkiJMf6jEoduywZhlWcgNs0vbYn3fKb0AgQa1pb9fJU4d3ltS06ZB5InexU6iDDECCkIedggBlxAWGcD5OTRlBygD2Wg9DhtnhOEgUH3J3OyeG5SIo-s1n2J7lsBjbApLlhSUncvspyGlckYn-sqmUx_C5LYBuNKrpJWMlfbCYbtonpvtecT3hJ-Lyl2KRpTX5akMCqGqrKoKXO6Unjr38poZd6bkKx1WZaDZB8nzJT-js3IcuPXvl1e-UFY91XIWVsUmAFCyvkpAb7fzCAusnnz3p8tf9yu_nsdTpYqcqxRmUXYhadSrO3ty6y2KuC4g==

Swagger ui
---
openapi: 3.0.2
info:
  title: feedbacksettings API
  version: "1.0"
servers:
  - url: https://api-test.sundsvall.se/feedbacksettings/1.0
paths:
  /api-docs:
    get:
      tags:
        - API
      summary: OpenAPI-definition
      parameters: []
      responses:
        '200':
          description: ok
      security:
        - default: []
      x-auth-type: None
      x-throttling-tier: Unlimited
      x-wso2-application-security:
        security-types:
          - oauth2
          - api_key
        optional: false
  /settings:
    get:
      tags:
      - Feedback Settings Resource
      parameters:
      - name: limit
        in: query
        schema:
          format: int32
          default: 20
          minimum: 1
          type: integer
      - name: organizationId
        in: query
        schema:
          type: string
      - name: page
        in: query
        schema:
          format: int32
          default: 1
          minimum: 1
          type: integer
      - name: personId
        in: query
        schema:
          type: string
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceErrorResponse'
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceErrorResponse'
        "500":
          description: Internal Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceErrorResponse'
    post:
      tags:
      - Feedback Settings Resource
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFeedbackSettingsRequest'
      responses:
        "201":
          description: Created
          headers:
            Location:
              style: simple
              schema:
                type: string
          content: {}
        "400":
          description: Bad request
          content: {}
        "500":
          description: Internal Server error
          content: {}
  /settings/{id}:
    get:
      tags:
      - Feedback Settings Resource
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeedbackSettings'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceErrorResponse'
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceErrorResponse'
        "500":
          description: Internal Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceErrorResponse'
    delete:
      tags:
      - Feedback Settings Resource
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Successful operation
        "400":
          description: Bad request
          content: {}
        "404":
          description: Not found
          content: {}
        "500":
          description: Internal Server error
          content: {}
    patch:
      tags:
      - Feedback Settings Resource
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFeedbackSettingsRequest'
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeedbackSettings'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceErrorResponse'
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceErrorResponse'
        "500":
          description: Internal Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceErrorResponse'
security:
  - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth: 
      type: apiKey
      in: header   
      name: apikey  
  schemas:
    ContactMethod:
      enum:
      - EMAIL
      - SMS
      type: string
    CreateFeedbackSettingsRequest:
      description: Request model for creating new feedback settings
      required:
      - personId
      type: object
      properties:
        personId:
          description: Unique id for the person to whom the feedback setting shall
            apply
          type: string
          example: 15aee472-46ab-4f03-9605-68bd64ebc73f
          nullable: false
        organizationId:
          description: Unique id for the company to which the feedback setting shall
            apply if the setting refers to an organizational representative
          type: string
          example: 15aee472-46ab-4f03-9605-68bd64ebc84a
        channels:
          type: array
          items:
            $ref: '#/components/schemas/RequestedFeedbackChannel'
    FeedbackChannel:
      description: Feedback channel model
      type: object
      properties:
        contactMethod:
          allOf:
          - $ref: '#/components/schemas/ContactMethod'
          - description: Method of contact
            readOnly: true
            example: SMS
        destination:
          description: Point of destination
          type: string
          readOnly: true
        sendFeedback:
          description: 'Signal if channel should be used or not when sending feedback '
          type: boolean
          readOnly: true
          example: true
    FeedbackSettings:
      description: Feedback settings response model
      type: object
      properties:
        id:
          description: Unique id for the feedback setting
          type: string
          readOnly: true
          example: 0d64c132-3aea-11ec-8d3d-0242ac130003
        personId:
          description: Unique id for the person to whom the feedback setting applies
          type: string
          readOnly: true
          example: 15aee472-46ab-4f03-9605-68bd64ebc73f
        organizationId:
          description: Unique id for the company to which the feedback setting applies
            in cases where the setting refers to an organizational representative
          type: string
          readOnly: true
          example: 15aee472-46ab-4f03-9605-68bd64ebc84a
        channels:
          type: array
          items:
            description: Feedback channel model
            type: object
            properties:
              contactMethod:
                allOf:
                - $ref: '#/components/schemas/ContactMethod'
                - description: Method of contact
                  readOnly: true
                  example: SMS
              destination:
                description: Point of destination
                type: string
                readOnly: true
              sendFeedback:
                description: 'Signal if channel should be used or not when sending
                  feedback '
                type: boolean
                readOnly: true
                example: true
          readOnly: true
        created:
          format: date-time
          description: Timestamp for creation
          type: string
          readOnly: true
          example: 2022-01-20T10:30:09.469+01:00
        modified:
          format: date-time
          description: Timestamp for last modification
          type: string
          readOnly: true
          example: 2022-01-20T10:30:09.469+01:00
    MetaData:
      description: Metadata model
      type: object
      properties:
        page:
          format: int32
          description: Current page
          type: integer
          readOnly: true
          example: 5
        limit:
          format: int32
          description: Displayed objects per page
          type: integer
          readOnly: true
          example: 20
        count:
          format: int32
          description: Displayed objects on current page
          type: integer
          readOnly: true
          example: 13
        totalRecords:
          format: int64
          description: Total amount of hits based on provided search parameters
          type: integer
          readOnly: true
          example: 98
        totalPages:
          format: int32
          description: Total amount of pages based on provided search parameters
          type: integer
          readOnly: true
          example: 23
    RequestedFeedbackChannel:
      description: Requested feedback channel model
      required:
      - contactMethod
      - destination
      - sendFeedback
      type: object
      properties:
        contactMethod:
          allOf:
          - $ref: '#/components/schemas/ContactMethod'
          - description: Method of contact
            example: SMS
            nullable: false
        destination:
          description: Point of destination
          type: string
          example: "0701234567"
        sendFeedback:
          description: 'Signal if channel should be used or not when sending feedback '
          type: boolean
          example: true
          nullable: false
    SearchResult:
      description: Search result response model
      type: object
      properties:
        _meta:
          $ref: '#/components/schemas/MetaData'
        feedbackSettings:
          type: array
          items:
            description: Feedback settings response model
            type: object
            properties:
              id:
                description: Unique id for the feedback setting
                type: string
                readOnly: true
                example: 0d64c132-3aea-11ec-8d3d-0242ac130003
              personId:
                description: Unique id for the person to whom the feedback setting
                  applies
                type: string
                readOnly: true
                example: 15aee472-46ab-4f03-9605-68bd64ebc73f
              organizationId:
                description: Unique id for the company to which the feedback setting
                  applies in cases where the setting refers to an organizational representative
                type: string
                readOnly: true
                example: 15aee472-46ab-4f03-9605-68bd64ebc84a
              channels:
                type: array
                items:
                  description: Feedback channel model
                  type: object
                  properties:
                    contactMethod:
                      allOf:
                      - $ref: '#/components/schemas/ContactMethod'
                      - description: Method of contact
                        readOnly: true
                        example: SMS
                    destination:
                      description: Point of destination
                      type: string
                      readOnly: true
                    sendFeedback:
                      description: 'Signal if channel should be used or not when sending
                        feedback '
                      type: boolean
                      readOnly: true
                      example: true
                readOnly: true
              created:
                format: date-time
                description: Timestamp for creation
                type: string
                readOnly: true
                example: 2022-01-20T10:30:09.469+01:00
              modified:
                format: date-time
                description: Timestamp for last modification
                type: string
                readOnly: true
                example: 2022-01-20T10:30:09.469+01:00
          readOnly: true
    ServiceErrorResponse:
      type: object
      properties:
        httpCode:
          format: int32
          type: integer
        message:
          type: string
        technicalDetails:
          $ref: '#/components/schemas/TechnicalDetails'
    TechnicalDetails:
      type: object
      properties:
        rootCode:
          format: int32
          type: integer
        rootCause:
          type: string
        serviceId:
          type: string
        details:
          type: array
          items:
            type: string
    UpdateFeedbackSettingsRequest:
      description: Request model for updating feedback settings
      type: object
      properties:
        channels:
          type: array
          items:
            $ref: '#/components/schemas/RequestedFeedbackChannel'

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

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

Länkar

FAQ

<FAQ>