ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

This method searches and returns request to registration employees by id. This method uses scopes and context. 

According to requirements: 

  • Legal entity(Owner, HR) can see only employee_requests that were made by this legal entity.
  • NHS Admin can see all employee_requests

Specification

Input parameters

  • id  

Validate request

  1. Verify the validity of access token
    1. in case error return 401
  2. Check user scopes in order to perform this action (scope = 'employee_request:read')
    1. in case error return 403

Validate id

  1. Verify id - employee_request_id exists
    1. in case error return 404 (not found employee request in DB with this ID)

Validate context

  1. Get legal_entity.id from '$.context'. Filter employee requests by legal_entity.id
    1. in case error return 404



  • No labels