ЕСОЗ - публічна документація
RC_warranty_Get Approval (apps) by ID
Purpose
This WS is designed to show active approval details in PIS made by the user to different clients.
Key points
Only active approvals are returned.
Service must return only user-related approvals.
Specification
Validate request
Validate x-consumer-id (user)
Ensure that header
x-consumer-id
passed to requestin case of error - return 401 ('Unauthorized')
Validate approval
Check that approval from url exists in mithril database, apps table
in case of error - return 404 ('Approval not found')
Check that approval doesn’t belongs to the trusted
client_type.name
according step 3 service logic of Get Approvals
Service logic
Get
user_id
from token (x-consumer-id
header).Get approval from mithril database,
apps
table, usinguser_id
and approvalid
as query params.Render response according to specification.
ЕСОЗ - публічна документація