ЕСОЗ - публічна документація
Resend Authorization OTP on Person Request
Purpose
This method is used when you need to re-send SMS to a person who approve creating or updating data about himself.
This method can be used to send to the same number that was sent after the Create/Update person request.
Specification
Link | Посилання на Apiary або Swagger | |
Resource | /api/person_requests/{{id}}/actions/resend_otp | Посилання на ресурс, наприклад: /api/persons/create |
Scope | person_request:write | Scope для доступу |
Components | Patient registry | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription |
Microservices | il/api fe/admin-web | Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC |
Protocol type | REST | Тип протоколу, який використовується запитом, наприклад: SOAP | REST |
Request type | POST | Тип запиту API, наприклад: GET, POST, PATCH… |
Sync/Async | Sync | Метод є синхронним чи асинхронним? |
Public/Private/Internal | Public |
|
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
id |
| String | Required | eeebb86d-5cba-43c9-885b-6482ecaf826b |
Request structure
See on Apiary
Authorize
Verify the validity of access token
Check user scope person_request:write in order to perform this action.
Headers
Content-Type:application/json
Authorization:Bearer {{access_token}}
api-key:{{secret}}
Request data validation
Validate auth method. Person must has auth_method.type = OTP or THIRD_PERSON( where third_person.auth_method.type = OTP)
Check that person_request.status = NEW.
Processing
Generate verification code
Invoke Initialize OTP to generate one time password and send it to client number.
cURL example
curl -X POST \
http://localhost:4000/verifications \
-H 'content-type: application/json' \
-d '{
"phone_number": "+380958697084"
}'
Response structure
Example:
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 | Response |
|
403 | Invalid scope | Validation failed |
404 | not_found | Validation failed |
409 | Auth method is not OTP | Validation failed |
ЕСОЗ - публічна документація