Use the following methods to create, deactivate, activate and update users belonging to a company.
To use these methods you must add the X-eSignatur-Id header containing your API key and the X-eSignatur-CreatorId header containing the identifcation of a user with administrative privileges.
The following model is used in the request to the Add and Update methods:
Name | Type | Description | Optional |
---|---|---|---|
UserId | String | User Id. | |
NewUserId | String | New e-Id of user (in case of e-Id change). | |
Name | String | Name of user. | |
Emails | String[] | List of email-addresses associated with this user. | |
IsCustomerAdmin | Boolean | Do the user have administrative privileges? | yes |
UserIdentificationType | String | eID used to access the Portal - defaults to NemID. | yes |
NetsId | String | NetsId of the user |
The following model is used in the response from the Index and Get methods:
Name | Type | Description | Optional |
---|---|---|---|
UserId | String | Id of user (the users e-Id or Employee number. | |
Name | String | Name of user. | |
Emails | String[] | List of email-addresses associated with this user. | |
IsCustomerAdmin | Boolean | Flag indicating if this user have administrative privileges. | |
IsDeleted | Boolean | Flag indicating if this user is soft-deleted (deactivated). |
The following models is used in the response from the Add, Update, Deactivate and Activate methods:
Name | Type | Description | Optional |
---|---|---|---|
UserId | String | User Id. | |
Status | String | Did the requested action succeed? (OK or ERROR). | |
Message | String | A descriptive message following this request. |
Gets a list of users belonging to this company.
GET api.esignatur.dk/User/Index
[ { "Name": "User Usersen", "Emails": [ "user1@local" ], "NetsId": "1234" }, { "Name": "Usain User", "Emails": [ "user2@local" ], "IsCustomerAdmin": true, "NetsId": "4321" } ]
Get the attributes of the user by UserId.
GET api.esignatur.dk/User/Get/{user-id}
{ "Name": "User Usersen", "Emails": [ "user1@local" ], "NetsId": "1234" }
Add a new user to the system. If a user with the given UserId exists this method will fail.
POST api.esignatur.dk/User/Add
[ { "UserId": "54321", "Name": "Parrot and Ferrets", "Emails": [ "parrot@ferret.local" ], "IsCustomerAdmin": true } ]
[ { "UserId": "54321", "Status": "OK", "Message": "Created" } ]
Modifies a user. If a NewUserId is given and that id already exists this method will fail. Do not specify NewUserId if you only want to update, say, the name of the user. You can selectively specifiy one or more attributes to change.
POST api.esignatur.dk/User/Update
[ { "UserId": "54321", "NewUserId": "15243", "Name": "Ferrets and Parrots" } ]
[ { "UserId": "54321", "Status": "OK", "Message": "Changed UserId to 15243,Changed name" } ]
Deactivate one or more users to prevent them from creating orders.
POST api.esignatur.dk/User/Deactivate
[ "15243" ]
{ "UserId": "15243", "Status": "OK", "Message": "User deactivated" }
Activate one or more users to enable them to create orders.
POST api.esignatur.dk/User/Activate
[ "15243" ]
{ "UserId": "15243", "Status": "OK", "Message": "User activated" }