Table of Contents |
---|
Purpose
This WS is designed to allow NHS employees with appropriate scopes to deactivate Employee records with two options - defining death date and without.
Key points
This is a graphQl query method used in Administration panel only.
Only authenticated and authorized employee with appropriate scope can create employee request.
Specification
Expand | ||||
---|---|---|---|---|
|
Authorization
Verify the validity of access token
in case of error - return 401 (“Invalid access token”) in case of validation fails
Verify that token is not expired
in case of error - return 401 (“Invalid access token”)
Check user scopes in order to perform this action (scope = '
employee:deactivate
')return 403 (“Your scope does not allow to access this resource. Missing allowances:
'employee:deactivate
') in case of invalid scope(s)
Validate legal entity
employee_belongs to related legal entity
Service logic
Set fields in employees table (prm database)
...