ЕСОЗ - публічна документація
[DRAFT] Create User via Employee Request [API-005-009-002-0181]
Сторінка знаходиться в процесі розробки. Інформація на ній може бути застарілою.
https://e-health-ua.atlassian.net/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)
- 1 Properties of a REST API method document
- 2 Purpose
- 3 Logic
- 4 Configuration parameters
- 5 Dictionaries
- 6 Input parameters
- 7 Request structure
- 8 Headers
- 9 Request data validation
- 10 Authorize
- 11 Processing
- 11.1 Get Employee Request Details
- 11.1.1 Sample Request
- 11.2 Create user in oAuth
- 11.1 Get Employee Request Details
- 12 Response structure examples
- 13 HTTP status codes
- 14 Post-processing processes
- 15 Technical modules where the method is used
Properties of a REST API method document
Document type | Метод REST API |
---|---|
Document title | [Document status] REST API [Назва методу] [ID методу] |
Guideline ID | GUI-0011 |
Author | @ |
Document version | 1 |
Document status | DRAFT |
Date of creation | ХХ.ХХ.ХХХХ (дата фінальної версії документа – RC або PROD) |
Date of update | ХХ.ХХ.ХХХХ (дата зміни версії) |
Method API ID | API-005-009-002-0181 |
Microservices (namespace) | IL |
Component | Legal Entities |
Component ID | COM-005-009 |
Link на API-специфікацію |
|
Resource | {{host}}/legal_entities |
Scope | legal_entity:read |
Protocol type | REST |
Request type | GET |
Sync/Async | Sync |
Public/Private | Private |
Purpose
This service should be used for internal services/processes. Used without access_token
Logic
Configuration parameters
Dictionaries
Input parameters
Input parameter | Mandatory | Type | Description | Example | |
---|---|---|---|---|---|
1 | id |
| String | Request | d290f1ee-6c54-4b01-90e6-d701748f0851 |
2 |
|
|
|
|
|
Request structure
See on API-specification
Headers
Request data validation
Authorize
Used without access_token
If client knows the employee_request_ID he can create user and approve it.
Processing
Get Employee Request Details
Invoke WS Get Employee Request by ID for further employee creation
See service specification
Sample Request
curl -X GET -H 'Content-Type: application/json' 'http://ehealth.nebo15.com/employee_requests/d290f1ee-6c54-4b01-90e6-d701748f0851'
Search User
Search user in Auth using email from Employee_Request.
If found, goto Create user
else return Error 401
Create user in oAuth
System should create user in oAuth by using Create User WS
email should be used from the employee_request
password should be used from the payload
See service specification
Response structure examples
See on API-specification
HTTP status codes
Response code | HTTP Status code | Message | Internal name | Description | |
---|---|---|---|---|---|
1 | Базові | ||||
2 |
| 201 | Response |
|
|
3 |
| 401 |
| Search user error |
|
4 | Специфічні | ||||
5 |
|
|
|
|
|
Post-processing processes
Technical modules where the method is used
ЕСОЗ - публічна документація