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

Approve Contract Request by NHS tests

n/ndescriptioninputsexpected_resultactual_resultexpected_result
graphQL
actual_result
graphQL
ACR1Approve Contract Request not by NHS Signer
  • token
  • id
403


ACR2Approve not updated Contract Request 
  • token
  • id
422422

ACR3Approve Contract Request which doesn't exist
  • token
  • id
404404, not found

ACR3.1Approve Contract Request in status<>'IN_PROCESS'


"errors": [
{"extensions": {
"code": "CONFLICT"},
"message": "Incorrect status of contract_request to modify it",
"path": [
"approveContractRequest"]}]
"errors": [
{"extensions": {
"code": "CONFLICT"},
"message": "Incorrect status of contract_request to modify it",
"path": [
"approveContractRequest"]}]
demo+
ACR4Approve Contract Request with contractor legal entity status<>'ACTIVE'
  • token
  • id
422422

"errors": [
{
"description": "Legal entity is not active",
"params": [],
"rule": "invalid"
}
],
"extensions": {
"code": "UNPROCESSABLE_ENTITY"
},
"message": "Validation error",
"path": [
"approveContractRequest"]}

demo+ 

ACR5Approve Contract Request with contractor_owner_id is_active=false
  • token
  • id
422422
"errors": [
{
"description": "Contractor owner must be active within current legal entity in contract request",
"params": [],
"rule": "invalid"
}
],
"extensions": {
"code": "UNPROCESSABLE_ENTITY"
},
"message": "Validation error",
"path": [
"approveContractRequest"]}

demo+ 
ACR6Approve Contract Request with invalid start_date
  • token
  • id
422422, Start date must be greater than create date
"errors": [
{
"description": "Start date must be greater than current date",
"params": [],
"rule": "invalid"
}
],
"extensions": {
"code": "UNPROCESSABLE_ENTITY"
},
"message": "Validation error",
"path": [
"approveContractRequest"]}

demo+
ACR7Approve valid Contract Request
  • token
  • id
200, event added to event manager
datadata
ACR7.1Approve Contract Request id in signed content <> id in input



{
"extensions": {
"code": "BAD_REQUEST"
},
"message": "Contract request id doesn't match with id in signed content",
"path": [
"approveContractRequest"]}

demo+ 

ACR8Approve CR with edrpou=10 symbols
  • token
  • id
  • DS surname
  • DS drfo
200200

ACR9Approve CR with different surname in DS and employee
  • token
  • id
  • DS surname
  • DS drfo
422

422

Signer surname does not match with current user last_name


"errors": [
{
"description": "Signer surname does not match with current user last_name",
"params": [],
"rule": "invalid"
}
],
"extensions": {
"code": "UNPROCESSABLE_ENTITY"
},
"message": "Validation error",
"path": [
"approveContractRequest"
]
}
ACR10Approve CR with edrpou=8 symbols
  • token
  • id
  • DS surname
  • DS drfo
200200

ACR11Approve CR with different edrpou in legal_entity and DS
  • token
  • id
  • DS surname
  • DS drfo
422422

ACR12Approve CR with different drfo in employee and DS
  • token
  • id
  • DS surname
  • DS drfo
422422

ACR13Approve by employee DS with DS drfo = LE edrpou = 10 symbols
  • token
  • id
  • DS surname
  • DS drfo
200200

ACR14Approve CR by NHS employee but not NHS signer in CR with DS edrpou = LE edrpou and DS surname = party surname
  • token
  • id
  • DS surname
  • DS drfo
200200

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