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

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

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

il/api

fe/admin-web

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

Protocol type

REST

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

Request type

GET

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

Sync/Async

Sync

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

Public/Private/Internal

Public

Filters

See on Apiary

Request structure

See on Apiary

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 {{access_token}}

  • api-key:{{secret}}

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
  }
}

HTTP status codes

HTTP status code

Message

What caused the error

200

Response

 

401

Invalid access token

Validation failed

403

Your scope does not allow to access this resource

Invalid scope

  • No labels