Here you will find information on how to connect with the API for SSG Access.

swagger URI:   https://api.ssg.se/swagger/ui/index#/Access

To be able to quickly test the API, there is a " mock user " who gives a response but is the same response no matter what you submit.

ClientID   = MockClient 
Client Secret   =   MockClient

Plant

Plant   corresponds to the requirements-making facility, that is, the one that requires that all contractors ( Contractors ) who want access ( Access ) to the facility must have completed the courses ( Competence ) that the facility sets requirements ( Requirements ).

Identity

An entrepreneur (Contractor) can be identified via one or more identities ( Identity ) associated with it, such as the social security number, access card number or the access card's MIFARE ID.

Contractor

One   Contractor   corresponds to the physical person who is to have access ( Access ) to the claim-making plant ( Plant ). Includes, for example, the name of the person.

Company

A contractor (contractor) may represent one or more contractors (Company). Includes, for example, the name of the company.

Competence

One   Competence   corresponds to a completed course or otherwise acquired knowledge ( Qualification ) and contains information for example validity.

Requirement

An Requirement   corresponds to a completed course or otherwise acquired knowledge ( Qualification ) that the plant ( Plant ) requires for the contractor ( Contractor ) to gain access ( Access )

Qualification

One   Qualification   represents something that a plant (plant) may require ( requirement ) and which at the same time a contractor ( contractor ) can fulfill through their competences ( competences ) such as a completed and valid web course from SSG or a skill / knowledge acquired in another way. It could also be a certificate or a permit.

Access

Access ( Access ) is given to the contractors ( contractors ) who meet the requirements ( requirements ) that the plant (plant) sets by being able to match its underlying knowledge ( qualifications ) with their corresponding knowledge ( competences )

Example

Download Contractor based on Access card number

GET / api / access / v1 / contractors / {identity} / { identityType }

identityType = 'SSG', Identity = Abbreviated number 7 digits

Example:

GET / api / access / v1 / contractors / 1000004 / SSG

 

Response :

{

  "Id": "a8501929-e88b-4315-855e-8ac2d1b5 ****",

  "Name": "Lasse Json",

  " AccessCardNo ": "1000004",

  " PhotoUrl ": "https: //ssgcardissueprod.blob.core.windows.net/cardphotos/89913637-b2a5-4b80 -..."

}

Retrieve entrepreneur based on personal

GET / api / access / v1 / contractors / {identity} / { identityType }

identityType = STAFF, Identity = Person number

Example :

GET / api / access / v1 / contractors / 671023-XXXX / PERSONAL

Response :

{

  "Id": "a8501929-e88b-4315-855e-8ac2d1b5 ****",

  "Name": "Lasse Json",

  " AccessCardNo ": "1000004",

  " PhotoUrl ": "https://ssgcardissueprod.blob.core.windows.net/cardphotos/89913637-b2a5-4b80-***"

}

access control

/ api / access / v1 / contractors / { contractorId } / access

contractorId = Id on Contractor, listed in the example above.

Example :

GET / api / access / v1 / contractors / a8501929-e88b-4315-855e-8ac2d1b5 **** / access

Response:

 

{

  " HasAccess ": true ,

  " ValidTo ": "2019-01-28T19: 33: 17.533",

  " PlantId ": "ded49d7f-5109-476b-a4de-4fee9ea3 ****",

  " ContractorId ": "a8501929-e88b-4315-855e-8ac2d1b5 ****"

 }