{
  "openapi": "3.0.0",
  "servers": [
    {
      "description": "Cafcass APIs to retrieve case data and docs",
      "url": "https://cft-api-mgmt-demo.azure-api.net,https://cft-api-mgmt-aat.azure-api.net,https://cft-api-mgmt-prod.azure-api.net"
    }
  ],
  "info": {
    "description": "This document present details of third-party organisations to retrieve case data and documents from the CFT case management system",
    "version": "1.0.0",
    "title": "Cafcass APIs",
    "contact": {
      "email": "yashar.rahvar@hmcts.com"
    }
  },
  "paths": {
    "/family-api/cases": {
      "get": {
        "security": [
          {
            "Authorization": []
          },
          {
            "Ocp-Apim-Subscription-Key": []
          }
        ],
        "tags": [
          "Cases"
        ],
        "summary": "Search and return cases according to the provided parameters",
        "operationId": "get cases data",
        "description": "This API retrieve case data\n",
        "parameters": [
          {
            "in": "query",
            "name": "start_date",
            "description": "start date timestamp",
            "required": true,
            "example": "2022-03-28T12:32:54.541",
            "schema": {
              "type": "string",
              "format": "datetime",
              "example": "2022-03-28T12:32:54.541"
            }
          },
          {
            "in": "query",
            "name": "end_date",
            "description": "end date timestamp",
            "example": "2022-03-28T12:32:54.541",
            "required": true,
            "schema": {
              "type": "string",
              "format": "datetime",
              "example": "2022-03-28T12:32:54.541"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "search results matching criteria",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/response"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          },
          "403": {
            "description": "Auth Error"
          },
          "429": {
            "description": "rate limit error or too many requests"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/family-api/cases/documents/{documentId}/binary": {
      "get": {
        "security": [
          {
            "Authorization": []
          },
          {
            "Ocp-Apim-Subscription-Key": []
          }
        ],
        "tags": [
          "Cases"
        ],
        "summary": "Streams contents of the most recent document associated with the case document. ResponseEntity<ByteArrayResource> more info can be find here>> https://github.com/hmcts/ccd-case-document-am-api/blob/master/src/main/java/uk/gov/hmcts/reform/ccd/documentam/controller/endpoints/CaseDocumentAmController.java#L167",
        "operationId": "get case document",
        "description": "This API retrieve case document\n",
        "parameters": [
          {
            "in": "path",
            "name": "documentId",
            "description": "retrieve case document by document ID",
            "schema": {
              "type": "string",
              "format": "string",
              "example": "dfe93656-a268-4fde-8f80-0152235daf95"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Case document Id is not valid"
          },
          "403": {
            "description": "Auth Error"
          },
          "404": {
            "description": "Case document not found"
          },
          "429": {
            "description": "rate limit error or too many requests"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "response": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "number",
            "example": 1
          },
          "cases": {
            "$ref": "#/components/schemas/case"
          }
        }
      },
      "case": {
        "type": "array",
        "items": {
          "properties": {
            "id": {
              "type": "integer",
              "example": 1652950891557691
            },
            "jurisdiction": {
              "type": "string",
              "example": "PRIVATELAW"
            },
            "state": {
              "type": "string",
              "example": "CASE_ISSUE"
            },
            "case_type_id": {
              "type": "string",
              "example": "PRLAPPS"
            },
            "created_date": {
              "type": "string",
              "example": "2022-05-19T09:01:31.576"
            },
            "last_modified": {
              "type": "string",
              "example": "2022-05-24T14:46:15.505"
            },
            "last_state_modified_date": {
              "type": "string",
              "example": "2022-05-24T14:46:15.505"
            },
            "caseTypeOfApplication": {
              "type": "string",
              "example": "C100"
            },
            "case_data": {
              "$ref": "#/components/schemas/case_data"
            }
          }
        }
      },
      "case_data": {
        "type": "object",
        "properties": {
          "familymanCaseNumber": {
            "type": "string",
            "example": "LV22P70768"
          },
          "submitAndPayDownloadApplicationLink": {
            "$ref": "#/components/schemas/submitAndPayDownloadApplicationLink"
          },
          "c8Document": {
            "$ref": "#/components/schemas/c8Document"
          },
          "c1ADocument": {
            "$ref": "#/components/schemas/c1ADocument"
          },
          "dateSubmitted": {
            "type": "string",
            "example": "2022-08-13"
          },
          "draftConsentOrderFile": {
            "$ref": "#/components/schemas/draftConsentOrderFile"
          },
          "confidentialDetails": {
            "type": "object",
            "properties": {
              "isConfidentialDetailsAvailable": {
                "type": "string",
                "example": "Yes"
              }
            }
          },
          "isInterpreterNeeded": {
            "type": "string",
            "example": "Yes"
          },
          "interpreterNeeds": {
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "type": "string",
                  "example": "c02f240b-fad3-4967-863b-715e3334e1a2"
                },
                "value": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "grandmother of the applicant."
                    },
                    "otherAssistance": {
                      "type": "string",
                      "example": "grandmother of the applicant."
                    },
                    "language": {
                      "type": "string",
                      "example": "grandmother of the applicant."
                    },
                    "party": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "[applicant,respondent,other]"
                      }
                    }
                  }
                }
              }
            }
          },
          "childrenKnownToLocalAuthority": {
            "type": "string",
            "example": "no"
          },
          "otherDocuments": {
            "$ref": "#/components/schemas/otherDocuments"
          },
          "finalDocument": {
            "$ref": "#/components/schemas/finalDocument"
          },
          "ordersApplyingFor": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "childArrangementsOrder"
            }
          },
          "children": {
            "type": "array",
            "items": {
              "properties": {
                "value": {
                  "type": "object",
                  "properties": {
                    "lastName": {
                      "type": "string",
                      "example": "ca"
                    },
                    "parentalResponsibilityDetails": {
                      "type": "string",
                      "example": "Parental responsibility"
                    },
                    "gender": {
                      "type": "string",
                      "example": "male"
                    },
                    "otherGender": {
                      "type": "string",
                      "example": "male"
                    },
                    "relationshipToRespondent": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "dateOfBirth": {
                      "type": "string",
                      "format": "date",
                      "example": "2012-04-21"
                    },
                    "otherApplicantsRelationshipToChild": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "respondentsRelationshipToChild": {
                      "type": "string",
                      "example": "other"
                    },
                    "whoDoesTheChildLiveWith": {
                      "type": "object",
                      "properties": {
                        "partyId": {
                          "type": "string",
                           "example": "49f18d28-782a-4bb1-b5ad-d8fd32012c7d"
                         },
                         "partyFullName": {
                          "type": "string",
                          "example": "James Franklyn"
                         },
                        "partyType": {
                          "type": "string",
                          "enum": [
                            "APPLICANT",
                            "RESPONDENT",
                            "OTHERPEOPLE"
                          ]
                         },
                         "childAddress": {
                            "type": "object",
                            "properties": {
                              "AddressLine1": {
                                "type": "string",
                                "example": "1 Signet Square"
                              },
                              "Country": {
                                "type": "string",
                                "example": "United Kingdom"
                              },
                              "PostTown": {
                                "type": "string",
                                "example": "Coventry"
                              },
                              "PostCode": {
                                "type": "string",
                                "example": "CV2 4NZ"
                              },
                              "County": {
                                "type": "string",
                                "example": "TEST"
                              }
                            }
                          }
                        }
                    },
                    "firstName": {
                      "type": "string",
                      "example": "ca"
                    },
                    "orderAppliedFor": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "childArrangementsOrder"
                      }
                    },
                    "childLiveWith": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "applicant"
                      }
                    },
                    "applicantsRelationshipToChild": {
                      "type": "string",
                      "example": "father"
                    },
                    "relationshipToApplicant": {
                      "type": "string",
                      "example": null
                    },
                    "otherRespondentsRelationshipToChild": {
                      "type": "string",
                      "example": "other"
                    },
                    "personWhoLivesWithChild": {
                      "type": "object",
                      "properties": {
                        "lastName": {
                          "type": "string",
                          "example": "cafcca1"
                        },
                        "firstName": {
                          "type": "string",
                          "example": "John"
                        },
                        "relationshipToChildDetails": {
                          "type": "string",
                          "example": "Local Guardian"
                        },
                        "isPersonIdentityConfidential": {
                          "type": "string",
                          "example": "Yes"
                        },
                        "address": {
                          "type": "object",
                          "properties": {
                            "AddressLine1": {
                              "type": "string",
                              "example": "1 Signet Square"
                            },
                            "Country": {
                              "type": "string",
                              "example": "United Kingdom"
                            },
                            "PostTown": {
                              "type": "string",
                              "example": "Coventry"
                            },
                            "PostCode": {
                              "type": "string",
                              "example": "CV2 4NZ"
                            },
                            "County": {
                              "type": "string",
                              "example": "TEST"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "miamCertificationDocumentUpload1": {
            "$ref": "#/components/schemas/miamCertificationDocumentUpload1"
          },
          "claimingExemptionMiam": {
            "type": "string",
            "example": "Yes"
          },
          "applicantAttendedMiam": {
            "type": "string",
            "example": "No"
          },
          "otherProceedingsMiam": {
            "type": "string",
            "example": "Yes/No"
          },
          "applicantConsentMiam": {
            "type": "string",
            "example": "Yes/No"
          },
          "mediatorRegistrationNumber": {
            "type": "string",
            "example": "Urn12345"
          },
          "familyMediatorServiceName": {
            "type": "string",
            "example": "Mediator name"
          },
          "soleTraderName": {
            "type": "string",
            "example": "Smith James"
          },
          "miamChildProtectionConcernReason": {
            "type": "string",
            "example": "child protection concern"
          },
          "mpuMediatorDetails": {
            "type": "string",
            "example": "mediator details"
          },
          "mpuNoDomesticAbuseEvidenceReason": {
            "type": "string",
            "example":"domestic abuse evidence reason"
          },
          "miamTable": {
            "type": "object",
            "properties": {
              "claimingExemptionMiam": {
                "type": "string",
                "example": "Yes"
              }
            }
          },
          "mpuChildInvolvedInMiam": {
            "type": "string",
            "example": "Yes/No"
          },
          "miamDomesticAbuseEvidences": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "Evidence of relevant criminal proceedings for a domestic abuse offence which have not concluded"
            }
          },
          "mpuIsDomesticAbuseEvidenceProvided": {
            "type": "string",
            "example": "Yes/No"
          },
          "mpuDomesticAbuseEvidenceDocument": {
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "example": "yf958b24-c5c2-451c-9f22-d7a6a87c6322"
                },
                "value": {
                  "type": "object",
                  "properties": {
                    "domesticAbuseDocument": {
                      "type": "object",
                      "properties": {
                        "document_id": {
                          "type": "string",
                          "format": "uuid",
                          "example": "zzz48b24-c5c2-451c-9fd5-d7a6a87c6355"
                        },
                        "document_filename": {
                          "type": "string",
                          "example": "domesticAbuseEvidenceDocument.pdf"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "miamUrgencyReason": {
            "type": "string",
            "example": "There is risk to the life, liberty or physical safety of the prospective applicant or his or her family or his or her home"
          },
          "miamPreviousAttendanceReason": {
            "type": "string",
            "example": "Miam previous attended reason details"
          },
          "miamTypeOfPreviousAttendanceEvidence": {
            "type": "string",
            "example": "MIAM attendance details"
          },
          "mpuCertificateByMediator": {
            "type": "object",
            "properties": {
              "document_id": {
                "type": "string",
                "format": "uuid",
                "example": "zzz48b24-c5c2-451c-9fd5-d7a6a87c6355"
              },
              "document_filename": {
                "type": "string",
                "example": "miamCertificate.pdf"
              }
            }
          },
          "miamOtherExemptionReasons": {
            "type": "string",
            "example": "A child is one of the prospective parties"
          },
          "mpuApplicantUnableToAttendMiamReason1": {
            "type": "string",
            "example": "Reasons applicant unable to attend MIAM"
          },
          "mpuApplicantUnableToAttendMiamReason2": {
            "type": "string",
            "example": "Reasons applicant unable to attend MIAM"
          },
          "mpuDocFromDisputeResolutionProvider": {
            "type": "object",
            "properties": {
              "document_id": {
                "type": "string",
                "format": "uuid",
                "example": "zzz48b24-c5c2-451c-9fd5-d7a6a87c6355"
              },
              "document_filename": {
                "type": "string",
                "example": "disputeResolution.pdf"
              }
            }
          },
          "miamExemptionsTable": {
            "type": "object",
            "properties": {
              "domesticViolenceEvidence": {
                "type": "string",
                "example": ""
              },
              "previousAttendenceEvidence": {
                "type": "string",
                "example": ""
              },
              "reasonsForMiamExemption": {
                "type": "string",
                "example": ""
              },
              "urgencyEvidence": {
                "type": "string",
                "example": ""
              },
              "childProtectionEvidence": {
                "type": "string",
                "example": ""
              },
              "otherGroundsEvidence": {
                "type": "string",
                "example": ""
              }
            }
          },
          "summaryTabForOrderAppliedFor": {
            "type": "object",
            "properties": {
              "ordersApplyingFor": {
                "type": "string",
                "example": "Child Arrangements Order"
              },
              "typeOfChildArrangementsOrder": {
                "type": "string",
                "example": "Spend time with order"
              }
            }
          },
          "applicants": {
            "type": "array",
            "items": {
              "properties": {
                "value": {
                  "type": "object",
                  "properties": {
                    "lastName": {
                      "type": "string",
                      "example": "cafcca1"
                    },
                    "otherPersonRelationshipToChildren": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "TEST"
                      }
                    },
                    "gender": {
                      "type": "string",
                      "example": "male/female/other"
                    },
                    "otherGender": {
                      "type": "string",
                      "example": "male"
                    },
                    "representativeFirstName": {
                      "type": "string",
                      "example": "firstname"
                    },
                    "solicitorOrg": {
                      "type": "object",
                      "properties": {
                        "OrganisationID": {
                          "type": "string",
                          "example": "W98ZZ5W"
                        },
                        "OrganisationName": {
                          "type": "string",
                          "example": "Uday2 Test Org"
                        }
                      }
                    },
                    "isCurrentAddressKnown": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "solicitorEmail": {
                      "type": "string",
                      "example": "cafcca@gmail.com"
                    },
                    "respondentLivedWithApplicant": {
                      "type": "string",
                      "example": "ca"
                    },
                    "solicitorTelephone": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "representativeLastName": {
                      "type": "string",
                      "example": "cafcca"
                    },
                    "solicitorReference": {
                      "type": "string",
                      "example": "cafcca@gmail.com"
                    },
                    "dxNumber": {
                      "type": "string",
                      "example": "DX1222"
                    },
                    "email": {
                      "type": "string",
                      "example": "other"
                    },
                    "isAddressConfidential": {
                      "type": "string",
                      "example": "Yes"
                    },
                    "isAtAddressLessThan5Years": {
                      "type": "string",
                      "example": "Yes"
                    },
                    "addressLivedLessThan5YearsDetails": {
                      "type": "string",
                      "example": "102, Mountbatten road, London"
                    },
                    "canYouProvideEmailAddress": {
                      "type": "string",
                      "example": "No"
                    },
                    "placeOfBirth": {
                      "type": "string",
                      "example": "coventry"
                    },
                    "isPhoneNumberConfidential": {
                      "type": "string",
                      "example": "Yes"
                    },
                    "address": {
                      "type": "object",
                      "properties": {
                        "AddressLine1": {
                          "type": "string",
                          "example": "1 Signet Square"
                        },
                        "AddressLine2": {
                          "type": "string",
                          "example": "Test address line 2"
                        },
                        "AddressLine3": {
                          "type": "string",
                          "example": "Test address line 3"
                        },
                        "Country": {
                          "type": "string",
                          "example": "United Kingdom"
                        },
                        "PostTown": {
                          "type": "string",
                          "example": "Coventry"
                        },
                        "PostCode": {
                          "type": "string",
                          "example": "CV2 4NZ"
                        },
                        "County": {
                          "type": "string",
                          "example": "TEST"
                        }
                      }
                    },
                    "isEmailAddressConfidential": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "relationshipToChildren": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "dateOfBirth": {
                      "type": "string",
                      "example": "1982-04-21"
                    },
                    "firstName": {
                      "type": "string",
                      "example": "cafcca1"
                    },
                    "previousName": {
                      "type": "string",
                      "example": "cafcca1"
                    },
                    "phoneNumber": {
                      "type": "string",
                      "example": "07424226800"
                    },
                    "isPlaceOfBirthKnown": {
                      "type": "string",
                      "example": "No"
                    }
                  }
                }
              }
            }
          },
          "respondents": {
            "type": "array",
            "items": {
              "properties": {
                "value": {
                  "type": "object",
                  "properties": {
                    "lastName": {
                      "type": "string",
                      "example": "cafcca1"
                    },
                    "otherPersonRelationshipToChildren": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": ""
                      }
                    },
                    "gender": {
                      "type": "string",
                      "example": "male"
                    },
                    "representativeFirstName": {
                      "type": "string",
                      "example": "firstname"
                    },
                    "solicitorOrg": {
                      "type": "object",
                      "properties": {
                        "OrganisationID": {
                          "type": "string",
                          "example": "W98ZZ5W"
                        },
                        "OrganisationName": {
                          "type": "string",
                          "example": "Uday2 Test Org"
                        }
                      }
                    },
                    "solicitorEmail": {
                      "type": "string",
                      "example": "cafcca@gmail.com"
                    },
                    "solicitorTelephone": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "representativeLastName": {
                      "type": "string",
                      "example": "cafcca"
                    },
                    "solicitorReference": {
                      "type": "string",
                      "example": "cafcca@gmail.com"
                    },
                    "email": {
                      "type": "string",
                      "example": "other"
                    },
                    "isPlaceOfBirthKnown": {
                      "type": "string",
                      "example": "No"
                    },
                    "isAddressConfidential": {
                      "type": "string",
                      "example": "Yes"
                    },
                    "placeOfBirth": {
                      "type": "string",
                      "example": "coventry"
                    },
                    "isPhoneNumberConfidential": {
                      "type": "string",
                      "example": "Yes"
                    },
                    "address": {
                      "type": "object",
                      "properties": {
                        "AddressLine1": {
                          "type": "string",
                          "example": "1 Signet Square"
                        },
                        "AddressLine2": {
                          "type": "string",
                          "example": "Test address line 2"
                        },
                        "AddressLine3": {
                          "type": "string",
                          "example": "Test address line 3"
                        },
                        "Country": {
                          "type": "string",
                          "example": "United Kingdom"
                        },
                        "PostTown": {
                          "type": "string",
                          "example": "Coventry"
                        },
                        "PostCode": {
                          "type": "string",
                          "example": "CV2 4NZ"
                        },
                        "County": {
                          "type": "string",
                          "example": "TEST"
                        }
                      }
                    },
                    "isEmailAddressConfidential": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "relationshipToChildren": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "dateOfBirth": {
                      "type": "string",
                      "example": "1982-04-21"
                    },
                    "firstName": {
                      "type": "string",
                      "example": "cafcca1"
                    },
                    "phoneNumber": {
                      "type": "string",
                      "example": "07424226800"
                    },
                    "isDateOfBirthKnown": {
                      "type": "string",
                      "example": "No"
                    },
                    "canYouProvidePhoneNumber": {
                      "type": "string",
                      "example": "No"
                    },
                    "isAtAddressLessThan5YearsWithDontKnow": {
                      "type": "string",
                      "example": "no"
                    },
                    "addressLivedLessThan5YearsDetails": {
                      "type": "string",
                      "example": "102, Mountbatten road, London"
                    },
                    "doTheyHaveLegalRepresentation": {
                      "type": "string",
                      "example": "no"
                    }
                  }
                }
              }
            }
          },
          "applicantsConfidentialDetails": {
            "type": "array",
            "items": {
              "properties": {
                "value": {
                  "type": "object",
                  "properties": {
                    "lastName": {
                      "type": "string",
                      "example": "cafcca1"
                    },
                    "firstName": {
                      "type": "string",
                      "example": "ca"
                    },
                    "address": {
                      "type": "object",
                      "properties": {
                        "AddressLine1": {
                          "type": "string",
                          "example": "1 Signet Square"
                        },
                        "AddressLine2": {
                          "type": "string",
                          "example": "Test address line 2"
                        },
                        "AddressLine3": {
                          "type": "string",
                          "example": "Test address line 3"
                        },
                        "Country": {
                          "type": "string",
                          "example": "United Kingdom"
                        },
                        "PostTown": {
                          "type": "string",
                          "example": "Coventry"
                        },
                        "PostCode": {
                          "type": "string",
                          "example": "CV2 4NZ"
                        },
                        "County": {
                          "type": "string",
                          "example": "TEST"
                        }
                      }
                    },
                    "phoneNumber": {
                      "type": "string",
                      "example": "cafcca1"
                    },
                    "email": {
                      "type": "string",
                      "example": "test@gmail.com"
                    }
                  }
                }
              }
            }
          },
          "applicantSolicitorEmailAddress": {
            "type": "string",
            "example": "prl_caseworker_solicitor@mailinator.com"
          },
          "solicitorName": {
            "type": "string",
            "example": "prl_caseworker_solicitor@mailinator.com"
          },
          "courtEpimsId": {
            "type": "string",
            "example": 121111
          },
          "courtTypeId": {
            "type": "string",
            "example": 43333
          },
          "courtName": {
            "type": "string",
            "example": "Coventry Combined Court Centre"
          },
          "otherPeopleInTheCaseTable": {
            "type": "array",
            "items": {
              "properties": {
                "value": {
                  "type": "object",
                  "properties": {
                    "lastName": {
                      "type": "string",
                      "example": "cafcca1"
                    },
                    "placeOfBirth": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "address": {
                      "type": "object",
                      "properties": {
                        "AddressLine1": {
                          "type": "string",
                          "example": "1 Signet Square"
                        },
                        "AddressLine2": {
                          "type": "string",
                          "example": "Test address line 2"
                        },
                        "AddressLine3": {
                          "type": "string",
                          "example": "Test address line 3"
                        },
                        "Country": {
                          "type": "string",
                          "example": "United Kingdom"
                        },
                        "PostTown": {
                          "type": "string",
                          "example": "Coventry"
                        },
                        "PostCode": {
                          "type": "string",
                          "example": "CV2 4NZ"
                        },
                        "County": {
                          "type": "string",
                          "example": "TEST"
                        }
                      }
                    },
                    "gender": {
                      "type": "string",
                      "example": "male"
                    },
                    "isCurrentAddressKnown": {
                      "type": "string",
                      "example": "No"
                    },
                    "dateOfBirth": {
                      "type": "string",
                      "example": "TEST"
                    },
                    "firstName": {
                      "type": "string",
                      "example": "ca8"
                    },
                    "phoneNumber": {
                      "type": "string",
                      "example": null
                    },
                    "otherGender": {
                      "type": "string",
                      "example": null
                    },
                    "canYouProvideEmailAddress": {
                      "type": "string",
                      "example": "No"
                    },
                    "canYouProvidePhoneNumber": {
                      "type": "string",
                      "example": "No"
                    }
                  }
                }
              }
            }
          },
          "ordersNonMolestationDocument": {
            "$ref": "#/components/schemas/ordersNonMolestationDocument"
          },
          "HearingOutComeDocument": {
            "$ref": "#/components/schemas/HearingOutComeDocument"
          },
          "hearingData": {
            "type": "object",
            "properties": {
              "hmctsServiceCode": {
                "type": "string",
                "example": "ABA5"
              },
              "caseRef": {
                "type": "string",
                "example": "1677494509039975"
              },
              "courtTypeId": {
                "type": "string",
                "example": 43333
              },
              "courtName": {
                "type": "string",
                "example": "Coventry Combined Court Centre"
              },
              "caseHearings": {
                "type": "array",
                "items": {
                  "properties": {
                    "hearingId": {
                      "type": "string",
                      "example": "2000005039"
                    },
                    "hearingStatus": {
                      "type": "string",
                      "enum": [
                        "LISTED",
                        "CANCELED"
                      ]
                    },
                    "hearingType": {
                      "type": "string",
                      "example": "ABA5-REV"
                    },
                    "hearingTypeValue": {
                      "type": "string",
                      "example": "Review"
                    },
                    "hearingDaySchedule": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "hearingVenueName": {
                            "type": "string",
                            "example": "ROYAL COURTS OF JUSTICE - QUEENS BUILDING (AND WEST GREEN BUILDING)"
                          },
                          "hearingStartDateTime": {
                            "type": "string",
                            "example": "2023-03-10T12:00:00"
                          },
                          "hearingEndDateTime": {
                            "type": "string",
                            "example": "2023-03-10T14:00:00"
                          },
                          "courtTypeId": {
                            "type": "string",
                            "example": 43333
                          },
                          "courtName": {
                            "type": "string",
                            "example": "Coventry Combined Court Centre"
                          },
                          "epimsId": {
                            "type": "string",
                            "example": 121111
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "orderCollection": {
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "type": "string",
                  "example": "368f1f4b-b56e-4541-9a13-78803d372d39"
                },
                "value": {
                  "type": "object",
                  "properties": {
                    "orderType": {
                      "type": "string",
                      "example": "Child arrangements, specific issue or prohibited steps order (C43)"
                    },
                    "orderTypeId": {
                      "type": "string",
                      "example": "childArrangementsSpecificProhibitedOrder"
                    },
                    "dateCreated": {
                      "type": "object",
                      "example": "2023-03-14T13:33:32.240736"
                    },
                    "hearingId": {
                      "type": "string",
                      "description": "A comma separated string of hearing IDs",
                      "example": "2000005039"
                    },
                    "hearingIds": {
                      "type": "array",
                      "items": {
                        "type": "number",
                        "format": "int64",
                        "example": 2000005039
                      }
                    },
                    "courtReportType": {
                      "type": "array",
                      "items": {
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "c02f240b-fad3-4967-863b-715e3334e1a2"
                          },
                          "value": {
                            "type": "string",
                            "example": {
                              "Safeguarding letter": null,
                              "16.4 report": null,
                              "Child Impact report": null
                            }
                          }
                        }
                      }
                    },
                    "originalFilingDate": {
                        "type": "string",
                        "example": "2023-06-09"
                      },
                    "otherDetails": {
                      "type": "object",
                      "properties": {
                        "orderRecipients": {
                          "type": "string",
                          "example": "My New Org (Applicant's Solicitor)"
                        },
                        "orderCreatedDate": {
                          "type": "string",
                          "example": "2023-06-09T00:00:00.000Z"
                        },
                        "createdBy": {
                          "type": "string",
                          "example": "John"
                        },
                        "orderMadeDate": {
                          "type": "string",
                          "example": "2023-03-15T00:00:00.000Z"
                        }
                      }
                    },
                    "orderMadeDate": {
                      "type": "object",
                      "description": "date format",
                      "example": "2023-12-23T00:00:00.000Z"
                    },
                    "orderDocument": {
                      "type": "object",
                      "properties": {
                        "document_filename": {
                          "type": "string",
                          "example": "My New Org (Applicant's Solicitor)"
                        },
                        "document_id": {
                          "type": "string",
                          "example": "41bf6a26-190c-470b-ab50-e656bbd4227d"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "submitAndPayDownloadApplicationLink": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid",
            "example": "df948a27-c5c2-461c-9fd5-d7a6a87c6385"
          },
          "document_filename": {
            "type": "string",
            "example": "Draft_C100_application.pdf"
          }
        }
      },
      "documentOther": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid",
            "example": "yf948a27-c5c2-451c-9fd5-d7a6a87c6381"
          },
          "document_filename": {
            "type": "string",
            "example": "cafa-test.pdf"
          }
        }
      },
      "c8Document": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid",
            "example": "yf948a27-c5c2-451c-9fd5-d7a6a87c6381"
          },
          "document_filename": {
            "type": "string",
            "example": "C8Document.pdf"
          }
        }
      },
      "c1ADocument": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid",
            "example": "yf948b24-c5c2-451c-9fd5-d7a6a87c6355"
          },
          "document_filename": {
            "type": "string",
            "example": "c1A_Document.pdf"
          }
        }
      },
      "ordersNonMolestationDocument": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid",
            "example": "yf948b24-c5c2-451c-9fd5-d7a6a87c6355"
          },
          "document_filename": {
            "type": "string",
            "example": "cafa-test.pdf.pdf"
          }
        }
      },
      "finalDocument": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid",
            "example": "zzz48b24-c5c2-451c-9fd5-d7a6a87c6355"
          },
          "document_filename": {
            "type": "string",
            "example": "C100FinalDocument.pdf"
          }
        }
      },
      "miamCertificationDocumentUpload1": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid",
            "example": "d9248b24-c5c2-451c-9fd5-d7a6a87c6355"
          },
          "document_filename": {
            "type": "string",
            "example": "cafa-test.pdf"
          }
        }
      },
      "caseManagementLocation": {
        "type": "object",
        "properties": {
          "regionId": {
            "type": "string",
            "example": "2 (Either you will get regionId or region)"
          },
          "region": {
            "type": "string",
            "example": "2 (Either you will get regionId or region)"
          },
          "baseLocation": {
            "type": "string",
            "example": "497679 (Either you will get baseLocationId or baseLocation)"
          },
          "baseLocationId": {
            "type": "string",
            "example": "497679 (Either you will get baseLocationId or baseLocation)"
          },
          "regionName": {
            "type": "string",
            "example": "Midlands"
          },
          "baseLocationName": {
            "type": "string",
            "example": "Coventry Combined Court Centre"
          }
        }
      },
      "draftConsentOrderFile": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid",
            "example": "yf948b24-c5c2-451c-9fd5-d7a6a87c6355"
          },
          "document_filename": {
            "type": "string",
            "example": "c100-drft.pdf"
          }
        }
      },
      "HearingOutComeDocument": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid",
            "example": "yf948b24-c5c2-451c-9fd5-d7a6a87c6355"
          },
          "document_filename": {
            "type": "string",
            "example": "placeHolder.pdf"
          }
        }
      },
      "otherDocuments": {
        "type": "array",
        "items": {
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "example": "yf958b24-c5c2-451c-9f22-d7a6a87c6322"
            },
            "value": {
              "type": "object",
              "properties": {
                "notes": {
                  "type": "string",
                  "example": "optional doc"
                },
                "documentTypeOther": {
                  "type": "string",
                  "example": "cafcassReports"
                },
                "documentName": {
                  "type": "string",
                  "example": "optional doc"
                },
                "documentOther": {
                  "$ref": "#/components/schemas/documentOther"
                }
              }
            }
          }
        }
      },
      "childAndApplicantRelations": {
        "type": "array",
        "description": "This array will have All Applicants relationship to each of the child",
        "items": {
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "example": "yf958b24-c5c2-451c-9f22-d7a6a87c6322"
            },
            "value": {
              "type": "object",
              "properties": {
                "partyId": {
                  "type": "string",
                  "example": "49f18d28-782a-4bb1-b5ad-d8fd32012c7d"
                },
                "partyFullName": {
                  "type": "string",
                  "example": "James Franklyn"
                },
                "partyType": {
                  "type": "string",
                  "enum": [
                    "APPLICANT",
                    "RESPONDENT",
                    "OTHERPEOPLE"
                  ]
                },
                "childId": {
                  "type": "string",
                  "example": "49f18d28-782a-4bb1-b5ad-d8fd32012c7d"
                },
                "childFullName": {
                  "type": "string",
                  "example": "Mary Franklyn"
                },
                "relationType": {
                  "type": "string",
                  "enum": [
                    "father",
                    "mother",
                    "stepFather",
                    "stepMother",
                    "grandParent",
                    "guardian",
                    "specialGuardian",
                    "other"
                  ]
                },
                "otherRelationDetails": {
                  "type": "string",
                  "example": "Aunt"
                },
                "childLivesWith": {
                  "type": "string",
                  "example": "Yes/No"
                }
              }
            }
          }
        }
      },
      "childAndRespondentRelations": {
        "type": "array",
        "description": "This array will have All Respondents relationship to each of the child",
        "items": {
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "example": "yf958b24-c5c2-451c-9f22-d7a6a87c6322"
            },
            "value": {
              "type": "object",
              "properties": {
                "partyId": {
                  "type": "string",
                  "example": "49f18d28-782a-4bb1-b5ad-d8fd32012c7d"
                },
                "partyFullName": {
                  "type": "string",
                  "example": "James Franklyn"
                },
                "partyType": {
                  "type": "string",
                  "enum": [
                    "APPLICANT",
                    "RESPONDENT",
                    "OTHERPEOPLE"
                  ]
                },
                "childId": {
                  "type": "string",
                  "example": "49f18d28-782a-4bb1-b5ad-d8fd32012c7d"
                },
                "childFullName": {
                  "type": "string",
                  "example": "Mary Franklyn"
                },
                "relationType": {
                  "type": "string",
                  "enum": [
                    "father",
                    "mother",
                    "stepFather",
                    "stepMother",
                    "grandParent",
                    "guardian",
                    "specialGuardian",
                    "other"
                  ]
                },
                "otherRelationDetails": {
                  "type": "string",
                  "example": "Aunt"
                },
                "childLivesWith": {
                  "type": "string",
                  "example": "Yes/No"
                }
              }
            }
          }
        }
      },
      "childAndOtherPeopleRelations": {
        "type": "array",
        "description": "This array will have All Other People relationship to each of the child",
        "items": {
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "example": "yf958b24-c5c2-451c-9f22-d7a6a87c6322"
            },
            "value": {
              "type": "object",
              "properties": {
                "partyId": {
                  "type": "string",
                  "example": "49f18d28-782a-4bb1-b5ad-d8fd32012c7d"
                },
                "partyFullName": {
                  "type": "string",
                  "example": "James Franklyn"
                },
                "partyType": {
                  "type": "string",
                  "enum": [
                    "APPLICANT",
                    "RESPONDENT",
                    "OTHERPEOPLE"
                  ]
                },
                "childId": {
                  "type": "string",
                  "example": "49f18d28-782a-4bb1-b5ad-d8fd32012c7d"
                },
                "childFullName": {
                  "type": "string",
                  "example": "Mary Franklyn"
                },
                "relationType": {
                  "type": "string",
                  "enum": [
                    "father",
                    "mother",
                    "stepFather",
                    "stepMother",
                    "grandParent",
                    "guardian",
                    "specialGuardian",
                    "other"
                  ]
                },
                "otherRelationDetails": {
                  "type": "string",
                  "example": "Aunt"
                },
                "childLivesWith": {
                  "type": "string",
                  "example": "Yes/No"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "Authorization": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "Ocp-Apim-Subscription-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  }
}
