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 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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 | ||
---|---|---|
| ||
{ "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 } ], "filters": [], "created": "2022-01-11T16:12:33.004+01:00", "modified": "2022-01-20T10:30:09.469+01:00" } |
API specifikation
Expand | ||
---|---|---|
| ||
eyJ4NXQiOiJOVGRtWmpNNFpEazNOalkwWXpjNU1tWm1PRGd3TVRFM01XWXdOREU1TVdSbFpEZzROemM0WkE9PSIsImtpZCI6ImdhdGV3YXlfY2VydGlmaWNhdGVfYWxpYXMiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbkBjYXJib24uc3VwZXIiLCJhcHBsaWNhdGlvbiI6eyJvd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nRcLzAuMSIsInB1Ymxpc2hlciI6ImFkbWluIiwidmVyc2lvbiI6IjAuMSIsInN1YnNjcmlwdGlvblRpZXIiOiJVbmxpbWl0ZWQifV0sImlhdCI6MTY0NDU2ODUwOCwianRpIjoiZmM5MWQ0MDEtZmYyNy00OWEwLThhYmYtMGRlMjQzZGY5NThiIn0=.rlQzNNFHGpav9DQ8Am79HG-Y2OCJyI86wlZbKrc07a5hL2neBFzQpgaujqq0dPopeQl5TNxEDG_86gJa5eR2Oldif9jfDcdbNdmsOXsOdHd7i8spfCYDXlG8mwXZonKz14hFId7Nk760xs9jDo_tzO0MCHehfYWaAxKV3z97fDZNZpMwJnByXA5uWeaeLmMzYfy42LsqgJN_rJYhIVNEqtLNlp8DJ6mf11p8tzPH3xdpLF0qKgG5UyUZgyd5Us7LVd5EoU1wKrwtNTmSxZ5SwUMV41OJ4Ig0-fZTQ7RigROWFCKGnPqe6r5zSJo7Y6r01dS5bjA35Ohi4UCabQgYGQ== |
Swagger ui | |
---|---|
url | https://api-test.sundsvall.se/feedbacksettings/1.1/api-docs---
openapi: 3.0.2
info:
title: api-feedbacksettings-dev API
version: "1.1"
paths:
/api-docs:
get:
tags:
- API
summary: OpenAPI-definition
parameters: []
responses:
"200":
description: ok
x-auth-type: None
/settings:
get:
tags:
- Feedback Settings Resource
description: |
Resource for querying for feedback settings matching sent in person- and/or organizationId. Returned feedback settings contains a matching percent,
which is 100% if request is not extended with filters (i.e. without filters, all returned posts matches incoming parameters to 100%).<br><br>
If needed, the client can extend the request to include filters. When filters are present they will be taken into account and matched against the
filters on the returned feedback settings when calculating matching percent. All posts matching sent in person- and/or organizationId will still be
returned, but with a calculated matching percent that is based on how filters for the feedback settings posts matches sent in filters.<br><br>
Filters are sent as header values. The convention of the header name is <code>x-filter-[filterkey]</code>. It is possible to include multiple values
for a filter by sending multiple headers with same filter name and different values for each entry, see example below.<br><br>
<pre>
-H 'x-filter-categories: broadband'
-H 'x-filter-categories: electricity'</pre>
parameters:
- name: limit
in: query
schema:
format: int32
default: 20
maximum: 100
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'
"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/CreateFeedbackSettingRequest'
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/FeedbackSetting'
"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/UpdateFeedbackSettingRequest'
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/FeedbackSetting'
"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:
schemas:
ContactMethod:
enum:
- EMAIL
- SMS
type: string
CreateFeedbackSettingRequest:
description: Request model for creating a new feedback setting
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
filters:
type: array
items:
$ref: '#/components/schemas/RequestedFeedbackFilter'
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
FeedbackFilter:
description: Feedback filter model
type: object
properties:
key:
description: Unique key for the filter
type: string
example: categories
values:
description: List of values for the filter
uniqueItems: true
type: array
items:
type: string
example:
- broadband
- electricity
FeedbackSetting:
description: Feedback setting 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
filters:
type: array
items:
description: Feedback filter model
type: object
properties:
key:
description: Unique key for the filter
type: string
example: categories
values:
description: List of values for the filter
uniqueItems: true
type: array
items:
type: string
example:
- broadband
- electricity
readOnly: true
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
RequestedFeedbackFilter:
description: Requested feedback filter model
required:
- key
- values
type: object
properties:
key:
description: Unique key for the filter
pattern: \S
type: string
example: categories
nullable: false
values:
description: List of values for the filter
minItems: 1
uniqueItems: true
type: array
items:
type: string
example:
- broadband
- electricity
SearchResult:
description: Search result model
type: object
properties:
_meta:
$ref: '#/components/schemas/MetaData'
feedbackSettings:
type: array
items:
description: Weighted feedback setting 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
filters:
type: array
items:
description: Feedback filter model
type: object
properties:
key:
description: Unique key for the filter
type: string
example: categories
values:
description: List of values for the filter
uniqueItems: true
type: array
items:
type: string
example:
- broadband
- electricity
readOnly: true
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
matchingPercent:
format: int32
description: Percentual match compared to filters in request
type: integer
readOnly: true
example: 37
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
UpdateFeedbackSettingRequest:
description: Request model for updating a feedback setting
type: object
properties:
channels:
type: array
items:
$ref: '#/components/schemas/RequestedFeedbackChannel'
filters:
type: array
items:
$ref: '#/components/schemas/RequestedFeedbackFilter'
WeightedFeedbackSetting:
description: Weighted feedback setting 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
filters:
type: array
items:
description: Feedback filter model
type: object
properties:
key:
description: Unique key for the filter
type: string
example: categories
values:
description: List of values for the filter
uniqueItems: true
type: array
items:
type: string
example:
- broadband
- electricity
readOnly: true
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
matchingPercent:
format: int32
description: Percentual match compared to filters in request
type: integer
readOnly: true
example: 37
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: apikey |
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>