Specification
Purpose
This WS allows to terminate contract request by legal entity.
Request
- status_reason
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')
Validate User
Extract legal_entity_id (client_id) from token.
- Check client_id=contractor_legal_entity_id
- in case of error return 403 "User is not allowed to perform this action"
- Check client_id=contractor_legal_entity_id
Validate contract request status
- Check contract_request.status<>SIGNED
- in case error return 422 - "Incorrect status of contract_request to modify it"
Response
mapping
field | value |
---|---|
status | TERMINATED |
status_reason | $.status_reason |
updated_at | now() |
updated_by | $.user_id |
Add status to event manager
After status was changed (status = TERMINATED) - add new status to event_manager
field | value |
---|---|
event_type | StatusChangeEvent |
entity_type | Contract_request |
entity_id | $.id |
properties.status. | $.status |
event_time | $.update_at |
changed_by | $.changed_by |