Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

Page Properties
idAPI_Specification

Link

https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/divisions/update-division

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

Resource

/api/divisions/{{id}}

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

Scope

division:write

Scope для доступу

Components

Divisions

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

Microservices

il/api

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

Protocol type

REST

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

Request type

PATCH

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

Sync/Async

Sync

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

Public/Private/Internal

Public

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

Logic

API paragraph not found

...

Content-Type:application/json
Authorization:Bearer {{access_token}}
API-key:{{secret}}

Request data validation

...

Validate location

Location is required for divisions related to legal entity with type PHARMACY

  1. Check that location exists in request for legal entity with type PHARMACY

    1. In case of error - generate 422 response

Validate addresses

  1. Check that addresses.type exists in dictionaries. Addresses type required (RESIDENCE,REGISTRATION)

    1. In case error generate 422 response

  2. Check that address exists in Uaddresses

    1. in case error generate 422 response

Validate phone

  1. Check that phone type exists in dictionaries. PHONE_TYPE required (MOBILE,LAND_LINE)

    1. in case error generate 422 response

  2. Check phone number is valid according to "^\\+38[0-9]{10}$"

    1. in case error generate 422 response

Validate email

  1. Check that email is valid according to "~r/^[\\w!#$%&'*+\\/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+\\/=?`{|}~^-]+)*@(?:[A-Z0-9-]+\\.)+[A-Z]{2,6}$/i"

    1. in case error generate 422 response

Validate type

  1. Check that type exists in dictionaries. Type required  (DRUGSTORE,DRUGSTORE2,CLINIC,AMBULANT_CLINIC,FAP)

    1. in case error generate 422 response

  2. Check mapping of legal_entity_type and division type. 

    1. in case error generate 422 response

Processing

API paragraph not found

...