Versions Compared

Key

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

Purpose

This WS is designed to search requests to registration employees by legal_entity_id and other filters

...

Page Properties

Link

 https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/employee-requests/get-employee-requests-list

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

Resource

 /api/employee_requests

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

Scope

 employee_request:read

Scope для доступу

Components

Employees

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

Microservices

 il/api

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

Protocol type

 REST

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

Request type

 GET

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

Sync/Async

 Sync

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

Public/Private/Internal

 Public

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

Logic

  1. Verify the validity of access token

  2. Check user scopes in order to perform this action

  3. If according to filters requests are not found, WS returns empty data array.

...

  • Content-Type:application/json

  • Authorization:Bearer c2778f3064753ea70de870a53795f5c9

Request data validation

  • Verify the validity of access token

    • Return (401, 'Invalid access token') in case of validation

...

    • fails

  • Verify that token is not expired

    • in case of error - return (401, 'Invalid access token')

  • Check user scopes in order to perform this action (scope = 'employee_request:read')

    • Return (403, 'Your scope does not allow to access this resource. Missing allowances: employee_request:read') in case of invalid scope(s)

Processing

Service returns specified Employee requests:

  1. Get Employee requests by ID from il.employee_requests

    1. Filter by search params

  2. Validate data consistency:

    1. Ensure that requested Employee requests relates to the legal entity from token:

      1. Return 403 ('Access denied') in case of error

  3. Render a response according to specification with found Employee requests:

    1. if according to filters requests are not found, WS returns empty data array

Response structure

See on Apiary

...