ЕСОЗ - публічна документація
[DRAFT] Get Employee Request by ID [API-005-007-002-0114]
Сторінка знаходиться в процесі розробки. Інформація на ній може бути застарілою.
https://e-health-ua.atlassian.net/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)
- 1 Properties of a REST API method document
- 2 Purpose
- 3 Logic
- 4 Configuration parameters
- 5 Dictionaries
- 6 Input parameters
- 7 Request structure
- 8 Headers
- 9 Request data validation
- 9.1 Authorize
- 9.2 Validate request
- 9.3 Validate id
- 9.4 Validate context
- 10 Processing
- 11 Response structure examples
- 12 HTTP status codes
- 13 Post-processing processes
- 14 Technical modules where the method is used
Properties of a REST API method document
Document type | Метод REST API |
---|---|
Document title | [DRAFT] Get Employee Request by ID [API-005-007-002-0114] |
Guideline ID | GUI-0011 |
Author | @ |
Document version | 1 |
Document status | DRAFT |
Date of creation | ХХ.ХХ.ХХХХ (дата фінальної версії документа – RC або PROD) |
Date of update | ХХ.ХХ.ХХХХ (дата зміни версії) |
Method API ID | API-005-007-002-0114 |
Microservices (namespace) | IL |
Component | Employees |
Component ID | COM-005-007 |
Link на API-специфікацію | |
Resource | {{host}}/api/employee_requests/{{id}} |
Scope | employee_request:read |
Protocol type | REST |
Request type | GET |
Sync/Async | Sync |
Public/Private | Public |
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
Logic
N/A
Configuration parameters
N/A
Dictionaries
POSITION
EMPLOYEE_TYPE
GENDER
+DOCUMENT_TYPE
PHONE_TYPE
COUNTRY
EDUCATION_DEGREE
QUALIFICATION_TYPE
SPECIALITY_TYPE
SPECIALITY_LEVEL
SPEC_QUALIFICATION_TYPE
Input parameters
Input parameter | Mandatory | Type | Description | Example | |
---|---|---|---|---|---|
1 | id |
| String | Required | d290f1ee-6c54-4b01-90e6-d701748f0851 |
2 |
|
|
|
|
|
Request structure
See on API-specification
Headers
Request data validation
Authorize
Request to process the request using a token in the headers
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
Processing
N/A
Response structure examples
See on API-specification
HTTP status codes
Response code | HTTP Status code | Message | Internal name | Description | |
---|---|---|---|---|---|
1 | Базові | ||||
2 |
| 200 | Response |
|
|
3 |
| 401 | Access token validation failed |
|
|
4 |
| 401 | Error |
|
|
5 |
| 403 | Check user scopes in order to perform this action failed |
|
|
6 |
| 403 | Error |
|
|
7 |
| 404 | COMPOSITION_NOT_FOUND_404 |
|
|
8 |
| 404 | Error |
|
|
9 |
| 404 | Get legal_entity.id from '$.context'. Filter employee requests by legal_entity.id failed |
|
|
10 |
| 404 | Not found employee request in DB with this ID |
|
|
11 | Специфічні | ||||
12 |
|
|
|
|
|
Post-processing processes
N/A
Technical modules where the method is used
ЕСОЗ - публічна документація