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

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 8 Current »

Purpose

This service should be used for internal services/processes. Used without access_token

Specification

Link

https://uaehealthapi.docs.apiary.io/#reference/internal.-partner-relationship-management/employees/create-user-via-employee-request

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

Resource

/employee_requests/{{id}}/user

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

Scope

API paragraph not found

Scope для доступу

Components

Employees

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

Microservices

API paragraph not found

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

Protocol type

REST

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

Request type

POST

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

Sync/Async

Sync

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

Public/Private/Internal

Internal

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

Logic

Input parameters

Input parameter

Values

Type

Description

Example

id

String

Request

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

Request structure

Example:

 Request example
{
  "password": "qwerty"
}

Authorize

Used without access_token

If client knows the employee_request_ID he can create user and approve it.

Headers

Наприклад:

Content-Type:application/json

Request data validation

API paragraph not found

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

Example:

 Response example
{
  "meta": {
    "code": 201,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
  },
  "data": {
    "email": "john@example.com",
    "settings": {},
    "priv_settings": {},
    "id": "user-1380df72-275a-11e7-93ae-92361f002671",
    "created_at": "2017-04-20T19:14:13Z",
    "updated_at": "2017-04-20T19:14:13Z"
  }
}

Post-processing processes

API paragraph not found

HTTP status codes

HTTP status code

Message

What caused the error

 201

 Response

 

 401

 

 Search user error

  • No labels