Search…
Personal Representative

About

A service that is responsible for storing and maintaining personal representatives and their rights to act on behalf of the represented person

Context

The purpose of the Personal Representative Database and the Service API is to allow the protection of rights agency of the Ministry of Social Affairs to define rights for personal representatives and maintain a list of personal representative connections along with rights list.
This allows for digital services to give access to the personal representative on behalf of their clients according to the rights list in their connection.
The API allows for maintenance of right types, personal representative types (currently only one type) and as stated before the connections between a personal representative and the represented person.

Example of connections

Personal representative
Represented person
Rights
1122334459
1223455569
health-data, personal-data, limited-financial-data
1020304059
0203050569
limited-health-data

JSON expample of connection

1
{
2
"id": "guid",
3
"personalRepresentativeTypeCode": "personal_representative_for_disabled_person",
4
"contractId": "99",
5
"externalUserId": "usernameA",
6
"nationalIdPersonalRepresentative": "0123456789",
7
"nationalIdRepresentedPerson": "0123456789",
8
"validTo": "2022-02-04T11:26:25.159Z",
9
"rightCodes": ["health-data", "finance-data"]
10
}
Copied!

Access

The ServiceAPI is only accessible through X-Road security servers and only to machine clients with specific scope
For the foreseeable future the only system with access would be the Personal Representative Contract System serviced by Spektra for the protection of rights agency

Scope

1
@island.is/auth/personal-representative-admin
Copied!

X-Road setup

Urls for X-Road setup are as follows

OpenAPI URL##

OpenAPI documentation and demoing at

Service provider usage

Digital service providers do not get access to the service API.
They can use the connection information through two ways.
  • Setting up X-Road and use the PublicAPI
  • Use Digital Iceland’s new login option and setting it up for Personal Representative usage.
    • This requires mapping rights to scope for service provider's client

Development

Initial setup

We are using the same service library and database as auth-api and therefore this step by step represents that First, make sure you have docker, then run:
1
yarn dev-services services-auth-api
Copied!
Then run the migrations:
1
yarn nx run services-auth-api:migrate
Copied!
You can serve this service locally by running:
1
yarn start services-personal-representative
Copied!
Api open api specs will now be accessible at
1
http://localhost:3376
Copied!

Testing

You can run tests for this service locally by running:
1
yarn test services-personal-representative
Copied!

Getting started

1
yarn start services-personal-representative
Copied!

Project owner

  • Réttindagæsla velferðarráðuneytisins

Code owners and maintainers