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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Purpose

Use this end-point to obtain all Employees of the legal entity specified by the legal_entity_id.

Specification

Link

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

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

Resource

/api/employees

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

Scope

employee:read

Scope для доступу

Components

Declarations

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

Microservices

API paragraph not found

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

Protocol type

REST

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

Request type

PATCH

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

Sync/Async

Sync

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

Logic

API paragraph not found

Preconditions

API paragraph not found

Global and configurable parameters

No

Input parameters

Input parameter

Values

Type

Description

Example

id

String

Required

d290f1ee-6c54-4b01-90e6-d701748f0851

Filters

API paragraph not found

Dictionaries

API paragraph not found

Request structure

API paragraph not found

Authorize

  1. Verify the validity of access token

  2. Check user scope declaration:reject in order to perform this action

    1. In case error - return 401 error.

Headers

Content-Type:application/json

Authorization:Bearer c2778f3064753ea70de870a53795f5c9

Request data validation

Validate transition

Validate transitionю Allowed transitions:

pending_verification → closed

Check is_active = true

If not passed, Return Error 403 message "Invalid transition"

Processing

Update Declaration status

$declaration.status = closed

$declaration.updated_by = user_id

$declaration.updated_at = timestamp

Response structure

See on Apiary

Example:

 Response example
{
  "meta": {
    "code": 200,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "req-adasdoijasdojsda"
  },
  "data": {}
}

Post-processing processes

API paragraph not found

HTTP status codes

HTTP status code

Message

What caused the error

 200

Response

 

401

  1. Invalid access token

  2. Error

  1. Check of the user`s scope failed

403

Invalid transition

Backward compatibility

API paragraph not found

This WS is designed to search employees by legal_entity_id. 

  1. Verify the validity of access token

  2. Check user scopes in order to perform this action

  3. Search employees by filters in ws url:

    1. required filters

      1. legal_entity_id (MSP id)

    2. optional filters: 

      1. status (employees status APPROVED, DISMISSED). By default used APPROVED

      2. type (employees type DOCTOR, HR, ACCOUNTANT, PHARMACIST, etc). By default returned all types of employees.

      3. limit (limit response size - quantity of employee objects). By default returned 50 objects.

      4. starting_after (cursor to fetch next page)

      5. ending_before (cursor to fetch previous page)

  4. If according to filters employees are not found, WS returns empty data array.

WS returns shortened details, which consist of:

  • employee and party objects

  • for DOCTOR and PHARMACIST - additional returns specialities information

  • pagination data - for tecnical info.



  • No labels