ЕСОЗ - публічна документація
Resend Authorization OTP on Authentication method Request
Purpose
This method is used when you need to re-send SMS to a person or third person.
Specification
Link | |
Resource | /api/persons/{{id}}/authentication_method_requests/{{request_id}}/actions/resend_otp |
Scope | authentication_method_request:write |
Components | Patient registry |
Microservices | mpi/api fe/admin-web |
Protocol type | REST |
Request type | POST |
Sync/Async | Sync |
Public/Private/Internal | Public |
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
id |
| String | Person identifier |
|
request_id |
| String | Request identifier |
|
Authorize
Verify the validity of access token
Check user scope authentication_method_request:write in order to perform this action
Request to process the request using a token in the headers.
Headers
Content-Type:application/json
Authorization:Bearer {{access_token}}
Api-key:{{secret}}
Request data validation
Validate
Validate auth method. il.authentication_method_request.auth_methos_current.type = OTP
Check that authentication_method_request.status = NEW
Validate preson_id
validate person.id UUID
in case error return
404
search person by person.id in MPI or person.is_active = false
in case error return
404
, "Such person doesn't exist"
validate that person is active ( person.status = active)
in case error return
409
, "Such person isn't active"
Processing
Generate verification code
Invoke Initialize OTP to generate one time password and send it to client number.
cURL example
Response structure
See on Apiary
Example:
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 | Response |
|
404 | Such person doesn't exist | Validation failed |
409 | Such person isn't active | Validation failed |
ЕСОЗ - публічна документація