Purpose
This service returns a list of clients filtered by context depending on client type:
Mithril Admin - receives all client records without context
MSP - receives only its own client
MIS - receives only its own client
Specification
Logic
This service must return a list of clients filtered by context depending on client type
Extract client_type from token
Filter response:
Mithril Admin - receives all client records without context
MSP, MIS, PHARMACY - receives only its own client
Prepare response
Query data from mithril.clients using context
Request structure
API paragraph not found
Authorize
Verify the validity of access token
in case of error return 401 ('Access denied')
Check user scope client:read in order to perform this action
in case of error generate 403 response ('Invalid scopes')
Headers
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
API-key:uXhEczJ56adsfh3Ri9SUkc4en
Request data validation
API paragraph not found
Processing
API paragraph not found
Response structure
Example:
Post-processing processes
API paragraph not found