Versions Compared

Key

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

Сторінка знаходиться в процесі розробки. Інформація на ній може бути застарілою.

Info

/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)

Table of Contents

Properties of a REST API method document

Page Properties
idpage_properties_method_REST API

Document type

Метод REST API

Document title

[Document status] REST API [Назва методу] [ID методу]

Guideline ID

GUI-0011

Author

@

Document version

1

Document status

DRAFT

Date of creation

ХХ.ХХ.ХХХХ (дата фінальної версії документа – RC або PROD)

Date of update

ХХ.ХХ.ХХХХ (дата зміни версії)

Method API ID

API-010-001-001-0347

Microservices (namespace)

MPI

Component

Master Patient Index

Component ID

COM-010-001

Link на API-специфікацію

https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/persons/create-authentication-method-request

Resource

{{host}}/api/persons/{{id}}/authentication_method_requests

Scope

authentication_method_request:write

Protocol type

REST

Request type

POST

Sync/Async

Sync

Public/Private

Public

...

Use GET person/{id}/ authentication_method to find authentication method' id of person.

Logic

Description of the working algorithm of the API method and the interaction of services with each other add Service logic (if necessary)

Configuration parameters

Variable

Values

Description

phone_number_auth_limit

 

Check if in table person_authentication_methods  with ended_atis empty or > now() & type = OTP > N, then error 422, such a phone already exists more N times

third_person_limit

 

In table person_auth_methods with type = THIRD_PERSON > N, then error 422 This fiduciary person is present more than N times in the system

third_person_term

 

parameter is used for calculation of ended_at data for authentication method type = THIRD_PERSON

person_with_third_person_limit

 

In table person_auth_methods with type = THIRD_PERSON >N, then error 422 Limit of authentication methods with THIRD_PERSON type is exhausted

no_self_auth_age

 

In table person now()-birth_date <=N & person_auth_methods with type = OTP OR OFFLINE, then error 422 Such person cannot have self authentication method

...

  • AUTHENTICATION_METHOD

  • DOCUMENT_TYPE

Provides a list of links to dictionaries that are available in Confluence

Input parameters

Input parameter

Mandatory

Type

Description

Example

1

id

 

String

Person identifier.

Required

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

2

Request structure

See on API-specification

Expand
titleExample
Code Block
{
  "object": {
    "action": "DEACTIVATE",
    "authentication_method": {
      "id": "7b100a9c-daaa-490e-b88d-2a911059b055"
    }
  }
}

...

Response structure examples

See on API-specification

Expand
titleResponse example. Code: 201
Code Block
{
  "meta": {
    "code": 201,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
  },
  "data": {
    "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
    "status": "NEW",
    "channel": "MIS"
  },
  "urgent": {
    "authentication_method_current": [
      {
        "type": "OTP",
        "phone_number": "+38093*****81"
      }
    ],
    "documents": [
      {
        "type": "PASSPORT",
        "url": "https://storage.ehealth.world"
      }
    ]
  }
}

...

Post-processing processes

Description of actions performed on data after processing

Technical modules where the method is used

List of pages describing technical modules where the method is used

Page Properties Report
headingsID ТМ, Статус
cqllabel = "tr-mis"

...