ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Required parameters are marked with "*"

Якщо інформації по відповідному параметру немає, потрібно зазначити: “API paragraph not found”.

Purpose*

This method is used when you need to re-send SMS to a person or third person

Specification*

Link

https://uaehealthapi.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/persons/resend-authorization-otp-on-authentication-method-request

Resource

/api/persons/{{id}}/authentication_method_requests/{{request_id}}/actions/resend_otp

Scope

API paragraph not found

Components

API paragraph not found

Microservices

API paragraph not found

Protocol type

Тип протоколу, який використовується запитом, наприклад: SOAP | REST

Request type

POST

Sync/Async

Метод є синхронним чи асинхронним?

Logic*

API paragraph not found

Input parameters

Input parameter

Values

Type

Description

Example

id

String

Person identifier

b075f148-7f93-4fc2-b2ec-2d81b19a9b7b

request_id

String

Request identifier

1096f147-7f93-3fc6-bddc-9d71b198fb7f

Request structure*

API paragraph not found

Authorize*

  1. 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 c2778f3064753ea70de870a53795f5c9

  • api-key:uXhEczJ56adsfh3Ri9SUkc4en

Request data validation*

Validate

  1. Validate auth method. il.authentication_method_request.auth_methos_current.type = OTP

  2. 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 example
curl -X POST \
  http://localhost:4000/verifications \
  -H 'content-type: application/json' \
  -d '{
  "phone_number": "+380958697084"
}'

Response structure*

See on Apiary

Example:

 Response example
{
  "meta": {
    "code": 200,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
  },
  "data": {
    "id": "7d23bebb-1cf3-4221-bf21-18aada444756",
    "status": "NEW",
    "code_expired_at": "2017-07-10T12:20:16.300597Z",
    "active": true
  }
}

Post-processing processes*

API paragraph not found

HTTP status codes*

HTTP status code

Message

What caused the error

 200

 

 

  • No labels