POST {who}/authorization/Delegations

Delegate roles and/or rights to a given party identified by username, organization number and/or ssn. When delegating to a user, last name must also be given - and when delegating to an organization the organization name must be given.

Request Information

Parameters

NameDescriptionAdditional information
who Who the delegation will be done on behalf of Valid values are "my", or an organization number of an organization the user can represent, or <Reportee.ReporteeId>, where the identified reportee may be a person or organization.

Define this parameter in the request URI.

rightHolder All rights and roles which are to be delegated, and information about who it should be delegated to

Define this parameter in the request body.

Request body formats

application/hal+xml

Sample request to delegate roles and rights to SSN. Need to specify the following Right holder parameters: Email, SocialSecurityNumber and LastName.
<resource rel="RightHolder">
    <Type>Email</Type>
    <SocialSecurityNumber>string example 21</SocialSecurityNumber>
    <LastName>string example 21</LastName>
    <resource rel="Roles">        
        <resource rel="Role">
            <RoleDefinitionId>64</RoleDefinitionId>
        </resource>
    </resource>
    <resource rel="Rights">
        <resource rel="Right">
            <ServiceCode>string example 34</ServiceCode>
            <ServiceEditionCode>64</ServiceEditionCode>
            <Action>string example 21</Action>
        </resource>
        <resource rel="Right">
            <MessageID>64</MessageID>
            <ServiceCode>string example 34</ServiceCode>
            <ServiceEditionCode>64</ServiceEditionCode>
            <Action>string example 21</Action>
        </resource>
        <resource rel="Right">
            <SystemResourceID>string example 38</SystemResourceID>
            <Action>string example 21</Action>
        </resource>
    </resource>
</resource>
                    

Sample request to delegate roles and rights to organization. Need to specify the following Right holder parameters: Email, OrganizationNumber and Name.
<resource rel="RightHolder">
    <Type>Email</Type>
    <OrganizationNumber>string example 21</OrganizationNumber>
    <Name>string example 21</Name>
    <resource rel="Roles">        
        <resource rel="Role">
            <RoleDefinitionId>64</RoleDefinitionId>
        </resource>
    </resource>
    <resource rel="Rights">
        <resource rel="Right">
            <ServiceCode>string example 34</ServiceCode>
            <ServiceEditionCode>64</ServiceEditionCode>
            <Action>string example 21</Action>
        </resource>
        <resource rel="Right">
            <SystemResourceID>string example 38</SystemResourceID>
            <Action>string example 21</Action>
        </resource>
    </resource>
</resource>
                    

Sample request to delegate roles and rights to UserName. Need to specify the following Right holder parameters: Email, UserName and LastName.
<resource rel="RightHolder">
    <Type>Email</Type>
    <UserName>string example 21</UserName>
    <LastName>string example 21</LastName>
    <resource rel="Roles">        
        <resource rel="Role">
            <RoleDefinitionId>64</RoleDefinitionId>
        </resource>
    </resource>
</resource>
                    

Sample request to delegate roles. Need to specify the RoleDefinitionId of the role which has to be delegated.
<resource rel="RightHolder">
    <Type>Email</Type>
    <SocialSecurityNumber>string example 21</SocialSecurityNumber>
    <LastName>string example 21</LastName>
    <resource rel="Roles">        
        <resource rel="Role">
            <RoleDefinitionId>64</RoleDefinitionId>
        </resource>
    </resource>
 </resource>

Sample request to delegate rights.
Specify SystemResourceID and Action for delegating access to system resource.
Specify ServiceCode, ServiceEditionCode and Action for delegating access to specific service.
Specify MessageID,ServiceCode, ServiceEditionCode and Action for delegating access to specific message.
<resource rel="RightHolder">
    <Type>Email</Type>
    <SocialSecurityNumber>string example 21</SocialSecurityNumber>
    <LastName>string example 21</LastName>
    <resource rel="Rights">
        <resource rel="Right">
            <ServiceCode>string example 34</ServiceCode>
            <ServiceEditionCode>64</ServiceEditionCode>
            <Action>string example 21</Action>
        </resource>
        <resource rel="Right">
            <MessageID>64</MessageID>
            <ServiceCode>string example 34</ServiceCode>
            <ServiceEditionCode>64</ServiceEditionCode>
            <Action>string example 21</Action>
        </resource>
        <resource rel="Right">
            <SystemResourceID>string example 38</SystemResourceID>
            <Action>string example 21</Action>
        </resource>
    </resource>
