ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Next »

Purpose

This web service is design to change contract request by nhs employee. NHS employee should enrich contract with information about itself, sum and place of the contract request and could change status of the contract request. 

Overview

  • NHS employee with scopes 'contract_requests:write' can change contract request
  • Contract request only in status 'NEW' could be changed. 
  • NHS employee can change only several field of the contract request and not all of them

Specification

Request

Validation

Validate token

  • Verify the validity of access token
    • Return 401 in case validation fails
  • token is not expired
    • in case error return 401 - "Token is expired"

Validate scopes

  • Check user scopes in order to perform this action (scope = 'contract_requests:write')
    • Return 403 in case invalid scope(s) 

Validate user

extract user_id from token

extract client_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 status

  • only NEW

Validate changed fields

  • issue_city - місце укладання
  • nhs_base - що діє на підставі
  • price - Загальна орієнтовна Ціна Договору
  • status

Response

Validate status

  • status=APPROVED - generate print form
  • if status was changed - event_manager
  • No labels