ЕСОЗ - публічна документація
RC_Get Device dispense details
Purpose
This method allows to get detailed information of the Device dispense.
Specification
Authorization
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 = 'device_dispense:read')
Return (403, 'Your scope does not allow to access this resource. Missing allowances: device_dispense:read') in case of invalid scope(s)
Validations
Validate Device dispense
Get Device dispense identifier from the URL
Check Device dispense exists in device_dispenses (MongoDB)
Return 404 ('not_found') in case of error
Check Device dispense belongs to legal entity
Return 404 ('not_found') in case of error
Service logic
Service returns specified Device dispense related to the legal entity from token:
Get Device dispense by ID from device_dispenses (MongoDB)
Validate data consistency:
Ensure that requested Device dispense relates to requested legal entity
Return 404 ('not_found') in case of error
Render a response according to specification
ЕСОЗ - публічна документація