Table of Contents | ||||
---|---|---|---|---|
Table of Contents | ||||
|
Purpose
This service is designed to obtain a list of capitation or reimbursement contract_requests by NHS employee (private API) or by MSP (public API).
Specification
Page Properties | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Logic
Contract_type should be declared in the URL
Overview
only users with scope "contract_requests:read" can get list of contract_requests
list of contract_request could be filtered
Specification
Public API
JSON schema
Private API
GraphQL schema
Capitation Contract Request graphQL schema
Reimbursement Contract Request graphQL schema
Features
Capitation Contract Request features
Reimbursement Contract Request features
...
.
Input parameters
Input parameter | Values | Type | Description | Example |
---|---|---|---|---|
contract_type | CAPITATION REIMBURSEMENT | String | Required |
Filters
Filter | Values | Type | Description | Example |
---|---|---|---|---|
id | String | id of contract request |
| |
contractor_legal_entity_id | String | id of legal entity which created contract request |
| |
contractor_owner_id | String | id of legal entity owner |
| |
nhs_signer_id | String | id of nhs employee |
| |
issue_city | String | contract request place |
| |
edrpou | String | legal entity edrpou |
| |
status |
| Enum | current status on contract request |
|
contract_number | String | human readable number of contract request |
| |
medical_program_id | String | id of a program that is a subject of contract |
| |
page | Number | Page number | 2 | |
page_size | Number | A limit on the number of objects to be returned. Maximum: 500 | 50 |
Dictionaries
API paragraph not found
Authorize
Request to process the request using a token in the headers
Headers
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
Validation data request
Validate token
Verify the validity of access token
Return 401 in case validation fails
token is not expired
in case error return 401
Validate scopes
Check user scopes in order to perform this action (scope = 'contract_requests:read')
Return 403 in case invalid scope(s) -"Your scope does not allow to access this resource. Missing allowances: contract_requests:read"
Validate employee
extract user_id from token
...
Check if user is active
in case error return 403 - "user is not active"
Check nhs_legal_entity is active
in case error return 403 - "Client is not active"
Validate context
Return response to user limited by context from user's token
if TOKENSif TOKENS_TYPES_PERSONAL
return response limited by contractor_legal_entity_id
if TOKENSif TOKENS_TYPES_NHS
return non limitted response
Dictionaries
CONTRACT_PAYMENT_METHOD
CONTRACT_TYPE
REIMBURSEMENT_CONTRACT_TYPE
Response structure
See on Apiary
Example:
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
If no contract request is found return 200 and empty array
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 | Response |
|
401 |
| |
403 |
|