diff --git a/openapi/api-docs.json b/openapi/api-docs.json index ed119ef7..5d34ac13 100644 --- a/openapi/api-docs.json +++ b/openapi/api-docs.json @@ -1 +1 @@ -{"openapi":"3.0.1","info":{"title":"HMPPS Integration API","description":"A long-lived API that exposes data from HMPPS systems such as the National Offender Management Information System (NOMIS), nDelius (probation system) and Offender Assessment System (OASys), providing a single point of entry for consumers.","license":{"name":"MIT","url":"https://github.com/ministryofjustice/hmpps-integration-api/blob/main/LICENSE"},"version":"1.0"},"servers":[{"url":"https://dev.integration-api.hmpps.service.justice.gov.uk","description":"Development server"},{"url":"https://preprod.integration-api.hmpps.service.justice.gov.uk","description":"Pre-production server, containing live data"},{"url":"https://integration-api.hmpps.service.justice.gov.uk","description":"Production"}],"security":[{"dn":[]}],"paths":{"/v1/prison/prisoners/{hmppsId}":{"get":{"tags":["prison"],"summary":"Returns a single prisoners details given an hmppsId, does not query for a probation person.","operationId":"getPerson","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found a prisoner with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePerson"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons":{"get":{"tags":["persons"],"summary":"Returns person(s) by search criteria, sorted by date of birth (newest first). At least one query parameter must be specified.","operationId":"getPersons","parameters":[{"name":"first_name","in":"query","description":"The first name of the person","required":false,"schema":{"type":"string"}},{"name":"last_name","in":"query","description":"The last name of the person","required":false,"schema":{"type":"string"}},{"name":"pnc_number","in":"query","description":"A URL-encoded pnc identifier","required":false,"schema":{"type":"string"}},{"name":"date_of_birth","in":"query","description":"The date of birth of the person","required":false,"schema":{"type":"string"}},{"name":"search_within_aliases","in":"query","description":"Whether to return results that match the search criteria within the aliases of a person.","required":false,"schema":{"type":"boolean","default":false}},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully performed the query on upstream APIs. An empty list is returned when no results are found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponsePerson"}}}},"400":{"description":"There were no query parameters passed in. At least one must be specified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{hmppsId}/plp-review-schedule":{"get":{"tags":["alerts","persons"],"summary":"Returns plp the review schedule associated with a person.","operationId":"getReviewSchedule","parameters":[{"name":"hmppsId","in":"path","description":"A HmppsId ","required":true,"schema":{"type":"string"},"example":"A123123"}],"responses":{"200":{"description":"Successfully found induction schedule for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseReviewSchedules"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{hmppsId}/plp-induction-schedule":{"get":{"tags":["alerts","persons"],"summary":"Returns plp the induction schedule associated with a person.","operationId":"getInductionSchedule","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS id","required":true,"schema":{"type":"string"},"example":"A123123"}],"responses":{"200":{"description":"Successfully found induction schedule for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseInductionSchedule"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}":{"get":{"tags":["persons"],"summary":"Returns a person.","operationId":"getPerson_1","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseOffenderSearchResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/status-information":{"get":{"tags":["alerts","persons"],"summary":"Returns the status information associated with a person.","operationId":"getStatusInformation","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found status information for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseStatusInformation"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/sentences":{"get":{"tags":["persons"],"summary":"Returns sentences associated with a person, sorted by dateOfSentencing (newest first).","operationId":"getPersonSentences","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found sentences for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseSentence"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/sentences/latest-key-dates-and-adjustments":{"get":{"tags":["persons"],"summary":"Returns the key dates and adjustments about a person's release from prison for their latest sentence.","operationId":"getPersonLatestSentenceKeyDatesAndAdjustments","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found latest sentence key dates and adjustments for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseLatestSentenceKeyDatesAndAdjustments"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risks/serious-harm":{"get":{"tags":["risks"],"summary":"Returns Risk of Serious Harm (ROSH) risks associated with a person. Returns only assessments completed in the last year. This endpoint does not serve LAO (Limited Access Offender) data.","operationId":"getPersonRiskSeriousHarm","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found risks for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseRisks"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risks/scores":{"get":{"tags":["risks"],"summary":"Returns risk scores from the last year associated with a person, sorted by completedDate (newest first). This endpoint does not serve LAO (Limited Access Offender) data.","operationId":"getPersonRiskPredictorScores","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found risk scores for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseRiskPredictorScore"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risks/mappadetail":{"get":{"tags":["persons"],"summary":"Returns the mappa detail related to a person.","operationId":"getMappaDetail","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found mappa detail for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseMappaDetail"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risks/dynamic":{"get":{"tags":["alerts","persons"],"summary":"Returns dynamic risks associated with a person.","operationId":"getDynamicRisks","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found dynamic risks for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseDynamicRisk"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risks/categories":{"get":{"tags":["persons"],"summary":"Returns the categories related to an offender.","operationId":"getPersonRiskCategories","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found risk categories for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseRiskCategory"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risk-management-plan":{"get":{"tags":["risks"],"summary":"Returns a list of Risk Management Plans created for the person with the provided HMPPS ID.","operationId":"getRiskManagementPlans","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found risk management plans for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseRiskManagementPlan"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/reported-adjudications":{"get":{"tags":["default"],"summary":"Returns adjudications associated with a person, sorted by dateTimeOfIncident (newest first).","operationId":"getPersonAdjudications","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseAdjudication"}}}},"404":{"description":"Failed to find adjudications for the person with the provided hmppsId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/protected-characteristics":{"get":{"tags":["default"],"summary":"Returns protected characteristics of a person.","operationId":"getPersonAddresses","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonProtectedCharacteristics"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/person-responsible-officer":{"get":{"tags":["default"],"summary":"Returns the person responsible officer associated with a person.","operationId":"getPersonResponsibleOfficer","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found the person responsible officer for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonResponsibleOfficer"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/offences":{"get":{"tags":["persons"],"summary":"\n Returns offences associated with a person, ordered by startDate (newest first).\n > Note: This API does not contain the complete list of offences for a person.\n > Offences are retrieved from Prison and Probation systems exclusively.\n > Prison systems record only custodial sentences, while Probation systems record only the main offence and some additional offences for case management purposes. Other offences recorded by HMCTS and police may not be included.\n ","operationId":"getPersonOffences","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found offences for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"},"example":{"data":[{"serviceSource":"NOMIS","systemSource":"PRISON_SYSTEMS","cjsCode":"RR84170","courtDates":["2018-02-10","2019-02-10"],"courtName":"London Magistrates Court","description":"Commit an act / series of acts with intent to pervert the course of public justice","endDate":"2018-03-10","hoCode":3457,"startDate":"1965-12-01","statuteCode":"RR84"},{"serviceSource":"NDELIUS","systemSource":"PROBATION_SYSTEMS","cjsCode":"RR12345","courtDates":["2020-05-15","2021-05-15"],"courtName":"Manchester Crown Court","description":"Assault causing grievous bodily harm","endDate":"2020-06-20","hoCode":3458,"startDate":"2020-05-10","statuteCode":"RR85"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/needs":{"get":{"tags":["needs"],"summary":"\n Returns criminogenic needs associated with a person. This endpoint does not serve LAO (Limited Access Offender) data.\n\n Note: Criminogenic needs are dynamic factors that are directly linked to criminal behaviour. Eight criminogenic needs are measured in OASys: Accommodation, Employability, Relationships, Lifestyle and Associates, Drug Misuse, Alcohol Misuse, Thinking & Behaviour and Attitudes. These are scored according to whether there is “no need”, “some need” or “severe need”, and a need is identified in a specific section based on calculations around these scores.\n However, the process by which needs are assessed is changing as early as next year (2024), specifically moving to a strength-based model that seeks to identify and develop the strengths of people with convictions. As a consequence of this, the information provided by this endpoint will also change.\n ","operationId":"getPersonNeeds","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found criminogenic needs for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseNeeds"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/name":{"get":{"tags":["persons"],"summary":"Returns a person's name","operationId":"getPersonName","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonName"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/licences/conditions":{"get":{"tags":["default"],"summary":"Returns license conditions associated with a person, sorted by createdDateTime (newest first).","operationId":"getLicenceConditions","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found licenses for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonLicences"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/images":{"get":{"tags":["persons"],"summary":"Returns metadata of images associated with a person sorted by captureDateTime (newest first).","operationId":"getPersonImages","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found a person with the provided HMPPS ID. If a person doesn't have any images, then an empty list (`[]`) is returned in the `data` property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseImageMetadata"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/cell-location":{"get":{"tags":["persons"],"operationId":"getPersonCellLocation","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseCellLocation"}}}}}}},"/v1/persons/{encodedHmppsId}/case-notes":{"get":{"tags":["default"],"summary":"Returns case notes associated with a person.","operationId":"getCaseNotesForPerson","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"startDate","in":"query","description":"Filter case notes from this date","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"Filter case notes up to this date","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"locationId","in":"query","description":"Filter by the location. example MDI","required":false,"schema":{"type":"string"},"example":"MDI"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":1}},{"name":"perPage","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"Successfully found case notes for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseCaseNote"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/alerts":{"get":{"tags":["alerts","persons"],"summary":"Returns alerts associated with a person, sorted by dateCreated (newest first).","operationId":"getPersonAlerts","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found alerts for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseAlert"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/alerts/pnd":{"get":{"tags":["alerts","persons"],"summary":"Returns alerts associated with a person, sorted by dateCreated (newest first).","operationId":"getPersonAlertsPND","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found alerts for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseAlert"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/addresses":{"get":{"tags":["persons"],"summary":"Returns addresses associated with a person, ordered by startDate.","operationId":"getPersonAddresses_1","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseListAddress"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/images/{id}":{"get":{"tags":["images"],"summary":"Returns an image in bytes as a JPEG.","operationId":"getImage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Successfully found an image with the provided ID.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Failed to find an image with the provided ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/hmpps/reference-data":{"get":{"tags":["reference-data-controller"],"summary":"Returns probation and prison reference data codes descriptions for values returned by the API","operationId":"getReferenceData","responses":{"200":{"description":"Successfully returned prison and probation reference data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"},"example":{"data":{"prisonReferenceData":{"PHONE_TYPE":[{"code":"a","description":"desc_a"}],"ALERT_TYPE":[{"code":"a","description":"desc_a"}]},"probationReferenceData":{"PHONE_TYPE":[{"code":"a","description":"desc_a"}],"REGISTER_TYPE":[{"code":"a","description":"desc_a"}]}},"errors":[]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/hmpps/id/nomis-number/by-hmpps-id/{hmppsId}":{"get":{"tags":["default"],"summary":"Return nomis number for a given HMPPS Id","description":"Accepts a HMPPS Id (hmppsId) and looks up the corresponding nomis number.\n ","operationId":"getNomisNumberByHMPPSID","parameters":[{"name":"hmppsId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseNomisNumber"}}}},"404":{"description":"Nomis number could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseNomisNumber"}}}},"400":{"description":"Invalid hmppsId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseNomisNumber"}}}}}}},"/v1/hmpps/id/nomis-number/{nomisNumber}":{"get":{"tags":["default"],"summary":"Return a HMPPS id for a given nomis number","description":"Accepts a nomis number and looks up the corresponding HMPPS Id (hmppsId).\n ","operationId":"getHmppsIdByNomisNumber","parameters":[{"name":"nomisNumber","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}},"404":{"description":"Nomis number could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}},"400":{"description":"Invalid hmppsId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}}}}},"/v1/hmpps/id/by-nomis-number/{nomisNumber}":{"get":{"tags":["default"],"summary":"Return a HMPPS id for a given nomis number","description":"Accepts a nomis number and looks up the corresponding HMPPS Id (hmppsId).\n ","operationId":"getHmppsIdByNomisNumber_1","parameters":[{"name":"nomisNumber","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}},"404":{"description":"Nomis number could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}},"400":{"description":"Invalid hmppsId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}}}}},"/v1/epf/person-details/{hmppsId}/{eventNumber}":{"get":{"tags":["default"],"summary":"Probation case information for the Effective Proposals Framework service","description":"Accepts an HMPPS Id (hmppsId) and Delius Event number\n and returns a data structure giving background information on the probation case\n for use in the Effective Proposals Framework system. The information is used to\n reduce the need for the EPF user to re-key information already held in Delius.\n ","operationId":"getCaseDetail","parameters":[{"name":"hmppsId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventNumber","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseCaseDetail"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"components":{"schemas":{"Alias":{"required":["firstName","lastName"],"type":"object","properties":{"firstName":{"type":"string","description":"first name","example":"John"},"lastName":{"type":"string","description":"last name","example":"Marston"},"middleName":{"type":"string","description":"last name","example":"Marston"},"dateOfBirth":{"type":"string","description":"date of birth","format":"date","example":"1965-12-01"},"gender":{"type":"string","description":"gender","example":"Male"},"ethnicity":{"type":"string","description":"ethnicity","example":"Prefer not to say"}}},"ContactDetailsWithEmailAndPhone":{"type":"object","properties":{"phoneNumbers":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumber"}},"emails":{"type":"array","description":"A list of email addresses","example":"leslie.knope@example.com","items":{"type":"string","description":"A list of email addresses","example":"leslie.knope@example.com"}}}},"DataResponsePerson":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Person"}}},"Identifiers":{"type":"object","properties":{"nomisNumber":{"type":"string","description":"A prisoner identifier from NOMIS.","example":"A1234AA"},"croNumber":{"type":"string","description":"A Criminal Records Office identifier from National Identification Service (NIS) or National Automated Fingerprint Identification System (NAFIS).","example":"SF80/655108T"},"deliusCrn":{"type":"string","description":"A Case Reference Number from Delius.","example":"X00001"}},"description":"Other unique identifiers for a person."},"Person":{"required":["aliases","firstName","identifiers","lastName"],"type":"object","properties":{"firstName":{"type":"string","description":"First name","example":"John"},"lastName":{"type":"string","description":"Last name","example":"Morgan"},"middleName":{"type":"string","description":"Middle name","example":"John"},"dateOfBirth":{"type":"string","description":"Date of birth","format":"date","example":"1965-12-01"},"gender":{"type":"string","description":"Gender","example":"Male"},"ethnicity":{"type":"string","description":"Ethnicity","example":"White: Eng./Welsh/Scot./N.Irish/British"},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/Alias"}},"identifiers":{"$ref":"#/components/schemas/Identifiers"},"pncId":{"type":"string","description":"An identifier from the Police National Computer (PNC)"},"hmppsId":{"type":"string","description":"HMPPS identifier","example":"2008/0545166T"},"contactDetails":{"$ref":"#/components/schemas/ContactDetailsWithEmailAndPhone"},"currentRestriction":{"type":"boolean"},"restrictionMessage":{"type":"string"},"currentExclusion":{"type":"boolean"},"exclusionMessage":{"type":"string"}}},"PhoneNumber":{"type":"object","properties":{"number":{"type":"string","description":"A phone number","example":"079123456789"},"type":{"type":"string","description":"The type of number","example":"TELEPHONE"}}},"PaginatedResponsePerson":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"Pagination":{"required":["count","isLastPage","page","perPage","totalCount","totalPages"],"type":"object","properties":{"isLastPage":{"type":"boolean","description":"Is the current page the last one?","example":true},"count":{"type":"integer","description":"The number of results in `data` for the current page","format":"int32","example":1},"page":{"type":"integer","description":"The current page number","format":"int32","example":1},"perPage":{"type":"integer","description":"The maximum number of results in `data` for a page","format":"int32","example":10},"totalCount":{"type":"integer","description":"The total number of results in `data` across all pages","format":"int64","example":1},"totalPages":{"type":"integer","description":"The total number of pages","format":"int32","example":1}}},"DataResponseReviewSchedules":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/ReviewSchedules"}}},"ReviewSchedule":{"required":["calculationRule","createdAt","createdAtPrison","createdBy","createdByDisplayName","reference","reviewDateFrom","reviewDateTo","status","updatedAt","updatedAtPrison","updatedBy","updatedByDisplayName","version"],"type":"object","properties":{"reference":{"type":"string"},"reviewDateFrom":{"type":"string","format":"date"},"reviewDateTo":{"type":"string","format":"date"},"status":{"type":"string"},"calculationRule":{"type":"string"},"createdBy":{"type":"string"},"createdByDisplayName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdAtPrison":{"type":"string"},"updatedBy":{"type":"string"},"updatedByDisplayName":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"updatedAtPrison":{"type":"string"},"version":{"type":"integer","format":"int32"}}},"ReviewSchedules":{"required":["reviewSchedules"],"type":"object","properties":{"reviewSchedules":{"type":"array","items":{"$ref":"#/components/schemas/ReviewSchedule"}}}},"DataResponseInductionSchedule":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/InductionSchedule"}}},"InductionSchedule":{"type":"object","properties":{"deadlineDate":{"type":"string","description":"An ISO-8601 date representing when the Induction should be completed by.","format":"date","example":"2023-09-01"},"status":{"type":"string","description":"The current status of the Induction Schedule","example":"SCHEDULED"},"calculationRule":{"type":"string","description":"The Induction Schedule rule used to determine deadline date.","example":"NEW_PRISON_ADMISSION"},"nomisNumber":{"type":"string","description":"The Nomis number of the person.","example":"A1234BC"},"systemUpdatedBy":{"type":"string","description":"The name of the person who used the PLP system to update the Induction Schedule, or 'system' for system generated updates.","example":"John Smith"},"systemUpdatedAt":{"type":"string","description":"An ISO-8601 timestamp representing the time the PLP system was used to update the Induction Schedule.","format":"date-time","example":"2023-06-19T09:39:44Z"},"inductionPerformedBy":{"type":"string","description":"The name of the person who performed the Induction with the prisoner. In the case of system generated updates or setting an exemption this field will not be present.","example":"Fred Jones"},"inductionPerformedAt":{"type":"string","description":"An ISO-8601 date representing when the Induction was performed with the prisoner. In the case of system generated updates this field will not be present.","format":"date","example":"2023-06-30"}}},"DataResponseOffenderSearchResponse":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/OffenderSearchResponse"}}},"OffenderSearchResponse":{"type":"object","properties":{"prisonerOffenderSearch":{"$ref":"#/components/schemas/Person"},"probationOffenderSearch":{"$ref":"#/components/schemas/PersonOnProbation"}}},"PersonOnProbation":{"required":["aliases","firstName","identifiers","lastName","underActiveSupervision"],"type":"object","properties":{"person":{"$ref":"#/components/schemas/Person"},"underActiveSupervision":{"type":"boolean"},"firstName":{"type":"string"},"lastName":{"type":"string"},"middleName":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"gender":{"type":"string"},"ethnicity":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/Alias"}},"identifiers":{"$ref":"#/components/schemas/Identifiers"},"pncId":{"type":"string"},"hmppsId":{"type":"string"},"contactDetails":{"$ref":"#/components/schemas/ContactDetailsWithEmailAndPhone"},"currentRestriction":{"type":"boolean"},"restrictionMessage":{"type":"string"},"currentExclusion":{"type":"boolean"},"exclusionMessage":{"type":"string"}}},"PaginatedResponseStatusInformation":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StatusInformation"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"StatusInformation":{"type":"object","properties":{"code":{"type":"string","example":"ASFO"},"description":{"type":"string","example":"Serious Further Offence - Subject to SFO review/investigation"},"startDate":{"type":"string","example":"2022-01-01"},"reviewDate":{"type":"string","example":"2025-01-01"},"notes":{"type":"string","example":"This is a note"}}},"PaginatedResponseSentence":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sentence"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"Sentence":{"required":["isCustodial","length","serviceSource","systemSource"],"type":"object","properties":{"serviceSource":{"type":"string","description":"\n Which upstream API service the sentence originates from. Possible values are:\n `NOMIS`,\n `NDELIUS`\n ","example":"NOMIS","enum":["NOMIS","PRISONER_OFFENDER_SEARCH","PROBATION_OFFENDER_SEARCH","NDELIUS","ASSESS_RISKS_AND_NEEDS","ADJUDICATIONS","CVL","CASE_NOTES","MANAGE_POM_CASE","RISK_MANAGEMENT_PLAN","TEST","PLP","NOMIS","NDELIUS"]},"systemSource":{"type":"string","description":"\n Which upstream API system the sentence originates from. Possible values are:\n `PRISON_SYSTEMS`,\n `PROBATION_SYSTEMS`\n ","example":"PROBATION_SYSTEMS","enum":["PRISON_SYSTEMS","PROBATION_SYSTEMS","PRISON_SYSTEMS","PROBATION_SYSTEMS"]},"dateOfSentencing":{"type":"string","description":"Date of sentencing","format":"date","example":"2009-09-09"},"description":{"type":"string","description":"Description of the sentence","example":"Young Offender Inst - >=12 mths"},"isActive":{"type":"boolean","description":"Whether the sentence is active","example":true},"isCustodial":{"type":"boolean","description":"Whether the sentence is custodial","example":true},"fineAmount":{"type":"number","description":"The amount of fine related to the sentence and offence","example":480.59},"length":{"$ref":"#/components/schemas/SentenceLength"}}},"SentenceLength":{"required":["terms"],"type":"object","properties":{"duration":{"type":"integer","description":"Duration of the sentence","format":"int32","example":10},"units":{"type":"string","description":"\n Time unit that is used in combination with the duration field. Possible values are:\n `Hours`,\n `Days`,\n `Weeks`,\n `Months`,\n `Years`\n ","example":"Hours","enum":["Hours","Days","Weeks","Months","Years"]},"terms":{"type":"array","items":{"$ref":"#/components/schemas/SentenceTerm"}}}},"SentenceTerm":{"type":"object","properties":{"years":{"type":"integer","description":"Number of years in the term","format":"int32","example":5},"months":{"type":"integer","description":"Number of months in the term","format":"int32","example":4},"weeks":{"type":"integer","description":"Number of weeks in the term","format":"int32","example":3},"days":{"type":"integer","description":"Number of days in the term","format":"int32","example":2},"hours":{"type":"integer","description":"Number of hours in the term","format":"int32","example":1},"prisonTermCode":{"type":"string","description":"\n The sentence term code\n Possible values are:\n `CUR` - Curfew Period,\n `DEF` - Deferment Period,\n `DET` - Detention,\n `HOURS` - Hours Ordered,\n `IMP` - Imprisonment,\n `LIC` - Licence,\n `PSYCH` - Psychiatric Hospital,\n `SCUS` - Custodial Period,\n `SEC104` - Breach of supervision requirements,\n `SEC105` - Breach due to imprisonable offence,\n `SEC86` - Section 86 of 2000 Act,\n `SUP` - Sentence Length,\n `SUSP` - Suspension Period\n ","example":"IMP","enum":["CUR","DEF","DET","HOURS","IMP","LIC","PSYCH","SCUS","SEC104","SEC105","SEC86","SUP","SUSP"]}}},"DataResponseLatestSentenceKeyDatesAndAdjustments":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/LatestSentenceKeyDatesAndAdjustments"}}},"HomeDetentionCurfewDate":{"type":"object","properties":{"actualDate":{"type":"string","format":"date"},"eligibilityCalculatedDate":{"type":"string","format":"date"},"eligibilityDate":{"type":"string","format":"date"},"eligibilityOverrideDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}}},"LatestSentenceKeyDatesAndAdjustments":{"type":"object","properties":{"adjustments":{"$ref":"#/components/schemas/SentenceAdjustment"},"automaticRelease":{"$ref":"#/components/schemas/SentenceKeyDate"},"conditionalRelease":{"$ref":"#/components/schemas/SentenceKeyDate"},"dtoPostRecallRelease":{"$ref":"#/components/schemas/SentenceKeyDate"},"earlyTerm":{"$ref":"#/components/schemas/SentenceKeyDateWithCalculatedDate"},"homeDetentionCurfew":{"$ref":"#/components/schemas/HomeDetentionCurfewDate"},"lateTerm":{"$ref":"#/components/schemas/SentenceKeyDateWithCalculatedDate"},"licenceExpiry":{"$ref":"#/components/schemas/SentenceKeyDateWithCalculatedDate"},"midTerm":{"$ref":"#/components/schemas/SentenceKeyDateWithCalculatedDate"},"nonDto":{"$ref":"#/components/schemas/NonDtoDate"},"nonParole":{"$ref":"#/components/schemas/SentenceKeyDate"},"paroleEligibility":{"$ref":"#/components/schemas/SentenceKeyDateWithCalculatedDate"},"postRecallRelease":{"$ref":"#/components/schemas/SentenceKeyDate"},"release":{"$ref":"#/components/schemas/ReleaseDate"},"sentence":{"$ref":"#/components/schemas/SentenceDate"},"topupSupervision":{"$ref":"#/components/schemas/TopupSupervision"},"actualParoleDate":{"type":"string","description":"the offender's actual parole date","format":"date","example":"2023-03-01"},"earlyRemovalSchemeEligibilityDate":{"type":"string","description":"the date on which offender will be eligible for early removal (under the Early Removal Scheme for foreign nationals).","format":"date","example":"2023-03-01"},"releaseOnTemporaryLicenceDate":{"type":"string","description":"the date on which offender will be released on temporary licence.","format":"date","example":"2023-03-01"},"tariffDate":{"type":"string","description":"date on which minimum term is reached for parole (indeterminate/life sentences).","format":"date","example":"2023-03-01"},"tariffEarlyRemovalSchemeEligibilityDate":{"type":"string","description":"tariffEarlyRemovalSchemeEligibilityDate.","format":"date","example":"2023-03-01"}}},"NonDtoDate":{"type":"object","properties":{"date":{"type":"string","description":"Release date for non-DTO sentence (if applicable). This will be based on one of ARD, CRD, NPD or PRRD. NonDto stands for Non-Detention training order.","format":"date","example":"2023-03-01"},"releaseDateType":{"type":"string","description":"\n Indicates which type of non-DTO release date is the effective release date. One of 'ARD', 'CRD', 'NPD' or 'PRRD'. Possible values are:\n `ARD`,\n `CRD`,\n `NPD`,\n `PRRD`.\n ","example":"ARD","enum":["ARD","CRD","NPD","PRRD"]}}},"ReleaseDate":{"type":"object","properties":{"date":{"type":"string","description":"\n Confirmed, actual, approved, provisional or calculated release date for offender, according to offender release date algorithm.\n\n Algorithm\n If there is a confirmed release date, the offender release date is the confirmed release date.\n If there is no confirmed release date for the offender, the offender release date is either the actual parole date or the home detention curfew actual date.\n If there is no confirmed release date, actual parole date or home detention curfew actual date for the offender, the release date is the later of the nonDtoReleaseDate or midTermDate value (if either or both are present)\n ","format":"date","example":"2023-03-01"},"confirmedDate":{"type":"string","description":"Confirmed release date for offender.","format":"date","example":"2023-03-01"}}},"SentenceAdjustment":{"type":"object","properties":{"additionalDaysAwarded":{"type":"number","description":"Number of additional days awarded","example":10},"unlawfullyAtLarge":{"type":"number","description":"Number unlawfully at large days","example":16},"lawfullyAtLarge":{"type":"number","description":"Number of lawfully at large days","example":11},"restoredAdditionalDaysAwarded":{"type":"number","description":"Number of restored additional days awarded","example":20},"specialRemission":{"type":"number","description":"Number of special remission days","example":14},"recallSentenceRemand":{"type":"number","description":"Number of recall sentence remand days","example":7},"recallSentenceTaggedBail":{"type":"number","description":"Number of recall sentence tagged bail days","example":19},"remand":{"type":"number","description":"Number of remand days","example":3},"taggedBail":{"type":"number","description":"Number of tagged bail days","example":13},"unusedRemand":{"type":"number","description":"Number of unused remand days","example":13}}},"SentenceDate":{"type":"object","properties":{"effectiveEndDate":{"type":"string","description":"Effective sentence end date.","format":"date","example":"2023-03-01"},"expiryCalculatedDate":{"type":"string","description":"date on which sentence expired (as calculated by NOMIS).","format":"date","example":"2023-03-01"},"expiryDate":{"type":"string","description":"date on which sentence expires.","format":"date","example":"2023-03-01"},"expiryOverrideDate":{"type":"string","description":"date on which sentence expires (override).","format":"date","example":"2023-03-01"},"startDate":{"type":"string","description":"Sentence start date.","format":"date","example":"2023-03-01"}}},"SentenceKeyDate":{"type":"object","properties":{"date":{"type":"string","description":"release date for offender","format":"date","example":"2023-03-01"},"overrideDate":{"type":"string","description":"release override date for offender","format":"date","example":"2023-03-01"}}},"SentenceKeyDateWithCalculatedDate":{"type":"object","properties":{"date":{"type":"string","description":"release date for offender","format":"date","example":"2023-03-01"},"overrideDate":{"type":"string","description":"release override date for offender","format":"date","example":"2023-03-01"},"calculatedDate":{"type":"string","description":"release calculated date for offender","format":"date","example":"2023-03-01"}}},"TopupSupervision":{"type":"object","properties":{"expiryCalculatedDate":{"type":"string","description":"(calculated) - top-up supervision expiry date for offender.","format":"date","example":"2023-03-01"},"expiryDate":{"type":"string","description":"top-up supervision expiry date for offender.","format":"date","example":"2023-03-01"},"expiryOverrideDate":{"type":"string","description":"(override) - top-up supervision expiry date for offender.","format":"date","example":"2023-03-01"},"startDate":{"type":"string","description":"Top-up supervision start date for offender - calculated as licence end date + 1 day or releaseDate if licence end date not set.","format":"date","example":"2023-03-01"}}},"DataResponseRisks":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Risks"}}},"OtherRisks":{"type":"object","properties":{"escapeOrAbscond":{"type":"string","description":"\n Risk of escape/abscond. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"YES","enum":["YES","NO","DK","NA"]},"controlIssuesDisruptiveBehaviour":{"type":"string","description":"\n Risk control issues/disruptive behaviour. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"DK","enum":["YES","NO","DK","NA"]},"breachOfTrust":{"type":"string","description":"\n Risk of breach of trust. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"NO","enum":["YES","NO","DK","NA"]},"riskToOtherPrisoners":{"type":"string","description":"\n Risk to other prisoners. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"YES","enum":["YES","NO","DK","NA"]}}},"Risk":{"type":"object","properties":{"risk":{"type":"string","description":"\n Presence of risk. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"YES","enum":["YES","NO","DK","NA"]},"previous":{"type":"string","description":"\n Previous concerns. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"NO","enum":["YES","NO","DK","NA"]},"previousConcernsText":{"type":"string","description":"Supporting comments for any previous concerns.","example":"Risk of self harm concerns due to ..."},"current":{"type":"string","description":"\n Current concerns. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"YES","enum":["YES","NO","DK","NA"]},"currentConcernsText":{"type":"string","description":"Supporting comments for any current concerns.","example":"Risk of self harm concerns due to ..."}}},"RiskSummary":{"type":"object","properties":{"whoIsAtRisk":{"type":"string","description":"Who is at risk","example":"X, Y and Z are at risk"},"natureOfRisk":{"type":"string","description":"What is the nature of the risk","example":"The nature of the risk is X"},"riskImminence":{"type":"string","description":"When is the risk likely to be greatest. Consider the timescale and indicate whether risk is immediate or not. Consider the risks in custody as well as on release.","example":"The risk is imminent and more probable in X situation"},"riskIncreaseFactors":{"type":"string","description":"What circumstances are likely to increase risk. Describe factors, actions, events which might increase level of risk, now and in the future.","example":"If offender in situation X the risk can be higher"},"riskMitigationFactors":{"type":"string","description":"What factors are likely to reduce the risk. Describe factors, actions, and events which may reduce or contain the level of risk. What has previously stopped them?","example":"Giving offender therapy in X will reduce the risk"},"overallRiskLevel":{"type":"string","description":"The overall risk level","example":"HIGH","enum":["VERY_HIGH","HIGH","MEDIUM","LOW"]},"riskInCommunity":{"type":"object","additionalProperties":{"type":"string","description":"Assess the risk of serious harm the offender poses on the basis that they could be released imminently back into the community. This field is a map which can return all or some of the properties given.","example":"{\"children\":\"HIGH\",\"public\":\"MEDIUM\",\"knownAdult\":\"VERY_HIGH\",\"staff\":\"HIGH\",\"prisoners\":\"LOW\"}"},"description":"Assess the risk of serious harm the offender poses on the basis that they could be released imminently back into the community. This field is a map which can return all or some of the properties given.","example":{"children":"HIGH","public":"MEDIUM","knownAdult":"VERY_HIGH","staff":"HIGH","prisoners":"LOW"}},"riskInCustody":{"type":"object","additionalProperties":{"type":"string","description":"Assess both the risk of serious harm the offender presents now, in custody, and the risk they could present to others whilst in a custodial setting. This field is a map which can return all or some of the properties given.","example":"{\"children\":\"HIGH\",\"public\":\"MEDIUM\",\"knownAdult\":\"VERY_HIGH\",\"staff\":\"HIGH\",\"prisoners\":\"LOW\"}"},"description":"Assess both the risk of serious harm the offender presents now, in custody, and the risk they could present to others whilst in a custodial setting. This field is a map which can return all or some of the properties given.","example":{"children":"HIGH","public":"MEDIUM","knownAdult":"VERY_HIGH","staff":"HIGH","prisoners":"LOW"}}}},"RiskToSelf":{"required":["custody","hostelSetting","selfHarm","suicide","vulnerability"],"type":"object","properties":{"suicide":{"$ref":"#/components/schemas/Risk"},"selfHarm":{"$ref":"#/components/schemas/Risk"},"custody":{"$ref":"#/components/schemas/Risk"},"hostelSetting":{"$ref":"#/components/schemas/Risk"},"vulnerability":{"$ref":"#/components/schemas/Risk"}}},"Risks":{"required":["otherRisks","riskToSelf","summary"],"type":"object","properties":{"assessedOn":{"type":"string","description":"Date of risk assessment","format":"date-time"},"riskToSelf":{"$ref":"#/components/schemas/RiskToSelf"},"otherRisks":{"$ref":"#/components/schemas/OtherRisks"},"summary":{"$ref":"#/components/schemas/RiskSummary"}}},"GeneralPredictor":{"type":"object","properties":{"scoreLevel":{"type":"string","description":"\n Indicator for general prediction. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`\n ","example":"VERY_HIGH","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]}}},"GroupReconviction":{"type":"object","properties":{"scoreLevel":{"type":"string","description":"\n Indicator for risk of group reconviction. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`\n ","example":"LOW","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]}}},"PaginatedResponseRiskPredictorScore":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RiskPredictorScore"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"RiskOfSeriousRecidivism":{"type":"object","properties":{"scoreLevel":{"type":"string","description":"\n Indicator for risk of serious recidivism. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`\n ","example":"MEDIUM","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]}}},"RiskPredictorScore":{"required":["generalPredictor","groupReconviction","riskOfSeriousRecidivism","sexualPredictor","violencePredictor"],"type":"object","properties":{"completedDate":{"type":"string","description":"Risk scores calculation completion date","format":"date-time"},"assessmentStatus":{"type":"string","description":"\n Whether the risk score calculation is complete. Possible values are:\n `COMPLETE`,\n `LOCKED_INCOMPLETE`\n ","example":"COMPLETED","enum":["COMPLETED","LOCKED_INCOMPLETE"]},"generalPredictor":{"$ref":"#/components/schemas/GeneralPredictor"},"violencePredictor":{"$ref":"#/components/schemas/ViolencePredictor"},"groupReconviction":{"$ref":"#/components/schemas/GroupReconviction"},"riskOfSeriousRecidivism":{"$ref":"#/components/schemas/RiskOfSeriousRecidivism"},"sexualPredictor":{"$ref":"#/components/schemas/SexualPredictor"}}},"SexualPredictor":{"type":"object","properties":{"indecentScoreLevel":{"type":"string","description":"\n Indicator for risk of sexual indecency. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`,\n ","example":"MEDIUM","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]},"contactScoreLevel":{"type":"string","description":"\n Indicator for risk of sexual contact. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`,\n ","example":"MEDIUM","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]}}},"ViolencePredictor":{"type":"object","properties":{"scoreLevel":{"type":"string","description":"\n Indicator for risk of violence. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`\n ","example":"MEDIUM","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]}}},"DataResponseMappaDetail":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/MappaDetail"}}},"MappaDetail":{"type":"object","properties":{"level":{"type":"number","example":1},"levelDescription":{"type":"string","example":"Description of M1"},"category":{"type":"number","example":2},"categoryDescription":{"type":"string","example":"Description of M2"},"startDate":{"type":"string","example":"2024-02-07"},"reviewDate":{"type":"string","example":"2024-02-07"},"notes":{"type":"string","example":"Mappa Detail for X00001"}}},"DynamicRisk":{"type":"object","properties":{"code":{"type":"string","example":"RCCO"},"description":{"type":"string","example":"Child Concerns - Safeguarding concerns where a child is at risk from the offender"},"startDate":{"type":"string","example":"2022-01-01"},"reviewDate":{"type":"string","example":"2025-01-01"},"notes":{"type":"string","example":"This is a note"}}},"PaginatedResponseDynamicRisk":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DynamicRisk"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"DataResponseRiskCategory":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/RiskCategory"}}},"RiskAssessment":{"type":"object","properties":{"classificationCode":{"type":"string","description":"The classification code of the risk","example":"C"},"classification":{"type":"string","description":"The classification of the code","example":"Cat C"},"assessmentCode":{"type":"string","description":"The assessment code","example":"CATEGORY"},"assessmentDescription":{"type":"string","description":"The description of the assessment","example":"Categorisation"},"assessmentDate":{"type":"string","description":"The date of the assessment","example":"2018-02-11"},"nextReviewDate":{"type":"string","description":"Next review date","example":"2018-02-11"},"assessmentAgencyId":{"type":"string","description":"Agency ID of the assessment","example":"MDI"},"assessmentStatus":{"type":"string","description":"The status of the assessment","example":"P"},"assessmentComment":{"type":"string","description":"Comments regarding the assessment","example":"Comment details"}}},"RiskCategory":{"required":["assessments"],"type":"object","properties":{"offenderNo":{"type":"string"},"assessments":{"type":"array","items":{"$ref":"#/components/schemas/RiskAssessment"}},"category":{"type":"string"},"categoryCode":{"type":"string"}}},"PaginatedResponseRiskManagementPlan":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RiskManagementPlan"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"RiskManagementPlan":{"required":["assessmentId","assessmentStatus","assessmentType","contingencyPlans","dateCompleted","furtherConsiderationsCurrentSituation","initiationDate","interventionsAndTreatment","keyInformationCurrentSituation","latestCompleteDate","latestSignLockDate","monitoringAndControl","supervision","victimSafetyPlanning"],"type":"object","properties":{"assessmentId":{"type":"string","description":"The unique ID of the risk management plan","example":"123456"},"dateCompleted":{"type":"string","description":"The date that the risk management plan was completed","example":"2024-05-04T01:04:20"},"initiationDate":{"type":"string","description":"The date of plan initiation","example":"2024-05-04T01:04:20"},"assessmentStatus":{"type":"string","description":"The status of the plan","example":"COMPLETE"},"assessmentType":{"type":"string","description":"The type of assessment"},"keyInformationCurrentSituation":{"type":"string","description":"Key information about the current situation of the subject being assessed"},"furtherConsiderationsCurrentSituation":{"type":"string","description":"Further considerations about the situation of the subject being assessed"},"supervision":{"type":"string","description":"Who they see, when and why, any support they get from their community, and how well they're desisting from problematic behaviour"},"monitoringAndControl":{"type":"string","description":"Information on restrictions in place to prevent reoffending, what steps have been taken to monitor potential reoffending, including license conditions, community order requirements, PPM restrictions and such."},"interventionsAndTreatment":{"type":"string","description":"Interventions delivered to develop controls and protective factors to reduce risk of reoffending, including practical support, requirements to support interventions and details of who and where these interventions will be administered."},"victimSafetyPlanning":{"type":"string","description":"Restrictions in place to specifically protect victims of, adults known to, and children potentially at risk from the offender."},"contingencyPlans":{"type":"string","description":"Future plans in the form \"If X happens, we will do Y....\" for if parts of the risk management plan break down or requirements or restrictions are breached by the offender."},"latestSignLockDate":{"type":"string","description":"An assessment is considered 'Signed and locked' once it is signed by the assessor, making the plan read-only. This is the date the plan has been signed by the assessor.","example":"2024-05-04T01:04:20"},"latestCompleteDate":{"type":"string","description":"Once a countersignature has been applied to the plan, the plan is considered complete. This is the date the plan has been countersigned.","example":"2024-05-04T01:04:20"}}},"Adjudication":{"type":"object","properties":{"incidentDetails":{"$ref":"#/components/schemas/IncidentDetailsDto"},"isYouthOffender":{"type":"boolean"},"incidentRole":{"$ref":"#/components/schemas/IncidentRoleDto"},"offenceDetails":{"$ref":"#/components/schemas/OffenceDto"},"status":{"type":"string"},"statusReason":{"type":"string"},"statusDetails":{"type":"string"},"hearings":{"type":"array","items":{"$ref":"#/components/schemas/HearingDto"}},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/OutcomeHistoryDto"}},"punishments":{"type":"array","items":{"$ref":"#/components/schemas/PunishmentDto"}},"punishmentComments":{"type":"array","items":{"$ref":"#/components/schemas/PunishmentCommentDto"}}}},"CombinedOutcomeDto":{"type":"object","properties":{"outcome":{"$ref":"#/components/schemas/OutcomeDto"},"referralOutcome":{"$ref":"#/components/schemas/OutcomeDto"}}},"HearingDto":{"type":"object","properties":{"dateTimeOfHearing":{"type":"string"},"oicHearingType":{"type":"string"},"outcome":{"$ref":"#/components/schemas/HearingOutcomeDto"}}},"HearingOutcomeDto":{"type":"object","properties":{"code":{"type":"string"},"reason":{"type":"string"},"details":{"type":"string"},"plea":{"type":"string"}}},"IncidentDetailsDto":{"type":"object","properties":{"dateTimeOfIncident":{"type":"string"}}},"IncidentRoleDto":{"type":"object","properties":{"roleCode":{"type":"string"},"offenceRule":{"$ref":"#/components/schemas/OffenceRuleDetailsDto"}}},"OffenceDto":{"type":"object","properties":{"offenceCode":{"type":"number"},"offenceRule":{"$ref":"#/components/schemas/OffenceRuleDto"}}},"OffenceRuleDetailsDto":{"type":"object","properties":{"paragraphNumber":{"type":"string"},"paragraphDescription":{"type":"string"}}},"OffenceRuleDto":{"type":"object","properties":{"paragraphNumber":{"type":"string"},"paragraphDescription":{"type":"string"}}},"OutcomeDto":{"type":"object","properties":{"code":{"type":"string"},"details":{"type":"string"},"reason":{"type":"string"},"quashedReason":{"type":"string"},"canRemove":{"type":"boolean"}}},"OutcomeHistoryDto":{"type":"object","properties":{"hearing":{"$ref":"#/components/schemas/HearingDto"},"outcome":{"$ref":"#/components/schemas/CombinedOutcomeDto"}}},"PaginatedResponseAdjudication":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Adjudication"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"PunishmentCommentDto":{"type":"object","properties":{"comment":{"type":"string"},"reasonForChange":{"type":"string"},"dateTime":{"type":"string"}}},"PunishmentDto":{"type":"object","properties":{"type":{"type":"string"},"privilegeType":{"type":"string"},"otherPrivilege":{"type":"string"},"schedule":{"$ref":"#/components/schemas/PunishmentScheduleDto"}}},"PunishmentScheduleDto":{"type":"object","properties":{"days":{"type":"number"},"startDate":{"type":"string"},"endDate":{"type":"string"},"suspendedUntil":{"type":"string"}}},"DataResponsePersonProtectedCharacteristics":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonProtectedCharacteristics"}}},"Disability":{"type":"object","properties":{"disabilityType":{"$ref":"#/components/schemas/KeyValue"},"condition":{"$ref":"#/components/schemas/KeyValue"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"notes":{"type":"string","example":"Walking issue"}}},"KeyValue":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"}}},"PersonProtectedCharacteristics":{"required":["age","disabilities","reasonableAdjustments"],"type":"object","properties":{"age":{"type":"number","description":"Age of the person","example":35},"gender":{"type":"string","description":"Gender of the person","example":"Female"},"sexualOrientation":{"type":"string","description":"Sexual orientation of the person","example":"Unknown"},"ethnicity":{"type":"string","description":"Ethnicity of the person","example":"White: Eng./Welsh/Scot./N.Irish/British"},"nationality":{"type":"string","description":"Nationality of the person","example":"Egyptian"},"religion":{"type":"string","description":"Religion of the person","example":"Church of England (Anglican)"},"disabilities":{"type":"array","items":{"$ref":"#/components/schemas/Disability"}},"maritalStatus":{"type":"string","description":"Marital status of the person","example":"Widowed"},"reasonableAdjustments":{"type":"array","items":{"$ref":"#/components/schemas/ReasonableAdjustment"}}}},"ReasonableAdjustment":{"type":"object","properties":{"treatmentCode":{"type":"string","description":"Treatment code","example":"WHEELCHR_ACC"},"commentText":{"type":"string","description":"Comment text","example":"abcd"},"startDate":{"type":"string","description":"Start date","format":"date","example":"2013-04-11"},"endDate":{"type":"string","description":"End date","format":"date","example":"2023-04-11"},"treatmentDescription":{"type":"string","description":"Treatment description","example":"Wheelchair accessibility"}}},"CommunityOffenderManager":{"required":["name","team"],"type":"object","properties":{"name":{"$ref":"#/components/schemas/PersonResponsibleOfficerName"},"email":{"type":"string"},"telephoneNumber":{"type":"string"},"team":{"$ref":"#/components/schemas/PersonResponsibleOfficerTeam"}}},"DataResponsePersonResponsibleOfficer":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonResponsibleOfficer"}}},"PersonResponsibleOfficer":{"required":["communityOffenderManager","prisonOffenderManager"],"type":"object","properties":{"prisonOffenderManager":{"$ref":"#/components/schemas/PrisonOffenderManager"},"communityOffenderManager":{"$ref":"#/components/schemas/CommunityOffenderManager"}}},"PersonResponsibleOfficerName":{"type":"object","properties":{"forename":{"type":"string"},"surname":{"type":"string"}}},"PersonResponsibleOfficerTeam":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"email":{"type":"string"},"telephoneNumber":{"type":"string"}}},"Prison":{"type":"object","properties":{"code":{"type":"string","description":"The prison code, which is usually short for the prison name."}}},"PrisonOffenderManager":{"required":["prison"],"type":"object","properties":{"forename":{"type":"string"},"surname":{"type":"string"},"prison":{"$ref":"#/components/schemas/Prison"}}},"PaginatedResponse":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"DataResponseNeeds":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Needs"}}},"Need":{"type":"object","properties":{"type":{"type":"string","description":"The type of need","example":"DRUG_MISUSE"},"riskOfHarm":{"type":"boolean","description":"Risk of harm"},"riskOfReoffending":{"type":"boolean","description":"Risk of reoffending"},"severity":{"type":"string","description":"Severity of need","example":"NO_NEED"}}},"Needs":{"required":["identifiedNeeds","notIdentifiedNeeds","unansweredNeeds"],"type":"object","properties":{"assessedOn":{"type":"string","description":"Needs assessment completion date","format":"date-time"},"identifiedNeeds":{"type":"array","items":{"$ref":"#/components/schemas/Need"}},"notIdentifiedNeeds":{"type":"array","items":{"$ref":"#/components/schemas/Need"}},"unansweredNeeds":{"type":"array","items":{"$ref":"#/components/schemas/Need"}}}},"DataResponsePersonName":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonName"}}},"PersonName":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"}}},"DataResponsePersonLicences":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonLicences"}}},"Licence":{"required":["conditions"],"type":"object","properties":{"status":{"type":"string"},"typeCode":{"type":"string"},"createdDate":{"type":"string"},"approvedDate":{"type":"string"},"updatedDate":{"type":"string"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/LicenceCondition"}}},"example":[{"status":"IN_PROGRESS","typeCode":"AP","createdDate":"2015-09-23","approvedDate":"2015-09-24","updatedDate":"2015-10-23","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"},{"type":"Custom","code":"b457e9c3-68c6-4f5e-9bd8-c36c5b7e70fb","category":"Contact Restrictions","condition":"You must not contact the victim"}]},{"status":"SUBMITTED","typeCode":"PSS","createdDate":"2016-01-15","approvedDate":"2016-01-16","updatedDate":"2016-02-15","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"}]},{"status":"APPROVED","typeCode":"PSS","createdDate":"2016-01-15","approvedDate":"2016-01-16","updatedDate":"2016-02-15","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"}]},{"status":"ACTIVE","typeCode":"AP","createdDate":"2018-05-20","approvedDate":"2018-05-21","updatedDate":"2018-06-20","conditions":[{"type":"Custom","code":"c97f33e3-1e50-4b28-8f71-5de3e2fbbf79","category":"Travel Restrictions","condition":"You must not leave the country without permission"}]},{"status":"VARIATION_IN_PROGRESS","typeCode":"AP","createdDate":"2019-07-01","approvedDate":"2019-07-02","updatedDate":"2019-08-01","conditions":[{"type":"Rehabilitation","code":"a5371dd7-7f54-42b9-9c3b-35f9e8f6f1e9","category":"Rehabilitation Program","condition":"You must participate in a rehabilitation program"}]},{"status":"VARIATION_SUBMITTED","typeCode":"AP_PSS","createdDate":"2020-09-12","approvedDate":"2020-09-13","updatedDate":"2020-10-12","conditions":[{"type":"Monitoring","code":"e4a8b9cf-4a50-44a2-8a0c-5f38d2fae6f9","category":"Electronic Monitoring","condition":"You must comply with electronic monitoring"}]},{"status":"VARIATION_APPROVED","typeCode":"AP_PSS","createdDate":"2021-11-23","approvedDate":"2021-11-24","updatedDate":"2021-12-23","conditions":[{"type":"Substance Abuse","code":"d4b8b1e8-9e4e-4f6a-a2df-b41e8f8e8e8e","category":"Alcohol Restrictions","condition":"You must not consume alcohol"}]},{"status":"VARIATION_REJECTED","typeCode":"PSS","createdDate":"2022-01-01","approvedDate":"2022-01-02","updatedDate":"2022-02-01","conditions":[{"type":"Association","code":"f9e8f1c8-2f4a-4a6a-a1de-5e7e9f7d9e8f","category":"Contact Restrictions","condition":"You must not associate with known criminals"}]}]},"LicenceCondition":{"type":"object","properties":{"type":{"type":"string"},"code":{"type":"string"},"category":{"type":"string"},"condition":{"type":"string"}}},"PersonLicences":{"required":["hmppsId","licences"],"type":"object","properties":{"hmppsId":{"type":"string","example":"2008/0545166T"},"offenderNumber":{"type":"string","example":"Z1234ZZ"},"licences":{"type":"array","example":[{"status":"IN_PROGRESS","typeCode":"AP","createdDate":"2015-09-23","approvedDate":"2015-09-24","updatedDate":"2015-10-23","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"},{"type":"Custom","code":"b457e9c3-68c6-4f5e-9bd8-c36c5b7e70fb","category":"Contact Restrictions","condition":"You must not contact the victim"}]},{"status":"SUBMITTED","typeCode":"PSS","createdDate":"2016-01-15","approvedDate":"2016-01-16","updatedDate":"2016-02-15","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"}]},{"status":"APPROVED","typeCode":"PSS","createdDate":"2016-01-15","approvedDate":"2016-01-16","updatedDate":"2016-02-15","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"}]},{"status":"ACTIVE","typeCode":"AP","createdDate":"2018-05-20","approvedDate":"2018-05-21","updatedDate":"2018-06-20","conditions":[{"type":"Custom","code":"c97f33e3-1e50-4b28-8f71-5de3e2fbbf79","category":"Travel Restrictions","condition":"You must not leave the country without permission"}]},{"status":"VARIATION_IN_PROGRESS","typeCode":"AP","createdDate":"2019-07-01","approvedDate":"2019-07-02","updatedDate":"2019-08-01","conditions":[{"type":"Rehabilitation","code":"a5371dd7-7f54-42b9-9c3b-35f9e8f6f1e9","category":"Rehabilitation Program","condition":"You must participate in a rehabilitation program"}]},{"status":"VARIATION_SUBMITTED","typeCode":"AP_PSS","createdDate":"2020-09-12","approvedDate":"2020-09-13","updatedDate":"2020-10-12","conditions":[{"type":"Monitoring","code":"e4a8b9cf-4a50-44a2-8a0c-5f38d2fae6f9","category":"Electronic Monitoring","condition":"You must comply with electronic monitoring"}]},{"status":"VARIATION_APPROVED","typeCode":"AP_PSS","createdDate":"2021-11-23","approvedDate":"2021-11-24","updatedDate":"2021-12-23","conditions":[{"type":"Substance Abuse","code":"d4b8b1e8-9e4e-4f6a-a2df-b41e8f8e8e8e","category":"Alcohol Restrictions","condition":"You must not consume alcohol"}]},{"status":"VARIATION_REJECTED","typeCode":"PSS","createdDate":"2022-01-01","approvedDate":"2022-01-02","updatedDate":"2022-02-01","conditions":[{"type":"Association","code":"f9e8f1c8-2f4a-4a6a-a1de-5e7e9f7d9e8f","category":"Contact Restrictions","condition":"You must not associate with known criminals"}]}],"items":{"$ref":"#/components/schemas/Licence"}}}},"ImageMetadata":{"required":["active","captureDateTime","id","orientation","type","view"],"type":"object","properties":{"id":{"type":"integer","description":"The Image ID, in reference to a unique identifier.","format":"int64","example":2461788},"active":{"type":"boolean","description":"A flag to indicate whether an image is in active use. It is no guarantee that the latest uploaded image will be the active one.","example":true},"captureDateTime":{"type":"string","description":"The Date and Time of when the image was captured.","format":"date-time"},"view":{"type":"string","description":"\n View is the subject focus; describing the inner focus or subject of the image, normally referring to a marking, tattoo or deeper level focus of the orientation. In practise this is the interior foci of what is captured in the 'orientation' field.\n Possible values are:\n `FACE` - Facing,\n `TAT` - Tattoo,\n `OTH` - Other,\n `SCAR` - Scar,\n `MARK` - Mark,\n `OIC` - Offence in Custody\n ","example":"FACE","enum":["FACE","TAT","OTH","SCAR","MARK","OIC"]},"orientation":{"type":"string","description":"\n Orientation is the scope focus; describing the scope or outer focus of the image, normally referring to the highest level object of interest within the bounds of the photo itself. This is normally a body part or an angle of photography, such as a photo of someone’s facial view (`FRONT`) or arm (`ARM`).\n Possible values are:\n `ANKLE` - Ankle,\n `ARM` - Arm,\n `DAMAGE` - Damage,\n `EAR` - Ear,\n `ELBOW` - Elbow,\n `FACE` - Face,\n `FIGHT` - Fight,\n `FINGER` - Finger,\n `FOOT` - Foot,\n `FRONT` - Front Facial View,\n `HAND` - Hand,\n `HEAD` - Head,\n `INCIDENT` - Incident,\n `INJURY` - Injury,\n `KNEE` - Knee,\n `LEG` - Leg,\n `LIP` - Lip,\n `NECK` - Neck,\n `NOSE` - Nose,\n `SHOULDER` - Shoulder,\n `THIGH` - Thigh,\n `TOE` - Toe,\n `TORSO` - Torso\n ","example":"FRONT","enum":["ANKLE","ARM","DAMAGE","EAR","ELBOW","FACE","FIGHT","FINGER","FOOT","FRONT","HAND","HEAD","INCIDENT","INJURY","KNEE","LEG","LIP","NECK","NOSE","SHOULDER","THIGH","TOE","TORSO"]},"type":{"type":"string","description":"\n Type is the contextual focus; describing the context or scenario the image was taken within. It could be for a particular purpose or capturing the results of a particular type of incident.\n Possible values are:\n `OFF_BKG` - Offender Booking,\n `OFF_IDM` - Offender Identification Marks,\n `OIC` - Offence In Custody,\n `PPTY` - Property Image\n ","example":"OFF_BKG","enum":["OFF_BKG","OFF_IDM","OIC","PPTY"]}}},"PaginatedResponseImageMetadata":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ImageMetadata"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"CellLocation":{"type":"object","properties":{"prisonCode":{"type":"string"},"prisonName":{"type":"string"},"cell":{"type":"string"}}},"DataResponseCellLocation":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/CellLocation"}}},"CaseNote":{"required":["amendments","sensitive"],"type":"object","properties":{"caseNoteId":{"type":"string","example":"1234"},"offenderIdentifier":{"type":"string","example":"A1234AA"},"type":{"type":"string","example":"KA"},"typeDescription":{"type":"string","example":"Key Worker"},"subType":{"type":"string","example":"KS"},"subTypeDescription":{"type":"string","example":"Key Worker Session"},"creationDateTime":{"type":"string","description":"Date and Time of Case Note creation","format":"date-time"},"occurrenceDateTime":{"type":"string","description":"Date and Time of when case note contact with offender was made","format":"date-time"},"text":{"type":"string","example":"This is some text"},"locationId":{"type":"string","example":"MDI"},"sensitive":{"type":"boolean"},"amendments":{"type":"array","description":"List of amendments to the case note","items":{"$ref":"#/components/schemas/CaseNoteAmendment"}}}},"CaseNoteAmendment":{"type":"object","properties":{"caseNoteAmendmentId":{"type":"integer","format":"int64","example":123232},"creationDateTime":{"type":"string","description":"Date and Time of Case Note creation","format":"date-time"},"additionalNoteText":{"type":"string","example":"Some Additional Text"}},"description":"List of amendments to the case note"},"PaginatedResponseCaseNote":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CaseNote"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"Alert":{"type":"object","properties":{"offenderNo":{"type":"string","description":"Offender unique reference","example":"Z1234ZZ"},"type":{"type":"string","description":"Alert type","example":"X"},"typeDescription":{"type":"string","description":"Alert type description","example":"Security"},"code":{"type":"string","description":"Alert code","example":"PO"},"codeDescription":{"type":"string","description":"Alert code description","example":"MAPPA Nominal"},"comment":{"type":"string","description":"Alert comment","example":"Professional lock pick"},"dateCreated":{"type":"string","description":"Date of the alert, which might differ from the date it was created","format":"date","example":"2014-09-23"},"dateExpired":{"type":"string","description":"Date that the alert expires","format":"date","example":"2015-09-23"},"expired":{"type":"boolean","description":"Whether the alert has expired","example":true},"active":{"type":"boolean","description":"Whether the alert is active","example":true}}},"PaginatedResponseAlert":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Alert"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"Address":{"required":["noFixedAddress","types"],"type":"object","properties":{"country":{"type":"string","example":"England"},"county":{"type":"string","example":"Greater London"},"endDate":{"type":"string","format":"date"},"locality":{"type":"string","example":"London Bridge"},"name":{"type":"string","example":"Name of the building of residence"},"noFixedAddress":{"type":"boolean","description":"Indicates whether the person has a permanent place of residence","example":true},"number":{"type":"string","example":"1"},"postcode":{"type":"string","example":"SE1 1TE"},"startDate":{"type":"string","format":"date"},"street":{"type":"string","example":"O'Meara Street"},"town":{"type":"string","example":"London"},"types":{"type":"array","items":{"$ref":"#/components/schemas/Type"}},"notes":{"type":"string","example":"This is their partner's address."}}},"DataResponseListAddress":{"required":["data"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Address"}}}},"Type":{"type":"object","properties":{"code":{"type":"string","description":"Address type code, for example: `BUS`, `HOME`, `WORK`.","example":"BUS"},"description":{"type":"string","description":"Description of address type, for example: `Business Address`, `Home Address`, `Work Address`.","example":"Business Address"}},"description":"Type or usage of address, for example `Business Address`, `Home Address`, `Work Address`."},"Response":{"required":["data","errors"],"type":"object","properties":{"data":{"type":"object"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/UpstreamApiError"}}}},"UpstreamApiError":{"required":["causedBy","type"],"type":"object","properties":{"causedBy":{"type":"string","enum":["NOMIS","PRISONER_OFFENDER_SEARCH","PROBATION_OFFENDER_SEARCH","NDELIUS","ASSESS_RISKS_AND_NEEDS","ADJUDICATIONS","CVL","CASE_NOTES","MANAGE_POM_CASE","RISK_MANAGEMENT_PLAN","TEST","PLP"]},"type":{"type":"string","enum":["ENTITY_NOT_FOUND","BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR"]},"description":{"type":"string"}}},"DataResponseNomisNumber":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/NomisNumber"}}},"NomisNumber":{"type":"object","properties":{"nomisNumber":{"type":"string"}}},"DataResponseHmppsId":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/HmppsId"}}},"HmppsId":{"type":"object","properties":{"hmppsId":{"type":"string"}}},"CaseDetail":{"type":"object","properties":{"nomsId":{"type":"string"},"name":{"$ref":"#/components/schemas/Name"},"dateOfBirth":{"type":"string"},"gender":{"type":"string"},"courtAppearance":{"$ref":"#/components/schemas/CourtAppearance"},"sentence":{"$ref":"#/components/schemas/CaseSentence"},"responsibleProvider":{"$ref":"#/components/schemas/ResponsibleProvider"},"ogrsScore":{"type":"integer","format":"int64"},"rsrScore":{"type":"number","format":"double"},"age":{"type":"integer","format":"int64"},"ageAtRelease":{"type":"integer","format":"int64"}}},"CaseSentence":{"type":"object","properties":{"date":{"type":"string"},"sentencingCourt":{"$ref":"#/components/schemas/SentencingCourt"},"releaseDate":{"type":"string"},"expectedReleaseDate":{"type":"string"}}},"CourtAppearance":{"type":"object","properties":{"date":{"type":"string"},"court":{"$ref":"#/components/schemas/CourtDetails"}}},"CourtDetails":{"type":"object","properties":{"name":{"type":"string","description":"The name of the court","example":"Manchester Crown Court"}}},"Name":{"type":"object","properties":{"forename":{"type":"string"},"middleName":{"type":"string"},"surname":{"type":"string"}}},"ResponseCaseDetail":{"required":["data","errors"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/CaseDetail"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/UpstreamApiError"}}}},"ResponsibleProvider":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}}},"SentencingCourt":{"type":"object","properties":{"name":{"type":"string"}}},"BadRequest":{"properties":{"status":{"type":"number","example":400},"userMessage":{"type":"string","example":"Validation failure: No query parameters specified."},"developerMessage":{"type":"string","example":"No query parameters specified."}}},"PersonNotFound":{"properties":{"status":{"type":"number","example":404},"userMessage":{"type":"string","example":"404 Not found error: Could not find person with HMPPS id: 2003/0011991D."},"developerMessage":{"type":"string","example":"Could not find person with HMPPS id: 2003/0011991D."}},"description":"Failed to find a person with the provided HMPPS ID."},"InternalServerError":{"properties":{"status":{"type":"number","example":500},"userMessage":{"type":"string","example":"Internal Server Error"},"developerMessage":{"type":"string","example":"Unable to complete request as an upstream service is not responding."}},"description":"An upstream service was not responding, so we cannot verify the accuracy of any data we did get."}},"securitySchemes":{"dn":{"type":"apiKey","description":"Example: O=test,CN=automated-test-client","name":"subject-distinguished-name","in":"header"}}}} \ No newline at end of file +{"openapi":"3.0.1","info":{"title":"HMPPS Integration API","description":"A long-lived API that exposes data from HMPPS systems such as the National Offender Management Information System (NOMIS), nDelius (probation system) and Offender Assessment System (OASys), providing a single point of entry for consumers.","license":{"name":"MIT","url":"https://github.com/ministryofjustice/hmpps-integration-api/blob/main/LICENSE"},"version":"1.0"},"servers":[{"url":"https://dev.integration-api.hmpps.service.justice.gov.uk","description":"Development server"},{"url":"https://preprod.integration-api.hmpps.service.justice.gov.uk","description":"Pre-production server, containing live data"},{"url":"https://integration-api.hmpps.service.justice.gov.uk","description":"Production"}],"security":[{"dn":[]}],"paths":{"/v1/prison/prisoners/{hmppsId}":{"get":{"tags":["prison"],"summary":"Returns a single prisoners details given an hmppsId, does not query for a probation person.","operationId":"getPerson","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found a prisoner with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePerson"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons":{"get":{"tags":["persons"],"summary":"Returns person(s) by search criteria, sorted by date of birth (newest first). At least one query parameter must be specified.","operationId":"getPersons","parameters":[{"name":"first_name","in":"query","description":"The first name of the person","required":false,"schema":{"type":"string"}},{"name":"last_name","in":"query","description":"The last name of the person","required":false,"schema":{"type":"string"}},{"name":"pnc_number","in":"query","description":"A URL-encoded pnc identifier","required":false,"schema":{"type":"string"}},{"name":"date_of_birth","in":"query","description":"The date of birth of the person","required":false,"schema":{"type":"string"}},{"name":"search_within_aliases","in":"query","description":"Whether to return results that match the search criteria within the aliases of a person.","required":false,"schema":{"type":"boolean","default":false}},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully performed the query on upstream APIs. An empty list is returned when no results are found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponsePerson"}}}},"400":{"description":"There were no query parameters passed in. At least one must be specified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{hmppsId}/plp-review-schedule":{"get":{"tags":["alerts","persons"],"summary":"Returns plp the review schedule associated with a person.","operationId":"getReviewSchedule","parameters":[{"name":"hmppsId","in":"path","description":"A HmppsId ","required":true,"schema":{"type":"string"},"example":"A123123"}],"responses":{"200":{"description":"Successfully found induction schedule for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseReviewSchedule"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{hmppsId}/plp-induction-schedule":{"get":{"tags":["alerts","persons"],"summary":"Returns plp the induction schedule associated with a person.","operationId":"getInductionSchedule","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS id","required":true,"schema":{"type":"string"},"example":"A123123"}],"responses":{"200":{"description":"Successfully found induction schedule for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseInductionSchedule"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}":{"get":{"tags":["persons"],"summary":"Returns a person.","operationId":"getPerson_1","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseOffenderSearchResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/status-information":{"get":{"tags":["alerts","persons"],"summary":"Returns the status information associated with a person.","operationId":"getStatusInformation","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found status information for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseStatusInformation"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/sentences":{"get":{"tags":["persons"],"summary":"Returns sentences associated with a person, sorted by dateOfSentencing (newest first).","operationId":"getPersonSentences","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found sentences for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseSentence"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/sentences/latest-key-dates-and-adjustments":{"get":{"tags":["persons"],"summary":"Returns the key dates and adjustments about a person's release from prison for their latest sentence.","operationId":"getPersonLatestSentenceKeyDatesAndAdjustments","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found latest sentence key dates and adjustments for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseLatestSentenceKeyDatesAndAdjustments"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risks/serious-harm":{"get":{"tags":["risks"],"summary":"Returns Risk of Serious Harm (ROSH) risks associated with a person. Returns only assessments completed in the last year. This endpoint does not serve LAO (Limited Access Offender) data.","operationId":"getPersonRiskSeriousHarm","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found risks for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseRisks"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risks/scores":{"get":{"tags":["risks"],"summary":"Returns risk scores from the last year associated with a person, sorted by completedDate (newest first). This endpoint does not serve LAO (Limited Access Offender) data.","operationId":"getPersonRiskPredictorScores","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found risk scores for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseRiskPredictorScore"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risks/mappadetail":{"get":{"tags":["persons"],"summary":"Returns the mappa detail related to a person.","operationId":"getMappaDetail","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found mappa detail for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseMappaDetail"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risks/dynamic":{"get":{"tags":["alerts","persons"],"summary":"Returns dynamic risks associated with a person.","operationId":"getDynamicRisks","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found dynamic risks for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseDynamicRisk"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risks/categories":{"get":{"tags":["persons"],"summary":"Returns the categories related to an offender.","operationId":"getPersonRiskCategories","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found risk categories for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseRiskCategory"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/risk-management-plan":{"get":{"tags":["risks"],"summary":"Returns a list of Risk Management Plans created for the person with the provided HMPPS ID.","operationId":"getRiskManagementPlans","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found risk management plans for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseRiskManagementPlan"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/reported-adjudications":{"get":{"tags":["default"],"summary":"Returns adjudications associated with a person, sorted by dateTimeOfIncident (newest first).","operationId":"getPersonAdjudications","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseAdjudication"}}}},"404":{"description":"Failed to find adjudications for the person with the provided hmppsId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/protected-characteristics":{"get":{"tags":["default"],"summary":"Returns protected characteristics of a person.","operationId":"getPersonAddresses","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonProtectedCharacteristics"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/person-responsible-officer":{"get":{"tags":["default"],"summary":"Returns the person responsible officer associated with a person.","operationId":"getPersonResponsibleOfficer","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found the person responsible officer for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonResponsibleOfficer"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/offences":{"get":{"tags":["persons"],"summary":"\n Returns offences associated with a person, ordered by startDate (newest first).\n > Note: This API does not contain the complete list of offences for a person.\n > Offences are retrieved from Prison and Probation systems exclusively.\n > Prison systems record only custodial sentences, while Probation systems record only the main offence and some additional offences for case management purposes. Other offences recorded by HMCTS and police may not be included.\n ","operationId":"getPersonOffences","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found offences for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"},"example":{"data":[{"serviceSource":"NOMIS","systemSource":"PRISON_SYSTEMS","cjsCode":"RR84170","courtDates":["2018-02-10","2019-02-10"],"courtName":"London Magistrates Court","description":"Commit an act / series of acts with intent to pervert the course of public justice","endDate":"2018-03-10","hoCode":3457,"startDate":"1965-12-01","statuteCode":"RR84"},{"serviceSource":"NDELIUS","systemSource":"PROBATION_SYSTEMS","cjsCode":"RR12345","courtDates":["2020-05-15","2021-05-15"],"courtName":"Manchester Crown Court","description":"Assault causing grievous bodily harm","endDate":"2020-06-20","hoCode":3458,"startDate":"2020-05-10","statuteCode":"RR85"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/needs":{"get":{"tags":["needs"],"summary":"\n Returns criminogenic needs associated with a person. This endpoint does not serve LAO (Limited Access Offender) data.\n\n Note: Criminogenic needs are dynamic factors that are directly linked to criminal behaviour. Eight criminogenic needs are measured in OASys: Accommodation, Employability, Relationships, Lifestyle and Associates, Drug Misuse, Alcohol Misuse, Thinking & Behaviour and Attitudes. These are scored according to whether there is “no need”, “some need” or “severe need”, and a need is identified in a specific section based on calculations around these scores.\n However, the process by which needs are assessed is changing as early as next year (2024), specifically moving to a strength-based model that seeks to identify and develop the strengths of people with convictions. As a consequence of this, the information provided by this endpoint will also change.\n ","operationId":"getPersonNeeds","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found criminogenic needs for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseNeeds"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/name":{"get":{"tags":["persons"],"summary":"Returns a person's name","operationId":"getPersonName","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonName"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/licences/conditions":{"get":{"tags":["default"],"summary":"Returns license conditions associated with a person, sorted by createdDateTime (newest first).","operationId":"getLicenceConditions","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found licenses for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonLicences"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/images":{"get":{"tags":["persons"],"summary":"Returns metadata of images associated with a person sorted by captureDateTime (newest first).","operationId":"getPersonImages","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found a person with the provided HMPPS ID. If a person doesn't have any images, then an empty list (`[]`) is returned in the `data` property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseImageMetadata"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/cell-location":{"get":{"tags":["persons"],"operationId":"getPersonCellLocation","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseCellLocation"}}}}}}},"/v1/persons/{encodedHmppsId}/case-notes":{"get":{"tags":["default"],"summary":"Returns case notes associated with a person.","operationId":"getCaseNotesForPerson","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"startDate","in":"query","description":"Filter case notes from this date","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"Filter case notes up to this date","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"locationId","in":"query","description":"Filter by the location. example MDI","required":false,"schema":{"type":"string"},"example":"MDI"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":1}},{"name":"perPage","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"Successfully found case notes for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseCaseNote"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/alerts":{"get":{"tags":["alerts","persons"],"summary":"Returns alerts associated with a person, sorted by dateCreated (newest first).","operationId":"getPersonAlerts","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found alerts for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseAlert"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/alerts/pnd":{"get":{"tags":["alerts","persons"],"summary":"Returns alerts associated with a person, sorted by dateCreated (newest first).","operationId":"getPersonAlertsPND","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"},{"name":"page","in":"query","description":"The page number (starting from 1)","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"perPage","in":"query","description":"The maximum number of results for a page","required":false,"schema":{"minimum":1,"type":"string"}}],"responses":{"200":{"description":"Successfully found alerts for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseAlert"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/persons/{encodedHmppsId}/addresses":{"get":{"tags":["persons"],"summary":"Returns addresses associated with a person, ordered by startDate.","operationId":"getPersonAddresses_1","parameters":[{"name":"encodedHmppsId","in":"path","description":"A URL-encoded HMPPS identifier","required":true,"schema":{"type":"string"},"example":"2008%2F0545166T"}],"responses":{"200":{"description":"Successfully found a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseListAddress"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/images/{id}":{"get":{"tags":["images"],"summary":"Returns an image in bytes as a JPEG.","operationId":"getImage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Successfully found an image with the provided ID.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Failed to find an image with the provided ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/hmpps/reference-data":{"get":{"tags":["reference-data-controller"],"summary":"Returns probation and prison reference data codes descriptions for values returned by the API","operationId":"getReferenceData","responses":{"200":{"description":"Successfully returned prison and probation reference data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"},"example":{"data":{"prisonReferenceData":{"PHONE_TYPE":[{"code":"a","description":"desc_a"}],"ALERT_TYPE":[{"code":"a","description":"desc_a"}]},"probationReferenceData":{"PHONE_TYPE":[{"code":"a","description":"desc_a"}],"REGISTER_TYPE":[{"code":"a","description":"desc_a"}]}},"errors":[]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/hmpps/id/nomis-number/by-hmpps-id/{hmppsId}":{"get":{"tags":["default"],"summary":"Return nomis number for a given HMPPS Id","description":"Accepts a HMPPS Id (hmppsId) and looks up the corresponding nomis number.\n ","operationId":"getNomisNumberByHMPPSID","parameters":[{"name":"hmppsId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseNomisNumber"}}}},"404":{"description":"Nomis number could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseNomisNumber"}}}},"400":{"description":"Invalid hmppsId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseNomisNumber"}}}}}}},"/v1/hmpps/id/nomis-number/{nomisNumber}":{"get":{"tags":["default"],"summary":"Return a HMPPS id for a given nomis number","description":"Accepts a nomis number and looks up the corresponding HMPPS Id (hmppsId).\n ","operationId":"getHmppsIdByNomisNumber","parameters":[{"name":"nomisNumber","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}},"404":{"description":"Nomis number could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}},"400":{"description":"Invalid hmppsId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}}}}},"/v1/hmpps/id/by-nomis-number/{nomisNumber}":{"get":{"tags":["default"],"summary":"Return a HMPPS id for a given nomis number","description":"Accepts a nomis number and looks up the corresponding HMPPS Id (hmppsId).\n ","operationId":"getHmppsIdByNomisNumber_1","parameters":[{"name":"nomisNumber","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}},"404":{"description":"Nomis number could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}},"400":{"description":"Invalid hmppsId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseHmppsId"}}}}}}},"/v1/epf/person-details/{hmppsId}/{eventNumber}":{"get":{"tags":["default"],"summary":"Probation case information for the Effective Proposals Framework service","description":"Accepts an HMPPS Id (hmppsId) and Delius Event number\n and returns a data structure giving background information on the probation case\n for use in the Effective Proposals Framework system. The information is used to\n reduce the need for the EPF user to re-key information already held in Delius.\n ","operationId":"getCaseDetail","parameters":[{"name":"hmppsId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventNumber","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseCaseDetail"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"components":{"schemas":{"Alias":{"required":["firstName","lastName"],"type":"object","properties":{"firstName":{"type":"string","description":"first name","example":"John"},"lastName":{"type":"string","description":"last name","example":"Marston"},"middleName":{"type":"string","description":"last name","example":"Marston"},"dateOfBirth":{"type":"string","description":"date of birth","format":"date","example":"1965-12-01"},"gender":{"type":"string","description":"gender","example":"Male"},"ethnicity":{"type":"string","description":"ethnicity","example":"Prefer not to say"}}},"ContactDetailsWithEmailAndPhone":{"type":"object","properties":{"phoneNumbers":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumber"}},"emails":{"type":"array","description":"A list of email addresses","example":"leslie.knope@example.com","items":{"type":"string","description":"A list of email addresses","example":"leslie.knope@example.com"}}}},"DataResponsePerson":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Person"}}},"Identifiers":{"type":"object","properties":{"nomisNumber":{"type":"string","description":"A prisoner identifier from NOMIS.","example":"A1234AA"},"croNumber":{"type":"string","description":"A Criminal Records Office identifier from National Identification Service (NIS) or National Automated Fingerprint Identification System (NAFIS).","example":"SF80/655108T"},"deliusCrn":{"type":"string","description":"A Case Reference Number from Delius.","example":"X00001"}},"description":"Other unique identifiers for a person."},"Person":{"required":["aliases","firstName","identifiers","lastName"],"type":"object","properties":{"firstName":{"type":"string","description":"First name","example":"John"},"lastName":{"type":"string","description":"Last name","example":"Morgan"},"middleName":{"type":"string","description":"Middle name","example":"John"},"dateOfBirth":{"type":"string","description":"Date of birth","format":"date","example":"1965-12-01"},"gender":{"type":"string","description":"Gender","example":"Male"},"ethnicity":{"type":"string","description":"Ethnicity","example":"White: Eng./Welsh/Scot./N.Irish/British"},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/Alias"}},"identifiers":{"$ref":"#/components/schemas/Identifiers"},"pncId":{"type":"string","description":"An identifier from the Police National Computer (PNC)"},"hmppsId":{"type":"string","description":"HMPPS identifier","example":"2008/0545166T"},"contactDetails":{"$ref":"#/components/schemas/ContactDetailsWithEmailAndPhone"}}},"PhoneNumber":{"type":"object","properties":{"number":{"type":"string","description":"A phone number","example":"079123456789"},"type":{"type":"string","description":"The type of number","example":"TELEPHONE"}}},"PaginatedResponsePerson":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"Pagination":{"required":["count","isLastPage","page","perPage","totalCount","totalPages"],"type":"object","properties":{"isLastPage":{"type":"boolean","description":"Is the current page the last one?","example":true},"count":{"type":"integer","description":"The number of results in `data` for the current page","format":"int32","example":1},"page":{"type":"integer","description":"The current page number","format":"int32","example":1},"perPage":{"type":"integer","description":"The maximum number of results in `data` for a page","format":"int32","example":10},"totalCount":{"type":"integer","description":"The total number of results in `data` across all pages","format":"int64","example":1},"totalPages":{"type":"integer","description":"The total number of pages","format":"int32","example":1}}},"DataResponseReviewSchedule":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/ReviewSchedule"}}},"ReviewSchedule":{"type":"object","properties":{"deadlineDate":{"type":"string","description":"An ISO-8601 date representing when the Review should be completed by.","format":"date","example":"2023-09-01"},"nomisNumber":{"type":"string"},"description":{"type":"string"}}},"DataResponseInductionSchedule":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/InductionSchedule"}}},"InductionSchedule":{"type":"object","properties":{"deadlineDate":{"type":"string","description":"An ISO-8601 date representing when the Induction should be completed by.","format":"date","example":"2023-09-01"},"status":{"type":"string","description":"The current status of the Induction Schedule","example":"SCHEDULED"},"calculationRule":{"type":"string","description":"The Induction Schedule rule used to determine deadline date.","example":"NEW_PRISON_ADMISSION"},"nomisNumber":{"type":"string","description":"The Nomis number of the person.","example":"A1234BC"},"systemUpdatedBy":{"type":"string","description":"The name of the person who used the PLP system to update the Induction Schedule, or 'system' for system generated updates.","example":"John Smith"},"systemUpdatedAt":{"type":"string","description":"An ISO-8601 timestamp representing the time the PLP system was used to update the Induction Schedule.","format":"date-time","example":"2023-06-19T09:39:44Z"},"inductionPerformedBy":{"type":"string","description":"The name of the person who performed the Induction with the prisoner. In the case of system generated updates or setting an exemption this field will not be present.","example":"Fred Jones"},"inductionPerformedAt":{"type":"string","description":"An ISO-8601 date representing when the Induction was performed with the prisoner. In the case of system generated updates this field will not be present.","format":"date","example":"2023-06-30"}}},"DataResponseOffenderSearchResponse":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/OffenderSearchResponse"}}},"OffenderSearchResponse":{"type":"object","properties":{"prisonerOffenderSearch":{"$ref":"#/components/schemas/Person"},"probationOffenderSearch":{"$ref":"#/components/schemas/PersonOnProbation"}}},"PersonOnProbation":{"required":["aliases","firstName","identifiers","lastName","underActiveSupervision"],"type":"object","properties":{"person":{"$ref":"#/components/schemas/Person"},"underActiveSupervision":{"type":"boolean"},"firstName":{"type":"string"},"lastName":{"type":"string"},"middleName":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"gender":{"type":"string"},"ethnicity":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/Alias"}},"identifiers":{"$ref":"#/components/schemas/Identifiers"},"pncId":{"type":"string"},"hmppsId":{"type":"string"},"contactDetails":{"$ref":"#/components/schemas/ContactDetailsWithEmailAndPhone"}}},"PaginatedResponseStatusInformation":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StatusInformation"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"StatusInformation":{"type":"object","properties":{"code":{"type":"string","example":"ASFO"},"description":{"type":"string","example":"Serious Further Offence - Subject to SFO review/investigation"},"startDate":{"type":"string","example":"2022-01-01"},"reviewDate":{"type":"string","example":"2025-01-01"},"notes":{"type":"string","example":"This is a note"}}},"PaginatedResponseSentence":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sentence"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"Sentence":{"required":["isCustodial","length","serviceSource","systemSource"],"type":"object","properties":{"serviceSource":{"type":"string","description":"\n Which upstream API service the sentence originates from. Possible values are:\n `NOMIS`,\n `NDELIUS`\n ","example":"NOMIS","enum":["NOMIS","PRISONER_OFFENDER_SEARCH","PROBATION_OFFENDER_SEARCH","NDELIUS","ASSESS_RISKS_AND_NEEDS","ADJUDICATIONS","CVL","CASE_NOTES","MANAGE_POM_CASE","RISK_MANAGEMENT_PLAN","TEST","PLP","NOMIS","NDELIUS"]},"systemSource":{"type":"string","description":"\n Which upstream API system the sentence originates from. Possible values are:\n `PRISON_SYSTEMS`,\n `PROBATION_SYSTEMS`\n ","example":"PROBATION_SYSTEMS","enum":["PRISON_SYSTEMS","PROBATION_SYSTEMS","PRISON_SYSTEMS","PROBATION_SYSTEMS"]},"dateOfSentencing":{"type":"string","description":"Date of sentencing","format":"date","example":"2009-09-09"},"description":{"type":"string","description":"Description of the sentence","example":"Young Offender Inst - >=12 mths"},"isActive":{"type":"boolean","description":"Whether the sentence is active","example":true},"isCustodial":{"type":"boolean","description":"Whether the sentence is custodial","example":true},"fineAmount":{"type":"number","description":"The amount of fine related to the sentence and offence","example":480.59},"length":{"$ref":"#/components/schemas/SentenceLength"}}},"SentenceLength":{"required":["terms"],"type":"object","properties":{"duration":{"type":"integer","description":"Duration of the sentence","format":"int32","example":10},"units":{"type":"string","description":"\n Time unit that is used in combination with the duration field. Possible values are:\n `Hours`,\n `Days`,\n `Weeks`,\n `Months`,\n `Years`\n ","example":"Hours","enum":["Hours","Days","Weeks","Months","Years"]},"terms":{"type":"array","items":{"$ref":"#/components/schemas/SentenceTerm"}}}},"SentenceTerm":{"type":"object","properties":{"years":{"type":"integer","description":"Number of years in the term","format":"int32","example":5},"months":{"type":"integer","description":"Number of months in the term","format":"int32","example":4},"weeks":{"type":"integer","description":"Number of weeks in the term","format":"int32","example":3},"days":{"type":"integer","description":"Number of days in the term","format":"int32","example":2},"hours":{"type":"integer","description":"Number of hours in the term","format":"int32","example":1},"prisonTermCode":{"type":"string","description":"\n The sentence term code\n Possible values are:\n `CUR` - Curfew Period,\n `DEF` - Deferment Period,\n `DET` - Detention,\n `HOURS` - Hours Ordered,\n `IMP` - Imprisonment,\n `LIC` - Licence,\n `PSYCH` - Psychiatric Hospital,\n `SCUS` - Custodial Period,\n `SEC104` - Breach of supervision requirements,\n `SEC105` - Breach due to imprisonable offence,\n `SEC86` - Section 86 of 2000 Act,\n `SUP` - Sentence Length,\n `SUSP` - Suspension Period\n ","example":"IMP","enum":["CUR","DEF","DET","HOURS","IMP","LIC","PSYCH","SCUS","SEC104","SEC105","SEC86","SUP","SUSP"]}}},"DataResponseLatestSentenceKeyDatesAndAdjustments":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/LatestSentenceKeyDatesAndAdjustments"}}},"HomeDetentionCurfewDate":{"type":"object","properties":{"actualDate":{"type":"string","format":"date"},"eligibilityCalculatedDate":{"type":"string","format":"date"},"eligibilityDate":{"type":"string","format":"date"},"eligibilityOverrideDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}}},"LatestSentenceKeyDatesAndAdjustments":{"type":"object","properties":{"adjustments":{"$ref":"#/components/schemas/SentenceAdjustment"},"automaticRelease":{"$ref":"#/components/schemas/SentenceKeyDate"},"conditionalRelease":{"$ref":"#/components/schemas/SentenceKeyDate"},"dtoPostRecallRelease":{"$ref":"#/components/schemas/SentenceKeyDate"},"earlyTerm":{"$ref":"#/components/schemas/SentenceKeyDateWithCalculatedDate"},"homeDetentionCurfew":{"$ref":"#/components/schemas/HomeDetentionCurfewDate"},"lateTerm":{"$ref":"#/components/schemas/SentenceKeyDateWithCalculatedDate"},"licenceExpiry":{"$ref":"#/components/schemas/SentenceKeyDateWithCalculatedDate"},"midTerm":{"$ref":"#/components/schemas/SentenceKeyDateWithCalculatedDate"},"nonDto":{"$ref":"#/components/schemas/NonDtoDate"},"nonParole":{"$ref":"#/components/schemas/SentenceKeyDate"},"paroleEligibility":{"$ref":"#/components/schemas/SentenceKeyDateWithCalculatedDate"},"postRecallRelease":{"$ref":"#/components/schemas/SentenceKeyDate"},"release":{"$ref":"#/components/schemas/ReleaseDate"},"sentence":{"$ref":"#/components/schemas/SentenceDate"},"topupSupervision":{"$ref":"#/components/schemas/TopupSupervision"},"actualParoleDate":{"type":"string","description":"the offender's actual parole date","format":"date","example":"2023-03-01"},"earlyRemovalSchemeEligibilityDate":{"type":"string","description":"the date on which offender will be eligible for early removal (under the Early Removal Scheme for foreign nationals).","format":"date","example":"2023-03-01"},"releaseOnTemporaryLicenceDate":{"type":"string","description":"the date on which offender will be released on temporary licence.","format":"date","example":"2023-03-01"},"tariffDate":{"type":"string","description":"date on which minimum term is reached for parole (indeterminate/life sentences).","format":"date","example":"2023-03-01"},"tariffEarlyRemovalSchemeEligibilityDate":{"type":"string","description":"tariffEarlyRemovalSchemeEligibilityDate.","format":"date","example":"2023-03-01"}}},"NonDtoDate":{"type":"object","properties":{"date":{"type":"string","description":"Release date for non-DTO sentence (if applicable). This will be based on one of ARD, CRD, NPD or PRRD. NonDto stands for Non-Detention training order.","format":"date","example":"2023-03-01"},"releaseDateType":{"type":"string","description":"\n Indicates which type of non-DTO release date is the effective release date. One of 'ARD', 'CRD', 'NPD' or 'PRRD'. Possible values are:\n `ARD`,\n `CRD`,\n `NPD`,\n `PRRD`.\n ","example":"ARD","enum":["ARD","CRD","NPD","PRRD"]}}},"ReleaseDate":{"type":"object","properties":{"date":{"type":"string","description":"\n Confirmed, actual, approved, provisional or calculated release date for offender, according to offender release date algorithm.\n\n Algorithm\n If there is a confirmed release date, the offender release date is the confirmed release date.\n If there is no confirmed release date for the offender, the offender release date is either the actual parole date or the home detention curfew actual date.\n If there is no confirmed release date, actual parole date or home detention curfew actual date for the offender, the release date is the later of the nonDtoReleaseDate or midTermDate value (if either or both are present)\n ","format":"date","example":"2023-03-01"},"confirmedDate":{"type":"string","description":"Confirmed release date for offender.","format":"date","example":"2023-03-01"}}},"SentenceAdjustment":{"type":"object","properties":{"additionalDaysAwarded":{"type":"number","description":"Number of additional days awarded","example":10},"unlawfullyAtLarge":{"type":"number","description":"Number unlawfully at large days","example":16},"lawfullyAtLarge":{"type":"number","description":"Number of lawfully at large days","example":11},"restoredAdditionalDaysAwarded":{"type":"number","description":"Number of restored additional days awarded","example":20},"specialRemission":{"type":"number","description":"Number of special remission days","example":14},"recallSentenceRemand":{"type":"number","description":"Number of recall sentence remand days","example":7},"recallSentenceTaggedBail":{"type":"number","description":"Number of recall sentence tagged bail days","example":19},"remand":{"type":"number","description":"Number of remand days","example":3},"taggedBail":{"type":"number","description":"Number of tagged bail days","example":13},"unusedRemand":{"type":"number","description":"Number of unused remand days","example":13}}},"SentenceDate":{"type":"object","properties":{"effectiveEndDate":{"type":"string","description":"Effective sentence end date.","format":"date","example":"2023-03-01"},"expiryCalculatedDate":{"type":"string","description":"date on which sentence expired (as calculated by NOMIS).","format":"date","example":"2023-03-01"},"expiryDate":{"type":"string","description":"date on which sentence expires.","format":"date","example":"2023-03-01"},"expiryOverrideDate":{"type":"string","description":"date on which sentence expires (override).","format":"date","example":"2023-03-01"},"startDate":{"type":"string","description":"Sentence start date.","format":"date","example":"2023-03-01"}}},"SentenceKeyDate":{"type":"object","properties":{"date":{"type":"string","description":"release date for offender","format":"date","example":"2023-03-01"},"overrideDate":{"type":"string","description":"release override date for offender","format":"date","example":"2023-03-01"}}},"SentenceKeyDateWithCalculatedDate":{"type":"object","properties":{"date":{"type":"string","description":"release date for offender","format":"date","example":"2023-03-01"},"overrideDate":{"type":"string","description":"release override date for offender","format":"date","example":"2023-03-01"},"calculatedDate":{"type":"string","description":"release calculated date for offender","format":"date","example":"2023-03-01"}}},"TopupSupervision":{"type":"object","properties":{"expiryCalculatedDate":{"type":"string","description":"(calculated) - top-up supervision expiry date for offender.","format":"date","example":"2023-03-01"},"expiryDate":{"type":"string","description":"top-up supervision expiry date for offender.","format":"date","example":"2023-03-01"},"expiryOverrideDate":{"type":"string","description":"(override) - top-up supervision expiry date for offender.","format":"date","example":"2023-03-01"},"startDate":{"type":"string","description":"Top-up supervision start date for offender - calculated as licence end date + 1 day or releaseDate if licence end date not set.","format":"date","example":"2023-03-01"}}},"DataResponseRisks":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Risks"}}},"OtherRisks":{"type":"object","properties":{"escapeOrAbscond":{"type":"string","description":"\n Risk of escape/abscond. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"YES","enum":["YES","NO","DK","NA"]},"controlIssuesDisruptiveBehaviour":{"type":"string","description":"\n Risk control issues/disruptive behaviour. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"DK","enum":["YES","NO","DK","NA"]},"breachOfTrust":{"type":"string","description":"\n Risk of breach of trust. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"NO","enum":["YES","NO","DK","NA"]},"riskToOtherPrisoners":{"type":"string","description":"\n Risk to other prisoners. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"YES","enum":["YES","NO","DK","NA"]}}},"Risk":{"type":"object","properties":{"risk":{"type":"string","description":"\n Presence of risk. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"YES","enum":["YES","NO","DK","NA"]},"previous":{"type":"string","description":"\n Previous concerns. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"NO","enum":["YES","NO","DK","NA"]},"previousConcernsText":{"type":"string","description":"Supporting comments for any previous concerns.","example":"Risk of self harm concerns due to ..."},"current":{"type":"string","description":"\n Current concerns. Possible values are:\n `YES`,\n `NO`,\n `DK`,\n `NA`\n ","example":"YES","enum":["YES","NO","DK","NA"]},"currentConcernsText":{"type":"string","description":"Supporting comments for any current concerns.","example":"Risk of self harm concerns due to ..."}}},"RiskSummary":{"type":"object","properties":{"whoIsAtRisk":{"type":"string","description":"Who is at risk","example":"X, Y and Z are at risk"},"natureOfRisk":{"type":"string","description":"What is the nature of the risk","example":"The nature of the risk is X"},"riskImminence":{"type":"string","description":"When is the risk likely to be greatest. Consider the timescale and indicate whether risk is immediate or not. Consider the risks in custody as well as on release.","example":"The risk is imminent and more probable in X situation"},"riskIncreaseFactors":{"type":"string","description":"What circumstances are likely to increase risk. Describe factors, actions, events which might increase level of risk, now and in the future.","example":"If offender in situation X the risk can be higher"},"riskMitigationFactors":{"type":"string","description":"What factors are likely to reduce the risk. Describe factors, actions, and events which may reduce or contain the level of risk. What has previously stopped them?","example":"Giving offender therapy in X will reduce the risk"},"overallRiskLevel":{"type":"string","description":"The overall risk level","example":"HIGH","enum":["VERY_HIGH","HIGH","MEDIUM","LOW"]},"riskInCommunity":{"type":"object","additionalProperties":{"type":"string","description":"Assess the risk of serious harm the offender poses on the basis that they could be released imminently back into the community. This field is a map which can return all or some of the properties given.","example":"{\"children\":\"HIGH\",\"public\":\"MEDIUM\",\"knownAdult\":\"VERY_HIGH\",\"staff\":\"HIGH\",\"prisoners\":\"LOW\"}"},"description":"Assess the risk of serious harm the offender poses on the basis that they could be released imminently back into the community. This field is a map which can return all or some of the properties given.","example":{"children":"HIGH","public":"MEDIUM","knownAdult":"VERY_HIGH","staff":"HIGH","prisoners":"LOW"}},"riskInCustody":{"type":"object","additionalProperties":{"type":"string","description":"Assess both the risk of serious harm the offender presents now, in custody, and the risk they could present to others whilst in a custodial setting. This field is a map which can return all or some of the properties given.","example":"{\"children\":\"HIGH\",\"public\":\"MEDIUM\",\"knownAdult\":\"VERY_HIGH\",\"staff\":\"HIGH\",\"prisoners\":\"LOW\"}"},"description":"Assess both the risk of serious harm the offender presents now, in custody, and the risk they could present to others whilst in a custodial setting. This field is a map which can return all or some of the properties given.","example":{"children":"HIGH","public":"MEDIUM","knownAdult":"VERY_HIGH","staff":"HIGH","prisoners":"LOW"}}}},"RiskToSelf":{"required":["custody","hostelSetting","selfHarm","suicide","vulnerability"],"type":"object","properties":{"suicide":{"$ref":"#/components/schemas/Risk"},"selfHarm":{"$ref":"#/components/schemas/Risk"},"custody":{"$ref":"#/components/schemas/Risk"},"hostelSetting":{"$ref":"#/components/schemas/Risk"},"vulnerability":{"$ref":"#/components/schemas/Risk"}}},"Risks":{"required":["otherRisks","riskToSelf","summary"],"type":"object","properties":{"assessedOn":{"type":"string","description":"Date of risk assessment","format":"date-time"},"riskToSelf":{"$ref":"#/components/schemas/RiskToSelf"},"otherRisks":{"$ref":"#/components/schemas/OtherRisks"},"summary":{"$ref":"#/components/schemas/RiskSummary"}}},"GeneralPredictor":{"type":"object","properties":{"scoreLevel":{"type":"string","description":"\n Indicator for general prediction. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`\n ","example":"VERY_HIGH","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]}}},"GroupReconviction":{"type":"object","properties":{"scoreLevel":{"type":"string","description":"\n Indicator for risk of group reconviction. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`\n ","example":"LOW","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]}}},"PaginatedResponseRiskPredictorScore":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RiskPredictorScore"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"RiskOfSeriousRecidivism":{"type":"object","properties":{"scoreLevel":{"type":"string","description":"\n Indicator for risk of serious recidivism. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`\n ","example":"MEDIUM","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]}}},"RiskPredictorScore":{"required":["generalPredictor","groupReconviction","riskOfSeriousRecidivism","sexualPredictor","violencePredictor"],"type":"object","properties":{"completedDate":{"type":"string","description":"Risk scores calculation completion date","format":"date-time"},"assessmentStatus":{"type":"string","description":"\n Whether the risk score calculation is complete. Possible values are:\n `COMPLETE`,\n `LOCKED_INCOMPLETE`\n ","example":"COMPLETED","enum":["COMPLETED","LOCKED_INCOMPLETE"]},"generalPredictor":{"$ref":"#/components/schemas/GeneralPredictor"},"violencePredictor":{"$ref":"#/components/schemas/ViolencePredictor"},"groupReconviction":{"$ref":"#/components/schemas/GroupReconviction"},"riskOfSeriousRecidivism":{"$ref":"#/components/schemas/RiskOfSeriousRecidivism"},"sexualPredictor":{"$ref":"#/components/schemas/SexualPredictor"}}},"SexualPredictor":{"type":"object","properties":{"indecentScoreLevel":{"type":"string","description":"\n Indicator for risk of sexual indecency. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`,\n ","example":"MEDIUM","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]},"contactScoreLevel":{"type":"string","description":"\n Indicator for risk of sexual contact. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`,\n ","example":"MEDIUM","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]}}},"ViolencePredictor":{"type":"object","properties":{"scoreLevel":{"type":"string","description":"\n Indicator for risk of violence. Possible values are:\n `LOW`,\n `MEDIUM`,\n `HIGH`,\n `VERY_HIGH`,\n `NOT_APPLICABLE`\n ","example":"MEDIUM","enum":["LOW","MEDIUM","HIGH","VERY_HIGH","NOT_APPLICABLE"]}}},"DataResponseMappaDetail":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/MappaDetail"}}},"MappaDetail":{"type":"object","properties":{"level":{"type":"number","example":1},"levelDescription":{"type":"string","example":"Description of M1"},"category":{"type":"number","example":2},"categoryDescription":{"type":"string","example":"Description of M2"},"startDate":{"type":"string","example":"2024-02-07"},"reviewDate":{"type":"string","example":"2024-02-07"},"notes":{"type":"string","example":"Mappa Detail for X00001"}}},"DynamicRisk":{"type":"object","properties":{"code":{"type":"string","example":"RCCO"},"description":{"type":"string","example":"Child Concerns - Safeguarding concerns where a child is at risk from the offender"},"startDate":{"type":"string","example":"2022-01-01"},"reviewDate":{"type":"string","example":"2025-01-01"},"notes":{"type":"string","example":"This is a note"}}},"PaginatedResponseDynamicRisk":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DynamicRisk"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"DataResponseRiskCategory":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/RiskCategory"}}},"RiskAssessment":{"type":"object","properties":{"classificationCode":{"type":"string","description":"The classification code of the risk","example":"C"},"classification":{"type":"string","description":"The classification of the code","example":"Cat C"},"assessmentCode":{"type":"string","description":"The assessment code","example":"CATEGORY"},"assessmentDescription":{"type":"string","description":"The description of the assessment","example":"Categorisation"},"assessmentDate":{"type":"string","description":"The date of the assessment","example":"2018-02-11"},"nextReviewDate":{"type":"string","description":"Next review date","example":"2018-02-11"},"assessmentAgencyId":{"type":"string","description":"Agency ID of the assessment","example":"MDI"},"assessmentStatus":{"type":"string","description":"The status of the assessment","example":"P"},"assessmentComment":{"type":"string","description":"Comments regarding the assessment","example":"Comment details"}}},"RiskCategory":{"required":["assessments"],"type":"object","properties":{"offenderNo":{"type":"string"},"assessments":{"type":"array","items":{"$ref":"#/components/schemas/RiskAssessment"}},"category":{"type":"string"},"categoryCode":{"type":"string"}}},"PaginatedResponseRiskManagementPlan":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RiskManagementPlan"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"RiskManagementPlan":{"required":["assessmentId","assessmentStatus","assessmentType","contingencyPlans","dateCompleted","furtherConsiderationsCurrentSituation","initiationDate","interventionsAndTreatment","keyInformationCurrentSituation","latestCompleteDate","latestSignLockDate","monitoringAndControl","supervision","victimSafetyPlanning"],"type":"object","properties":{"assessmentId":{"type":"string","description":"The unique ID of the risk management plan","example":"123456"},"dateCompleted":{"type":"string","description":"The date that the risk management plan was completed","example":"2024-05-04T01:04:20"},"initiationDate":{"type":"string","description":"The date of plan initiation","example":"2024-05-04T01:04:20"},"assessmentStatus":{"type":"string","description":"The status of the plan","example":"COMPLETE"},"assessmentType":{"type":"string","description":"The type of assessment"},"keyInformationCurrentSituation":{"type":"string","description":"Key information about the current situation of the subject being assessed"},"furtherConsiderationsCurrentSituation":{"type":"string","description":"Further considerations about the situation of the subject being assessed"},"supervision":{"type":"string","description":"Who they see, when and why, any support they get from their community, and how well they're desisting from problematic behaviour"},"monitoringAndControl":{"type":"string","description":"Information on restrictions in place to prevent reoffending, what steps have been taken to monitor potential reoffending, including license conditions, community order requirements, PPM restrictions and such."},"interventionsAndTreatment":{"type":"string","description":"Interventions delivered to develop controls and protective factors to reduce risk of reoffending, including practical support, requirements to support interventions and details of who and where these interventions will be administered."},"victimSafetyPlanning":{"type":"string","description":"Restrictions in place to specifically protect victims of, adults known to, and children potentially at risk from the offender."},"contingencyPlans":{"type":"string","description":"Future plans in the form \"If X happens, we will do Y....\" for if parts of the risk management plan break down or requirements or restrictions are breached by the offender."},"latestSignLockDate":{"type":"string","description":"An assessment is considered 'Signed and locked' once it is signed by the assessor, making the plan read-only. This is the date the plan has been signed by the assessor.","example":"2024-05-04T01:04:20"},"latestCompleteDate":{"type":"string","description":"Once a countersignature has been applied to the plan, the plan is considered complete. This is the date the plan has been countersigned.","example":"2024-05-04T01:04:20"}}},"Adjudication":{"type":"object","properties":{"incidentDetails":{"$ref":"#/components/schemas/IncidentDetailsDto"},"isYouthOffender":{"type":"boolean"},"incidentRole":{"$ref":"#/components/schemas/IncidentRoleDto"},"offenceDetails":{"$ref":"#/components/schemas/OffenceDto"},"status":{"type":"string"},"statusReason":{"type":"string"},"statusDetails":{"type":"string"},"hearings":{"type":"array","items":{"$ref":"#/components/schemas/HearingDto"}},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/OutcomeHistoryDto"}},"punishments":{"type":"array","items":{"$ref":"#/components/schemas/PunishmentDto"}},"punishmentComments":{"type":"array","items":{"$ref":"#/components/schemas/PunishmentCommentDto"}}}},"CombinedOutcomeDto":{"type":"object","properties":{"outcome":{"$ref":"#/components/schemas/OutcomeDto"},"referralOutcome":{"$ref":"#/components/schemas/OutcomeDto"}}},"HearingDto":{"type":"object","properties":{"dateTimeOfHearing":{"type":"string"},"oicHearingType":{"type":"string"},"outcome":{"$ref":"#/components/schemas/HearingOutcomeDto"}}},"HearingOutcomeDto":{"type":"object","properties":{"code":{"type":"string"},"reason":{"type":"string"},"details":{"type":"string"},"plea":{"type":"string"}}},"IncidentDetailsDto":{"type":"object","properties":{"dateTimeOfIncident":{"type":"string"}}},"IncidentRoleDto":{"type":"object","properties":{"roleCode":{"type":"string"},"offenceRule":{"$ref":"#/components/schemas/OffenceRuleDetailsDto"}}},"OffenceDto":{"type":"object","properties":{"offenceCode":{"type":"number"},"offenceRule":{"$ref":"#/components/schemas/OffenceRuleDto"}}},"OffenceRuleDetailsDto":{"type":"object","properties":{"paragraphNumber":{"type":"string"},"paragraphDescription":{"type":"string"}}},"OffenceRuleDto":{"type":"object","properties":{"paragraphNumber":{"type":"string"},"paragraphDescription":{"type":"string"}}},"OutcomeDto":{"type":"object","properties":{"code":{"type":"string"},"details":{"type":"string"},"reason":{"type":"string"},"quashedReason":{"type":"string"},"canRemove":{"type":"boolean"}}},"OutcomeHistoryDto":{"type":"object","properties":{"hearing":{"$ref":"#/components/schemas/HearingDto"},"outcome":{"$ref":"#/components/schemas/CombinedOutcomeDto"}}},"PaginatedResponseAdjudication":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Adjudication"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"PunishmentCommentDto":{"type":"object","properties":{"comment":{"type":"string"},"reasonForChange":{"type":"string"},"dateTime":{"type":"string"}}},"PunishmentDto":{"type":"object","properties":{"type":{"type":"string"},"privilegeType":{"type":"string"},"otherPrivilege":{"type":"string"},"schedule":{"$ref":"#/components/schemas/PunishmentScheduleDto"}}},"PunishmentScheduleDto":{"type":"object","properties":{"days":{"type":"number"},"startDate":{"type":"string"},"endDate":{"type":"string"},"suspendedUntil":{"type":"string"}}},"DataResponsePersonProtectedCharacteristics":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonProtectedCharacteristics"}}},"Disability":{"type":"object","properties":{"disabilityType":{"$ref":"#/components/schemas/KeyValue"},"condition":{"$ref":"#/components/schemas/KeyValue"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"notes":{"type":"string","example":"Walking issue"}}},"KeyValue":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"}}},"PersonProtectedCharacteristics":{"required":["age","disabilities","reasonableAdjustments"],"type":"object","properties":{"age":{"type":"number","description":"Age of the person","example":35},"gender":{"type":"string","description":"Gender of the person","example":"Female"},"sexualOrientation":{"type":"string","description":"Sexual orientation of the person","example":"Unknown"},"ethnicity":{"type":"string","description":"Ethnicity of the person","example":"White: Eng./Welsh/Scot./N.Irish/British"},"nationality":{"type":"string","description":"Nationality of the person","example":"Egyptian"},"religion":{"type":"string","description":"Religion of the person","example":"Church of England (Anglican)"},"disabilities":{"type":"array","items":{"$ref":"#/components/schemas/Disability"}},"maritalStatus":{"type":"string","description":"Marital status of the person","example":"Widowed"},"reasonableAdjustments":{"type":"array","items":{"$ref":"#/components/schemas/ReasonableAdjustment"}}}},"ReasonableAdjustment":{"type":"object","properties":{"treatmentCode":{"type":"string","description":"Treatment code","example":"WHEELCHR_ACC"},"commentText":{"type":"string","description":"Comment text","example":"abcd"},"startDate":{"type":"string","description":"Start date","format":"date","example":"2013-04-11"},"endDate":{"type":"string","description":"End date","format":"date","example":"2023-04-11"},"treatmentDescription":{"type":"string","description":"Treatment description","example":"Wheelchair accessibility"}}},"CommunityOffenderManager":{"required":["name","team"],"type":"object","properties":{"name":{"$ref":"#/components/schemas/PersonResponsibleOfficerName"},"email":{"type":"string"},"telephoneNumber":{"type":"string"},"team":{"$ref":"#/components/schemas/PersonResponsibleOfficerTeam"}}},"DataResponsePersonResponsibleOfficer":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonResponsibleOfficer"}}},"PersonResponsibleOfficer":{"required":["communityOffenderManager","prisonOffenderManager"],"type":"object","properties":{"prisonOffenderManager":{"$ref":"#/components/schemas/PrisonOffenderManager"},"communityOffenderManager":{"$ref":"#/components/schemas/CommunityOffenderManager"}}},"PersonResponsibleOfficerName":{"type":"object","properties":{"forename":{"type":"string"},"surname":{"type":"string"}}},"PersonResponsibleOfficerTeam":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"email":{"type":"string"},"telephoneNumber":{"type":"string"}}},"Prison":{"type":"object","properties":{"code":{"type":"string","description":"The prison code, which is usually short for the prison name."}}},"PrisonOffenderManager":{"required":["prison"],"type":"object","properties":{"forename":{"type":"string"},"surname":{"type":"string"},"prison":{"$ref":"#/components/schemas/Prison"}}},"PaginatedResponse":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"DataResponseNeeds":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Needs"}}},"Need":{"type":"object","properties":{"type":{"type":"string","description":"The type of need","example":"DRUG_MISUSE"},"riskOfHarm":{"type":"boolean","description":"Risk of harm"},"riskOfReoffending":{"type":"boolean","description":"Risk of reoffending"},"severity":{"type":"string","description":"Severity of need","example":"NO_NEED"}}},"Needs":{"required":["identifiedNeeds","notIdentifiedNeeds","unansweredNeeds"],"type":"object","properties":{"assessedOn":{"type":"string","description":"Needs assessment completion date","format":"date-time"},"identifiedNeeds":{"type":"array","items":{"$ref":"#/components/schemas/Need"}},"notIdentifiedNeeds":{"type":"array","items":{"$ref":"#/components/schemas/Need"}},"unansweredNeeds":{"type":"array","items":{"$ref":"#/components/schemas/Need"}}}},"DataResponsePersonName":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonName"}}},"PersonName":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"}}},"DataResponsePersonLicences":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonLicences"}}},"Licence":{"required":["conditions"],"type":"object","properties":{"status":{"type":"string"},"typeCode":{"type":"string"},"createdDate":{"type":"string"},"approvedDate":{"type":"string"},"updatedDate":{"type":"string"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/LicenceCondition"}}},"example":[{"status":"IN_PROGRESS","typeCode":"AP","createdDate":"2015-09-23","approvedDate":"2015-09-24","updatedDate":"2015-10-23","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"},{"type":"Custom","code":"b457e9c3-68c6-4f5e-9bd8-c36c5b7e70fb","category":"Contact Restrictions","condition":"You must not contact the victim"}]},{"status":"SUBMITTED","typeCode":"PSS","createdDate":"2016-01-15","approvedDate":"2016-01-16","updatedDate":"2016-02-15","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"}]},{"status":"APPROVED","typeCode":"PSS","createdDate":"2016-01-15","approvedDate":"2016-01-16","updatedDate":"2016-02-15","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"}]},{"status":"ACTIVE","typeCode":"AP","createdDate":"2018-05-20","approvedDate":"2018-05-21","updatedDate":"2018-06-20","conditions":[{"type":"Custom","code":"c97f33e3-1e50-4b28-8f71-5de3e2fbbf79","category":"Travel Restrictions","condition":"You must not leave the country without permission"}]},{"status":"VARIATION_IN_PROGRESS","typeCode":"AP","createdDate":"2019-07-01","approvedDate":"2019-07-02","updatedDate":"2019-08-01","conditions":[{"type":"Rehabilitation","code":"a5371dd7-7f54-42b9-9c3b-35f9e8f6f1e9","category":"Rehabilitation Program","condition":"You must participate in a rehabilitation program"}]},{"status":"VARIATION_SUBMITTED","typeCode":"AP_PSS","createdDate":"2020-09-12","approvedDate":"2020-09-13","updatedDate":"2020-10-12","conditions":[{"type":"Monitoring","code":"e4a8b9cf-4a50-44a2-8a0c-5f38d2fae6f9","category":"Electronic Monitoring","condition":"You must comply with electronic monitoring"}]},{"status":"VARIATION_APPROVED","typeCode":"AP_PSS","createdDate":"2021-11-23","approvedDate":"2021-11-24","updatedDate":"2021-12-23","conditions":[{"type":"Substance Abuse","code":"d4b8b1e8-9e4e-4f6a-a2df-b41e8f8e8e8e","category":"Alcohol Restrictions","condition":"You must not consume alcohol"}]},{"status":"VARIATION_REJECTED","typeCode":"PSS","createdDate":"2022-01-01","approvedDate":"2022-01-02","updatedDate":"2022-02-01","conditions":[{"type":"Association","code":"f9e8f1c8-2f4a-4a6a-a1de-5e7e9f7d9e8f","category":"Contact Restrictions","condition":"You must not associate with known criminals"}]}]},"LicenceCondition":{"type":"object","properties":{"type":{"type":"string"},"code":{"type":"string"},"category":{"type":"string"},"condition":{"type":"string"}}},"PersonLicences":{"required":["hmppsId","licences"],"type":"object","properties":{"hmppsId":{"type":"string","example":"2008/0545166T"},"offenderNumber":{"type":"string","example":"Z1234ZZ"},"licences":{"type":"array","example":[{"status":"IN_PROGRESS","typeCode":"AP","createdDate":"2015-09-23","approvedDate":"2015-09-24","updatedDate":"2015-10-23","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"},{"type":"Custom","code":"b457e9c3-68c6-4f5e-9bd8-c36c5b7e70fb","category":"Contact Restrictions","condition":"You must not contact the victim"}]},{"status":"SUBMITTED","typeCode":"PSS","createdDate":"2016-01-15","approvedDate":"2016-01-16","updatedDate":"2016-02-15","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"}]},{"status":"APPROVED","typeCode":"PSS","createdDate":"2016-01-15","approvedDate":"2016-01-16","updatedDate":"2016-02-15","conditions":[{"type":"Standard","code":"5a105297-dce1-4d18-b9ea-4195b46b7594","category":"Residence at a specific place","condition":"You must reside at an approved address"}]},{"status":"ACTIVE","typeCode":"AP","createdDate":"2018-05-20","approvedDate":"2018-05-21","updatedDate":"2018-06-20","conditions":[{"type":"Custom","code":"c97f33e3-1e50-4b28-8f71-5de3e2fbbf79","category":"Travel Restrictions","condition":"You must not leave the country without permission"}]},{"status":"VARIATION_IN_PROGRESS","typeCode":"AP","createdDate":"2019-07-01","approvedDate":"2019-07-02","updatedDate":"2019-08-01","conditions":[{"type":"Rehabilitation","code":"a5371dd7-7f54-42b9-9c3b-35f9e8f6f1e9","category":"Rehabilitation Program","condition":"You must participate in a rehabilitation program"}]},{"status":"VARIATION_SUBMITTED","typeCode":"AP_PSS","createdDate":"2020-09-12","approvedDate":"2020-09-13","updatedDate":"2020-10-12","conditions":[{"type":"Monitoring","code":"e4a8b9cf-4a50-44a2-8a0c-5f38d2fae6f9","category":"Electronic Monitoring","condition":"You must comply with electronic monitoring"}]},{"status":"VARIATION_APPROVED","typeCode":"AP_PSS","createdDate":"2021-11-23","approvedDate":"2021-11-24","updatedDate":"2021-12-23","conditions":[{"type":"Substance Abuse","code":"d4b8b1e8-9e4e-4f6a-a2df-b41e8f8e8e8e","category":"Alcohol Restrictions","condition":"You must not consume alcohol"}]},{"status":"VARIATION_REJECTED","typeCode":"PSS","createdDate":"2022-01-01","approvedDate":"2022-01-02","updatedDate":"2022-02-01","conditions":[{"type":"Association","code":"f9e8f1c8-2f4a-4a6a-a1de-5e7e9f7d9e8f","category":"Contact Restrictions","condition":"You must not associate with known criminals"}]}],"items":{"$ref":"#/components/schemas/Licence"}}}},"ImageMetadata":{"required":["active","captureDateTime","id","orientation","type","view"],"type":"object","properties":{"id":{"type":"integer","description":"The Image ID, in reference to a unique identifier.","format":"int64","example":2461788},"active":{"type":"boolean","description":"A flag to indicate whether an image is in active use. It is no guarantee that the latest uploaded image will be the active one.","example":true},"captureDateTime":{"type":"string","description":"The Date and Time of when the image was captured.","format":"date-time"},"view":{"type":"string","description":"\n View is the subject focus; describing the inner focus or subject of the image, normally referring to a marking, tattoo or deeper level focus of the orientation. In practise this is the interior foci of what is captured in the 'orientation' field.\n Possible values are:\n `FACE` - Facing,\n `TAT` - Tattoo,\n `OTH` - Other,\n `SCAR` - Scar,\n `MARK` - Mark,\n `OIC` - Offence in Custody\n ","example":"FACE","enum":["FACE","TAT","OTH","SCAR","MARK","OIC"]},"orientation":{"type":"string","description":"\n Orientation is the scope focus; describing the scope or outer focus of the image, normally referring to the highest level object of interest within the bounds of the photo itself. This is normally a body part or an angle of photography, such as a photo of someone’s facial view (`FRONT`) or arm (`ARM`).\n Possible values are:\n `ANKLE` - Ankle,\n `ARM` - Arm,\n `DAMAGE` - Damage,\n `EAR` - Ear,\n `ELBOW` - Elbow,\n `FACE` - Face,\n `FIGHT` - Fight,\n `FINGER` - Finger,\n `FOOT` - Foot,\n `FRONT` - Front Facial View,\n `HAND` - Hand,\n `HEAD` - Head,\n `INCIDENT` - Incident,\n `INJURY` - Injury,\n `KNEE` - Knee,\n `LEG` - Leg,\n `LIP` - Lip,\n `NECK` - Neck,\n `NOSE` - Nose,\n `SHOULDER` - Shoulder,\n `THIGH` - Thigh,\n `TOE` - Toe,\n `TORSO` - Torso\n ","example":"FRONT","enum":["ANKLE","ARM","DAMAGE","EAR","ELBOW","FACE","FIGHT","FINGER","FOOT","FRONT","HAND","HEAD","INCIDENT","INJURY","KNEE","LEG","LIP","NECK","NOSE","SHOULDER","THIGH","TOE","TORSO"]},"type":{"type":"string","description":"\n Type is the contextual focus; describing the context or scenario the image was taken within. It could be for a particular purpose or capturing the results of a particular type of incident.\n Possible values are:\n `OFF_BKG` - Offender Booking,\n `OFF_IDM` - Offender Identification Marks,\n `OIC` - Offence In Custody,\n `PPTY` - Property Image\n ","example":"OFF_BKG","enum":["OFF_BKG","OFF_IDM","OIC","PPTY"]}}},"PaginatedResponseImageMetadata":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ImageMetadata"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"CellLocation":{"type":"object","properties":{"prisonCode":{"type":"string"},"prisonName":{"type":"string"},"cell":{"type":"string"}}},"DataResponseCellLocation":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/CellLocation"}}},"CaseNote":{"required":["amendments","sensitive"],"type":"object","properties":{"caseNoteId":{"type":"string","example":"1234"},"offenderIdentifier":{"type":"string","example":"A1234AA"},"type":{"type":"string","example":"KA"},"typeDescription":{"type":"string","example":"Key Worker"},"subType":{"type":"string","example":"KS"},"subTypeDescription":{"type":"string","example":"Key Worker Session"},"creationDateTime":{"type":"string","description":"Date and Time of Case Note creation","format":"date-time"},"occurrenceDateTime":{"type":"string","description":"Date and Time of when case note contact with offender was made","format":"date-time"},"text":{"type":"string","example":"This is some text"},"locationId":{"type":"string","example":"MDI"},"sensitive":{"type":"boolean"},"amendments":{"type":"array","description":"List of amendments to the case note","items":{"$ref":"#/components/schemas/CaseNoteAmendment"}}}},"CaseNoteAmendment":{"type":"object","properties":{"caseNoteAmendmentId":{"type":"integer","format":"int64","example":123232},"creationDateTime":{"type":"string","description":"Date and Time of Case Note creation","format":"date-time"},"additionalNoteText":{"type":"string","example":"Some Additional Text"}},"description":"List of amendments to the case note"},"PaginatedResponseCaseNote":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CaseNote"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"Alert":{"type":"object","properties":{"offenderNo":{"type":"string","description":"Offender unique reference","example":"Z1234ZZ"},"type":{"type":"string","description":"Alert type","example":"X"},"typeDescription":{"type":"string","description":"Alert type description","example":"Security"},"code":{"type":"string","description":"Alert code","example":"PO"},"codeDescription":{"type":"string","description":"Alert code description","example":"MAPPA Nominal"},"comment":{"type":"string","description":"Alert comment","example":"Professional lock pick"},"dateCreated":{"type":"string","description":"Date of the alert, which might differ from the date it was created","format":"date","example":"2014-09-23"},"dateExpired":{"type":"string","description":"Date that the alert expires","format":"date","example":"2015-09-23"},"expired":{"type":"boolean","description":"Whether the alert has expired","example":true},"active":{"type":"boolean","description":"Whether the alert is active","example":true}}},"PaginatedResponseAlert":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Alert"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"Address":{"required":["noFixedAddress","types"],"type":"object","properties":{"country":{"type":"string","example":"England"},"county":{"type":"string","example":"Greater London"},"endDate":{"type":"string","format":"date"},"locality":{"type":"string","example":"London Bridge"},"name":{"type":"string","example":"Name of the building of residence"},"noFixedAddress":{"type":"boolean","description":"Indicates whether the person has a permanent place of residence","example":true},"number":{"type":"string","example":"1"},"postcode":{"type":"string","example":"SE1 1TE"},"startDate":{"type":"string","format":"date"},"street":{"type":"string","example":"O'Meara Street"},"town":{"type":"string","example":"London"},"types":{"type":"array","items":{"$ref":"#/components/schemas/Type"}},"notes":{"type":"string","example":"This is their partner's address."}}},"DataResponseListAddress":{"required":["data"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Address"}}}},"Type":{"type":"object","properties":{"code":{"type":"string","description":"Address type code, for example: `BUS`, `HOME`, `WORK`.","example":"BUS"},"description":{"type":"string","description":"Description of address type, for example: `Business Address`, `Home Address`, `Work Address`.","example":"Business Address"}},"description":"Type or usage of address, for example `Business Address`, `Home Address`, `Work Address`."},"Response":{"required":["data","errors"],"type":"object","properties":{"data":{"type":"object"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/UpstreamApiError"}}}},"UpstreamApiError":{"required":["causedBy","type"],"type":"object","properties":{"causedBy":{"type":"string","enum":["NOMIS","PRISONER_OFFENDER_SEARCH","PROBATION_OFFENDER_SEARCH","NDELIUS","ASSESS_RISKS_AND_NEEDS","ADJUDICATIONS","CVL","CASE_NOTES","MANAGE_POM_CASE","RISK_MANAGEMENT_PLAN","TEST","PLP"]},"type":{"type":"string","enum":["ENTITY_NOT_FOUND","BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR"]},"description":{"type":"string"}}},"DataResponseNomisNumber":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/NomisNumber"}}},"NomisNumber":{"type":"object","properties":{"nomisNumber":{"type":"string"}}},"DataResponseHmppsId":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/HmppsId"}}},"HmppsId":{"type":"object","properties":{"hmppsId":{"type":"string"}}},"CaseDetail":{"type":"object","properties":{"nomsId":{"type":"string"},"name":{"$ref":"#/components/schemas/Name"},"dateOfBirth":{"type":"string"},"gender":{"type":"string"},"courtAppearance":{"$ref":"#/components/schemas/CourtAppearance"},"sentence":{"$ref":"#/components/schemas/CaseSentence"},"responsibleProvider":{"$ref":"#/components/schemas/ResponsibleProvider"},"ogrsScore":{"type":"integer","format":"int64"},"rsrScore":{"type":"number","format":"double"},"age":{"type":"integer","format":"int64"},"ageAtRelease":{"type":"integer","format":"int64"}}},"CaseSentence":{"type":"object","properties":{"date":{"type":"string"},"sentencingCourt":{"$ref":"#/components/schemas/SentencingCourt"},"releaseDate":{"type":"string"},"expectedReleaseDate":{"type":"string"}}},"CourtAppearance":{"type":"object","properties":{"date":{"type":"string"},"court":{"$ref":"#/components/schemas/CourtDetails"}}},"CourtDetails":{"type":"object","properties":{"name":{"type":"string","description":"The name of the court","example":"Manchester Crown Court"}}},"Name":{"type":"object","properties":{"forename":{"type":"string"},"middleName":{"type":"string"},"surname":{"type":"string"}}},"ResponseCaseDetail":{"required":["data","errors"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/CaseDetail"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/UpstreamApiError"}}}},"ResponsibleProvider":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}}},"SentencingCourt":{"type":"object","properties":{"name":{"type":"string"}}},"BadRequest":{"properties":{"status":{"type":"number","example":400},"userMessage":{"type":"string","example":"Validation failure: No query parameters specified."},"developerMessage":{"type":"string","example":"No query parameters specified."}}},"PersonNotFound":{"properties":{"status":{"type":"number","example":404},"userMessage":{"type":"string","example":"404 Not found error: Could not find person with HMPPS id: 2003/0011991D."},"developerMessage":{"type":"string","example":"Could not find person with HMPPS id: 2003/0011991D."}},"description":"Failed to find a person with the provided HMPPS ID."},"InternalServerError":{"properties":{"status":{"type":"number","example":500},"userMessage":{"type":"string","example":"Internal Server Error"},"developerMessage":{"type":"string","example":"Unable to complete request as an upstream service is not responding."}},"description":"An upstream service was not responding, so we cannot verify the accuracy of any data we did get."}},"securitySchemes":{"dn":{"type":"apiKey","description":"Example: O=test,CN=automated-test-client","name":"subject-distinguished-name","in":"header"}}}} \ No newline at end of file