Table of Contents |
---|
Specification
...
- 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')
Validate User
Extract legal_entityparty_id (clientassociated with user_id) from token.
- Check clientCheck party_id=party.contractor_legal_entityowner_id
- in case of error return 403 "User is not allowed to perform this action"
- Check clientCheck party_id=party.contractor_legal_entityowner_id
...
Response
mapping
field | value |
---|---|
status | TERMINATED |
status_reason | $.status_reason |
updated_at | now() |
updated_by | $.user_id |
Auto termination
- Fetch all contract_request with start_date<now().
- for REIMBURSEMENT contracts only
- - find contracts in status NHS_SIGNED and nhs_signed < today -`REIMBURSEMENT_CONTRACT_REQUEST_AUTOTERMINATION_PERIOD_DAYS`
Set status and status reason for such contract request as below:
field | value |
---|---|
status | TERMINATED |
status_reason | $.auto_expired |
updated_at | now() |
updated_by | $.user_id |
Add status to event manager
...