Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


n/nDescriptionInputsexpected resultactual  resultexpected result GraphQLactual result GraphQL
UCR1Update Contract Request without scope
  • token
  • id
  • json
403403
"extensions": {
"code": "FORBIDDEN",
"exception": {
"missingAllowances": [
"contract_request:update"]}
},
"message": "Current client is not allowed to access this resource",
"extensions": {
"code": "FORBIDDEN",
"exception": {
"missingAllowances": [
"contract_request:update"]}
},
"message": "Current client is not allowed to access this resource",
UCR2Update Contract Request by other role than `NHS ADMIN SIGNER`
  • token NHS_OWNER
  • id
  • json
200200

UCR3Update Contract
Reuqest
Request in status<>'
NEW
IN_PROCESS'
  • token 
  • id request in
status<>NEW
  • status<>IN_PROCESS
422422, Incorrect status of contract_request to modify it
"extensions": {"code": "CONFLICT"},
"message": "Incorrect status of contract_request to modify it",
"path": [
"UpdateContractRequest"
"extensions": {"code": "CONFLICT"},
"message": "Incorrect status of contract_request to modify it",
"path": [
"UpdateContractRequest"
UCR4Update Contract Reuqest with ID doesn't exist
  • token
  • id doesn't exist
404404

 500,

{"type": "internal_error"}
UCR5Update contract request with invalid price 
  • token
  • id 
  • nhs_contract_price<0
422

422, nhs_contract_price,

must be greater than 0

  • validate nhs_contract_price 
    • nhs_contract_price should be > 0
      • in case error return 422 ("Contract price could not be negative")

 500,

{"type": "internal_error"}
UCR6Update contract request with start_date start_date<today422422, Start date must be greater than create date
500
{"type": "internal_error"}
UCR7Update contract request using not valid nhs_payment_method
  • token
  • id
  • nhs_payment_method not from DICTIONARY
422422"message": "Argument \"input\" has invalid value $input.\nIn field \"nhsPaymentMethod\": Expected type \"NhsPaymentMethod\", found \"PAYMENT\".""message": "Argument \"input\" has invalid value $input.\nIn field \"nhsPaymentMethod\": Expected type \"NhsPaymentMethod\", found \"PAYMENT\"."
UCR8Update contract request without issue city
  • token
  • id
  • issue city absent 
200200
issueCity must be Cyrillic letters
UCR9Update contract request with extra fields (msp data)
  • token
  • id
  • json
422

422, schema does not allow additional properties



UCR9Update updated contract request 
  • token
  • id
  • json
200200datadata
UCR10Update  nhs signer id
  • token
  • son


  • Validate $nhs_signer_id: fetch prm.employees.id=$nhs_signer_id 
    • check client_id=prm.employees.legal_entity_id
      • in case of error return 422 Error (Employee doesn't belong to legal_entity)
    • check status='APPROVED' and is_active=true
      • in case of error return 422 Error (Employee must be active)
in case employee
  • doesn't exist
  • doesn't belong to NHS
  • has status='DISMISSED'

I receive 500,

{"type": "internal_error"}