Table of Contents |
---|
...
- Verify the validity of access token
- Check user scopes declaration:terminate in order to perform this action
- In case error - generate 401 response
Validate request
One parameter of employee_id
andor person_id
must be set. Also can be added the description field: reason_description.
Validate person
- Search person by $.id
- in case error return 404
- Search declaration by $.person_id
- in case error return 404
- Check declaration status = active
- in case error return 422. Message:"declaration status is not active"
...