Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel7

Purpose

This method is used by NHS_admin to verify declarations that have been created with offline authorization. Declaration status will be changed to active

Specification

Page Properties

Link

https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/declarations/verify-declaration

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

Resource

/api/declarations/{{id}}/actions/approveПосилання на ресурс, наприклад: /api/persons/create

Scope

declaration:approveScope для доступу

Components

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

Microservices

API paragraph not found

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

Protocol type

REST

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

Request type

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

Sync/Async

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

Public/Private/Internal

Public

Logic

API paragraph not found

Preconditions

API paragraph not found

Global and configurable parameters

No

Input parameters

Input parameter

Values

Type

Description

Example

id

String

Required

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

Filters

API paragraph not found

Dictionaries

...

Request structure

API paragraph not found

Authorize

  1. Verify the validity of access token

  2. Check user scope declaration:approve in order to perform this action

    1. In case error - return 401 error.

Headers

Content-Type:application/json

Authorization:Bearer c2778f3064753ea70de870a53795f5c9

Request data validation

Validate transition

Validate transitionю Allowed transitions:

...

If not passed, Return Error 403 message "Invalid transition"

Processing

Update Declaration status

$declaration.status = active

...

$declaration.updated_at = timestamp

Response structure

See on Apiary

Example:

Expand
titleResponse example
Code Block
{
  "meta": {
    "code": 200,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "req-adasdoijasdojsda6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
  },
  "data": {}
}

Post-processing processes

API paragraph not found

HTTP status codes

Page Properties

HTTP status code

Message

What caused the error

 200200

Response

 

401

  1. Invalid access token

  2. Error

2. Check of the user`s scope failedInvalid scope

403

Invalid transition

Backward compatibility

API paragraph not found