...
Get person_id
Get person request details from il.person_requests table by id
In case if
person_requests.documents
field contains not empty array - prepare data forurgent.documents
field in responseGet all
documents.[x].type
values from person requestInvoke Media Invoke Media Content Storage to generate upload URL for each document type from person request, add new links to response:
action:
PUT
bucket:
MEDIA_STORAGE_PERSON_REQUEST_BUCKET
resource_id:
person_request_id
resource_name:
person_request_#{type}.jpeg
Check existence of file for each type in Media content storage for person request
if file exists - set is_uploaded = true for document type in response
if file does not exist - set is_uploaded = false for document type in response
Render a response according to specification