This process is designed to verify declarations with the offline verification by NHS admin.
Authorize
- Verify the validity of access token
- Check user scope declaration:verify in order to perform this action
- In case error - return 401 error
Validate transition
Validate transitionю Allowed transitions:
pending_verification → active
pending_verification → closed
Check is_active = true
If not passed, Returne Error 403 message "Invalid transition"
Update Declaration status
$declaration.status = active
$declaration.updated_by = user_id
$declaration.updated_at = timestamp