Table of Contents | ||
---|---|---|
|
...
Required parameters are marked with "*"
...
|
Purpose
Use this method to reject previously created Declaration Request.
Specification
...
Link | Apiaryhttps://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/declaration-requests/reject-declaration-request-v3 | ||
Resource | /api/v3/declaration_requests/{{id}}/actions/reject | ||
Scope | declaration_request:reject | ||
Components | Необхідно зазначити перелік компонентів, які використовують цей метод, наприклад: ePrescription | Using Dictionaries | Потрібно вказати словники, які використовує метод APIDeclarations |
Using Dictionaries | API paragraph not found | ||
Using Microservices | Вкажіть перелік мікросервісів, які використовує метод API. Наприклад: Auth, ABACAPI paragraph not found | ||
Protocol type | Вкажіть тип протоколу, який використовується запитом, наприклад: SOAP | REST | JSON | ||
Request type | PATCH | ||
Sync/Async | Метод є синхронним чи асинхронним? |
...
Sync | |
Public/Private/Internal | Public |
Logic
Only authenticated and authorized user can use this service
New and Approved declaration request can be rejected
The request can be rejected only by the employee who works in the same legal entity in which the request was made.
Input parameters
Filter | Values | Type | Description | Example |
---|---|---|---|---|
id | String |
| 7f93-4fc2-b2ec-2d81b19a9b7b |
Request structure
...
API paragraph not found
Authorize
...
Verify the validity of access token
Return 401 in case validation fails
Check scopes in order to perform this action (scope = 'declaration_request:write')
Return 403 in case invalid scope(s)
Request to process the request using a token in the headers.
Headers
...
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
...
Validation data request
Check that declaration request with such ID exists in the system (is_active = true)
In case of error - return 404
Check that declaration request belongs to the same legal entity as the user
In case of error - return 403
Validation data request*
...
Processing
API paragraph not found
Response structure
...
Expand | ||
---|---|---|
| ||
|
Post-processing processes
...
Change declaration request
Change entity status in IL_DB.declaration_request to REJECTED
Set updated_at - now() (Get current date-time)
Set updated_by - user_id (Extract user from token)
HTTP status codes
HTTP status code | Message | What caused the error | ||
---|---|---|---|---|
201 |
| 201 | Response |
|
401 | Access token validation failed | |||
403 |
| |||
404 |
|