Purpose
This method searches and returns request for registration employee by id. This method uses scopes and context.
According to the requirements:
The 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
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
id |
| String | Required | d290f1ee-6c54-4b01-90e6-d701748f0851 |
Dictionaries
POSITION https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1300529210/EMPLOYEE+TYPE GENDER https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1287192636/DOCUMENT+TYPE https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1321533446/PHONE+TYPE COUNTRY
EDUCATION_DEGREE
https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1194852413/QUALIFICATION+TYPE https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1195114505/SPECIALITY+TYPE https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1194852386/SPECIALITY+LEVEL
https://e-health-ua.atlassian.net/wiki/spaces/EBT/pages/1195278373/SPEC+QUALIFICATION+TYPE
Authorize
Request to process the request using a token in the headers
Headers
Authorization:Bearer c2778f3064753ea70de870a53795f5c9 (string, optional)
Request data validation
Validate request
Verify the validity of access token
in case error return 401
Check user scopes in order to perform this action (scope = 'employee_request:read')
in case error return 403
Validate id
Verify id - employee_request_id exists
in case error return 404 (not found employee request in DB with this ID)
Validate context
Get legal_entity.id from '$.context'. Filter employee requests by legal_entity.id
in case error return 404
Response structure
See on Apiary
Example:
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 | Response |
|
401 | Error | Access token validation failed |
403 | Error | Check user scopes in order to perform this action failed |
404 |
| 2. Get legal_entity.id from '$.context'. Filter employee requests by legal_entity.id failed |