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

[DRAFT] Resend Authorization OTP on merge request [API-010-001-002-0357]

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

 

https://e-health-ua.atlassian.net/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)

Properties of a REST API method document

Document type

Метод REST API

Document title

[DRAFT] Resend Authorization OTP on merge request [API-010-001-002-0357]

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-002-0357

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/merge-request/resend-authorization-otp-on-merge-request

Resource

{{host}}/api/merge_requests/{{id}}/actions/resend_otp

Scope

merge_request:write

Protocol type

REST

Request type

POST

Sync/Async

Sync

Public/Private

Public

Purpose

Use this method to resend sms with OTP-code on previously created merge request (patient`s authentification method is OTP).

Logic

Process is similar to Resend Authorization OTP on Person Request, but with next differences:

  1. Checks merge_request:write scope on Authorization (instead of scope person_request:write)

  2. Saves to il.merge_requests in field authentication_method_current that auth_method_type that person selected.

Configuration parameters

N/A

Dictionaries

N/A

Input parameters

Input parameter

Mandatory

Type

Description

Example

Input parameter

Mandatory

Type

Description

Example

1

id

 

String

Identifier of the merge request. Required

7c3da506-804d-4550-8993-bf17f9ee0404

2

 

 

 

 

 

Request structure

See on API-specification

Headers

Headers

Request data validation

  1. Validate auth method. Person must has auth_method.type = OTP or THIRD_PERSON( where third_person.auth_method.type = OTP)

  2. Check that merge_request.status = NEW.

Authorize

  1. Verify the validity of access token

    • Check user scope merge_request:write in order to perform this action.

 

Processing

Process is similar to Resend Authorization OTP on Person Request, but with next difference:

  • Saves to il.merge_requests in field authentication_method_current that auth_method_type that person selected.

Response structure examples

See on API-specification

{ "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 } }

HTTP status codes

Response code

HTTP Status code

Message

Internal name

Description

Response code

HTTP Status code

Message

Internal name

Description

1

Базові

2

 

200

 Response

 

200

3

Специфічні

4

 

 

 

 

 

Post-processing processes

N/A

Technical modules where the method is used

 

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