Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Service specification

Даний метод розроблений для перевірки чи веріфікований номер телефону в системі та потребує скоуп otp:read.

Користувач передає номер телефону в параметрах запиту до системи та отримує у відповідь

...

Якщо введений номер веріфікований в системі

...

Table of Contents
minLevel1
maxLevel7

Purpose

This method is designed to check if the phone number is verified in the system

Specification

Link

https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/otp-verification/find-verifications-by-phone-number

Resource

/api/verifications/{{phone_number}}

Scope

otp:read

Components

OTP Verification service

Using Dictionaries

API paragraph not found

Using Microservices

API paragraph not found

Protocol type

REST

Request type

GET

Sync/Async

Sync

Logic

  1. Search requested phone number in verified_phones table

  2. Return 200 (VERIFIED) if phone number found

  3. Return 422 (UNVERIFIED) if phone number not found

Preconditions

API paragraph not found

Global and configuration parameters

API paragraph not found

Input parameters

Input parameter

Values

Type

Description

Example

phone_number

(required)

String

+380508887700

Filters

None

Request structure

See on Apiary

Example

Expand
titleRequest example
Code Block
curl --include \
     --header "Content-Type: application/json" \
     --header "Authorization: Bearer c2778f3064753ea70de870a53795f5c9" \
  'http://ehealth.com/api/verifications/{phone_number}'

Authorize

Request to process the request using a token in the headers

Headers

Example

Expand
titleHeader example
Code Block
Content-Type: application/json
Authorization: Bearer c2778f3064753ea70de870a53795f5c9

Validate request (JSON schema)

API paragraph not found

Validation data request

API paragraph not found

Processing

API paragraph not found

Response structure

See on Apiary

If the entered number is verified in the system

Example:

Expand
titleResponse example (code: 200)
Code Block
{
  "data": {
    "phone_number": "{{phone_number}}"

...


  },

...


"meta": {

...


  "code": 200,

...


  "request_id": "xxx",

...


  "type": "object",

...


  "url": "http://api-svc.verification/verifications/{{phone_number}}"

...

Якщо введений номер неверіфікований в системі

...


  }
}

If the entered number is not verified in the system

Example:

Expand
titleResponse example (code: 404)
Code Block
{
"error": {

...


"type": "not_found"

...


},

...


"meta": {

...


"code": 404,

...


"request_id": "xxx",

...


"type": "object",

...


"url": "http://api-svc.verification/verifications/{{phone_number}}"

...

Search requested phone number in verified_phones table

...


}
}

Post-processing processes

API paragraph not found

HTTP status codes

HTTP status code

Message

What caused the error

200

phone number found

...

 

422

phone number not found

Backward compatibility

API paragraph not found