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

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 9 Next »

Purpose

Use this method to obtain list of Person Requests

Key features

  1. Only authenticated and authorized user can use person requests

  2. Service returns only person requests related to the same legal entity as the user.

Specification

Link

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

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

Resource

/api/person_requests

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

Scope

person_request:read

Scope для доступу

Components

Patient registry

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

Microservices

API paragraph not found

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

Protocol type

REST

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

Request type

GET

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

Sync/Async

Sync

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

Public/Private/Internal

Public

Logic

API paragraph not found

Input parameters

No

Filters

See on Apiary

Dictionaries

API paragraph not found

Request structure

API paragraph not found

Authorize

  1. Verify the validity of access token

    1. Return 401 in case validation fails.

  2. Check scopes in order to perform this action (scope = 'person_request:read')

    1. Return 403 in case invalid scope(s).

Headers

  • Content-Type:application/json

  • Authorization:Bearer c2778f3064753ea70de870a53795f5c9

  • api-key:uXhEczJ56adsfh3Ri9SUkc4en

Request data validation

API paragraph not found

Processing

Prepare response

Service returns only person requests related to the same legal entity as the user

  1. Extract client_id from token

  2. Return entries filtered by client_id and query params.

Response structure

Example:

 Response example
{
  "meta": {
    "code": 200,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "req-adasdoijasdojsda"
  },
  "data": [
    {
      "id": "b075f148-7f93-4fc2-b2ec-2d81b19a9b7b",
      "status": "APPROVED",
      "person": {
        "first_name": "Петро",
        "last_name": "Іванов",
        "second_name": "Миколайович"
      }
    }
  ],
  "paging": {
    "page_number": 2,
    "page_size": 50,
    "total_entries": 1000,
    "total_pages": 23
  }
}

Post-processing processes

API paragraph not found

HTTP status codes

HTTP status code

Message

What caused the error

200

Response

 

401

Invalid access token

 

403

Your scope does not allow to access this resource

Backward compatibility

API paragraph not found

  • No labels