Table of Contents | ||||
---|---|---|---|---|
|
...
Verify the validity of access token
Return 401 in case of validation fails
Check user scope approval:create in order to perform this action
Return 403 in case of invalid scope
Request to process the request using a token in the headers
Headers*
Наприклад:
Content-Type:application/json
Authorization:Bearer d368a4b0-4a0e-457a-b267-32359fa6288f
...
Search for approval by patient_id + approval_id
Validate person by http://patient.id
In case error return 404 (message "Person not found")
Validate approval by approval.id
In case error return 404 (message "Approval with such id is not found")
Send SMS with OTP-code to persons phone from approvals.urgent.phone_number
...