{"openapi":"3.1.0","info":{"description":"Civil RTL Export","license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"title":"Civil RTL Export","version":"v0.0.1"},"externalDocs":{"description":"README","url":"https://github.com/hmcts/civil-rtl-export"},"servers":[{"url":"http://localhost","description":"Generated server url"}],"paths":{"/":{"get":{"operationId":"welcome","responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"OK"}},"tags":["root-controller"]}},"/judgment":{"post":{"operationId":"judgmentEvent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgmentEvent"}}},"required":true},"responses":{"201":{"description":"Judgment record created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgmentEventError"}}},"description":"Bad request"},"401":{"description":"Service authentication failed"},"403":{"description":"Service is not an authorised service"}},"summary":"Create judgment record","tags":["judgment-event-controller"]}},"/trigger-report":{"get":{"operationId":"triggerReport","parameters":[{"in":"query","name":"asOf","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"test","required":false,"schema":{"type":"boolean","default":false}},{"in":"query","name":"serviceId","required":false,"schema":{"type":"string","pattern":"^[A-Z0-9]{4}$"}}],"responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"Report generated and sent successfully"},"400":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"Invalid service id"},"500":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"An error occurred during the report generation process"}},"summary":"Generate a report containing judgment data and send it via SFTP to RTL","tags":["report-controller"]}}},"components":{"schemas":{"Defendant":{"type":"object","properties":{"defendantAddress":{"$ref":"#/components/schemas/DefendantAddress"},"defendantDateOfBirth":{"type":"string","format":"date"},"defendantName":{"type":"string"}}},"DefendantAddress":{"type":"object","properties":{"defendantAddressLine1":{"type":"string"},"defendantAddressLine2":{"type":"string"},"defendantAddressLine3":{"type":"string"},"defendantAddressLine4":{"type":"string"},"defendantAddressLine5":{"type":"string"},"defendantPostcode":{"type":"string"}}},"JudgmentEvent":{"type":"object","properties":{"cancellationDate":{"type":"string","format":"date"},"caseNumber":{"type":"string"},"ccdCaseRef":{"type":"string"},"courtEpimsId":{"type":"string"},"defendant1":{"$ref":"#/components/schemas/Defendant"},"defendant2":{"$ref":"#/components/schemas/Defendant"},"judgmentAdminOrderDate":{"type":"string","format":"date"},"judgmentAdminOrderTotal":{"type":"number"},"judgmentEventTimeStamp":{"type":"string","format":"date-time"},"judgmentId":{"type":"string"},"registrationType":{"type":"string","enum":["R","C","S","M","A","K","V"]},"serviceId":{"type":"string"}}},"JudgmentEventError":{"type":"object","properties":{"errorCode":{"type":"string"},"errorMessage":{"type":"string"}}}}}}
