Table of Contents |
---|
Purpose
This WS allows to get a list of licenses for a legal entity. Used by legal entity employees to receive full information about primary and additional licenses of legal entity.
Key points
This REST method is used by MIS.
Only authenticated and authorized user with appropriate scope can get licenses list.
Specification
Page Properties | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Project Name | Електронний рецепт | COVID-certificate | |||||||||||||||||||||||||
Project abreviation | ePrescription | SVC | |||||||||||||||||||||||||
Developer | Edenlab | Розробник методу API. Наприклад, Edenlab | |||||||||||||||||||||||||
Project Manager | @Єлизавета Гессен-Дармштадська | ||||||||||||||||||||||||||
Tech Lead | @Іоанн Воїнов | ||||||||||||||||||||||||||
Product Owner | @Нікодім Святогорцев | ||||||||||||||||||||||||||
Вusiness analyst | Iryna Lishtaba (SoE eHealth) Oleksandr Zhuk (SoE eHealth) Oksana Demchenko | @Пантелеймон Нікомедійський | Status |
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Version
API paragraph not found
1.0
Date of release
PROD
Link | Посилання на Apiary або Swagger | |
Resource | /api/licenses | НаприкладПосилання на ресурс, наприклад: /api/persons/create |
Scope | license:read | Зазначається потрібний scopeScope для доступу |
Components | ePrescriptionLegal Entities | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription |
Microservices | API paragraph not found | Перелік мікросервісів, які використовує метод API. Наприклад, наприклад: Auth, ABAC |
Protocol type | REST | Тип протоколу, який використовується запитом, наприклад: SOAP | REST |
Request type | GET | Тип HTTP методу, який використовується запитомзапиту API, наприклад: GET, POST | GET…, PATCH… |
Sync/Async | Sync | Метод є синхронним чи асинхронним? |
Public/Private/Internal | Public |
Logic
Extract client_id from token.
Filter active licenses:
for current legal entity from token (licenses.legal_entity_id=$.client_id).
by search params.
Render found licenses with all fields from DB.
...
Preconditions
API paragraph not found
Global and configurable parameters
...
Input parameters
No
Filters
Filter | Values | Type | Description | Example |
---|---|---|---|---|
id | String | Optional | d290f1ee-6c54-4b01-90e6-d701748f0851 | |
license_number | String | Optional | fd12344344 | |
type | String | Dictionary LICENSE_TYPE. Optional |
| |
is_primary |
| Boolean | primary or additional license flag | |
page | Number | Page number. Required | 2 | |
page_size | Number | A limit on the number of objects to be returned, between 1 and 100. Default: 50. Required | 50 |
Request structure
See on ApiaryAPI paragraph not found
Authorize
Verify the validity of MIS client secret
in case of error - return 401 (“Invalid access token”)
Verify the validity of access token
in case of error - 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 = 'license:read')
return 403 (“Your scope does not allow to access this resource. Missing allowances: license:read”) in case of invalid scope(s)
...
API paragraph not found
Request data validation
API paragraph not found
Parameters that are used when processing the request
Configuration parameters
Access to the method is defined by the scope license:read. Permission for this scope is determined by the System administrator by configuring scopes in the context of clients and roles.
...
API paragraph not found
Processing
API paragraph not found
Response structure
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
...