ЕСОЗ - публічна документація
Get Employee Requests List
Purpose
This WS is designed to search requests to registration employees by legal_entity_id and other filters
Specification
Link | Посилання на Apiary або Swagger | |
Resource | /api/employee_requests | Посилання на ресурс, наприклад: /api/persons/create |
Scope | employee_request:read | Scope для доступу |
Components | Employees | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription |
Microservices | il/api | Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC |
Protocol type | REST | Тип протоколу, який використовується запитом, наприклад: SOAP | REST |
Request type | GET | Тип запиту API, наприклад: GET, POST, PATCH… |
Sync/Async | Sync | Метод є синхронним чи асинхронним? |
Public/Private/Internal | Public | Потрібно зазначити тип методу за ступенем доступності |
Logic
Verify the validity of access token
Check user scopes in order to perform this action
If according to filters requests are not found, WS returns empty data array.
WS returns list of request objects include id and status, pagination data - for technical info.
Filters
See on Apiary
Filter | Values | Type | Description | Example |
---|---|---|---|---|
id |
| String | MPI identifier of the preperson. Required |
|
edrpou |
| String |
|
|
legal_entity_name |
| String |
|
|
no_tax_id |
| Boolean |
|
|
status |
| Enum |
|
|
page |
| Number |
|
|
page_size |
| Number |
|
|
Authorize
Request to process the request using a token in the headers
Headers
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
Request data validation
Verify the validity of access token
Return (401, 'Invalid access token') in case of validation fails
Verify that token is not expired
in case of error - return (401, 'Invalid access token')
Check user scopes in order to perform this action (scope = 'employee_request:read')
Return (403, 'Your scope does not allow to access this resource. Missing allowances: employee_request:read') in case of invalid scope(s)
Processing
Service returns specified Employee requests:
Get Employee requests by ID from
il.employee_requests
Filter by search params
Validate data consistency:
Ensure that requested Employee requests relates to the legal entity from token:
Return 403 ('Access denied') in case of error
Render a response according to specification with found Employee requests:
if according to filters requests are not found, WS returns empty data array
Response structure
See on Apiary
Example:
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 | Response |
|
ЕСОЗ - публічна документація