{"openapi":"3.1.0","info":{"description":"Opal Fines Service","license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"title":"Opal Fines Service","version":"v0.0.1"},"externalDocs":{"description":"README","url":"https://github.com/hmcts/opal-fines-service"},"servers":[{"url":"http://localhost","description":"Generated server url"}],"tags":[{"description":"the Minor Creditor API","name":"Minor Creditor"},{"description":"the Defendant Account API","name":"Defendant Account"}],"paths":{"/":{"get":{"operationId":"welcome","responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"OK"}},"tags":["Root Controller"]}},"/__exc/data-access-resource-failure":{"get":{"operationId":"dataAccessResourceFailure","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/__exc/feign-404":{"get":{"operationId":"feign404","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/__exc/feign-429":{"get":{"operationId":"feign429","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/__exc/feign-502":{"get":{"operationId":"feign502","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/__exc/feign-503":{"get":{"operationId":"feign503","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/__exc/feign-504":{"get":{"operationId":"feign504","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/__exc/http-503":{"get":{"operationId":"http503","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/__exc/jpa-serial-failure":{"get":{"operationId":"jpaSerialFailure","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/__exc/psql-connectivity":{"get":{"operationId":"psqlConnectivity","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/__exc/psql-other":{"get":{"operationId":"psqlOther","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/__exc/query-timeout":{"get":{"operationId":"queryTimeout","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/__exc/tx-deadlock":{"get":{"operationId":"txDeadlock","responses":{"200":{"description":"OK"}},"tags":["throwing-controller"]}},"/amendments/search":{"post":{"operationId":"postAmendmentsSearch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmendmentSearchDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/SearchDataResponseAmendmentEntity"}}},"description":"OK"}},"summary":"Searches Amendments based upon criteria in request body","tags":["amendment-controller"]}},"/amendments/{amendmentId}":{"get":{"operationId":"getAmendmentById","parameters":[{"in":"path","name":"amendmentId","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/AmendmentEntity"}}},"description":"OK"}},"summary":"Returns the Amendment for the given DB primary key id.","tags":["amendment-controller"]}},"/api/print/enqueue-print-jobs":{"post":{"operationId":"enqueuePrintJobs","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PrintJob"}}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"OK"}},"summary":"Enqueues print jobs for a batch of documents","tags":["Print Controller"]}},"/api/print/generate-pdf":{"post":{"operationId":"generatePdf","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintJob"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"type":"string","format":"byte"}}},"description":"OK"}},"summary":"Generates a PDF from a provided print request","tags":["Print Controller"]}},"/api/print/process-pending-jobs":{"post":{"operationId":"processPendingJobs","responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"OK"}},"summary":"Processes pending print jobs","tags":["Print Controller"]}},"/business-units":{"get":{"operationId":"getBusinessUnitRefData","parameters":[{"in":"query","name":"q","required":false,"schema":{"type":"string"}},{"in":"query","name":"permission","required":false,"schema":{"type":"string","enum":["CREATE_MANAGE_DRAFT_ACCOUNTS","ACCOUNT_ENQUIRY_NOTES","ACCOUNT_ENQUIRY","COLLECTION_ORDER","CHECK_VALIDATE_DRAFT_ACCOUNTS","SEARCH_AND_VIEW_ACCOUNTS","ACCOUNT_MAINTENANCE","AMEND_PAYMENT_TERMS","ENTER_ENFORCEMENT","CONSOLIDATE","ADD_AND_REMOVE_PAYMENT_HOLD"]}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/BusinessUnitReferenceDataResults"}}},"description":"OK"}},"summary":"Returns Business Units as reference data with an optional filter applied","tags":["BusinessUnit Controller"]}},"/business-units/search":{"post":{"operationId":"postBusinessUnitsSearch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessUnitSearchDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BusinessUnitFullEntity"}}}},"description":"OK"}},"summary":"Searches BusinessUnits based upon criteria in request body","tags":["BusinessUnit Controller"]}},"/business-units/{businessUnitId}":{"get":{"operationId":"getBusinessUnitById","parameters":[{"in":"path","name":"businessUnitId","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/BusinessUnitFullEntity"}}},"description":"OK"}},"summary":"Returns the BusinessUnit for the given businessUnitId.","tags":["BusinessUnit Controller"]}},"/courts":{"get":{"operationId":"getCourtRefData","parameters":[{"in":"query","name":"q","required":false,"schema":{"type":"string"}},{"in":"query","name":"business_unit","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/CourtReferenceDataResults"}}},"description":"OK"}},"summary":"Returns courts as reference data with an optional filter applied","tags":["Court Controller"]}},"/courts/search":{"post":{"operationId":"postCourtsSearch","parameters":[{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourtSearchDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/SearchDataResponseLite"}}},"description":"OK"}},"summary":"Searches courts based upon criteria in request body","tags":["Court Controller"]}},"/courts/{courtId}":{"get":{"operationId":"getCourtById","parameters":[{"in":"path","name":"courtId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/Lite"}}},"description":"OK"}},"summary":"Returns the court for the given courtId.","tags":["Court Controller"]}},"/defendant-accounts/search":{"post":{"operationId":"postDefendantAccountSearch","parameters":[{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSearchDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/DefendantAccountSearchResultsDto"}}},"description":"OK"}},"summary":"Searches defendant accounts based upon criteria in request body","tags":["Defendant Account Controller"]}},"/defendant-accounts/{defendantAccountId}":{"patch":{"operationId":"updateDefendantAccount","parameters":[{"in":"path","name":"defendantAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}},{"in":"header","name":"Business-Unit-Id","required":true,"schema":{"type":"string"}},{"in":"header","name":"If-Match","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDefendantAccountRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefendantAccountResponse"}}},"description":"OK"}},"summary":"Update defendant account (comments, notes, enforcement details)","tags":["Defendant Account Controller"]}},"/defendant-accounts/{defendantAccountId}/at-a-glance":{"get":{"operationId":"getAtAGlance","parameters":[{"in":"path","name":"defendantAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/DefendantAccountAtAGlanceResponse"}}},"description":"OK"}},"summary":"Get At A Glance details for a given defendant account","tags":["Defendant Account Controller"]}},"/defendant-accounts/{defendantAccountId}/defendant-account-parties/{defendantAccountPartyId}":{"get":{"operationId":"getDefendantAccountParty","parameters":[{"in":"path","name":"defendantAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"path","name":"defendantAccountPartyId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetDefendantAccountPartyResponse"}}},"description":"OK"}},"summary":"Get details for a defendant account party","tags":["Defendant Account Controller"]},"put":{"operationId":"replaceDefendantAccountParty","parameters":[{"in":"path","name":"defendantAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"path","name":"defendantAccountPartyId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Business-Unit-Id","required":true,"schema":{"type":"string"}},{"in":"header","name":"If-Match","required":false,"schema":{"type":"string"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefendantAccountParty"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetDefendantAccountPartyResponse"}}},"description":"OK"}},"summary":"Get defendant account details by providing the defendant account summary","tags":["Defendant Account Controller"]}},"/defendant-accounts/{defendantAccountId}/enforcements":{"post":{"operationId":"addEnforcement","parameters":[{"in":"path","name":"defendantAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}},{"in":"header","name":"Business-Unit-Id","required":true,"schema":{"type":"string"}},{"in":"header","name":"If-Match","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDefendantAccountEnforcementRequest"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/AddEnforcementResponse"}}},"description":"OK"}},"summary":"Create an enforcement for a given defendant account","tags":["Defendant Account Controller"]}},"/defendant-accounts/{defendantAccountId}/fixed-penalty":{"get":{"operationId":"getDefendantAccountFixedPenalty","parameters":[{"in":"path","name":"defendantAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetDefendantAccountFixedPenaltyResponse"}}},"description":"OK"}},"summary":"Retrieve Fixed Penalty Offence details for a given Defendant Account","tags":["Defendant Account Controller"]}},"/defendant-accounts/{defendantAccountId}/header-summary":{"get":{"operationId":"getHeaderSummary","parameters":[{"in":"path","name":"defendantAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/DefendantAccountHeaderSummary"}}},"description":"OK"}},"summary":"Get defendant account details by providing the defendant account summary","tags":["Defendant Account Controller"]}},"/defendant-accounts/{defendantAccountId}/payment-card-request":{"post":{"operationId":"addPaymentCardRequest","parameters":[{"in":"path","name":"defendantAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}},{"in":"header","name":"Business-Unit-Id","required":true,"schema":{"type":"string"}},{"in":"header","name":"Business-Unit-User-Id","required":false,"schema":{"type":"string"}},{"in":"header","name":"If-Match","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/AddPaymentCardRequestResponse"}}},"description":"OK"}},"summary":"Create a payment card request for a given defendant account","tags":["Defendant Account Controller"]}},"/defendant-accounts/{defendantAccountId}/payment-terms":{"post":{"operationId":"addPaymentTerms","parameters":[{"in":"path","name":"defendantAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Business-Unit-Id","required":true,"schema":{"type":"string"}},{"in":"header","name":"If-Match","required":false,"schema":{"type":"string"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDefendantAccountPaymentTermsRequest"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetDefendantAccountPaymentTermsResponse"}}},"description":"OK"}},"summary":"Add Payment Terms to a defendant account","tags":["Defendant Account Controller"]}},"/defendant-accounts/{defendantAccountId}/payment-terms/latest":{"get":{"operationId":"defendantAccountPaymentTerms","parameters":[{"in":"path","name":"defendantAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetDefendantAccountPaymentTermsResponse"}}},"description":"OK"}},"summary":"Get defendant account details by providing the defendant account summary","tags":["Defendant Account Controller"]}},"/defendant-accounts/{id}/enforcement-status":{"get":{"description":"The Get Defendant Account Enforcement Status API will be used to return the enforcement related information relating to a defendant account.","operationId":"getEnforcementStatus","parameters":[{"description":"DB Mapping - defendant_accounts.defendant_account_id","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}},{"description":"Bearer token","in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEnforcementStatusResponse"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/GetEnforcementStatusResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Internal server error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Service unavailable"}},"summary":"Get Defendant Account Enforcement Status","tags":["Defendant Account"]}},"/defendant-accounts/{id}/header-summary-openapi-autogenerated-version":{"get":{"description":"Returns a Header Summary for a Defendant Account.","operationId":"getDefendantAccountHeaderSummary","parameters":[{"description":"DB Mapping - defendant_accounts.defendant_account_id","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDefendantAccountHeaderSummary200Response"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/GetDefendantAccountHeaderSummary200Response"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Internal server error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Service unavailable"}},"summary":"Get Defendant Account Header Summary","tags":["Defendant Account"]}},"/defendant-accounts/{id}/impositions":{"get":{"description":"The Get Defendant Account Impositions API is used return an array of data relating to impositions on a defendant account, which populates the on screen table.","operationId":"getDefendantAccountImpositions","parameters":[{"description":"DB Mapping - defendant_accounts.defendant_account_id","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpositionSummaryCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ImpositionSummaryCommon"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Internal server error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Service unavailable"}},"summary":"Get Defendant Account Impositions","tags":["Defendant Account"]}},"/draft-accounts":{"get":{"operationId":"getDraftAccountSummaries","parameters":[{"in":"query","name":"business_unit","required":false,"schema":{"type":"array","items":{"type":"integer","format":"int32"}}},{"in":"query","name":"status","required":false,"schema":{"type":"array","items":{"type":"string","enum":["Submitted","Rejected","Deleted","Approved","Resubmitted","Publishing Pending","Legacy Response Pending","Published","Publishing Failed"]}}},{"in":"query","name":"submitted_by","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"not_submitted_by","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"account_status_date_from","required":false,"schema":{"type":"string","format":"date"}},{"in":"query","name":"account_status_date_to","required":false,"schema":{"type":"string","format":"date"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/DraftAccountsResponseDto"}}},"description":"OK"}},"summary":"Returns a collection of draft accounts summaries for the given user.","tags":["DraftAccount Controller"]},"post":{"operationId":"postDraftAccount","parameters":[{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDraftAccountRequestDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/DraftAccountResponseDto"}}},"description":"OK"}},"summary":"Creates a Draft Account Entity in the DB based upon data in request body","tags":["DraftAccount Controller"]}},"/draft-accounts/search":{"post":{"operationId":"postDraftAccountsSearch","parameters":[{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAccountSearchDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DraftAccountResponseDto"}}}},"description":"OK"}},"summary":"Searches Draft Accounts based upon criteria in request body","tags":["DraftAccount Controller"]}},"/draft-accounts/{draftAccountId}":{"get":{"operationId":"getDraftAccountById","parameters":[{"in":"path","name":"draftAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/DraftAccountResponseDto"}}},"description":"OK"}},"summary":"Returns the Draft Account for the given draftAccountId.","tags":["DraftAccount Controller"]},"patch":{"operationId":"patchDraftAccount","parameters":[{"in":"path","name":"draftAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDraftAccountRequestDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/DraftAccountResponseDto"}}},"description":"OK"}},"summary":"Updates an existing Draft Account Entity in the DB with data in request body","tags":["DraftAccount Controller"]},"put":{"operationId":"putDraftAccount","parameters":[{"in":"path","name":"draftAccountId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceDraftAccountRequestDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/DraftAccountResponseDto"}}},"description":"OK"}},"summary":"Replaces an existing Draft Account Entity in the DB with data in request body","tags":["DraftAccount Controller"]}},"/enforcers":{"get":{"operationId":"getEnforcersRefData","parameters":[{"in":"query","name":"q","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/EnforcerReferenceDataResults"}}},"description":"OK"}},"summary":"Returns Enforcers as reference data with an optional filter applied","tags":["Enforcer Controller"]}},"/enforcers/search":{"post":{"operationId":"postEnforcersSearch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnforcerSearchDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnforcerEntity"}}}},"description":"OK"}},"summary":"Searches Enforcers based upon criteria in request body","tags":["Enforcer Controller"]}},"/enforcers/{enforcerId}":{"get":{"operationId":"getEnforcerById","parameters":[{"in":"path","name":"enforcerId","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/EnforcerEntity"}}},"description":"OK"}},"summary":"Returns the Enforcer for the given enforcerId.","tags":["Enforcer Controller"]}},"/local-justice-areas":{"get":{"operationId":"getLocalJusticeAreaRefData","parameters":[{"in":"query","name":"q","required":false,"schema":{"type":"string"}},{"in":"query","name":"lja_type","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/LjaReferenceDataResults"}}},"description":"OK"}},"summary":"Returns Local Justice Area as reference data with an optional filter applied","tags":["LocalJusticeArea Controller"]}},"/local-justice-areas/search":{"post":{"operationId":"postLocalJusticeAreasSearch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalJusticeAreaSearchDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LocalJusticeAreaEntity"}}}},"description":"OK"}},"summary":"Searches LocalJusticeAreas based upon criteria in request body","tags":["LocalJusticeArea Controller"]}},"/local-justice-areas/{localJusticeAreaId}":{"get":{"operationId":"getLocalJusticeAreaById","parameters":[{"in":"path","name":"localJusticeAreaId","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/LocalJusticeAreaEntity"}}},"description":"OK"}},"summary":"Returns the LocalJusticeArea for the given localJusticeAreaId.","tags":["LocalJusticeArea Controller"]}},"/major-creditors":{"get":{"operationId":"getMajorCreditorRefData","parameters":[{"in":"query","name":"q","required":false,"schema":{"type":"string"}},{"in":"query","name":"businessUnit","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/MajorCreditorReferenceDataResults"}}},"description":"OK"}},"summary":"Returns MajorCreditors as reference data with an optional filter applied","tags":["Major Creditor Controller"]}},"/major-creditors/search":{"post":{"operationId":"postMajorCreditorsSearch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MajorCreditorSearchDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MajorCreditorFullEntity"}}}},"description":"OK"}},"summary":"Searches MajorCreditors based upon criteria in request body","tags":["Major Creditor Controller"]}},"/major-creditors/{majorCreditorId}":{"get":{"operationId":"getMajorCreditorById","parameters":[{"in":"path","name":"majorCreditorId","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/MajorCreditorFullEntity"}}},"description":"OK"}},"summary":"Returns the MajorCreditor for the given majorCreditorId.","tags":["Major Creditor Controller"]}},"/minor-creditor-accounts/search":{"post":{"operationId":"postMinorCreditorsSearch","parameters":[{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MinorCreditorSearch"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/PostMinorCreditorAccountsSearchResponse"}}},"description":"OK"}},"summary":"Searches MinorCreditors based upon criteria in request body","tags":["Minor Creditor Controller"]}},"/minor-creditor-accounts/{id}":{"get":{"description":"The Get Minor Creditor Account will be used to return the low level data associated to the minor creditor account - such as personal details for the minor creditor, and payment details.","operationId":"getMinorCreditorAccount","parameters":[{"description":"DB Mapping - creditor_accounts.creditor_account_id","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MinorCreditorAccountResponseMinorCreditor"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/MinorCreditorAccountResponseMinorCreditor"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Internal server error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Service unavailable"}},"summary":"Get Minor Creditor Account","tags":["Minor Creditor"]},"patch":{"description":"The Update Minor Creditor Account will be used to update individual attributes of a Minor Creditor Account.","operationId":"patchMinorCreditorAccount","parameters":[{"description":"DB Mapping - creditor_accounts.creditor_account_id","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}},{"description":"Version of the minor creditor account. DB Mapping - creditor_accounts.version","in":"header","name":"ETag","required":false,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchMinorCreditorAccountRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MinorCreditorAccountResponseMinorCreditor"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/MinorCreditorAccountResponseMinorCreditor"}}},"description":"CREATED"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Internal server error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}},"application/json+problem":{"schema":{"$ref":"#/components/schemas/ProblemDetailCommon"}}},"description":"Service unavailable"}},"summary":"Update Minor Creditor Account","tags":["Minor Creditor"]}},"/minor-creditor-accounts/{minorCreditorId}/at-a-glance":{"get":{"operationId":"getMinorCreditorsAtAGlance","parameters":[{"in":"path","name":"minorCreditorId","required":true,"schema":{"type":"string"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetMinorCreditorAccountAtAGlanceResponse"}}},"description":"OK"}},"summary":"Get Minor Creditor Account At A Glance","tags":["Minor Creditor Controller"]}},"/minor-creditor-accounts/{minorCreditorId}/header-summary":{"get":{"operationId":"getMinorCreditorAccountHeaderSummary","parameters":[{"in":"path","name":"minorCreditorId","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMinorCreditorAccountHeaderSummaryResponse"}}},"description":"OK"}},"summary":"Gets Minor Creditor account header summary for the given minorCreditorId","tags":["Minor Creditor Controller"]}},"/notes/add":{"post":{"operationId":"addNote","parameters":[{"in":"header","name":"Authorization","required":false,"schema":{"type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddNoteRequest"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"OK"}},"summary":"adds a note to an entity","tags":["Notes Controller"]}},"/offences":{"get":{"operationId":"getOffenceRefData","parameters":[{"in":"query","name":"q","required":false,"schema":{"type":"string"}},{"in":"query","name":"business_unit_id","required":false,"schema":{"type":"integer","format":"int32"}},{"in":"query","name":"cjs_code","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/OffenceReferenceDataResults"}}},"description":"OK"}},"summary":"Returns 'global' Offences as reference data with an optional filter applied. If the business unit is provided, then that is used to return only 'local' offences for that business unit, or ALL local offences if the business unit provided is zero.","tags":["Offence Controller"]}},"/offences/search":{"post":{"operationId":"postOffencesSearch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OffenceSearchDto"}}},"required":true},"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/OffenceSearchDataResults"}}},"description":"OK"}},"summary":"Searches Offences based upon criteria in request body","tags":["Offence Controller"]}},"/offences/{offenceId}":{"get":{"operationId":"getOffenceById","parameters":[{"in":"path","name":"offenceId","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/OffenceFullEntity"}}},"description":"OK"}},"summary":"Returns the Offence for the given offenceId.","tags":["Offence Controller"]}},"/prosecutors":{"get":{"operationId":"getProsecutorsRefData","parameters":[{"in":"query","name":"q","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/RefDataResponseProsecutorReferenceData"}}},"description":"OK"}},"summary":"Returns Prosecutors as reference data with an optional filter applied","tags":["Prosecutor Controller"]}},"/prosecutors/{prosecutorId}":{"get":{"operationId":"getProsecutorById","parameters":[{"in":"path","name":"prosecutorId","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProsecutorEntity"}}},"description":"OK"}},"summary":"Returns the Prosecutor for the given prosecutorId.","tags":["Prosecutor Controller"]}},"/results":{"get":{"operationId":"getResults","parameters":[{"in":"query","name":"result_ids","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"active","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"manual_enforcement_only","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"generates_hearing","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"enforcement","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"enforcement_override","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultReferenceDataResponse"}}},"description":"OK"}},"summary":"Returns all results or results for the given resultIds.","tags":["Result Controller"]}},"/results/{resultId}":{"get":{"operationId":"getResultById","parameters":[{"in":"path","name":"resultId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultDto"}}},"description":"OK"}},"summary":"Returns the full ResultDto for the given resultId.","tags":["Result Controller"]}},"/s2s/create-fine-accounts":{"post":{"operationId":"createFineAccounts","parameters":[{"in":"query","name":"createFineAccountsRequest","required":true,"schema":{"$ref":"#/components/schemas/OpalS2SRequestWrapper"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/OpalS2SResponseWrapper"}}},"description":"OK"}},"summary":"cpp interface: creates fine accounts by criteria in request body xml.","tags":["Create Fine Account Controller"]}},"/s2s/debtor-profiles":{"post":{"operationId":"searchDebtorProfile","parameters":[{"in":"query","name":"debtorProfileRequest","required":true,"schema":{"$ref":"#/components/schemas/OpalS2SRequestWrapper"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/OpalS2SResponseWrapper"}}},"description":"OK"}},"summary":"cpp interface: Searches for debtor profile by criteia in request body xml.","tags":["Debtor Profile Search Controller"]}},"/testing-support/app-mode":{"get":{"operationId":"getAppMode","responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/AppMode"}}},"description":"OK"}},"summary":"Retrieves the value for app mode.","tags":["Testing Support Controller"]}},"/testing-support/defendant-accounts/{defendantAccountId}":{"delete":{"operationId":"deleteDefendantAccountWithAllData","parameters":[{"in":"path","name":"defendantAccountId","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}},"summary":"Deletes a defendant account and ALL associated data. FOR TESTING ONLY!","tags":["Testing Support Controller"]}},"/testing-support/launchdarkly/bool/{featureKey}":{"get":{"operationId":"isFeatureEnabled","parameters":[{"in":"path","name":"featureKey","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"type":"boolean"}}},"description":"OK"}},"tags":["Testing Support Controller"]}},"/testing-support/launchdarkly/string/{featureKey}":{"get":{"operationId":"getFeatureValue","parameters":[{"in":"path","name":"featureKey","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"OK"}},"tags":["Testing Support Controller"]}},"/testing-support/token/parse":{"get":{"operationId":"parseToken","parameters":[{"in":"header","name":"Authorization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"OK"}},"tags":["Testing Support Controller"]}},"/testing-support/user-client/{userId}":{"get":{"operationId":"getUserState","parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserState"}}},"description":"OK"}},"summary":"Retrieves user state via User Service client","tags":["Testing Support Controller"]}}},"components":{"schemas":{"AccountSearchDto":{"type":"object","properties":{"active_accounts_only":{"type":"boolean"},"business_unit_ids":{"type":"array","items":{"type":"integer","format":"int32"},"minItems":1},"consolidation_search":{"type":"boolean"},"defendant":{"$ref":"#/components/schemas/DefendantDto"},"reference_number":{"$ref":"#/components/schemas/ReferenceNumberDto"}},"required":["active_accounts_only","business_unit_ids","defendant"]},"AccountStatusReference":{"type":"object","properties":{"account_status_code":{"type":"string"},"account_status_display_name":{"type":"string"}}},"AccountStatusReferenceCommon":{"type":"object","properties":{"account_status_code":{"type":"string","enum":["L","C","TO","TS","TA","CS","WO"]},"account_status_display_name":{"type":"string"}},"required":["account_status_code","account_status_display_name"]},"AddDefendantAccountEnforcementRequest":{"type":"object","properties":{"enforcement_result_responses":{"type":"array","items":{"$ref":"#/components/schemas/ResultResponse"}},"payment_terms":{"$ref":"#/components/schemas/PaymentTerms"},"result_id":{"type":"string","enum":["ABDC","AEO","AEOC","BWTU","CLAMPO","COLLO","CONF","CW","DW","FSN","HTT","INTL","MPSO","NAP","NBWT","NOENF","PRIS","REGF","REM","S136","SC","UPWO","WDN"]}}},"AddDefendantAccountPaymentTermsRequest":{"type":"object","properties":{"generate_payment_terms_change_letter":{"type":"boolean"},"payment_terms":{"$ref":"#/components/schemas/PaymentTerms"},"request_payment_card":{"type":"boolean"}}},"AddDraftAccountRequestDto":{"type":"object","properties":{"account":{"type":"string"},"account_snapshot":{"type":"string"},"account_type":{"type":"string","minLength":1},"business_unit_id":{"type":"integer","format":"int32"},"created_at":{"type":"string","format":"date-time"},"draft_account_id":{"type":"integer","format":"int64"},"submitted_by":{"type":"string"},"submitted_by_name":{"type":"string"},"timeline_data":{"type":"string"},"validated_at":{"type":"string","format":"date-time"},"validated_by":{"type":"string"}},"required":["account","account_type","business_unit_id","timeline_data"]},"AddEnforcementResponse":{"type":"object","properties":{"defendant_account_id":{"type":"string","minLength":1},"enforcement_id":{"type":"string","minLength":1},"version":{"type":"integer","format":"int32"}},"required":["defendant_account_id","enforcement_id"]},"AddNoteRequest":{"type":"object","properties":{"activity_note":{"$ref":"#/components/schemas/Note"}}},"AddPaymentCardRequestResponse":{"type":"object","properties":{"defendant_account_id":{"type":"integer","format":"int64"}}},"AddressDetails":{"type":"object","properties":{"address_line_1":{"type":"string"},"address_line_2":{"type":"string"},"address_line_3":{"type":"string"},"address_line_4":{"type":"string"},"address_line_5":{"type":"string"},"postcode":{"type":"string"}}},"AddressDetailsCommon":{"type":"object","properties":{"address_line_1":{"type":"string"},"address_line_2":{"type":"string"},"address_line_3":{"type":"string"},"address_line_4":{"type":"string"},"address_line_5":{"type":"string"},"postcode":{"type":"string"}}},"AliasDto":{"type":"object","properties":{"alias_number":{"type":"integer","format":"int32"},"forenames":{"type":"string"},"organisation_name":{"type":"string"},"surname":{"type":"string"}}},"AmendmentEntity":{"type":"object","properties":{"amended_by":{"type":"string"},"amended_date":{"type":"string","format":"date"},"amendment_id":{"type":"integer","format":"int64"},"associated_record_id":{"type":"string"},"associated_record_type":{"type":"string"},"business_unit_id":{"type":"integer","format":"int32"},"case_reference":{"type":"string"},"field_code":{"type":"integer","format":"int32"},"function_code":{"type":"string"},"new_value":{"type":"string"},"old_value":{"type":"string"}}},"AmendmentSearchDto":{"type":"object","properties":{"amended_by":{"type":"string"},"amended_date":{"type":"string"},"amendment_id":{"type":"string"},"associated_record_id":{"type":"string"},"associated_record_type":{"type":"string"},"business_unit_id":{"type":"string"},"case_reference":{"type":"string"},"field_code":{"type":"string"},"function_code":{"type":"string"},"new_value":{"type":"string"},"old_value":{"type":"string"}}},"AppMode":{"type":"object","properties":{"mode":{"type":"string"}}},"AtAGlanceDefendant":{"type":"object","properties":{"account_id":{"type":"integer","format":"int64"},"account_number":{"type":"string"}}},"BusinessUnitFullEntity":{"type":"object","properties":{"accountNumberPrefix":{"type":"string"},"businessUnitCode":{"type":"string"},"businessUnitId":{"type":"integer","format":"int32"},"businessUnitName":{"type":"string"},"businessUnitType":{"type":"string","enum":["Accounting Division","Area"]},"configurationItems":{"type":"array","items":{"$ref":"#/components/schemas/ConfigurationItemFullEntity"}},"opalDomain":{"type":"string"},"parentBusinessUnit":{"$ref":"#/components/schemas/BusinessUnitFullEntity"},"welshLanguage":{"type":"boolean"}}},"BusinessUnitReferenceData":{"type":"object","properties":{"account_number_prefix":{"type":"string"},"business_unit_code":{"type":"string"},"business_unit_id":{"type":"integer","format":"int32"},"business_unit_name":{"type":"string"},"business_unit_type":{"type":"string"},"configuration_items":{"type":"array","items":{"$ref":"#/components/schemas/ConfigItemRefData"}},"opal_domain":{"type":"string"},"welsh_language":{"type":"boolean"}}},"BusinessUnitReferenceDataResults":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"refData":{"type":"array","items":{"$ref":"#/components/schemas/BusinessUnitReferenceData"}}}},"BusinessUnitSearchDto":{"type":"object","properties":{"accountNumberPrefix":{"type":"string"},"businessUnitCode":{"type":"string"},"businessUnitId":{"type":"string"},"businessUnitName":{"type":"string"},"businessUnitType":{"type":"string"},"parentBusinessUnitId":{"type":"string"}}},"BusinessUnitSummary":{"type":"object","properties":{"business_unit_id":{"type":"string"},"business_unit_name":{"type":"string"},"welsh_speaking":{"type":"string"}}},"BusinessUnitSummaryCommon":{"type":"object","properties":{"business_unit_id":{"type":"string"},"business_unit_name":{"type":"string"},"welsh_speaking":{"type":"string"}},"required":["business_unit_id","business_unit_name","welsh_speaking"]},"BusinessUnitUser":{"type":"object","properties":{"business_unit_id":{"type":"integer","format":"int32"},"business_unit_user_id":{"type":"string"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/Permission"},"uniqueItems":true}}},"Checks":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/WarnError"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/WarnError"}}}},"CollectionOrderCommon":{"type":"object","properties":{"collection_order_date":{"type":"string","format":"date","description":"The date when the collection order was applied"},"collection_order_flag":{"type":"boolean","description":"Flag indicating if a collection order is applied to the account"}},"required":["collection_order_date","collection_order_flag"]},"CollectionOrderDto":{"type":"object","properties":{"collection_order_date":{"type":"string"},"collection_order_flag":{"type":"boolean"}}},"CommentsAndNotes":{"type":"object","properties":{"account_comment":{"type":"string"},"free_text_note_1":{"type":"string"},"free_text_note_2":{"type":"string"},"free_text_note_3":{"type":"string"}}},"ConfigItemRefData":{"type":"object","properties":{"item_name":{"type":"string"},"item_value":{"type":"string"},"item_values":{"type":"array","items":{"type":"string"}}}},"ConfigurationItemFullEntity":{"type":"object","properties":{"businessUnit":{},"businessUnitId":{"type":"integer","format":"int32"},"configurationItemId":{"type":"integer","format":"int64"},"itemName":{"type":"string"},"itemValue":{"type":"string"},"itemValues":{"type":"array","items":{"type":"string"}}}},"ContactDetails":{"type":"object","properties":{"home_telephone_number":{"type":"string"},"mobile_telephone_number":{"type":"string"},"primary_email_address":{"type":"string"},"secondary_email_address":{"type":"string"},"work_telephone_number":{"type":"string"}}},"CourtReferenceCommon":{"type":"object","properties":{"court_code":{"type":"integer","format":"int32"},"court_id":{"type":"integer","format":"int64"},"court_name":{"type":"string"}},"required":["court_id","court_name"]},"CourtReferenceData":{"type":"object","properties":{"business_unit_id":{"type":"integer","format":"int32"},"court_code":{"type":"integer","format":"int32"},"court_id":{"type":"integer","format":"int64"},"court_type":{"type":"string"},"division":{"type":"string"},"lja":{"type":"integer","format":"int32"},"name":{"type":"string"}}},"CourtReferenceDataResults":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"refData":{"type":"array","items":{"$ref":"#/components/schemas/CourtReferenceData"}}}},"CourtReferenceDto":{"type":"object","properties":{"court_id":{"type":"integer","format":"int32"},"court_name":{"type":"string"}}},"CourtSearchDto":{"type":"object","properties":{"addressLine":{"type":"string"},"addressLineCy":{"type":"string"},"businessUnitId":{"type":"string"},"courtCode":{"type":"string"},"courtId":{"type":"string"},"courtType":{"type":"string"},"division":{"type":"string"},"localJusticeAreaId":{"type":"string"},"name":{"type":"string"},"nameCy":{"type":"string"},"postcode":{"type":"string"}}},"Creditor":{"type":"object","properties":{"address_line_1":{"type":"string"},"exact_match_forenames":{"type":"boolean"},"exact_match_organisation_name":{"type":"boolean"},"exact_match_surname":{"type":"boolean"},"forenames":{"type":"string"},"organisation":{"type":"boolean"},"organisation_name":{"type":"string"},"postcode":{"type":"string"},"surname":{"type":"string"}}},"CreditorAccountDto":{"type":"object","properties":{"account_balance":{"type":"number"},"account_number":{"type":"string"},"address_line_1":{"type":"string"},"business_unit_id":{"type":"string"},"business_unit_name":{"type":"string"},"creditor_account_id":{"type":"string"},"defendant":{"$ref":"#/components/schemas/DefendantDto"},"firstnames":{"type":"string"},"organisation":{"type":"boolean"},"organisation_name":{"type":"string"},"postcode":{"type":"string"},"surname":{"type":"string"}}},"CreditorAccountFullEntity":{"type":"object","properties":{"accountNumber":{"type":"string"},"bankAccountName":{"type":"string"},"bankAccountNumber":{"type":"string"},"bankAccountReference":{"type":"string"},"bankAccountType":{"type":"string"},"bankSortCode":{"type":"string"},"businessUnit":{"$ref":"#/components/schemas/BusinessUnitFullEntity"},"businessUnitId":{"type":"integer","format":"int32"},"creditorAccountId":{"type":"integer","format":"int64"},"creditorAccountType":{"type":"string","enum":["CF","MJ","MN"]},"fromSuspense":{"type":"boolean"},"holdPayout":{"type":"boolean"},"lastChangedDate":{"type":"string","format":"date-time"},"majorCreditor":{"$ref":"#/components/schemas/MajorCreditorFullEntity"},"majorCreditorId":{"type":"integer","format":"int64"},"minorCreditorPartyId":{"type":"integer","format":"int64"},"payByBacs":{"type":"boolean"},"prosecutionService":{"type":"boolean"},"version":{"type":"integer"},"versionNumber":{"type":"integer","format":"int64"}}},"CreditorAccountPaymentDetailsCommon":{"type":"object","properties":{"account_name":{"type":"string","description":"DB Mapping - creditor_accounts.bank_account_name","maxLength":18,"minLength":1},"account_number":{"type":"string","description":"DB Mapping - creditor_accounts.bank_account_number","maxLength":10,"minLength":1},"account_reference":{"type":"string","description":"DB Mapping - creditor_accounts.bank_account_reference","maxLength":18,"minLength":1},"hold_payment":{"type":"boolean","description":"DB Mapping - creditor_accounts.hold_payout"},"pay_by_bacs":{"type":"boolean","description":"DB Mapping - creditor_accounts.pay_by_bacs"},"sort_code":{"type":"string","description":"DB Mapping - creditor_accounts.bank_sort_code","maxLength":6,"minLength":1}},"required":["hold_payment","pay_by_bacs"]},"CreditorAccountTypeReference":{"type":"object","properties":{"display_name":{"type":"string"},"type":{"type":"string"}}},"CreditorAccountTypeReferenceCommon":{"type":"object","properties":{"account_type":{"type":"string","description":"DB Mapping - creditor_accounts.creditor_account_type","enum":["MN","MJ","CF"]},"display_name":{"type":"string","description":"Converts the short hand code of creditor_accounts.creditor_account_type into a display name. Mapping:   'MN' becomes 'Minor Creditor'   'MJ' becomes 'Major Creditor'   'CF' becomes 'Central Fund' ","enum":["Minor Creditor","Major Creditor","Central Fund"]}}},"DefendantAccountAtAGlanceResponse":{"type":"object","properties":{"account_number":{"type":"string"},"address":{"$ref":"#/components/schemas/AddressDetails"},"comments_and_notes":{"$ref":"#/components/schemas/CommentsAndNotes"},"debtor_type":{"type":"string"},"defendant_account_id":{"type":"string"},"enforcement_status":{"$ref":"#/components/schemas/EnforcementStatusSummary"},"is_youth":{"type":"boolean"},"language_preferences":{"$ref":"#/components/schemas/LanguagePreferences"},"party_details":{"$ref":"#/components/schemas/PartyDetails"},"payment_terms":{"$ref":"#/components/schemas/PaymentTermsSummary"}}},"DefendantAccountHeaderSummary":{"type":"object","properties":{"account_number":{"type":"string"},"account_status_reference":{"$ref":"#/components/schemas/AccountStatusReference"},"account_type":{"type":"string"},"business_unit_summary":{"$ref":"#/components/schemas/BusinessUnitSummary"},"debtor_type":{"type":"string"},"defendant_account_id":{"type":"string"},"defendant_account_party_id":{"type":"string"},"fixed_penalty_ticket_number":{"type":"string"},"is_youth":{"type":"boolean"},"parent_guardian_party_id":{"type":"string"},"party_details":{"$ref":"#/components/schemas/PartyDetails"},"payment_state_summary":{"$ref":"#/components/schemas/PaymentStateSummary"},"prosecutor_case_reference":{"type":"string"}}},"DefendantAccountParty":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/AddressDetails"},"contact_details":{"$ref":"#/components/schemas/ContactDetails"},"defendant_account_party_type":{"type":"string"},"employer_details":{"$ref":"#/components/schemas/EmployerDetails"},"is_debtor":{"type":"boolean"},"language_preferences":{"$ref":"#/components/schemas/LanguagePreferences"},"party_details":{"$ref":"#/components/schemas/PartyDetails"},"vehicle_details":{"$ref":"#/components/schemas/VehicleDetails"}}},"DefendantAccountResponse":{"type":"object","properties":{"collection_order":{"$ref":"#/components/schemas/CollectionOrderDto"},"comment_and_notes":{"$ref":"#/components/schemas/CommentsAndNotes"},"enforcement_court":{"$ref":"#/components/schemas/CourtReferenceDto"},"enforcement_override":{"$ref":"#/components/schemas/EnforcementOverride"},"id":{"type":"integer","format":"int64"}}},"DefendantAccountSearchResultsDto":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"defendant_accounts":{"type":"array","items":{"$ref":"#/components/schemas/DefendantAccountSummaryDto"}}}},"DefendantAccountSummaryDto":{"type":"object","properties":{"account_balance":{"type":"number"},"account_number":{"type":"string"},"account_version":{"type":"integer"},"address_line_1":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/AliasDto"}},"birth_date":{"type":"string"},"business_unit_id":{"type":"string"},"business_unit_name":{"type":"string"},"checks":{"$ref":"#/components/schemas/Checks"},"defendant_account_id":{"type":"string"},"defendant_firstnames":{"type":"string"},"defendant_surname":{"type":"string"},"defendant_title":{"type":"string"},"has_collection_order":{"type":"boolean"},"last_enforcement_action":{"type":"string"},"national_insurance_number":{"type":"string"},"organisation":{"type":"boolean"},"organisation_name":{"type":"string"},"parent_guardian_firstnames":{"type":"string"},"parent_guardian_surname":{"type":"string"},"postcode":{"type":"string"},"prosecutor_case_reference":{"type":"string"}}},"DefendantDto":{"type":"object","properties":{"defendant_account_id":{"type":"string"},"firstnames":{"type":"string"},"organisation":{"type":"boolean"},"organisation_name":{"type":"string"},"surname":{"type":"string"}}},"DraftAccountResponseDto":{"type":"object","properties":{"account":{"type":"string"},"account_id":{"type":"integer","format":"int64"},"account_number":{"type":"string"},"account_snapshot":{"type":"string"},"account_status":{"type":"string","enum":["Submitted","Rejected","Deleted","Approved","Resubmitted","Publishing Pending","Legacy Response Pending","Published","Publishing Failed"]},"account_status_date":{"type":"string","format":"date-time"},"account_type":{"type":"string"},"business_unit_id":{"type":"integer","format":"int32"},"created_at":{"type":"string","format":"date-time"},"draft_account_id":{"type":"integer","format":"int64"},"status_message":{"type":"string"},"submitted_by":{"type":"string"},"submitted_by_name":{"type":"string"},"timeline_data":{"type":"string"},"validated_at":{"type":"string","format":"date-time"},"validated_by":{"type":"string"},"validated_by_name":{"type":"string"}}},"DraftAccountSearchDto":{"type":"object","properties":{"accountStatus":{"type":"string"},"accountType":{"type":"string"},"businessUnitId":{"type":"string"},"draftAccountId":{"type":"string"}}},"DraftAccountSummaryDto":{"type":"object","properties":{"account_id":{"type":"integer","format":"int64"},"account_number":{"type":"string"},"account_snapshot":{"type":"string"},"account_status":{"type":"string","enum":["Submitted","Rejected","Deleted","Approved","Resubmitted","Publishing Pending","Legacy Response Pending","Published","Publishing Failed"]},"account_status_date":{"type":"string","format":"date"},"account_type":{"type":"string"},"business_unit_id":{"type":"integer","format":"int32"},"created_at":{"type":"string","format":"date-time"},"draft_account_id":{"type":"integer","format":"int64"},"status_message":{"type":"string"},"submitted_by":{"type":"string"},"submitted_by_name":{"type":"string"},"validated_at":{"type":"string","format":"date-time"},"validated_by":{"type":"string"},"validated_by_name":{"type":"string"}}},"DraftAccountsResponseDto":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"summaries":{"type":"array","items":{"$ref":"#/components/schemas/DraftAccountSummaryDto"}}}},"EmployerDetails":{"type":"object","properties":{"employer_address":{"$ref":"#/components/schemas/AddressDetails"},"employer_email_address":{"type":"string"},"employer_name":{"type":"string"},"employer_reference":{"type":"string"},"employer_telephone_number":{"type":"string"}}},"EnforcementActionDefendantAccount":{"type":"object","properties":{"date_added":{"type":"string","format":"date-time"},"enforcement_action":{"$ref":"#/components/schemas/ResultReferenceCommon"},"enforcer":{"$ref":"#/components/schemas/EnforcerReferenceCommon"},"reason":{"type":"string"},"result_responses":{"type":"array","items":{"$ref":"#/components/schemas/ResultResponsesCommon"}},"warrant_number":{"type":"string"}},"required":["date_added","enforcement_action"]},"EnforcementOverride":{"type":"object","properties":{"enforcement_override_result":{"$ref":"#/components/schemas/EnforcementOverrideResult"},"enforcer":{"$ref":"#/components/schemas/Enforcer"},"lja":{"$ref":"#/components/schemas/LJA"}}},"EnforcementOverrideCommon":{"type":"object","properties":{"enforcement_override_result":{"$ref":"#/components/schemas/EnforcementOverrideResultReferenceCommon"},"enforcer":{"$ref":"#/components/schemas/EnforcerReferenceCommon"},"lja":{"$ref":"#/components/schemas/LjaReferenceCommon"}},"required":["enforcement_override_result"]},"EnforcementOverrideResult":{"type":"object","properties":{"enforcement_override_result_id":{"type":"string"},"enforcement_override_result_title":{"type":"string"}}},"EnforcementOverrideResultReferenceCommon":{"type":"object","properties":{"enforcement_override_result_id":{"type":"string"},"enforcement_override_result_name":{"type":"string"}},"required":["enforcement_override_result_id","enforcement_override_result_name"]},"EnforcementOverviewDefendantAccount":{"type":"object","properties":{"collection_order":{"$ref":"#/components/schemas/CollectionOrderCommon"},"days_in_default":{"type":"integer","format":"int32"},"enforcement_court":{"$ref":"#/components/schemas/CourtReferenceCommon"}},"required":["collection_order","enforcement_court"]},"EnforcementStatusSummary":{"type":"object","properties":{"collection_order_made":{"type":"boolean"},"default_days_in_jail":{"type":"integer","format":"int32"},"enforcement_override":{"$ref":"#/components/schemas/EnforcementOverride"},"last_enforcement_action":{"$ref":"#/components/schemas/LastEnforcementAction"},"last_movement_date":{"type":"string","format":"date"}}},"Enforcer":{"type":"object","properties":{"enforcer_id":{"type":"integer","format":"int64"},"enforcer_name":{"type":"string"}}},"EnforcerEntity":{"type":"object","properties":{"addressLine1":{"type":"string"},"addressLine1Cy":{"type":"string"},"addressLine2":{"type":"string"},"addressLine2Cy":{"type":"string"},"addressLine3":{"type":"string"},"addressLine3Cy":{"type":"string"},"businessUnit":{"$ref":"#/components/schemas/BusinessUnitFullEntity"},"enforcerCode":{"type":"integer","format":"int32"},"enforcerId":{"type":"integer","format":"int64"},"name":{"type":"string"},"nameCy":{"type":"string"},"postcode":{"type":"string"},"warrantReferenceSequence":{"type":"string"},"warrantRegisterSequence":{"type":"integer","format":"int32"}}},"EnforcerReferenceCommon":{"type":"object","properties":{"enforcer_id":{"type":"integer","format":"int64"},"enforcer_name":{"type":"string"}},"required":["enforcer_id","enforcer_name"]},"EnforcerReferenceData":{"type":"object","properties":{"enforcer_code":{"type":"integer","format":"int32"},"enforcer_id":{"type":"integer","format":"int64"},"name":{"type":"string"},"name_cy":{"type":"string"}}},"EnforcerReferenceDataResults":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"refData":{"type":"array","items":{"$ref":"#/components/schemas/EnforcerReferenceData"}}}},"EnforcerSearchDto":{"type":"object","properties":{"addressLine":{"type":"string"},"addressLineCy":{"type":"string"},"enforcerCode":{"type":"string"},"enforcerId":{"type":"string"},"name":{"type":"string"},"nameCy":{"type":"string"},"postcode":{"type":"string"},"warrantReferenceSequence":{"type":"string"},"warrantRegisterSequence":{"type":"string"}}},"FixedPenaltyTicketDetails":{"type":"object","properties":{"issuing_authority":{"type":"string","maxLength":2147483647,"minLength":1},"place_of_offence":{"type":"string","maxLength":2147483647,"minLength":1},"ticket_number":{"type":"string","maxLength":2147483647,"minLength":1},"time_of_offence":{"type":"string","maxLength":2147483647,"minLength":1}}},"GetDefendantAccountFixedPenaltyResponse":{"type":"object","properties":{"fixed_penalty_ticket_details":{"$ref":"#/components/schemas/FixedPenaltyTicketDetails"},"vehicle_fixed_penalty_details":{"$ref":"#/components/schemas/VehicleFixedPenaltyDetails"},"vehicle_fixed_penalty_flag":{"type":"boolean"}}},"GetDefendantAccountHeaderSummary200Response":{"type":"object","properties":{"account_number":{"type":"string","description":"DB Mapping - defendant_accounts.account_number"},"account_status_reference":{"$ref":"#/components/schemas/AccountStatusReferenceCommon"},"account_type":{"type":"string","description":"DB Mapping - defendant_accounts.account_type","enum":["Fine","Conditional Caution","Confiscation","Fixed Penalty"]},"business_unit_summary":{"$ref":"#/components/schemas/BusinessUnitSummaryCommon"},"debtor_type":{"type":"string","description":"This field will be set to 'Defendant' if defendant_account_parties.debtor = 'TRUE', otherwise if this is null and a Parent/Guardian is on the account with defendant_account_parties.debtor = 'TRUE', then the value returned is 'Parent/Guardian'. DB Mapping - defendant_account_parties.debtor (where debtor = True) ","enum":["Defendant","Parent/Guardian"]},"defendant_account_id":{"type":"string","description":"DB Mapping - defendant_accounts.defendant_account_id"},"defendant_party_id":{"type":"string","description":"defendant_account_parties.defendant_account_party_id (where defendant_account_parties.association_type = 'Defendant')"},"fixed_penalty_ticket_number":{"type":"string","description":"Only provided for Fixed Penalty accounts DB Mapping - fixed_penalty_offences.ticket_number "},"has_consolidated_accounts":{"type":"boolean","description":"This field will return true if the account has had accounts consolidated into it or false if it has not."},"is_youth":{"type":"boolean","description":"DERIVED FROM THE DEFENDANT The BE will need to check the defendants DOB via (parties.birth_date) and if: parties.birth_date ≥ 18, then value is FALSE I.e. An Adult defendant parties.birth_date < 18, then value is TRUE I.e. A Youth defendant If parties.birth_date = null, then the defendants age (parties.age) should be observed: parties.age ≥ 18, then the value is ‘FALSE’ parties.age < 18, then the value is ‘TRUE’ parties.age = null, then the value is ‘FALSE’  DB Mapping - parties.birth_date The defendants DOB is derived from this database field, but is not returned. Instead the BE will set the is_youth flag depending on the DOB value parties.age "},"originator_name":{"type":"string","description":"NEW - DB Mapping - defendant.accounts.originator_name"},"originator_type":{"type":"string","description":"NEW - DB Mapping - defendant_accounts.originator_type","enum":["TFO","FP","CASE","MAC"]},"parent_guardian_party_id":{"type":"string","description":"Only provided if a parent/guardian has been associated with the account, during account creation. DB Mapping - defendant_account_parties.defendant_account_party_id (where defendant_account_parties.association_type = 'Parent/Guardian') "},"party_details":{"$ref":"#/components/schemas/PartyDetailsCommon"},"payment_state_summary":{"$ref":"#/components/schemas/PaymentStateSummaryCommon"},"prosecutor_case_reference":{"type":"string","description":"DB Mapping - defendant.accounts.prosecutor_case_reference"}},"required":["account_number","account_status_reference","account_type","business_unit_summary","debtor_type","defendant_account_id","defendant_party_id","has_consolidated_accounts","is_youth","originator_name","originator_type","party_details","payment_state_summary"]},"GetDefendantAccountPartyResponse":{"type":"object","properties":{"defendant_account_party":{"$ref":"#/components/schemas/DefendantAccountParty"}}},"GetDefendantAccountPaymentTermsResponse":{"type":"object","properties":{"last_enforcement":{"type":"string"},"payment_card_last_requested":{"type":"string","format":"date"},"payment_terms":{"$ref":"#/components/schemas/PaymentTerms"}}},"GetEnforcementStatusResponse":{"type":"object","properties":{"account_status_reference":{"$ref":"#/components/schemas/AccountStatusReferenceCommon"},"defendant_account_type":{"type":"string","enum":["adult","company","youth"]},"employer_flag":{"type":"boolean"},"enforcement_override":{"$ref":"#/components/schemas/EnforcementOverrideCommon"},"enforcement_overview":{"$ref":"#/components/schemas/EnforcementOverviewDefendantAccount"},"is_hmrc_check_eligible":{"type":"boolean","description":"This field will return true if all of the following are met, else will return false. - The defendant account has a date of birth - The defendant account has a national insurance number - The defendant account has a first name - The defendant account has a last name - The defendant account does not have zero balance - The defendant account type is not one of the following -- Company  -- Youth -- Parent / guardian to pay "},"last_enforcement_action":{"$ref":"#/components/schemas/EnforcementActionDefendantAccount"},"next_enforcement_action_data":{"type":"string","description":"A comma-separated list of result IDs, 'all' , or null .","pattern":"^(?i:all|[A-Za-z0-9]{1,6}(,[A-Za-z0-9]{1,6})*|)$"}},"required":["account_status_reference","defendant_account_type","employer_flag","enforcement_overview","is_hmrc_check_eligible"]},"GetMinorCreditorAccountAtAGlanceResponse":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/AddressDetails"},"creditor_account_id":{"type":"integer","format":"int64"},"defendant":{"$ref":"#/components/schemas/AtAGlanceDefendant"},"party":{"$ref":"#/components/schemas/PartyDetails"},"payment":{"$ref":"#/components/schemas/Payment"}}},"GetMinorCreditorAccountHeaderSummaryResponse":{"type":"object","properties":{"account_number":{"type":"string"},"awaiting_payout_amount":{"type":"number"},"awarded_amount":{"type":"number"},"business_unit_summary":{"$ref":"#/components/schemas/BusinessUnitSummary"},"creditor_account_id":{"type":"string"},"creditor_account_type":{"$ref":"#/components/schemas/CreditorAccountTypeReference"},"has_associated_defendant":{"type":"boolean"},"outstanding_amount":{"type":"number"},"paid_out_amount":{"type":"number"},"party_details":{"$ref":"#/components/schemas/PartyDetails"}}},"ImpositionSummaryCommon":{"type":"object","properties":{"balance":{"type":"number","description":"A monetary value that is zero or positive, with up to two decimal places.","maximum":999999999999,"minimum":0},"creditor":{"$ref":"#/components/schemas/CreditorAccountTypeReferenceCommon","description":"DB Mapping - impositions.creditor_account_id"},"date_imposed":{"type":"string","format":"date"},"imposed_amount":{"type":"number","description":"A monetary value that is zero or positive, with up to two decimal places.","maximum":999999999999,"minimum":0},"imposing_court":{"$ref":"#/components/schemas/CourtReferenceCommon","description":"DB Mapping - impositions.imposing_court_id"},"imposition_id":{"type":"integer","format":"int64","description":"DB Mapping - impositions.imposition_id"},"offence":{"$ref":"#/components/schemas/OffenceReferenceCommon"},"paid_amount":{"type":"number","description":"A monetary value that is zero or positive, with up to two decimal places.","maximum":999999999999,"minimum":0},"posted_details":{"$ref":"#/components/schemas/PostedDetailsCommon"},"result":{"$ref":"#/components/schemas/ResultReferenceCommon","description":"DB Mapping - impositions.result_id"}},"required":["balance","creditor","date_imposed","imposed_amount","imposition_id","offence","paid_amount","posted_details","result"]},"IndividualAlias":{"type":"object","properties":{"alias_id":{"type":"string"},"forenames":{"type":"string"},"sequence_number":{"type":"integer","format":"int32"},"surname":{"type":"string"}}},"IndividualAliasCommon":{"type":"object","properties":{"alias_id":{"type":"string"},"forenames":{"type":"string"},"sequence_number":{"type":"integer","format":"int32","maximum":5,"minimum":1},"surname":{"type":"string"}},"required":["alias_id","sequence_number","surname"]},"IndividualDetails":{"type":"object","properties":{"age":{"type":"string"},"date_of_birth":{"type":"string"},"forenames":{"type":"string"},"individual_aliases":{"type":"array","items":{"$ref":"#/components/schemas/IndividualAlias"}},"national_insurance_number":{"type":"string"},"surname":{"type":"string"},"title":{"type":"string"}}},"IndividualDetailsCommon":{"type":"object","properties":{"age":{"type":"string"},"date_of_birth":{"type":"string"},"forenames":{"type":"string"},"individual_aliases":{"type":"array","items":{"$ref":"#/components/schemas/IndividualAliasCommon"}},"national_insurance_number":{"type":"string"},"surname":{"type":"string"},"title":{"type":"string"}},"required":["surname"]},"InstalmentPeriod":{"type":"object","properties":{"instalment_period_code":{"type":"string","enum":["W","M","F"]},"instalment_period_display_name":{"type":"string"}}},"LJA":{"type":"object","properties":{"lja_code":{"type":"string"},"lja_id":{"type":"integer","format":"int32"},"lja_name":{"type":"string"}}},"LanguagePreference":{"type":"object","properties":{"language_code":{"type":"string"},"language_display_name":{"type":"string"}}},"LanguagePreferences":{"type":"object","properties":{"document_language_preference":{"$ref":"#/components/schemas/LanguagePreference"},"hearing_language_preference":{"$ref":"#/components/schemas/LanguagePreference"}}},"LastEnforcementAction":{"type":"object","properties":{"last_enforcement_action_id":{"type":"string"},"last_enforcement_action_title":{"type":"string"}}},"Lite":{"type":"object","properties":{"addressLine1":{"type":"string"},"addressLine1Cy":{"type":"string"},"addressLine2":{"type":"string"},"addressLine2Cy":{"type":"string"},"addressLine3":{"type":"string"},"addressLine3Cy":{"type":"string"},"businessUnitId":{"type":"integer","format":"int32"},"courtCode":{"type":"integer","format":"int32"},"courtId":{"type":"integer","format":"int64"},"courtType":{"type":"string"},"division":{"type":"string"},"localJusticeAreaId":{"type":"integer","format":"int32"},"name":{"type":"string"},"nameCy":{"type":"string"},"postcode":{"type":"string"}}},"LjaReferenceCommon":{"type":"object","properties":{"lja_code":{"type":"string"},"lja_id":{"type":"integer","format":"int32"},"lja_name":{"type":"string"}},"required":["lja_id","lja_name"]},"LjaReferenceData":{"type":"object","properties":{"address_line_1":{"type":"string"},"lja_code":{"type":"string"},"lja_type":{"type":"string"},"local_justice_area_id":{"type":"integer","format":"int32"},"name":{"type":"string"},"postcode":{"type":"string"}}},"LjaReferenceDataResults":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"refData":{"type":"array","items":{"$ref":"#/components/schemas/LjaReferenceData"}}}},"LocalJusticeAreaEntity":{"type":"object","properties":{"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"addressLine3":{"type":"string"},"addressLine4":{"type":"string"},"addressLine5":{"type":"string"},"endDate":{"type":"string","format":"date-time"},"ljaCode":{"type":"string"},"ljaType":{"type":"string","enum":["LJA","CRWCRT","SJCRT","NICRT","SCSCRT"]},"localJusticeAreaId":{"type":"integer","format":"int32"},"name":{"type":"string"},"postcode":{"type":"string"}}},"LocalJusticeAreaSearchDto":{"type":"object","properties":{"addressLine":{"type":"string"},"ljaCode":{"type":"string"},"localJusticeAreaId":{"type":"string"},"name":{"type":"string"},"postcode":{"type":"string"}}},"MajorCreditorFullEntity":{"type":"object","properties":{"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"addressLine3":{"type":"string"},"businessUnitId":{"type":"integer","format":"int32"},"contactEmail":{"type":"string"},"contactName":{"type":"string"},"contactTelephone":{"type":"string"},"creditorAccountEntity":{"$ref":"#/components/schemas/CreditorAccountFullEntity"},"majorCreditorCode":{"type":"string"},"majorCreditorId":{"type":"integer","format":"int64"},"name":{"type":"string"},"postcode":{"type":"string"}}},"MajorCreditorReferenceData":{"type":"object","properties":{"account_number":{"type":"string"},"business_unit_id":{"type":"integer","format":"int32"},"creditor_account_id":{"type":"integer","format":"int64"},"creditor_account_type":{"type":"string"},"from_suspense":{"type":"boolean"},"hold_payout":{"type":"boolean"},"last_changed_date":{"type":"string","format":"date-time"},"major_creditor_code":{"type":"string"},"major_creditor_id":{"type":"integer","format":"int64"},"minor_creditor_party_id":{"type":"integer","format":"int64"},"name":{"type":"string"},"postcode":{"type":"string"},"prosecution_service":{"type":"boolean"}}},"MajorCreditorReferenceDataResults":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"refData":{"type":"array","items":{"$ref":"#/components/schemas/MajorCreditorReferenceData"}}}},"MajorCreditorSearchDto":{"type":"object","properties":{"addressLine":{"type":"string"},"businessUnitId":{"type":"string"},"businessUnitName":{"type":"string"},"majorCreditorCode":{"type":"string"},"majorCreditorId":{"type":"string"},"name":{"type":"string"},"postcode":{"type":"string"}}},"MinorCreditorAccountResponseMinorCreditor":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/AddressDetailsCommon"},"creditor_account_id":{"type":"integer","format":"int64"},"party_details":{"$ref":"#/components/schemas/PartyDetailsCommon"},"payment":{"$ref":"#/components/schemas/MinorCreditorAccountResponseMinorCreditorPayment"}},"required":["address","creditor_account_id","party_details","payment"]},"MinorCreditorAccountResponseMinorCreditorPayment":{"type":"object","properties":{"account_name":{"type":"string","description":"DB Mapping - creditor_accounts.bank_account_name","maxLength":18,"minLength":1},"account_number":{"type":"string","description":"DB Mapping - creditor_accounts.bank_account_number","maxLength":10,"minLength":1},"account_reference":{"type":"string","description":"DB Mapping - creditor_accounts.bank_account_reference","maxLength":18,"minLength":1},"hold_payment":{"type":"boolean","description":"DB Mapping - creditor_accounts.hold_payout"},"pay_by_bacs":{"type":"boolean","description":"DB Mapping - creditor_accounts.pay_by_bacs"},"sort_code":{"type":"string","description":"DB Mapping - creditor_accounts.bank_sort_code","maxLength":6,"minLength":1}},"required":["hold_payment","pay_by_bacs"]},"MinorCreditorSearch":{"type":"object","properties":{"account_number":{"type":"string"},"active_accounts_only":{"type":"boolean"},"business_unit_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"creditor":{"$ref":"#/components/schemas/Creditor"}}},"Note":{"type":"object","properties":{"note_text":{"type":"string"},"note_type":{"type":"string"},"record_id":{"type":"string"},"record_type":{"type":"string","enum":["defendant_accounts","creditor_accounts","suspense_accounts","report_instances"]}}},"OffenceFullEntity":{"type":"object","properties":{"businessUnit":{"$ref":"#/components/schemas/BusinessUnitFullEntity"},"businessUnitId":{"type":"integer","format":"int32"},"cjsCode":{"type":"string"},"dateUsedFrom":{"type":"string","format":"date-time"},"dateUsedTo":{"type":"string","format":"date-time"},"offenceId":{"type":"integer","format":"int64"},"offenceOas":{"type":"string"},"offenceOasCy":{"type":"string"},"offenceTitle":{"type":"string"},"offenceTitleCy":{"type":"string"}}},"OffenceReferenceCommon":{"type":"object","properties":{"code":{"type":"string","description":"DB mapping - offences.cjs_code","maxLength":10,"minLength":0},"id":{"type":"integer","format":"int64","description":"DB mapping - offences.offence_id"},"title":{"type":"string","description":"DB mapping - offences.offence_title","maxLength":120,"minLength":0}},"required":["title"]},"OffenceReferenceData":{"type":"object","properties":{"business_unit_id":{"type":"integer","format":"int32"},"cjs_code":{"type":"string"},"date_used_from":{"type":"string","format":"date-time"},"date_used_to":{"type":"string","format":"date-time"},"offence_id":{"type":"integer","format":"int64"},"offence_oas":{"type":"string"},"offence_oas_cy":{"type":"string"},"offence_title":{"type":"string"},"offence_title_cy":{"type":"string"}}},"OffenceReferenceDataResults":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"refData":{"type":"array","items":{"$ref":"#/components/schemas/OffenceReferenceData"}}}},"OffenceSearchData":{"type":"object","properties":{"cjs_code":{"type":"string"},"date_used_from":{"type":"string","format":"date-time"},"date_used_to":{"type":"string","format":"date-time"},"offence_id":{"type":"integer","format":"int64"},"offence_oas":{"type":"string"},"offence_oas_cy":{"type":"string"},"offence_title":{"type":"string"},"offence_title_cy":{"type":"string"}}},"OffenceSearchDataResults":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"searchData":{"type":"array","items":{"$ref":"#/components/schemas/OffenceSearchData"}}}},"OffenceSearchDto":{"type":"object","properties":{"act_and_section":{"type":"string"},"active_date":{"type":"string","format":"date-time"},"cjs_code":{"type":"string"},"max_results":{"type":"integer","format":"int32"},"offence_id":{"type":"string"},"title":{"type":"string"}}},"OpalS2SRequestWrapper":{"type":"object","properties":{"external_api_payload":{"type":"string"}}},"OpalS2SResponseWrapper":{"type":"object","properties":{"error_detail":{"type":"string"},"opal_response_payload":{"type":"string"}}},"OrganisationAlias":{"type":"object","properties":{"alias_id":{"type":"string"},"organisation_name":{"type":"string"},"sequence_number":{"type":"integer","format":"int32"}}},"OrganisationAliasCommon":{"type":"object","properties":{"alias_id":{"type":"string"},"organisation_name":{"type":"string"},"sequence_number":{"type":"integer","format":"int32","maximum":5,"minimum":1}},"required":["alias_id","organisation_name","sequence_number"]},"OrganisationDetails":{"type":"object","properties":{"organisation_aliases":{"type":"array","items":{"$ref":"#/components/schemas/OrganisationAlias"}},"organisation_name":{"type":"string"}}},"OrganisationDetailsCommon":{"type":"object","properties":{"organisation_aliases":{"type":"array","items":{"$ref":"#/components/schemas/OrganisationAliasCommon"}},"organisation_name":{"type":"string"}},"required":["organisation_name"]},"PartyDetails":{"type":"object","properties":{"individual_details":{"$ref":"#/components/schemas/IndividualDetails"},"organisation_details":{"$ref":"#/components/schemas/OrganisationDetails"},"organisation_flag":{"type":"boolean"},"party_id":{"type":"string"}}},"PartyDetailsCommon":{"type":"object","properties":{"individual_details":{"$ref":"#/components/schemas/IndividualDetailsCommon"},"organisation_details":{"$ref":"#/components/schemas/OrganisationDetailsCommon"},"organisation_flag":{"type":"boolean"},"party_id":{"type":"string"}},"required":["organisation_flag","party_id"]},"PatchMinorCreditorAccountRequest":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/AddressDetailsCommon"},"party_details":{"$ref":"#/components/schemas/PartyDetailsCommon"},"payment":{"$ref":"#/components/schemas/CreditorAccountPaymentDetailsCommon"}},"required":["address","party_details","payment"]},"Payment":{"type":"object","properties":{"bacs":{"type":"boolean"},"hold_payment":{"type":"boolean"},"is_bacs":{"type":"boolean"}}},"PaymentStateSummary":{"type":"object","properties":{"account_balance":{"type":"number"},"arrears_amount":{"type":"number"},"imposed_amount":{"type":"number"},"paid_amount":{"type":"number"}}},"PaymentStateSummaryCommon":{"type":"object","properties":{"account_balance":{"type":"number"},"arrears_amount":{"type":"number"},"imposed_amount":{"type":"number"},"paid_amount":{"type":"number"}},"required":["account_balance","arrears_amount","imposed_amount","paid_amount"]},"PaymentTerms":{"type":"object","properties":{"date_days_in_default_imposed":{"type":"string","format":"date"},"days_in_default":{"type":"integer","format":"int32"},"effective_date":{"type":"string","format":"date"},"extension":{"type":"boolean"},"instalment_amount":{"type":"number"},"instalment_period":{"$ref":"#/components/schemas/InstalmentPeriod"},"lump_sum_amount":{"type":"number"},"payment_terms_type":{"$ref":"#/components/schemas/PaymentTermsType"},"posted_details":{"$ref":"#/components/schemas/PostedDetails"},"reason_for_extension":{"type":"string"}}},"PaymentTermsSummary":{"type":"object","properties":{"effective_date":{"type":"string","format":"date"},"instalment_amount":{"type":"number"},"instalment_period":{"$ref":"#/components/schemas/InstalmentPeriod"},"lump_sum_amount":{"type":"number"},"payment_terms_type":{"$ref":"#/components/schemas/PaymentTermsType"}}},"PaymentTermsType":{"type":"object","properties":{"payment_terms_type_code":{"type":"string","enum":["B","P","I"]},"payment_terms_type_display_name":{"type":"string"}}},"Permission":{"type":"object","properties":{"permission_id":{"type":"integer","format":"int64"},"permission_name":{"type":"string"}}},"PostMinorCreditorAccountsSearchResponse":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"creditor_accounts":{"type":"array","items":{"$ref":"#/components/schemas/CreditorAccountDto"},"maxItems":2147483647,"minItems":1}}},"PostedDetails":{"type":"object","properties":{"posted_by":{"type":"string"},"posted_by_name":{"type":"string"},"posted_date":{"type":"string","format":"date-time"}}},"PostedDetailsCommon":{"type":"object","properties":{"posted_by":{"type":"string","maxLength":20,"minLength":0},"posted_by_name":{"type":"string","maxLength":100,"minLength":0},"posted_date":{"type":"string","format":"date"}},"required":["posted_date"]},"PrintJob":{"type":"object","properties":{"batchId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"docType":{"type":"string"},"docVersion":{"type":"string"},"jobId":{"type":"string","format":"uuid"},"printJobId":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["PENDING","IN_PROGRESS","COMPLETED","FAILED"]},"updatedAt":{"type":"string","format":"date-time"},"xmlData":{"type":"string"}}},"ProblemDetailCommon":{"type":"object","properties":{"detail":{"type":"string","example":"The requested resource was not found."},"instance":{"type":"string","format":"uri","example":"https://example.com/problem/12345"},"operation_id":{"type":"string","format":"uuid","description":"A unique operation id that links logs of the same operation together"},"properties":{"type":"object","additionalProperties":{"type":"string"}},"retriable":{"type":"boolean"},"status":{"type":"integer","format":"int32","example":404},"title":{"type":"string","example":"Not Found","maxLength":100,"minLength":0},"type":{"type":"string","format":"uri","example":"https://example.com/problem"}},"required":["detail","status","title"]},"ProsecutorEntity":{"type":"object","properties":{"address_line_1":{"type":"string"},"address_line_2":{"type":"string"},"address_line_3":{"type":"string"},"address_line_4":{"type":"string"},"address_line_5":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"name":{"type":"string"},"postcode":{"type":"string"},"prosecutor_code":{"type":"string"},"prosecutor_id":{"type":"integer","format":"int64"}}},"ProsecutorReferenceData":{"type":"object","properties":{"address_line_1":{"type":"string"},"address_line_2":{"type":"string"},"address_line_3":{"type":"string"},"address_line_4":{"type":"string"},"address_line_5":{"type":"string"},"end_date":{"type":"string","format":"date-time"},"name":{"type":"string"},"postcode":{"type":"string"},"prosecutor_code":{"type":"string"},"prosecutor_id":{"type":"integer","format":"int32"}}},"RefDataResponseProsecutorReferenceData":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"ref_data":{"type":"array","items":{"$ref":"#/components/schemas/ProsecutorReferenceData"}}}},"ReferenceNumberDto":{"type":"object","properties":{"account_number":{"type":"string"},"organisation":{"type":"boolean"},"prosecutor_case_reference":{"type":"string"}},"required":["account_number","organisation","prosecutor_case_reference"]},"ReplaceDraftAccountRequestDto":{"type":"object","properties":{"account":{"type":"string","minLength":1},"account_status":{"type":"string"},"account_type":{"type":"string","minLength":1},"business_unit_id":{"type":"integer","format":"int32"},"submitted_by":{"type":"string"},"submitted_by_name":{"type":"string"},"timeline_data":{"type":"string","minLength":1}},"required":["account","account_status","account_type","business_unit_id","timeline_data"]},"ResultDto":{"type":"object","properties":{"active":{"type":"boolean"},"collection_order":{"type":"boolean"},"enforcement":{"type":"boolean"},"enforcement_hold":{"type":"boolean"},"enforcement_override":{"type":"boolean"},"extend_ttp_disallow":{"type":"boolean"},"extend_ttp_preserve_last_enf":{"type":"boolean"},"further_enforcement_disallow":{"type":"boolean"},"further_enforcement_warn":{"type":"boolean"},"generates_hearing":{"type":"boolean"},"imposition":{"type":"boolean"},"imposition_accruing":{"type":"boolean"},"imposition_allocation_priority":{"type":"integer","format":"int32"},"imposition_category":{"type":"string"},"imposition_creditor":{"type":"string"},"lists_monies":{"type":"boolean"},"prevent_payment_card":{"type":"boolean"},"requires_enforcer":{"type":"boolean"},"result_id":{"type":"string"},"result_parameters":{"type":"string"},"result_title":{"type":"string"},"result_title_cy":{"type":"string"},"result_type":{"type":"string"}}},"ResultReferenceCommon":{"type":"object","properties":{"result_id":{"type":"string"},"result_title":{"type":"string","maxLength":60,"minLength":0}},"required":["result_id","result_title"]},"ResultReferenceData":{"type":"object","properties":{"active":{"type":"boolean"},"imposition_allocation_order":{"type":"integer","format":"int32"},"imposition_creditor":{"type":"string"},"result_id":{"type":"string"},"result_title":{"type":"string"},"result_title_cy":{"type":"string"},"result_type":{"type":"string"}}},"ResultReferenceDataResponse":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"refData":{"type":"array","items":{"$ref":"#/components/schemas/ResultReferenceData"}}}},"ResultResponse":{"type":"object","properties":{"parameter_name":{"type":"string"},"response":{"type":"string"}}},"ResultResponsesCommon":{"type":"object","properties":{"parameter_name":{"type":"string"},"response":{"type":"string"}},"required":["parameter_name","response"]},"SearchDataResponseAmendmentEntity":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"searchData":{"type":"array","items":{"$ref":"#/components/schemas/AmendmentEntity"}}}},"SearchDataResponseLite":{"type":"object","properties":{"count":{"type":"integer","format":"int32"},"searchData":{"type":"array","items":{"$ref":"#/components/schemas/Lite"}}}},"UpdateDefendantAccountRequest":{"type":"object","properties":{"collection_order":{"$ref":"#/components/schemas/CollectionOrderDto"},"comment_and_notes":{"$ref":"#/components/schemas/CommentsAndNotes"},"enforcement_court":{"$ref":"#/components/schemas/CourtReferenceDto"},"enforcement_override":{"$ref":"#/components/schemas/EnforcementOverride"}}},"UpdateDraftAccountRequestDto":{"type":"object","properties":{"account_status":{"type":"string"},"business_unit_id":{"type":"integer","format":"int32"},"reason_text":{"type":"string"},"timeline_data":{"type":"string"},"validated_by":{"type":"string"},"validated_by_name":{"type":"string"}}},"UserState":{"type":"object","properties":{"business_unit_user":{"type":"array","items":{"$ref":"#/components/schemas/BusinessUnitUser"},"uniqueItems":true},"user_id":{"type":"integer","format":"int64"},"user_name":{"type":"string"}}},"VehicleDetails":{"type":"object","properties":{"vehicle_make_and_model":{"type":"string"},"vehicle_registration":{"type":"string"}}},"VehicleFixedPenaltyDetails":{"type":"object","properties":{"date_notice_issued":{"type":"string","maxLength":2147483647,"minLength":1},"notice_number":{"type":"string","maxLength":2147483647,"minLength":1},"vehicle_drivers_license":{"type":"string","maxLength":2147483647,"minLength":1},"vehicle_registration_number":{"type":"string","maxLength":2147483647,"minLength":1}}},"WarnError":{"type":"object","properties":{"message":{"type":"string"},"reference":{"type":"string"}}}}}}