</resource>

Sample request for consent delegation of rights.
Specify DelegationContext parameter for the Right holder Specify ServiceCode, ServiceEditionCode, Action and IsConsentDelegation for delegating consent access to specific service.
<resource rel="RightHolder">
    <Type>Email</Type>
    <SocialSecurityNumber>string example 21</SocialSecurityNumber>
    <LastName>string example 21</LastName>
    <DelegationContext>string example 22</DelegationContext>
    <resource rel="Rights">
        <resource rel="Right">
            <ServiceCode>string example 34</ServiceCode>
            <ServiceEditionCode>64</ServiceEditionCode>
            <Action>string example 21</Action>
            <ValidToDate>string example 34</ValidToDate>
            <IsConsentDelegation>True</IsConsentDelegation>
        </resource>
    </resource>
</resource>

application/hal+json

Sample request to delegate roles and rights to SSN. Need to specify the following Right holder parameters: Email, SocialSecurityNumber and LastName.
{
    "Type": "Email",
    "SocialSecurityNumber": "string example 34",
    "LastName": "string example 34",
    "_embedded" : {
        "Roles" : [{
            "RoleDefinitionId": 64;
        }],
        "Rights" : [{
            "ServiceCode": "string example 36",
            "ServiceEditionCode": 64,
            "Action": "string example 36"
        },
        {
            "MessageID": 64;
            "ServiceCode": "string example 36",
            "ServiceEditionCode": 64,
            "Action": "string example 36"
        },
        {
            "SystemResourceID": "string example 36",
            "Action": "string example 38"
        }]
    }
}
                    

Sample request to delegate roles and rights to organization. Need to specify the following Right holder parameters: Email, OrganizationNumber and Name.
{
    "Type": "Email",
    "OrganizationNumber": "string example 34",
    "Name": "string example 34",
    "_embedded" : {
        "Roles" : [{
            "RoleDefinitionId": 64;
        }],
        "Rights" : [{
            "ServiceCode": "string example 36",
            "ServiceEditionCode": 64,
            "Action": "string example 36"
        },
        {
            "SystemResourceID": "string example 36",
            "Action": "string example 38"
        }]
    }
}
                    

Sample request to delegate roles and rights to UserName. Need to specify the following Right holder parameters: Email, UserName and LastName.
{
    "Type": "Email",
    "UserName": "string example 34",
    "LastName": "string example 34",
    "_embedded" : {
        "Roles" : [{
            "RoleDefinitionId": 64;
        }]
 }
}
                    

Sample request to delegate roles. Need to specify the RoleDefinitionId of the role which has to be delegated.
{
    "Type": "Email",
    "SocialSecurityNumber": "string example 34",
    "LastName": "string example 34",
    "_embedded" : {
        "Roles" : [{
            "RoleDefinitionId": 64;
        }]
    }
}

Sample request to delegate rights.
Specify SystemResourceID and Action for delegating access to system resource.
Specify ServiceCode, ServiceEditionCode and Action for delegating access to specific service.
Specify MessageID,ServiceCode, ServiceEditionCode and Action for delegating access to specific message.
{
    "Type": "Email",
    "SocialSecurityNumber": "string example 34",
    "LastName": "string example 34",
    "_embedded" : {
        "Rights" : [{
            "ServiceCode": "string example 36",
            "ServiceEditionCode": 64,
            "Action": "string example 36"
        },
        {
            "MessageID": 64;
            "ServiceCode": "string example 36",
            "ServiceEditionCode": 64,
            "Action": "string example 36"
        },
        {
            "SystemResourceID": "string example 36",
            "Action": "string example 38"
        }]
    }
}

Sample request for consent delegation of rights.
Specify DelegationContext parameter for the Right holder Specify ServiceCode, ServiceEditionCode, Action and IsConsentDelegation for delegating consent access to specific service.
{
    "Type": "Email",
    "SocialSecurityNumber": "string example 34",
    "LastName": "string example 34",
    "DelegationContext": "string example 34",
    "_embedded" : {
        "Rights" : [{
            "ServiceCode": "string example 36",
            "ServiceEditionCode": 64,
            "Action": "string example 36",
            "ValidToDate": "string example 36",
            "IsConsentDelegation": "True"
        }]
    }
}