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

Reject Declaration

Purpose

This method is used by NHS_admin to reject declarations that has been created with the offline authorization. In case if the verification result is not acceptable. declaration status will be changed to closed.

Specification

Link

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

Resource

/declarations/{{id}}/reject

Scope

declaration:reject

Components

Declarations

Microservices

il/api

ops/api

Protocol type

REST

Request type

PATCH

Sync/Async

Sync

Public/Private/Internal

Public

Logic

API paragraph not found

Input parameters

Input parameter

Values

Type

Description

Example

Input parameter

Values

Type

Description

Example

id

 

String

Required

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

Authorize

  1. Verify the validity of access token

  2. Check user scope declaration:reject 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:

pending_verification → closed

Check is_active = true

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

Processing

Update Declaration status

$declaration.status = closed

$declaration.updated_by = user_id

$declaration.updated_at = timestamp

Response structure

Example:

{ "meta": { "code": 200, "url": "https://example.com/resource", "type": "object", "request_id": "req-adasdoijasdojsda" }, "data": {} }

Post-processing processes

API paragraph not found

HTTP status codes

HTTP status code

Message

What caused the error

HTTP status code

Message

What caused the error

200

Response

 

401

  1. Invalid access token

  2. Error

2. Invalid scope

403

Invalid transition

 

Backward compatibility

API paragraph not found

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