{"openapi":"3.1.0","info":{"title":"Mange case assignment API","description":"Mange case access","contact":{"name":"CDM","url":"https://tools.hmcts.net/confluence/display/RCCD/Reform%3A+Core+Case+Data+Home","email":"corecasedatateam@hmcts.net"},"version":"1.0.0"},"servers":[{"url":"http://localhost","description":"Generated server url"}],"paths":{"/noc/verify-noc-answers":{"post":{"tags":["notice-of-change-controller"],"summary":"Verify Notice of Change answers","description":"Use to validate the answers provided by a user wishing to raise a Notice of Change Request to gain access to a case","operationId":"verifyNoticeOfChangeAnswers","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyNoCAnswersRequest"}}},"required":true},"responses":{"200":{"description":"Notice of Change answers verified successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyNoCAnswersResponse"},"example":{"organisation":{"OrganisationID":"QUK822NA","OrganisationName":"Some Org"},"status_message":"Notice of Change answers verified successfully"}}}},"400":{"description":"One or more of the following reasons:\n1. Any of the `400` errors returned by the `Get Notice of Change questions` operation\n2. Challenge question answers can not be empty\n3. The number of provided answers must match the number of questions - expected %s answers, received %s\n4. The answers did not match those for any litigant\n5. The answers did not uniquely identify a litigant\n6. No answer has been provided for question ID '%s'\n7. No OrganisationPolicy exists on the case for the case role '%s'\n8. The requestor has answered questions uniquely identifying a litigant that they are already representing\n","content":{"application/json":{"example":"{\n    \"status\": \"BAD_REQUEST\",\n    \"message\": \"The number of provided answers must match the number of questions\n        - expected 1 answers, received 2\",\n    \"errors\": []\n}"}}},"404":{"description":"Case could not be found","content":{"application/json":{"example":{"message":"Case could not be found","status":"NOT_FOUND"}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyNoCAnswersResponse"}}}},"403":{"description":"Unauthorised S2S service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyNoCAnswersResponse"}}}}}}},"/noc/set-organisation-to-remove":{"post":{"tags":["notice-of-change-controller"],"summary":"Set Organisation To Remove","description":"Set Organisation To Remove","operationId":"setOrganisationToRemove","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutToSubmitCallbackResponse"}}}},"400":{"description":"One or more of the following reasons:\n1) Case ID has to be a valid 16-digit Luhn number\n2) Case ID has to be 16-digits long\n3) Case ID can not be empty\n4) ChangeOrganisationRequest field could not be found or appears invalid\n5) CaseRole field within ChangeOrganisationRequest matched none or more than one OrganisationPolicy on the case","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"status":"BAD_REQUEST","message":"Case ID can not be empty","errors":[]}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutToSubmitCallbackResponse"}}}},"403":{"description":"Unauthorised S2S service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutToSubmitCallbackResponse"}}}}}}},"/noc/noc-requests":{"post":{"tags":["notice-of-change-controller"],"summary":"Request Notice of Change Event","description":"Request Notice of Change Event","operationId":"requestNoticeOfChange","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestNoticeOfChangeRequest"}}},"required":true},"responses":{"201":{"description":"The Notice of Change request has been successfully submitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestNoticeOfChangeResponse"}}}},"400":{"description":"One or more of the following reasons:- Any of the `400` errors returned by the `Verify Notice of Change answers` operation\n\n1) Case ID has to be a valid 16-digit Luhn number\n2) Case ID has to be 16-digits long\n3) Case ID can not be empty\n4) Challenge question answers can not be empty\n5) Missing ChangeOrganisationRequest.CaseRoleID [APPLICANT] in the case definition","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoCApiError"},"example":{"status":"BAD_REQUEST","message":"Case ID has to be a valid 16-digit Luhn number","code":"case-id-invalid","errors":[]}}}},"404":{"description":"Case could not be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoCApiError"},"example":{"message":"Case could not be found","status":"NOT_FOUND"}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestNoticeOfChangeResponse"}}}},"403":{"description":"Unauthorised S2S service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestNoticeOfChangeResponse"}}}}}}},"/noc/noc-prepare":{"post":{"tags":["notice-of-change-controller"],"summary":"Prepare NoC request event","description":"Prepare NoC request event","operationId":"prepareNoC","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutToStartCallbackRequest"}}},"required":true},"responses":{"200":{"description":"Data with a list of Case Roles attached to the ChangeOrganisationRequest.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutToStartCallbackResponse"}}}},"400":{"description":"One or more of the following reasons:\n1) Jurisdiction cannot be blank.\n2) Case type ID can not be empty\n3) No OrganisationPolicy found on the case data.\n4) Ongoing NoC request in progress\n5) The organisation of the solicitor is not recorded in an organisation policy on the case.\n6) No Organisation id present in any Org policy on the case.\n7) Missing OrganisationPolicy.OrgPolicyCaseAssignedRole %s in the case definition.\n8) CaseRole field within ChangeOrganisationRequest matched none or more than one OrganisationPolicy on the case\n9) ChangeOrganisationRequest field could not be found or appears invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"status":"BAD_REQUEST","message":"Ongoing NoC request in progress","errors":[]}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutToStartCallbackResponse"}}}},"403":{"description":"Unauthorised S2S service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutToStartCallbackResponse"}}}}}}},"/noc/check-noc-approval":{"post":{"tags":["notice-of-change-controller"],"summary":"Check for Notice of Change Approval","description":"Check for Notice of Change Approval","operationId":"checkNoticeOfChangeApproval","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitCallbackResponse"}}}},"400":{"description":"One or more of the following reasons:\n1) Case ID has to be a valid 16-digit Luhn number\n2) Case ID has to be 16-digits long\n3) Case ID can not be empty\n4) ChangeOrganisationRequest field could not be found or appears invalid\n5) NoC Decision event could not be identified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"status":"BAD_REQUEST","message":"Case ID can not be empty","errors":[]}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitCallbackResponse"}}}},"403":{"description":"Unauthorised S2S service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitCallbackResponse"}}}}}}},"/noc/apply-decision":{"post":{"tags":["notice-of-change-controller"],"summary":"Apply Notice of Change decision","description":"Use to apply a Notice of Change decision on a case.\nNote that this operation acts as a callback and therefore it accepts a standard callback request,\nand similarly returns a standard callback response. As with normal callbacks, the response\nreturns a 200 (success) status when valid parameters have been passed to the operation but\nprocessing errors have occurred.\n","operationId":"applyNoticeOfChangeDecision","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyNoCDecisionRequest"}}},"required":true},"responses":{"200":{"description":"    Notice of Change decision applied successfully, or one of the following error conditions:\n    - A decision has not yet been made on the pending Notice of Change request\n    - Approval status is not recognised\n    - Case must contain exactly one OrganisationPolicy with the case role\n    - ChangeOrganisationRequest complex type is missing an expected field or value\n    Note that the response will contain *either* `data` (for a success) or `errors` (for an error).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyNoCDecisionResponse"},"example":{"data":{"TextField":"TextFieldValue","EmailField":"[email protected]","NumberField":"123","OrganisationPolicyField1":{"Organisation":{"OrganisationID":null,"OrganisationName":null},"OrgPolicyReference":"DefendantPolicy","OrgPolicyCaseAssignedRole":"[Defendant]"},"OrganisationPolicyField2":{"Organisation":{"OrganisationID":"QUK822N","OrganisationName":"SomeOrg"},"OrgPolicyReference":"ClaimantPolicy","OrgPolicyCaseAssignedRole":"[Claimant]"},"ChangeOrganisationRequestField":{"Reason":null,"CaseRoleId":null,"NotesReason":null,"ApprovalStatus":null,"RequestTimestamp":null,"OrganisationToAdd":{"OrganisationID":null,"OrganisationName":null},"OrganisationToRemove":{"OrganisationID":null,"OrganisationName":null},"ApprovalRejectionTimestamp":null}}}}}},"400":{"description":"One or more of the following reasons:\n- Request payload does not match the expected format\n","content":{"application/json":{"example":{"status":"BAD_REQUEST","message":"'case_details' are required.","errors":[]}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyNoCDecisionResponse"}}}},"403":{"description":"Unauthorised S2S service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyNoCDecisionResponse"}}}}}}},"/case-users":{"get":{"tags":["case-assigned-user-roles-controller"],"summary":"Get Case-Assigned Users and Roles","operationId":"getCaseUserRoles","parameters":[{"name":"case_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"user_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get Case-Assigned Users and Roles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResource"}}}},"400":{"description":"One or more of the following reasons:\n1) Case ID has to be a valid 16-digit Luhn number\n2) Case ID list is empty\n3) User ID is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResource"}}}},"403":{"description":"One of the following reasons:\n1) Access to other user's case role assignments not granted\n2) Unauthorised S2S service.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResource"}}}}}},"post":{"tags":["case-assigned-user-roles-controller"],"summary":"Add Case-Assigned Users and Roles","operationId":"addCaseUserRoles","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for an approved micro-service","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesRequest"}}},"required":true},"responses":{"201":{"description":"Case-User-Role assignments created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResponse"}}}},"400":{"description":"One or more of the following reasons:\n1. Case user roles list is empty, \n2. Case ID has to be a valid 16-digit Luhn number: has to be a valid 16-digit Luhn number, \n3. User ID is not valid: has to be a string of length > 0, \n4. Case role name format is invalid: has to be a none-empty string in square brackets, \n5. Organisation ID is not valid: has to be a non-empty string, when present.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResponse"}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResponse"}}}},"403":{"description":"One of the following reasons:\n1. Unauthorised S2S service.\n2. Client service not authorised to perform operation.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResponse"}}}},"404":{"description":"Case could not be found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResponse"}}}}}},"delete":{"tags":["case-assigned-user-roles-controller"],"summary":"Remove Case-Assigned Users and Roles","operationId":"removeCaseUserRoles","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for an approved micro-service","required":true,"schema":{"type":"string"}},{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesRequest"}}},"required":true},"responses":{"200":{"description":"Case-User-Role assignments removed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResponse"}}}},"400":{"description":"One or more of the following reasons:\n1. Case user roles list is empty, \n2. Case ID has to be a valid 16-digit Luhn number: has to be a valid 16-digit Luhn number, \n3. User ID is not valid: has to be a string of length > 0, \n4. Case role name format is invalid: has to be a none-empty string in square brackets, \n5. Organisation ID is not valid: has to be a non-empty string, when present.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResponse"}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResponse"}}}},"403":{"description":"One of the following reasons:\n1. Unauthorised S2S service \n2. Client service not authorised to perform operation.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResponse"}}}},"404":{"description":"Case could not be found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseAssignedUserRolesResponse"}}}}}}},"/case-assignments":{"get":{"tags":["case-assignment-controller"],"summary":"Get Case Assignments in My Organisation","description":"Get Assignments in My Organisation","operationId":"getCaseAssignments","parameters":[{"name":"case_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Case-User-Role assignments returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCaseAssignmentsResponse"},"example":{"status_message":"Case-User-Role assignments returned successfully","case_assignments":[{"case_id":"1588234985453946","shared_with":[{"idam_id":"221a2877-e1ab-4dc4-a9ff-f9424ad58738","first_name":"Bill","last_name":"Roberts","email":"bill.roberts@greatbrsolicitors.co.uk","case_roles":["[Claimant]","[Defendant]"]}]}]}}}},"400":{"description":"case_ids must be a non-empty list of proper case ids.","content":{"application/json":{"example":{"message":"case_ids must be a non-empty list of proper case ids","status":"BAD_REQUEST"}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCaseAssignmentsResponse"}}}},"403":{"description":"Unauthorised S2S service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCaseAssignmentsResponse"}}}}}},"post":{"tags":["case-assignment-controller"],"summary":"Assign Access within Organisation","description":"Assign Access within Organisation","operationId":"assignAccessWithinOrganisation","parameters":[{"name":"use_user_token","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseAssignmentRequest"}}},"required":true},"responses":{"201":{"description":"Role from the organisation policy successfully assigned to the assignee.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseAssignmentResponse"}}}},"400":{"description":"One or more of the following reasons:\n1) Case ID has to be a valid 16-digit Luhn number\n2) Case ID has to be 16-digits long\n3) Case ID can not be empty\n4) Case type ID can not be empty\n5) IDAM Assignee ID can not be empty\n6) Intended assignee has to be in the same organisation as that of the invoker.\n7) Case ID has to be one for which a case role is represented by the invoker's organisation.\n8) Intended assignee has to be a solicitor enabled in the jurisdiction of the case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"status":"BAD_REQUEST","message":"Intended assignee has to be in the same organisation as that of the invoker.","errors":[]}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseAssignmentResponse"}}}},"403":{"description":"Unauthorised S2S service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseAssignmentResponse"}}}},"404":{"description":"Case could not be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseAssignmentResponse"}}}}}},"delete":{"tags":["case-assignment-controller"],"summary":"Unassign Access within Organisation","description":"Unassign Access within Organisation","operationId":"unassignAccessWithinOrganisation","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseUnassignmentRequest"}}},"required":true},"responses":{"200":{"description":"Unassignment(s) performed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseUnassignmentResponse"}}}},"400":{"description":"One or more of the following reasons:\n1) Requested Unassignments can not be empty\n2) Case ID has to be a valid 16-digit Luhn number\n3) Case ID has to be 16-digits long\n4) Case ID can not be empty\n5) IDAM Assignee ID can not be empty\n6) Case role name format is invalid\n7) Intended user to be unassigned has to be in the same organisation as that of the invoker.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"status":"BAD_REQUEST","errors":["Case ID has to be a valid 16-digit Luhn number","Case role name format is invalid"]}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseUnassignmentResponse"}}}},"403":{"description":"Unauthorised S2S service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseUnassignmentResponse"}}}}}}},"/noc/noc-questions":{"get":{"tags":["notice-of-change-controller"],"summary":"Get Notice of Change questions","description":"Get Notice of Change questions","operationId":"getNoticeOfChangeQuestions","parameters":[{"name":"case_id","in":"query","required":true,"schema":{"type":"string","maxLength":16,"minLength":16}},{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Challenge questions returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeQuestionsResult"},"example":{"questions":[{"case_type_id":"caseType","order":1,"question_text":"questionText","answer_field_type":{"id":"Number","type":"Number","min":null,"max":null,"regular_expression":null,"fixed_list_items":[],"complex_fields":[],"collection_field_type":null},"display_context_parameter":null,"challenge_question_id":"NoC","answer_field":null,"question_id":"QuestionId1"}]}}}},"400":{"description":"One or more of the following reasons:\n1. Case ID can not be empty,\n2. Case ID has to be a valid 16-digit Luhn number,\n3. No NoC events available for this case type,\n4. Multiple NoC Request events found for the user,\n5. More than one change request found on the case,\n6. Ongoing NoC request in progress\n7. Insufficient privileges for notice of change request\n8. No Organisation Policy for one or more of the roles available\n for the notice of change request\n","content":{"application/json":{"example":"{\n    \"message\": \"Case ID has to be a valid 16-digit Luhn number\"\n    \"code\": \"case-id-invalid\"\n    \"status\": \"BAD_REQUEST\"\n}"}}},"404":{"description":"Case could not be found","content":{"application/json":{"example":{"message":"Case could not be found","status":"NOT_FOUND"}}}},"401":{"description":"Authentication failure due to invalid / expired tokens (IDAM / S2S).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeQuestionsResult"}}}},"403":{"description":"Unauthorised S2S service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeQuestionsResult"}}}}}}},"/":{"get":{"tags":["root-controller"],"operationId":"welcome","parameters":[{"name":"ServiceAuthorization","in":"header","description":"Valid Service-to-Service JWT token for a whitelisted micro-service","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Keyword `Bearer` followed by a valid IDAM user token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"SubmittedChallengeAnswer":{"type":"object","properties":{"value":{"type":"string","description":"Submitted answer value","example":"Answer for Question1"},"question_id":{"type":"string","description":"Question ID for which the answer relates to","example":"Question1"}},"required":["question_id","value"]},"VerifyNoCAnswersRequest":{"type":"object","description":"Verify Notice of Change Answers Request","properties":{"answers":{"type":"array","description":"Submitted challenge question answers","items":{"$ref":"#/components/schemas/SubmittedChallengeAnswer"},"minItems":1},"case_id":{"type":"string","description":"Case ID to verify NoC challengeAnswers for","example":"1583841721773828","maxLength":16,"minLength":16}},"required":["answers","case_id"]},"Organisation":{"type":"object","properties":{"OrganisationID":{"type":"string"},"OrganisationName":{"type":"string"}}},"VerifyNoCAnswersResponse":{"type":"object","description":"Verify Notice of Change Answers Response","properties":{"organisation":{"$ref":"#/components/schemas/Organisation","description":"Organisation for identified case role"},"status_message":{"type":"string","description":"Domain status message","example":"Notice of Change answers verified successfully"}},"required":["organisation","status_message"]},"CallbackRequest":{"type":"object","description":"About To Submit Callback Request","properties":{"event_id":{"type":"string"},"case_details_before":{"$ref":"#/components/schemas/CaseDetails"},"case_details":{"$ref":"#/components/schemas/CaseDetails"}}},"CaseDetails":{"type":"object","properties":{"jurisdiction":{"type":"string"},"state":{"type":"string"},"id":{"type":"string","maxLength":16,"minLength":16},"case_type_id":{"type":"string"},"case_data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}},"created_date":{"type":"string","format":"date-time"},"security_classification":{"type":"string","enum":["PUBLIC","PRIVATE","RESTRICTED"]},"data_classification":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Same structure as `case_data` with classification (`PUBLIC`, `PRIVATE`, `RESTRICTED`) as field's value."},"callback_response_status":{"type":"string"},"callback_error_message":{"type":"string"}},"required":["id"]},"JsonNode":{},"AboutToSubmitCallbackResponse":{"type":"object","description":"About To Submit Callback Response","properties":{"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}}}},"ApiError":{"type":"object","properties":{"status":{"type":"string","enum":["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 EARLY_HINTS","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}}},"RequestNoticeOfChangeRequest":{"type":"object","description":"Request Notice Of Change Request","properties":{"answers":{"type":"array","description":"Submitted challenge question answers","items":{"$ref":"#/components/schemas/SubmittedChallengeAnswer"},"minItems":1},"case_id":{"type":"string","description":"Case ID to Assign Access To","example":"1583841721773828","maxLength":16,"minLength":16}},"required":["answers","case_id"]},"NoCApiError":{"type":"object","properties":{"status":{"type":"string","enum":["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 EARLY_HINTS","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"code":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}}},"RequestNoticeOfChangeResponse":{"type":"object","description":"Request Notice Of Change Response","properties":{"status_message":{"type":"string","description":"Domain Status Message","example":"The Notice of Change request has been successfully submitted."},"case_role":{"type":"string","description":"Case Role","example":"\"[Claimant]\""},"approval_status":{"type":"string","description":"Approval status","enum":["PENDING","APPROVED","REJECTED"],"example":"APPROVED"}},"required":["approval_status","case_role","status_message"]},"AboutToStartCallbackRequest":{"type":"object","description":"About to Start Callback Request","properties":{"event_id":{"type":"string"},"case_details_before":{"$ref":"#/components/schemas/CaseDetails"},"case_details":{"$ref":"#/components/schemas/CaseDetails"}}},"AboutToStartCallbackResponse":{"type":"object","description":"About to Start Callback Response","properties":{"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Case data as defined in case type definition.See `docs/api/case-data.md` for data structure."},"state":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"data_classification":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Same structure as `data` with classification (`PUBLIC`, `PRIVATE`, `RESTRICTED`) as field's value."},"security_classification":{"type":"string","enum":["PUBLIC","PRIVATE","RESTRICTED"]},"significant_item":{"$ref":"#/components/schemas/SignificantItem"}}},"SignificantItem":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"}}},"SubmitCallbackResponse":{"type":"object","description":"SubmitCallbackResponse","properties":{"confirmation_header":{"type":"string"},"confirmation_body":{"type":"string"}}},"ApplyNoCDecisionRequest":{"type":"object","description":"Apply Notice of Change Decision Request","properties":{"case_details":{"$ref":"#/components/schemas/CaseDetails","description":"Case details"}},"required":["case_details"]},"ApplyNoCDecisionResponse":{"type":"object","description":"Apply Notice of Change Decision Response","properties":{"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Case data"},"errors":{"type":"array","description":"Errors","items":{"type":"string"}}}},"CaseAssignedUserRoleWithOrganisation":{"type":"object","properties":{"case_id":{"type":"string"},"user_id":{"type":"string"},"case_role":{"type":"string"},"organisation_id":{"type":"string"}}},"CaseAssignedUserRolesRequest":{"type":"object","description":"List of Case-User-Role assignments to add","properties":{"case_users":{"type":"array","items":{"$ref":"#/components/schemas/CaseAssignedUserRoleWithOrganisation"}}}},"CaseAssignedUserRolesResponse":{"type":"object","description":"Add Case-Assigned User Roles Response","properties":{"status_message":{"type":"string","description":"Domain Status Message","example":"Case-User-Role assignments created successfully"}},"required":["status_message"]},"CaseAssignmentRequest":{"type":"object","description":"Case Assignment Request","properties":{"case_type_id":{"type":"string","description":"Case type ID of the requested case","example":"PROBATE-TEST","minLength":1},"case_id":{"type":"string","description":"Case ID to Assign Access To","example":"1583841721773828","maxLength":16,"minLength":16},"assignee_id":{"type":"string","description":"IDAM ID of the Assign User","example":"ecb5edf4-2f5f-4031-a0ec","minLength":1}},"required":["assignee_id","case_id","case_type_id"]},"CaseAssignmentResponse":{"type":"object","description":"Case Assignment Response","properties":{"status_message":{"type":"string","description":"Domain Status Message","example":"Role [Defendant] from the organisation policy successfully assigned to the assignee."}},"required":["status_message"]},"AccessControlList":{"type":"object","properties":{"role":{"type":"string"},"create":{"type":"boolean"},"read":{"type":"boolean"},"update":{"type":"boolean"},"delete":{"type":"boolean"}}},"CaseField":{"type":"object","properties":{"metadata":{"type":"boolean"},"id":{"type":"string","description":"The id of the case field"},"case_type_id":{"type":"string","description":"Foriegn key to the case type as fields should not work across"},"label":{"type":"string"},"hint_text":{"type":"string"},"field_type":{"$ref":"#/components/schemas/FieldType"},"hidden":{"type":"boolean"},"security_classification":{"type":"string","description":"Gov security level of the data (official, top secret etc)"},"live_from":{"type":"string"},"live_until":{"type":"string"},"acls":{"type":"array","items":{"$ref":"#/components/schemas/AccessControlList"}},"complexACLs":{"type":"array","items":{"$ref":"#/components/schemas/ComplexACL"}},"order":{"type":"integer","format":"int32"},"show_condition":{"type":"string"},"display_context_parameter":{"type":"string"},"retain_hidden_value":{"type":"boolean"}},"required":["field_type","id","label"]},"ChallengeQuestion":{"type":"object","properties":{"case_type_id":{"type":"string"},"order":{"type":"integer","format":"int32"},"question_text":{"type":"string"},"answer_field_type":{"$ref":"#/components/schemas/FieldType"},"display_context_parameter":{"type":"string"},"challenge_question_id":{"type":"string"},"answer_field":{"type":"string"},"question_id":{"type":"string"},"ignore_null_fields":{"type":"boolean"}}},"ChallengeQuestionsResult":{"type":"object","properties":{"questions":{"type":"array","items":{"$ref":"#/components/schemas/ChallengeQuestion"}}}},"ComplexACL":{"type":"object","properties":{"role":{"type":"string"},"create":{"type":"boolean"},"read":{"type":"boolean"},"update":{"type":"boolean"},"delete":{"type":"boolean"},"listElementCode":{"type":"string"}}},"FieldType":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"min":{"type":"string"},"max":{"type":"string"},"regular_expression":{"type":"string"},"fixed_list_items":{"type":"array","items":{"$ref":"#/components/schemas/FixedListItem"}},"complex_fields":{"type":"array","items":{"$ref":"#/components/schemas/CaseField"}},"collection_field_type":{"$ref":"#/components/schemas/FieldType"}}},"FixedListItem":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"order":{"type":"integer","format":"int32"}}},"CaseAssignedUserRole":{"type":"object","properties":{"case_id":{"type":"string"},"user_id":{"type":"string"},"case_role":{"type":"string"}}},"CaseAssignedUserRolesResource":{"type":"object","properties":{"case_users":{"type":"array","items":{"$ref":"#/components/schemas/CaseAssignedUserRole"}}}},"CaseAssignedUsers":{"type":"object","properties":{"case_id":{"type":"string"},"shared_with":{"type":"array","items":{"$ref":"#/components/schemas/UserDetails"}}}},"GetCaseAssignmentsResponse":{"type":"object","description":"Get case assignments response","properties":{"status_message":{"type":"string","description":"Domain Status Message","example":"Case-User-Role assignments returned successfully"},"case_assignments":{"type":"array","description":"Case Assignments","items":{"$ref":"#/components/schemas/CaseAssignedUsers"}}},"required":["case_assignments","status_message"]},"UserDetails":{"type":"object","properties":{"idam_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"case_roles":{"type":"array","items":{"type":"string"}}}},"CaseUnassignmentRequest":{"type":"object","description":"Case Unassignment Request","properties":{"unassignments":{"type":"array","description":"Requested Unassignments","items":{"$ref":"#/components/schemas/RequestedCaseUnassignment"},"minItems":1}},"required":["unassignments"]},"RequestedCaseUnassignment":{"type":"object","description":"Requested Unassignment From Case","properties":{"case_id":{"type":"string","description":"Case ID to Unassign Access To","example":"1583841721773828","maxLength":16,"minLength":16},"assignee_id":{"type":"string","description":"IDAM ID of the User to Unassign","example":"ecb5edf4-2f5f-4031-a0ec","minLength":1},"case_roles":{"type":"array","description":"Case Roles to Unassign","example":["[Claimant]","[Defendant]"],"items":{"type":"string","pattern":"^\\[.+]$"}}},"required":["assignee_id","case_id"]},"CaseUnassignmentResponse":{"type":"object","description":"Case Unassignment Response","properties":{"status_message":{"type":"string","description":"Domain Status Message","example":"Unassignment(s) performed successfully."}},"required":["status_message"]}}}}
