Table of Contents |
---|
...
Validate request using JSON schema
In case validation fails - generate 422 error
Check declaration request status
If status is not APPROVED, - returned error 'Incorrect status'
Validate person verification status
validate patient's verification_status is not equal to NOT_VERIFIED.
in case of error return 409, "Patient is not verified"
Check signed content
Check decoded signed content with previously created on IL.db.
...
If "patient_signed" is not present in request, return 422 ("required property patient_signed was not present")
If "patient_signed"=false in request, return 422 ("Patient must sign declaration form")
Validate human readable declaration number
Search declaration_number in declarations.declaration_number.
...
Get url for declaration upload.
Use Request a Secret WSParameter
Source
action'GET'bucket'DECLARATIONS'resource_id: DECLARATION_IDresource_name: DECLARATION_NAME
Upload signed declaration to media storage
...
HTTP status code | Message | What caused the error |
---|---|---|
200200 | Response |
|
401 | Access token validation failed | |
403 | Invalid scopes | |
409 | Validation failed | |
422 | Validation failed |