Purpose
This WS is designed to search requests to registration employees by legal_entity_id and other filters
...
Page Properties | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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.
...
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
...