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

Reset authentication method

Purpose

This WS is designed to RESET (set ended_at - now()) person (MPI) active  authentication method. This WS used by NHS Admins.

Specification

Link

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

Посилання на Apiary або Swagger

Resource

/api/persons/{{id}}/actions/reset_authentication_method

Посилання на ресурс, наприклад: /api/persons/create

Scope

person:reset_authentication_method

Scope для доступу

Components

Patient registry

Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription

Microservices

mpi/api

fe/admin-web

Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC

Protocol type

REST

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

Request type

PATCH

Тип запиту API, наприклад: GET, POST, PATCH…

Sync/Async

Sync

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

Public/Private/Internal

Public (NHS)/Internal

Потрібно зазначити тип методу за ступенем доступності

Input parameters

Input parameter

Values

Type

Description

Example

Input parameter

Values

Type

Description

Example

id

 

String

Person identifier.

Required

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

Dictionaries

  • GENDER

  • PHONE_TYPE

Request structure

See on Apiary

Authorize

  1. Verify the validity of access token

    1. Return 401 in case validation fails

  2. Check user scopes in order to perform this action (scope = 'person:reset_authentication_method')

    1. Return 403 in case invalid scope(s)

Headers

Content-Type:application/json

Authorization:Bearer {{access_token}}

Request data validation

Validate FK

  1. Validate $.person_id exists

    1. In case error - return 404 error

Validate status

  1. Validate mpi.person.status = ACTIVE

    1. if invalid -  return 409 error "Invalid status MPI for this action"

Processing

Update person authentication method

  1. All active auth_method by person_id set ended_at = now()

Response structure

Example:

{ "meta": { "code": 200, "url": "https://example.com/resource", "type": "object", "request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810" }, "data": { "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b", "first_name": "Петро", "last_name": "Іванов", "second_name": "Миколайович", "birth_date": "1991-08-19", "gender": "FEMALE", "tax_id": "3126509816", "phones": [ { "type": "MOBILE", "number": "+380503410870" } ], "birth_settlement": "Вінниця", "birth_country": "Україна" }, "paging": { "limit": 20, "cursors": { "starting_after": "56c31536a60ad644060041af", "ending_before": "56c31536a60ad644060041aa" }, "size": 50, "has_more": false } }
{ "meta": { "code": 403, "url": "https://example.com/resource", "type": "object", "request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810" }, "error": { "type": "forbidden", "message": "Not found active declaration with person for this legal entity!" } }

HTTP status codes

HTTP status code

Message

What caused the error

HTTP status code

Message

What caused the error

200

 Response

 

401

 

Verification of the access token failed

403

Not found active declaration with person for this legal entity!

 Validation error

404

 

Validation error

409

Invalid status MPI for this action

Validation error

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