Versions Compared
Version | Old Version 47 | New Version 48 |
---|---|---|
Changes made by | ||
Saved on |
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Beskrivning
Hämta bolagengagemang för en privatperson från Bolagsverket.
I steg två skall tjänsten byggas ut mot Bolagsverkets Mina Ombud.
I ett första steg anropar vi Bolagsverkets engagemang-tjänst för att hämta vilka bolagsengagemang en privatperson har.
Då alla anrop mot bolagsverket innebär en kostnad, cachas alla lyckade svar från bolagsverket i 30 minuter.
Livscykelstatus
Design
Lösningsbeskrivning
Gliffy | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Hantering av personuppgifter
API specifikation
Expand | ||
---|---|---|
| ||
eyJ4NXQiOiJPV1l4TkRJd016ZGhPREk1WVdRNU1EZGxPREkzT1RZeU1qTXpZemN4TW1NMU0yRTFaREF5WXpGa01qQmpNV0ZrTkROa1pXVTFPRFk1T1dJMlpHRTBZZyIsImtpZCI6ImdhdGV3YXlfY2VydGlmaWNhdGVfYWxpYXMiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJQRVJTT05BTFwvV1NPMl9NU19zaWduYXRvcnlAY2FyYm9uLnN1cGVyIiwiYXBwbGljYXRpb24iOnsib3duZXIiOiJQRVJTT05BTFwvV1NPMl9NU19zaWduYXRvcnkiLCJ0aWVyUXVvdGFUeXBlIjpudWxsLCJ0aWVyIjoiVW5saW1pdGVkIiwibmFtZSI6IkRlZmF1bHRBcHBsaWNhdGlvbiIsImlkIjoyNSwidXVpZCI6ImYwZDU4MTc3LWVlNzctNDNjOC1iNDM0LTBmNDQyOTBkMWU5ZiJ9LCJpc3MiOiJodHRwczpcL1wvYXBpLWltLXRlc3Quc3VuZHN2YWxsLnNlOjQ0M1wvb2F1dGgyXC90b2tlbiIsInRpZXJJbmZvIjp7IkJyb256ZSI6eyJ0aWVyUXVvdGFUeXBlIjoicmVxdWVzdENvdW50IiwiZ3JhcGhRTE1heENvbXBsZXhpdHkiO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Npb24iOiIxLjAiLCJzdWJzY3JpcHRpb25UaWVyIjoiVW5saW1pdGVkIn1dLCJwZXJtaXR0ZWRJUCI6IiIsImlhdCI6MTY2MDcyMDE3NiwianRpIjoiM2Q3ZDYxZTgtMzY3YS00YTgwLWJjNDItM2M5N2Y5MjQzNjVkIn0=.rOzKm1CCSVC8PYy5Rb1hOOkDWtNgxMOrBnXUPo1g1u2k8yAoAzPHjskzbXgUdllXFNiJSnDTYg4imGnUv_4o6OF4yoCALLD31OxbmSkosYLnZ-hnVZToZ42mnouIuwsmaTTnuEZSa3GB3eL3K9k5NnjZu-hw_jvAN10cekvYp5JLMDUNI6STPMEtMCXo_jiB-UYbisgUh-2JWSBGgciE_wnakaMFUZKpamHpdHw93B415RzXR5dUJTebVKvafo8oASgO5MElYdBVBretrdmZXipaLYL5b7xObmqokx1MmqhFA_7iyvuLH9csjdYQTrZjG1vmj5LV4pGUDTXofYaC-A== |
Swagger ui |
---|
openapi: 3.0.1
info:
title: api-businessengagements
contact: {}
license:
name: MIT License
url: https://opensource.org/licenses/MIT
version: "1.0"
servers:
- url: https://api-test.sundsvall.se/sandbox/businessengagements/1.0/
tags:
- name: Business Engagements
description: En tjänst som hämtar en persons företagsengagemang
paths:
/engagements/{partyId}:
get:
tags:
- Business Engagements
operationId: getEngagements
parameters:
- name: partyId
in: path
required: true
schema:
type: string
description: Unique identifier for a person
example: 6a5c3d04-412d-11ec-973a-0242ac130003
- name: personalName
in: query
required: true
schema:
type: string
description: The first and surname of the person
- name: serviceName
in: query
required: true
schema:
type: string
description: Name of the system initiating the request
example: Mina Sidor
responses:
"200":
description: Successful Operation
content:
'*/*':
schema:
$ref: '#/components/schemas/BusinessEngagementsResponse'
"204":
description: No Content
content:
'*/*':
schema:
$ref: '#/components/schemas/BusinessEngagementsResponse'
"404":
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"400":
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
"500":
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/Problem'
/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
security:
- ApiKeyAuth: []
components:
schemas:
BusinessEngagementsResponse:
required:
- status
type: object
properties:
engagements:
type: array
items:
$ref: '#/components/schemas/Engagement'
statusDescriptions:
type: object
additionalProperties:
type: string
description: "In case fetching one or more engagement failed, this will\
\ show why it failed. There may be more than one description if several\
\ engagements failed."
example: Timeout
description: "In case fetching one or more engagement failed, this will\
\ show why it failed. There may be more than one description if several\
\ engagements failed."
example: Timeout
status:
type: string
description: If fetching all engagements went "OK" or "NOK". A "NOK" may
still return engagements but indicates that the information is incomplete.
example: OK
enum:
- OK
- NOK
Engagement:
type: object
properties:
organizationName:
type: string
description: Name of the organization
example: Styrbjörns båtar
organizationNumber:
type: string
description: "Organization number, may also be personal number in case of\
\ enskild firma"
example: "2021005448"
organizationId:
type: string
description: Unique id for the organization (UUID)
example: bab17d8b-af38-4531-967c-083f15ca1571
description: Represents a persons business engagement.
Problem:
type: object
properties:
instance:
type: string
format: uri
type:
type: string
format: uri
parameters:
type: object
additionalProperties:
type: object
status:
$ref: '#/components/schemas/StatusType'
title:
type: string
detail:
type: string
StatusType:
type: object
properties:
statusCode:
type: integer
format: int32
reasonPhrase:
type: string
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: apikey
|
Alla anrop mot bolagsverket har två tvingande parametrar vilket även är tvingande in i detta API förutom partyId:
serviceName
- Det system som anropet initierades ifrån.personalName
- Namnet på den person som företagen skall hämtas för.
Hämta företagsengagemang (/engagements)
Request: /engagements/6a5c3d04-412d-11ec-973a-0242ac130003?personalName=Jane%20Doe&serviceName=Kommunen
Code Block | ||
---|---|---|
| ||
{ "partyId": "6a5c3d04-412d-11ec-973a-0242ac130003", "personalName": "Jane Doe", "serviceName": "Kommunen" } |
Response:
Code Block | ||
---|---|---|
| ||
{ "engagements": [ { "organizationName": "Fritjofs blommor och blad", "organizationNumber": "5561234567", "organizationId": " 793afd03-3be5-4e14-863f-a61d4859841d" }, { "organizationName": "Vanja Jumpers plåt", "organizationNumber": "5561234568" } ] "statusDescriptions": { "5561234568": "Couldn't fetch guid for organization number" }, "status": "NOK" } |
Förtydligande response-parametrar:
engagements: Kan innehålla 0 → n antal engagemang personen har, varje objekt innehåller organisationsnamn och organisationsnummer.
organizationId: unikt uuid/guid för organisationsnumret, om det inte återfinns i LegalEntity utelämnas denna helt.
statusDescriptions: Innehåller eventuella fel i samband med hämtandet av bolagsengagemang eller organizationId. T.ex. att underliggande system (från bolagsverket) överskred begärd svarstid eller att det inte gick att hämta organizationId. Typen är en “Map<String, String>”.
status: Visar om personens alla engagemang kunde hämtas utan fel. Vid eventuella fel sätts denna till “NOK” och det reflekteras även i parametern statusDescriptions genom att varje felbeskrivning läggs till.
Testdata
Bolagsverket har lagt upp fiktiva personnummer med olika bolagsengagemang, partyId för dessa personer finns upplagda i testmiljön för CitizenMapping och mappar till följande dokument.
Personnummer | partyId |
---|---|
198104112381 | 65694a6d-5f5d-4bb6-b256-3b81cb419b60 |
198101032384 | d1eda732-5aec-45e2-a673-4debd42b2f04 |
198101052382 | d4554399-91bb-4258-a7a7-afb9f265dd66 |
198101012386 | 740c013c-f979-4ad3-a073-42a6d5255e3a |
198101042383 | 5a4afbf9-8897-42a8-aaf0-de9530849f7c |
193403223328 | af99121e-4dfc-477c-8b02-daf70603b55f |
198104152387 | ea4a0b53-fa9a-42a6-89a6-7ab1431a014f |
Säkerhetsklassning
Säkerhetsklass 1
Autentiseringsmetod: Oauth2
(Ref: Säkerhetsklassning av APIer )
API-ägare
<Kontaktuppgifter till den verksamhet som äger APIets livscykel>
Teknisk ägare
Ansvarigt team: Team Dynasty
För tekniska frågor: mailto:teamdynasty@sundsvall.se