Table of Contents | ||||
---|---|---|---|---|
|
Required parameters are marked with "*"
Якщо інформації по відповідному параметру немає, потрібно зазначити: “APIparagraph not found”.
Purpose*
This WS allows to terminate contract request by legal entity.
...
Page Properties | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Logic*
This WS is designed to terminate contract request by contractor. Contract request can't be in status='SIGNED'
Input parameters
Потрібно вказати вхідні параметри, наприклад:
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
id | String |
|
Request structure*
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
Authorize*
Вимоги до авторизації: яким чином надається доступ до використання методу
Verify the validity of access token
in case of error return 401 ('Access denied')
Check user scope contract_request:termiante in order to perform this action
in case of error generate 401 response ('Invalid scopes')
Request to process the request using a token in the headers
Headers*
Наприклад:
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
...
Check contract_request.status<>SIGNED
in case error return 422 - "Incorrect status of contract_request to modify it"
Processing*
Потрібно описати процеси, які відбуваються з даними
1. Using global parameters
...
Auto termination
Fetch all contract_request with start_date<now().
for REIMBURSEMENT contracts
- find contracts in status NHS_SIGNED and nhs_signed < today -`REIMBURSEMENT_CONTRACT_REQUEST_AUTOTERMINATION_PERIOD_DAYS`
for CAPITATION contracts
- find contracts in status NHS_SIGNED and nhs_signed < today -`CAPITATION_CONTRACT_REQUEST_AUTOTERMINATION_PERIOD_DAYS`
...
Response structure*
See on Apiary в коде используется ном ошибки 201, а в заголовке - 200. ??
Example:
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
Request mapping
field | value |
---|---|
status | TERMINATED |
status_reason | $.status_reason |
updated_at | now() |
updated_by | $.user_id |
...
Post-processing processes*
Що має відбутися в ЦБД після опрацювання та відправлення відповіді, тощо
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 |
|
|
...