From d589a28dd99f5e77ab92bb6bb4665041a5f0a147 Mon Sep 17 00:00:00 2001
From: tomwatkins1994 <46263076+tomwatkins1994@users.noreply.github.com>
Date: Tue, 11 Mar 2025 18:47:32 +0000
Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20ministry?=
=?UTF-8?q?ofjustice/hmpps-integration-api@e342ee2a1692ba51f8e2cddb18c7d98?=
=?UTF-8?q?13330cc1d=20=F0=9F=9A=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
openapi/api-docs.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openapi/api-docs.json b/openapi/api-docs.json
index 8407a8474..178f17d64 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/persons/{hmppsId}/expression-of-interest/jobs/{jobid}":{"put":{"tags":["persons"],"summary":"Returns completed response","operationId":"submitExpressionOfInterest","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS identifier","required":true,"schema":{"type":"string"},"example":"A1234AA"},{"name":"jobid","in":"path","description":"A job identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully submitted an expression of interest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUnit"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"403":{"description":"Access is forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}}}}},"/queue-admin/retry-dlq/{dlqName}":{"put":{"tags":["hmpps-queue-resource"],"operationId":"retryDlq","parameters":[{"name":"dlqName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryDlqResult"}}}}}}},"/queue-admin/retry-all-dlqs":{"put":{"tags":["hmpps-queue-resource"],"operationId":"retryAllDlqs","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RetryDlqResult"}}}}}}}},"/queue-admin/purge-queue/{queueName}":{"put":{"tags":["hmpps-queue-resource"],"operationId":"purgeQueue","parameters":[{"name":"queueName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeQueueResult"}}}}}}},"/v1/prison/{prisonId}/prisoners/{hmppsId}/transactions":{"post":{"tags":["prison"],"summary":"Make a financial transaction.","description":"Request body
Applicable filters:
","operationId":"postTransactions","parameters":[{"name":"prisonId","in":"path","description":"The ID of the prison that holds the account","required":true,"schema":{"type":"string"}},{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRequest"}}},"required":true},"responses":{"200":{"description":"Successfully created a transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseTransactionCreateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConflict"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/prison/{prisonId}/prisoners/{hmppsId}/transactions/transfer":{"post":{"tags":["prison"],"summary":"Transfer funds between the accounts of a prisoner.","description":"Currently only able to move from spends to savings.
Request body
Applicable filters: ","operationId":"postTransactionsTransfer","parameters":[{"name":"prisonId","in":"path","description":"The ID of the prison that holds the account","required":true,"schema":{"type":"string"}},{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionTransferRequest"}}},"required":true},"responses":{"200":{"description":"Successfully created a transaction transfer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseTransactionTransferCreateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConflict"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/visit/{visitReference}":{"get":{"tags":["prison"],"summary":"Get visit information for a visit by visit reference.","operationId":"getVisitInformationByReference","parameters":[{"name":"visitReference","in":"path","description":"The visit reference number relating to the visit.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found visit information for a given visit reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseVisit"}}}},"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/prison/{prisonId}/visit/search":{"get":{"tags":["visits","prison"],"summary":"Searches for visits by prisonId and criteria.","description":"Applicable filters: ","operationId":"getVisits","parameters":[{"name":"prisonId","in":"path","description":"The ID of the prison to be queried against","required":true,"schema":{"type":"string"}},{"name":"hmppsId","in":"query","description":"The HMPPS ID of the person","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","description":"The start date of the visit","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","description":"The end date of the visit","required":false,"schema":{"type":"string"}},{"name":"visitStatus","in":"query","description":"The status of the visit. (BOOKING or CANCELLED)","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"The page number","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"size","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/PaginatedResponseVisit"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponse"}}}},"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/prison/{prisonId}/prisoners/{hmppsId}/transactions/{clientUniqueRef}":{"get":{"tags":["prison"],"summary":"Returns details for a transaction by clientUniqueRef.","description":"Applicable filters: ","operationId":"getTransactionsByClientUniqueRef","parameters":[{"name":"prisonId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}},{"name":"hmppsId","in":"path","description":"The ID of the prison that holds the account","required":true,"schema":{"type":"string"}},{"name":"clientUniqueRef","in":"path","description":"The clientUniqueRef used when the transaction was created","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseTransaction"}}}},"400":{"description":"The request data has an invalid format or the prisoner does not have transaction associated with the clientUniqueRef.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/prison/{prisonId}/prisoners/{hmppsId}/non-associations":{"get":{"tags":["prison"],"summary":"Returns a single prisoners list of non associates.","description":"Applicable filters:
includeOpen is true by default, includeClosed is false by default. At least one must be true. The role READ_NON_ASSOCIATIONS is required for this endpoint.","operationId":"getPrisonersNonAssociates","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the prisoner","required":true,"schema":{"type":"string"}},{"name":"prisonId","in":"path","description":"The prison ID of the prisoner","required":true,"schema":{"type":"string"}},{"name":"includeOpen","in":"query","required":false,"schema":{"type":"boolean","default":true}},{"name":"includeClosed","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successfully found prisoners non associates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseNonAssociations"}}}},"400":{"description":"The HMPPS ID provided has an invalid format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/prison/{prisonId}/prisoners/{hmppsId}/balances":{"get":{"tags":["balances-controller"],"summary":"Returns all accounts for a prisoner that they have at a prison.","description":"Applicable filters: ","operationId":"getBalancesForPerson","parameters":[{"name":"hmppsId","in":"path","required":true,"schema":{"type":"string"}},{"name":"prisonId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoner's accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseBalances"}}}},"400":{"description":"The HMPPS ID provided has an invalid format or the prisoner does hot have accounts at the specified prison.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/prison/{prisonId}/prisoners/{hmppsId}/accounts/{accountCode}/transactions":{"get":{"tags":["prison"],"summary":"Returns all transactions for a prisoner associated with an account code that they have at a prison.","description":"Applicable filters: ","operationId":"getTransactionsByAccountCode","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}},{"name":"prisonId","in":"path","description":"The ID of the prison that holds the account","required":true,"schema":{"type":"string"}},{"name":"accountCode","in":"path","description":"The code of the account to be accessed, one of 'spends', 'savings' or 'cash'","required":true,"schema":{"type":"string"},"example":"spends"},{"name":"from_date","in":"query","description":"Start date for transactions (defaults to today if not supplied)","required":false,"schema":{"type":"string"}},{"name":"to_date","in":"query","description":"To date for transactions (defaults to today if not supplied)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoner's transactions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseTransactions"}}}},"400":{"description":"The request data has an invalid format or the prisoner does hot have transactions at the specified prison.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/prison/{prisonId}/prisoners/{hmppsId}/accounts/{accountCode}/balances":{"get":{"tags":["balances-controller"],"summary":"Returns a specific account for a prisoner that they have at a prison, based on the account code provided.","description":"Applicable filters: ","operationId":"getBalanceForPerson","parameters":[{"name":"hmppsId","in":"path","required":true,"schema":{"type":"string"}},{"name":"prisonId","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountCode","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoner's account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseBalance"}}}},"400":{"description":"The HMPPS ID provided has an invalid format, the account code is not one of the allowable accounts or the prisoner does hot have accounts at the specified prison.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/prison/prisoners":{"get":{"tags":["prison"],"summary":"Returns person(s) by search criteria, sorted by date of birth (newest first). Only queries prisoner search.","description":"Applicable filters: ","operationId":"getPrisoners","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":"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/PaginatedResponsePersonInPrison"}}}},"400":{"description":"There were no query parameters passed in. At least one must be specified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/prison/prisoners/{hmppsId}":{"get":{"tags":["prison"],"summary":"Returns a single prisoners details given an hmppsId, does not query for a probation person.","description":"Applicable filters: ","operationId":"getPerson","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoner with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonInPrison"}}}},"400":{"description":"The HMPPS ID provided has an invalid format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/pnd/persons/{encodedHmppsId}/alerts":{"get":{"tags":["alerts","persons"],"summary":"Returns alerts associated with a person, sorted by dateCreated (newest first).","operationId":"getPndPersonAlerts","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":{"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}/visitor/{contactId}/restrictions":{"get":{"tags":["persons"],"summary":"Gets visitor restrictions.","description":"Returns visitor restrictions for a prisoner","operationId":"getVisitorRestrictions","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS identifier","required":true,"schema":{"type":"string"}},{"name":"contactId","in":"path","description":"A contact ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoners vistor restrictions with the provided HMPPS ID and contact ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePrisonerContactRestrictions"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/visit/future":{"get":{"tags":["persons","visits"],"summary":"Get Future Visit Information.","description":"Applicable filters: ","operationId":"getFutureVisits","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a person's future visits with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseListVisit"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/visit-restrictions":{"get":{"tags":["persons"],"summary":"Gets restrictions for latest booking.","description":"Returns a list of restrictions for the latest booking","operationId":"getRestrictionsForPerson","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a person's visit restrictions with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseListPersonVisitRestriction"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/visit-orders":{"get":{"tags":["persons"],"summary":"Returns visit orders.","operationId":"getPrisonersVisitOrders","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the prisoner","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoners visit orders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseVisitOrders"}}}},"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}/sentences":{"get":{"tags":["persons"],"summary":"Returns sentences associated with a person, sorted by dateOfSentencing (newest first).","description":"Applicable filters: ","operationId":"getPersonSentences","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}},{"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"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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-review-schedule":{"get":{"tags":["alerts","persons"],"summary":"Returns the plp review schedule associated with a person.","operationId":"getReviewSchedule","parameters":[{"name":"hmppsId","in":"path","description":"A HmppsId","required":true,"schema":{"type":"string"},"example":"A123123"},{"name":"statuses","in":"query","description":"Filter by review schedule statuses","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["COMPLETED","PENDING"]}],"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 current 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/{hmppsId}/plp-induction-schedule/history":{"get":{"tags":["alerts","persons"],"summary":"Returns the plp induction schedule history associated with a person.","operationId":"getInductionScheduleHistory","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS id","required":true,"schema":{"type":"string"},"example":"A123123"}],"responses":{"200":{"description":"Successfully found induction schedule history for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseInductionSchedules"}}}},"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}/name":{"get":{"tags":["persons"],"summary":"Returns a person's name","description":"Applicable filters: ","operationId":"getPersonName","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonName"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/iep-level":{"get":{"tags":["persons"],"summary":"Returns a prisoners IEP level.","description":"Applicable filters: ","operationId":"getPrisonersIEPLevel","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the prisoner","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoners contacts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseIEPLevel"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/contacts":{"get":{"tags":["persons"],"summary":"Returns a prisoners contacts.","description":"Applicable filters: ","operationId":"getPrisonersContacts","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the prisoner","required":true,"schema":{"type":"string"}},{"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 prisoners contacts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponsePrisonerContact"}}}},"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}/cell-location":{"get":{"tags":["persons"],"summary":"Returns the cell location of a person.","description":"Applicable filters: ","operationId":"getPersonCellLocation","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a persons cell location.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseCellLocation"}}}},"400":{"description":"The HMPPS ID provided has an invalid format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/alerts":{"get":{"tags":["alerts","persons"],"summary":"Returns alerts associated with a person, sorted by dateCreated (newest first).","description":"Applicable filters: ","operationId":"getPersonAlerts","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}},{"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"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/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.","description":"Applicable filters: ","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"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponse"}}}},"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}/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}/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"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponse"}}}},"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"}}}}},"deprecated":true}},"/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":"\n Accepts a HMPPS Id (hmppsId) and looks up the corresponding nomis number.
\n Applicable filters: \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).
Applicable filters: ","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).
Applicable filters: ","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"}}}}}}},"/v1/contacts/{contactId}":{"get":{"tags":["contacts"],"summary":"Returns a contact by ID.","operationId":"getContactById","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found contact by contact ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDetailedContact"}}}},"400":{"description":"The contact is in invalid format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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"}}}}}}},"/queue-admin/get-dlq-messages/{dlqName}":{"get":{"tags":["hmpps-queue-resource"],"operationId":"getDlqMessages","parameters":[{"name":"dlqName","in":"path","required":true,"schema":{"type":"string"}},{"name":"maxMessages","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDlqResult"}}}}}}}},"components":{"schemas":{"ResponseUnit":{"required":["data","errors"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Unit"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/UpstreamApiError"}}}},"Unit":{"type":"object"},"UpstreamApiError":{"required":["causedBy","type"],"type":"object","properties":{"causedBy":{"type":"string","enum":["NOMIS","PRISONER_OFFENDER_SEARCH","PROBATION_OFFENDER_SEARCH","NDELIUS","ASSESS_RISKS_AND_NEEDS","EFFECTIVE_PROPOSAL_FRAMEWORK","ADJUDICATIONS","CVL","CASE_NOTES","MANAGE_POM_CASE","RISK_MANAGEMENT_PLAN","TEST","PLP","NON_ASSOCIATIONS","PERSONAL_RELATIONSHIPS","MANAGE_PRISON_VISITS","INCENTIVES"]},"type":{"type":"string","enum":["ENTITY_NOT_FOUND","BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","CONFLICT"]},"description":{"type":"string"}}},"RetryDlqResult":{"required":["messagesFoundCount"],"type":"object","properties":{"messagesFoundCount":{"type":"integer","format":"int32"}}},"PurgeQueueResult":{"required":["messagesFoundCount"],"type":"object","properties":{"messagesFoundCount":{"type":"integer","format":"int32"}}},"TransactionRequest":{"required":["amount","clientTransactionId","clientUniqueRef","type"],"type":"object","properties":{"type":{"type":"string","description":"Transaction type. Determines which accounts will be debited and credited.","example":"CANT"},"description":{"type":"string","description":"Description of the transaction.","example":"Canteen Purchase of £16.34"},"amount":{"type":"integer","description":"Amount of money in pence, must be positive. Whether the transaction is a credit or debit is determined by the type.","format":"int32","example":1234},"clientTransactionId":{"type":"string","description":"Client Transaction ID.","example":"CL123212"},"clientUniqueRef":{"type":"string","description":"A reference unique to the client making the post. Maximum size 64 characters, only alphabetic, numeric, '-' and '_' are allowed.","example":"CLIENT121131-0_11"}}},"DataResponseTransactionCreateResponse":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransactionCreateResponse"}}},"TransactionCreateResponse":{"required":["transactionId"],"type":"object","properties":{"transactionId":{"type":"string"}}},"TransactionTransferRequest":{"required":["amount","clientTransactionId","clientUniqueRef","description","fromAccount","toAccount"],"type":"object","properties":{"description":{"type":"string","description":"Description of the transaction."},"amount":{"type":"integer","description":"Amount of money in pence, must be positive.","format":"int32","example":1234},"clientTransactionId":{"type":"string","description":"Client Transaction Id."},"clientUniqueRef":{"type":"string","description":"A reference unique to the client making the post. Maximum size 64 characters, only alphabetic, numeric, '-' and '_' are allowed."},"fromAccount":{"type":"string","description":"The account to move money from. Must be 'spends'.","example":"spends"},"toAccount":{"type":"string","description":"The account to move money to. Must be 'savings'.","example":"savings"}}},"DataResponseTransactionTransferCreateResponse":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransactionTransferCreateResponse"}}},"TransactionTransferCreateResponse":{"required":["creditTransactionId","debitTransactionId","transactionId"],"type":"object","properties":{"debitTransactionId":{"type":"string","description":"Transaction id for the debit portion of the transaction."},"creditTransactionId":{"type":"string","description":"Transaction id for the credit portion of the transaction."},"transactionId":{"type":"string","description":"Transaction id for the whole transaction."}}},"DataResponseVisit":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Visit"}}},"Visit":{"required":["createdTimestamp","endTimestamp","firstBookedDateTime","modifiedTimestamp","prisonId","prisonName","prisonerId","startTimestamp","visitContact","visitNotes","visitRestriction","visitRoom","visitStatus","visitType","visitorSupport","visitors"],"type":"object","properties":{"applicationReference":{"type":"string","description":"Application Reference","example":"dfs-wjs-eqr"},"reference":{"type":"string","description":"Visit Reference","example":"v9-d7-ed-7u"},"prisonerId":{"type":"string","description":"Prisoner Id","example":"AF34567G"},"prisonId":{"type":"string","description":"Prison Id","example":"MDI"},"prisonName":{"type":"string","description":"Prison Name","example":"Moorland (HMP & YOI)"},"sessionTemplateReference":{"type":"string","description":"Session Template Reference","example":"v9d.7ed.7u"},"visitRoom":{"type":"string","description":"Location of Visit ","example":"Visits Main Hall"},"visitType":{"type":"string","description":"Type of Visit","example":"SOCIAL"},"visitStatus":{"type":"string","description":"Visit Status","example":"BOOKED"},"outcomeStatus":{"type":"string","description":"Outcome Status of Visit","example":"ADMINISTRATIVE_CANCELLATION"},"visitRestriction":{"type":"string","description":"Visit Restriction","example":"OPEN"},"startTimestamp":{"type":"string","description":"The date and time of the visit"},"endTimestamp":{"type":"string","description":"The finishing date and time of the visit"},"visitNotes":{"type":"array","description":"Visit Notes","items":{"$ref":"#/components/schemas/VisitNotes"}},"visitContact":{"$ref":"#/components/schemas/VisitContact"},"visitors":{"type":"array","description":"List of visitors associated with the visit","items":{"$ref":"#/components/schemas/Visitors"}},"visitorSupport":{"$ref":"#/components/schemas/VisitorSupport"},"createdTimestamp":{"type":"string","description":"The visit created date and time"},"modifiedTimestamp":{"type":"string","description":"The visit modified date and time"},"firstBookedDateTime":{"type":"string","description":"Date the visit was first booked or migrated"}}},"VisitContact":{"required":["email","name","telephone"],"type":"object","properties":{"name":{"type":"string","description":"Contact name","example":"John Smith"},"telephone":{"type":"string","description":"Contact Phone Number","example":"01234 567890"},"email":{"type":"string","description":"Contact Email Address","example":"email@example.com"}},"description":"Contact associated with the visit"},"VisitNotes":{"required":["text","type"],"type":"object","properties":{"type":{"type":"string","description":"Note type","example":"VISITOR_CONCERN","enum":["VISITOR_CONCERN","VISIT_OUTCOMES","VISIT_COMMENT","STATUS_CHANGED_REASON"]},"text":{"type":"string","description":"Note Text","example":"Visitor is concerned that his mother in-law is coming!"}},"description":"Visit Notes"},"VisitorSupport":{"required":["description"],"type":"object","properties":{"description":{"type":"string","description":"Support text description","example":"Visually impaired assistance"}},"description":"Additional support associated with the visit"},"Visitors":{"required":["contactId"],"type":"object","properties":{"contactId":{"type":"integer","description":"Person ID (nomis) of the visitor","format":"int64","example":1234},"visitContact":{"type":"boolean","description":"true if visitor is the contact for the visit otherwise false","example":true}},"description":"List of visitors associated with the visit"},"PaginatedResponseVisit":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Visit"}},"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}}},"DataResponseTransaction":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Transaction"}}},"Transaction":{"required":["amount","date","description","id","type"],"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type"},"description":{"type":"string"},"amount":{"type":"integer","format":"int32"},"date":{"type":"string"}}},"Type":{"required":["code","desc"],"type":"object","properties":{"code":{"type":"string"},"desc":{"type":"string"}}},"DataResponseNonAssociations":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/NonAssociations"}}},"NonAssociation":{"required":["authorisedBy","comment","id","isClosed","isOpen","otherPrisonerDetails","reason","reasonDescription","restrictionType","restrictionTypeDescription","role","roleDescription","updatedBy","whenCreated","whenUpdated"],"type":"object","properties":{"id":{"type":"integer","description":"The ID of the non association","format":"int32"},"role":{"type":"string","description":"The prisoner's role code in the non-association","example":"VICTIM"},"roleDescription":{"type":"string","description":"The description of the prisoner's role in the non-association","example":"Victim"},"reason":{"type":"string","description":"The reason code why these prisoners should be kept apart","example":"BULLYING"},"reasonDescription":{"type":"string","description":"The reason description why these prisoners should be kept apart","example":"Bullying"},"restrictionType":{"type":"string","description":"Location-based restriction code","example":"CELL"},"restrictionTypeDescription":{"type":"string","description":"Location-based restriction description","example":"Cell only"},"comment":{"type":"string","description":"Explanation of why prisoners are non-associated","example":"John and Luke always end up fighting"},"authorisedBy":{"type":"string","description":"User ID of the person who created the non-association.","example":"OFF3_GEN"},"whenCreated":{"type":"string","description":"When the non-association was created","example":"2021-12-31T12:34:56.789012"},"whenUpdated":{"type":"string","description":"When the non-association was last updated","example":"2021-12-31T12:34:56.789012"},"updatedBy":{"type":"string","description":"User ID of the person who last updated the non-association"},"isClosed":{"type":"boolean","description":"Whether the non-association is closed or is in effect"},"closedBy":{"type":"string","description":"User ID of the person who closed the non-association. Only present when the non-association is closed, null for open non-associations"},"closedReason":{"type":"string","description":"Reason why the non-association was closed. Only present when the non-association is closed, null for open non-associations"},"closedAt":{"type":"string","description":"Date and time of when the non-association was closed. Only present when the non-association is closed, null for open non-associations"},"otherPrisonerDetails":{"$ref":"#/components/schemas/NonAssociationPrisonerDetails"},"isOpen":{"type":"boolean","description":"Whether the non-association is open or closed"}},"description":"List of non-associations"},"NonAssociationPrisonerDetails":{"required":["cellLocation","firstName","lastName","prisonId","prisonName","prisonerNumber","role","roleDescription"],"type":"object","properties":{"prisonerNumber":{"type":"string","description":"Prisoner number","example":"D5678EF"},"role":{"type":"string","description":"Other prisoner’s role code in the non-association","example":"VICTIM"},"roleDescription":{"type":"string","description":"Other prisoner’s role description in the non-association"},"firstName":{"type":"string","description":"First name","example":"John"},"lastName":{"type":"string","description":"Last name","example":"Smith"},"prisonId":{"type":"string","description":"ID of the prison","example":"MDI"},"prisonName":{"type":"string","description":"Name of the prison","example":"Moorland"},"cellLocation":{"type":"string","description":"Cell the prisoner is assigned to","example":"B-2-007"}},"description":"Details about the other person in the non-association."},"NonAssociations":{"required":["nonAssociations"],"type":"object","properties":{"nonAssociations":{"type":"array","description":"List of non-associations","items":{"$ref":"#/components/schemas/NonAssociation"}}}},"AccountBalance":{"required":["accountCode","amount"],"type":"object","properties":{"accountCode":{"type":"string"},"amount":{"type":"integer","format":"int32"}}},"Balances":{"required":["balances"],"type":"object","properties":{"balances":{"type":"array","items":{"$ref":"#/components/schemas/AccountBalance"}}}},"DataResponseBalances":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Balances"}}},"DataResponseTransactions":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Transactions"}}},"Transactions":{"required":["transactions"],"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}}},"Balance":{"required":["balance"],"type":"object","properties":{"balance":{"$ref":"#/components/schemas/AccountBalance"}}},"DataResponseBalance":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Balance"}}},"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"}}},"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."},"PaginatedResponsePersonInPrison":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PersonInPrison"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"PersonInPrison":{"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)"},"category":{"type":"string","description":"Category","example":"C"},"csra":{"type":"string","description":"Cell sharing risk assessment","example":"HIGH"},"receptionDate":{"type":"string","description":"Date prisoner was received into the prison","example":"2021-12-01"},"status":{"type":"string","description":"Status of the prisoner","example":"ACTIVE IN"},"prisonId":{"type":"string","description":"Prison ID","example":"MDI"},"prisonName":{"type":"string","description":"Name of the prison","example":"HMP Leeds"},"cellLocation":{"type":"string","description":"In prison cell location","example":"A-1-002"}}},"DataResponsePersonInPrison":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonInPrison"}}},"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"}}},"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"}}}},"PaginatedResponsePerson":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"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"}}},"ContactRestriction":{"required":["comments","createdBy","createdTime","enteredByDisplayName","enteredByUsername","expiryDate","restrictionType","restrictionTypeDescription","startDate","updatedBy","updatedTime"],"type":"object","properties":{"restrictionType":{"type":"string","description":"The restriction code"},"restrictionTypeDescription":{"type":"string","description":"The description of the restriction type","example":"Banned"},"startDate":{"type":"string","description":"Restriction created date","example":"2024-01-01"},"expiryDate":{"type":"string","description":"Restriction expiry date","example":"2024-01-01"},"comments":{"type":"string","description":"Comments for the restriction","example":"N/A"},"enteredByUsername":{"type":"string","description":"The username of either the person who created the restriction or the last person to update it if it has been modified","example":"admin"},"enteredByDisplayName":{"type":"string","description":"The display name of either the person who created the restriction or the last person to update it if it has been modified","example":"John Smith"},"createdBy":{"type":"string","description":"User who created the entry","example":"admin"},"createdTime":{"type":"string","description":"Timestamp when the entry was created","example":"2023-09-23T10:15:30"},"updatedBy":{"type":"string","description":"User who updated the entry","example":"admin"},"updatedTime":{"type":"string","description":"Timestamp when the entry was updated","example":"2023-09-23T10:15:30"}},"description":"Global (estate-wide) restrictions for the contact"},"DataResponsePrisonerContactRestrictions":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PrisonerContactRestrictions"}}},"PrisonerContactRestrictions":{"type":"object","properties":{"prisonerContactRestrictions":{"type":"array","description":"Relationship specific restrictions","items":{"$ref":"#/components/schemas/ContactRestriction"}},"contactGlobalRestrictions":{"type":"array","description":"Global (estate-wide) restrictions for the contact","items":{"$ref":"#/components/schemas/ContactRestriction"}}}},"DataResponseListVisit":{"required":["data"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Visit"}}}},"DataResponseListPersonVisitRestriction":{"required":["data"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PersonVisitRestriction"}}}},"PersonVisitRestriction":{"required":["active","comment","restrictionId","restrictionType","restrictionTypeDescription","startDate"],"type":"object","properties":{"restrictionId":{"type":"integer","description":"Restriction ID","format":"int64"},"comment":{"type":"string","description":"Restriction comment text"},"restrictionType":{"type":"string","description":"Code of restriction type"},"restrictionTypeDescription":{"type":"string","description":"Description of restriction type"},"startDate":{"type":"string","description":"Date from which the restrictions applies","example":"1980-01-01"},"expiryDate":{"type":"string","description":"Date restriction applies to, or indefinitely if null","example":"1980-01-01"},"active":{"type":"boolean","description":"True if restriction is within the start date and optional expiry date range"}}},"DataResponseVisitOrders":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/VisitOrders"}}},"VisitOrders":{"required":["remainingPrivilegeVisitOrders","remainingVisitOrders"],"type":"object","properties":{"remainingVisitOrders":{"type":"integer","description":"The prisoners remaining visit orders","format":"int64","example":123456},"remainingPrivilegeVisitOrders":{"type":"integer","description":"The prisoners remaining privilege visit orders","format":"int64","example":123456}}},"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","EFFECTIVE_PROPOSAL_FRAMEWORK","ADJUDICATIONS","CVL","CASE_NOTES","MANAGE_POM_CASE","RISK_MANAGEMENT_PLAN","TEST","PLP","NON_ASSOCIATIONS","PERSONAL_RELATIONSHIPS","MANAGE_PRISON_VISITS","INCENTIVES","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"]}}},"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":{"nomisNumber":{"type":"string","description":"The Nomis number of the person.","example":"A1234BC"},"reference":{"type":"string","description":"The UUID reference for the review schedule record.","format":"uuid"},"reviewDateFrom":{"type":"string","description":"The earliest date that the review should be carried out.","format":"date"},"reviewDateTo":{"type":"string","description":"The latest date that the review should be carried out.","format":"date"},"status":{"type":"string","description":"\n The status of this review schedule possible values are:\n SCHEDULED\n EXEMPT_PRISONER_DRUG_OR_ALCOHOL_DEPENDENCY\n EXEMPT_PRISONER_OTHER_HEALTH_ISSUES\n EXEMPT_PRISONER_FAILED_TO_ENGAGE\n EXEMPT_PRISONER_ESCAPED_OR_ABSCONDED\n EXEMPT_PRISONER_SAFETY_ISSUES\n EXEMPT_PRISON_REGIME_CIRCUMSTANCES\n EXEMPT_PRISON_STAFF_REDEPLOYMENT\n EXEMPT_PRISON_OPERATION_OR_SECURITY_ISSUE\n EXEMPT_SECURITY_ISSUE_RISK_TO_STAFF\n EXEMPT_SYSTEM_TECHNICAL_ISSUE\n EXEMPT_PRISONER_TRANSFER\n EXEMPT_PRISONER_RELEASE\n EXEMPT_PRISONER_DEATH\n EXEMPT_PRISONER_MERGE\n EXEMPT_UNKNOWN\n COMPLETED\n "},"calculationRule":{"type":"string","description":"\n The calculation rule that was used to workout the review schedule window.\n Possible values are:\n PRISONER_READMISSION\n PRISONER_TRANSFER\n BETWEEN_RELEASE_AND_3_MONTHS_TO_SERVE\n BETWEEN_3_MONTHS_AND_3_MONTHS_7_DAYS_TO_SERVE\n BETWEEN_3_MONTHS_8_DAYS_AND_6_MONTHS_TO_SERVE\n BETWEEN_6_AND_12_MONTHS_TO_SERVE\n BETWEEN_12_AND_60_MONTHS_TO_SERVE\n MORE_THAN_60_MONTHS_TO_SERVE\n INDETERMINATE_SENTENCE\n PRISONER_ON_REMAND\n PRISONER_UN_SENTENCED\n "},"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","description":"\n The review schedule can change status numerous times.\n The version number indicates which version of the review schedule this one is, the higher the number the newer the update.\n use the version number in conjunction with the reference UUID.\n ie if you group the schedules by reference then the version numbers represent different versions of the same schedule.\n The final status of each grouping is COMPLETED.\n ","format":"int32"},"reviewCompletedBy":{"type":"string","description":"When the review schedule has a completed review this will be populated by the name of the person who did the review."},"reviewCompletedByRole":{"type":"string","description":"When the review schedule has a completed review this will be populated by the role of the person who did the review."},"reviewCompletedAt":{"type":"string","description":"When the review schedule has a completed review this will be populated with the date that the CIAG entered into the system when completing the Review. It is the date that the user did the Review in person, rather than the date that it was entered into the system..","format":"date"},"reviewType":{"type":"string","description":"\n When the review schedule has a completed review this will be populated with the type of the review.\n values are:\n REGULAR,\n PRE_RELEASE\n "},"reviewReason":{"type":"string","description":"\n When the review schedule has a completed review this will be populated with the reason for the review.\n values are:\n REOFFENCE,\n TRANSFER,\n REGULAR\n "}},"description":"\n A list of review schedules for this prisoner.\n Note that this will return multiple versions of the the same schedule.\n This is because down stream clients need to know the previous states of the review schedules.\n grouping by reference and then ordering by highest version number will present the review schedules with the most up to date data.\n "},"ReviewSchedules":{"required":["reviewSchedules"],"type":"object","properties":{"reviewSchedules":{"type":"array","description":"\n A list of review schedules for this prisoner.\n Note that this will return multiple versions of the the same schedule.\n This is because down stream clients need to know the previous states of the review schedules.\n grouping by reference and then ordering by highest version number will present the review schedules with the most up to date data.\n ","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":"\n The current status of the Induction Schedule.\n list of values:\n SCHEDULED\n COMPLETED\n EXEMPT_PRISONER_DRUG_OR_ALCOHOL_DEPENDENCY\n EXEMPT_PRISONER_OTHER_HEALTH_ISSUES\n EXEMPT_PRISONER_FAILED_TO_ENGAGE\n EXEMPT_PRISONER_ESCAPED_OR_ABSCONDED\n EXEMPT_PRISONER_SAFETY_ISSUES\n EXEMPT_PRISON_REGIME_CIRCUMSTANCES\n EXEMPT_PRISON_STAFF_REDEPLOYMENT\n EXEMPT_PRISON_OPERATION_OR_SECURITY_ISSUE\n EXEMPT_SECURITY_ISSUE_RISK_TO_STAFF\n EXEMPT_SYSTEM_TECHNICAL_ISSUE\n EXEMPT_PRISONER_TRANSFER\n EXEMPT_PRISONER_RELEASE\n EXEMPT_PRISONER_DEATH\n EXEMPT_SCREENING_AND_ASSESSMENT_IN_PROGRESS\n EXEMPT_SCREENING_AND_ASSESSMENT_INCOMPLETE\n EXEMPT_PRISONER_MERGE\n ","example":"SCHEDULED"},"calculationRule":{"type":"string","description":"\n The Induction Schedule rule used to determine deadline date.\n list of values are:\n NEW_PRISON_ADMISSION\n EXISTING_PRISONER_LESS_THAN_6_MONTHS_TO_SERVE\n EXISTING_PRISONER_BETWEEN_6_AND_12_MONTHS_TO_SERVE\n EXISTING_PRISONER_BETWEEN_12_AND_60_MONTHS_TO_SERVE\n EXISTING_PRISONER_INDETERMINATE_SENTENCE\n EXISTING_PRISONER_ON_REMAND\n EXISTING_PRISONER_UN_SENTENCED\n ","example":"NEW_PRISON_ADMISSION"},"nomisNumber":{"type":"string","description":"The Nomis number of the person.","example":"A1234BC"},"systemCreatedBy":{"type":"string","description":"The name of the person who used the PLP system to create the Induction Schedule, or 'system' for system generated updates.","example":"John Smith"},"systemCreatedAt":{"type":"string","description":"An ISO-8601 timestamp representing the time the PLP system was used to create the Induction Schedule.","format":"date-time","example":"2023-06-19T09:39:44Z"},"systemCreatedAtPrison":{"type":"string","description":"The code of the prison where the induction was Created","example":"BXI"},"systemUpdatedBy":{"type":"string","description":"\n The name of the person who performed the Induction with the prisoner.\n In the case of system generated updates or setting an exemption this field will not be present.\n ","example":"Fred Jones"},"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"},"systemUpdatedAtPrison":{"type":"string","description":"The code of the prison where the induction was updated","example":"BXI"},"inductionPerformedBy":{"type":"string","description":"\n The name of the person who performed the Induction with the prisoner.\n In the case of system generated updates or setting an exemption this field will not be present.\n ","example":"Fred Jones"},"inductionPerformedAt":{"type":"string","description":"\n When the induction schedule has a completed induction this will be populated with the date that the CIAG entered into the system when completing the Induction. It is the date that the user did the Induction in person, rather than the date that it was entered into the system.\n ","format":"date","example":"2023-06-30"},"inductionPerformedByRole":{"type":"string","description":"\n The role of the person who performed the Induction with the prisoner.\n In the case of system generated updates or setting an exemption this field will not be present.\n ","example":"Peer Mentor"},"inductionPerformedAtPrison":{"type":"string","description":"The prison code that the induction was performed at.","example":"BXI"},"exemptionReason":{"type":"string","description":"If reason the induction schedule was exempted.","example":"EXEMPT_SYSTEM_TECHNICAL_ISSUE"},"version":{"type":"integer","description":"\n The induction schedule can change status numerous times.\n When looking at the plp-induction-schedule/history of the inductions.\n The version number indicates which version of the induction schedule this one is,\n the higher the number the newer the update.\n ","format":"int32"}}},"DataResponseInductionSchedules":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/InductionSchedules"}}},"InductionSchedules":{"required":["inductionSchedules"],"type":"object","properties":{"inductionSchedules":{"type":"array","description":"\n A list of induction schedule versions for this prisoner.\n The prisoner will only have one induction schedule but for various reasons the schedule can be updated.\n This list will show each change the schedule has been through. This allows for reports to be generated.\n ","items":{"$ref":"#/components/schemas/InductionSchedule"}}}},"DataResponsePersonName":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonName"}}},"PersonName":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"}}},"DataResponseIEPLevel":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/IEPLevel"}}},"IEPLevel":{"required":["iepCode","iepLevel"],"type":"object","properties":{"iepCode":{"type":"string","description":"Incentive Level Code","example":"STD"},"iepLevel":{"type":"string","description":"Incentive Level","example":"Standard"}}},"Contact":{"required":["contactId","dateOfBirth","firstName","lastName","phoneNumber","phoneType","phoneTypeDescription"],"type":"object","properties":{"contactId":{"type":"integer","description":"The ID of the contact","format":"int64","example":123456},"lastName":{"type":"string","description":"The last name of the contact","example":"Doe"},"firstName":{"type":"string","description":"The first name of the contact","example":"John"},"middleNames":{"type":"string","description":"The middle names of the contact, if any","example":"William"},"dateOfBirth":{"type":"string","description":"The date of birth of the contact, if known","example":"1980-01-01"},"flat":{"type":"string","description":"Flat number or name","example":"Flat 2B"},"property":{"type":"string","description":"Building or house number or name","example":"Mansion House"},"street":{"type":"string","description":"Street or road name","example":"Acacia Avenue"},"area":{"type":"string","description":"Area","example":"Morton Heights"},"cityCode":{"type":"string","description":"City code","example":"25343"},"cityDescription":{"type":"string","description":"The description of the city code","example":"Sheffield"},"countyCode":{"type":"string","description":"County code","example":"S.YORKSHIRE"},"countyDescription":{"type":"string","description":"The description of county code","example":"South Yorkshire"},"postCode":{"type":"string","description":"Postcode","example":"S13 4FH"},"countryCode":{"type":"string","description":"Country code","example":"ENG"},"countryDescription":{"type":"string","description":"The description of country code","example":"England"},"primaryAddress":{"type":"boolean","description":"True if this is the primary address otherwise false","example":true},"mailAddress":{"type":"boolean","description":"If true this address should be considered for sending mail to","example":true},"phoneType":{"type":"string","description":"Type of phone","example":"MOB"},"phoneTypeDescription":{"type":"string","description":"Description of the type of phone","example":"Mobile"},"phoneNumber":{"type":"string","description":"Phone number","example":"+1234567890"},"extNumber":{"type":"string","description":"Extension number","example":"123"}},"description":"The details of a contact as an individual"},"PaginatedResponsePrisonerContact":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PrisonerContact"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"PrisonerContact":{"required":["contact","relationship"],"type":"object","properties":{"contact":{"$ref":"#/components/schemas/Contact"},"relationship":{"$ref":"#/components/schemas/PrisonerContactRelationship"}}},"PrisonerContactRelationship":{"type":"object","properties":{"relationshipTypeCode":{"type":"string","description":"Coded value indicating either a social or official contact. This is a coded value from the group code CONTACT_TYPE in reference data","example":"Social"},"relationshipTypeDescription":{"type":"string","description":"The description of the relationship type","example":"Friend"},"relationshipToPrisonerCode":{"type":"string","description":"The relationship to the prisoner. A code from SOCIAL_RELATIONSHIP or OFFICIAL_RELATIONSHIP reference data groups depending on the relationship type","example":"FRI"},"relationshipToPrisonerDescription":{"type":"string","description":"The description of the relationship to the prisoner","example":"Friend"},"approvedVisitor":{"type":"boolean","description":"Indicates whether the contact is an approved visitor","example":true},"nextOfKin":{"type":"boolean","description":"Is this contact the prisoner's next of kin?","example":false},"emergencyContact":{"type":"boolean","description":"Is this contact the prisoner's emergency contact?","example":true},"isRelationshipActive":{"type":"boolean","description":"Is this contact the prisoner's next of kin?","example":true},"currentTerm":{"type":"boolean","description":"Is this relationship active for the current booking?","example":true},"comments":{"type":"string","description":"Any additional comments","example":"Close family friend"}},"description":"The details of the relationship between the prisoner and this contact"},"CellLocation":{"type":"object","properties":{"prisonCode":{"type":"string"},"prisonName":{"type":"string"},"cell":{"type":"string"}}},"DataResponseCellLocation":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/CellLocation"}}},"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"}}},"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"}}}},"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"}}},"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"}}},"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"}}}},"Response":{"required":["data","errors"],"type":"object","properties":{"data":{"type":"object"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/UpstreamApiError"}}}},"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"}}},"ContactAddress":{"required":["createdBy","createdTime","mailFlag","noFixedAddress","phoneNumbers","primaryAddress","verified"],"type":"object","properties":{"addressType":{"type":"string","description":"The type of the address","example":"HOME"},"addressTypeDescription":{"type":"string","description":"The description of the address type"},"primaryAddress":{"type":"boolean","description":"True if this is the primary address otherwise false","example":true},"flat":{"type":"string","description":"Flat number or name","example":"Flat 2B"},"property":{"type":"string","description":"Building or house number or name","example":"Mansion House"},"street":{"type":"string","description":"Street or road name","example":"Acacia Avenue"},"area":{"type":"string","description":"Area","example":"Morton Heights"},"cityCode":{"type":"string","description":"City code","example":"25343"},"cityDescription":{"type":"string","description":"The description of the city code","example":"Sheffield"},"countyCode":{"type":"string","description":"County code","example":"S.YORKSHIRE"},"countyDescription":{"type":"string","description":"The description of county code","example":"South Yorkshire"},"postcode":{"type":"string","description":"Postcode","example":"S13 4FH"},"countryCode":{"type":"string","description":"Country code","example":"ENG"},"countryDescription":{"type":"string","description":"The description of country code","example":"England"},"verified":{"type":"boolean","description":"Whether the address has been verified by postcode lookup","example":false},"verifiedBy":{"type":"string","description":"Which username ran the postcode lookup check","example":"NJKG44D"},"verifiedTime":{"type":"string","description":"The timestamp of when the postcode lookup was done","example":"2024-01-01T00:00:00Z"},"mailFlag":{"type":"boolean","description":"Flag to indicate whether mail is allowed to be sent to this address","example":false},"startDate":{"type":"string","description":"The start date when this address is to be considered active from","example":"2024-01-01"},"endDate":{"type":"string","description":"The end date when this address is to be considered active from","example":"2024-01-01"},"noFixedAddress":{"type":"boolean","description":"Flag to indicate whether this address indicates no fixed address","example":false},"comments":{"type":"string","description":"Any additional information or comments about the address","example":"Some additional information"},"phoneNumbers":{"type":"array","description":"Phone numbers that are related to this address","items":{"$ref":"#/components/schemas/ContactPhoneNumber"}},"createdBy":{"type":"string","description":"The id of the user who created the contact","example":"JD000001"},"createdTime":{"type":"string","description":"The timestamp of when the contact was created","example":"2024-01-01T00:00:00Z"},"updatedBy":{"type":"string","description":"The id of the user who created the contact address","example":"JD000001"},"updatedTime":{"type":"string","description":"The timestamp of when the contact address was last updated","example":"2024-01-01T00:00:00Z"}},"description":"All addresses for the contact"},"ContactEmailAddress":{"required":["emailAddress"],"type":"object","properties":{"emailAddress":{"type":"string","description":"Email address","example":"test@example.com"}},"description":"All email addresses for the contact"},"ContactPhoneNumber":{"required":["phoneNumber","phoneType","phoneTypeDescription"],"type":"object","properties":{"phoneType":{"type":"string","description":"Type of phone","example":"MOB"},"phoneTypeDescription":{"type":"string","description":"Description of the type of phone","example":"Mobile"},"phoneNumber":{"type":"string","description":"Phone number","example":"+1234567890"},"extNumber":{"type":"string","description":"Extension number","example":"123"}},"description":"All phone numbers for the contact"},"DetailedContact":{"required":["addresses","contactId","emailAddresses","firstName","genderCode","genderDescription","interpreterRequired","isStaff","lastName","phoneNumbers"],"type":"object","properties":{"contactId":{"type":"integer","description":"The ID of the contact","format":"int64","example":123456},"titleCode":{"type":"string","description":"The title code for the contact","example":"MR"},"titleDescription":{"type":"string","description":"The description of the title code, if present","example":"Mr"},"lastName":{"type":"string","description":"The last name of the contact","example":"Doe"},"firstName":{"type":"string","description":"The first name of the contact","example":"John"},"middleNames":{"type":"string","description":"The middle names of the contact, if any","example":"William"},"dateOfBirth":{"type":"string","description":"The date of birth of the contact, if known","example":"1980-01-01"},"isStaff":{"type":"boolean","description":"Whether the contact is a staff member","example":false},"deceasedDate":{"type":"string","description":"The date the contact deceased, if known","example":"1980-01-01"},"languageCode":{"type":"string","description":"The NOMIS code for the contacts language","example":"ENG"},"languageDescription":{"type":"string","description":"The description of the language code","example":"English"},"interpreterRequired":{"type":"boolean","description":"Whether an interpreter is required for this contact","example":true},"addresses":{"type":"array","description":"All addresses for the contact","items":{"$ref":"#/components/schemas/ContactAddress"}},"phoneNumbers":{"type":"array","description":"All phone numbers for the contact","items":{"$ref":"#/components/schemas/ContactPhoneNumber"}},"emailAddresses":{"type":"array","description":"All email addresses for the contact","items":{"$ref":"#/components/schemas/ContactEmailAddress"}},"genderCode":{"type":"string","description":"The NOMIS code for the contacts gender. See reference data with group code 'GENDER'"},"genderDescription":{"type":"string","description":"The description of gender code. See reference data with group code 'GENDER'"}}},"ResponseDetailedContact":{"required":["data","errors"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/DetailedContact"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/UpstreamApiError"}}}},"DlqMessage":{"required":["body","messageId"],"type":"object","properties":{"body":{"type":"object","additionalProperties":{"type":"object"}},"messageId":{"type":"string"}}},"GetDlqResult":{"required":["messages","messagesFoundCount","messagesReturnedCount"],"type":"object","properties":{"messagesFoundCount":{"type":"integer","format":"int32"},"messagesReturnedCount":{"type":"integer","format":"int32"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/DlqMessage"}}}},"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."},"TransactionConflict":{"properties":{"status":{"type":"number","example":409},"userMessage":{"type":"string","example":"Conflict"},"developerMessage":{"type":"string","example":"Duplicate post - The client_unique_ref has been used before"}},"description":"Duplicate post - The client_unique_ref has been used before"},"ForbiddenResponse":{"properties":{"status":{"type":"number","example":403},"userMessage":{"type":"string","example":"Forbidden to complete action by upstream service"},"developerMessage":{"type":"string","example":"Forbidden to complete action by upstream service"}},"description":"Forbidden to complete action by upstream service"}},"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/persons/{hmppsId}/expression-of-interest/jobs/{jobid}":{"put":{"tags":["persons"],"summary":"Returns completed response","operationId":"submitExpressionOfInterest","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS identifier","required":true,"schema":{"type":"string"},"example":"A1234AA"},{"name":"jobid","in":"path","description":"A job identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully submitted an expression of interest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUnit"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"403":{"description":"Access is forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}}}}},"/queue-admin/retry-dlq/{dlqName}":{"put":{"tags":["hmpps-queue-resource"],"operationId":"retryDlq","parameters":[{"name":"dlqName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryDlqResult"}}}}}}},"/queue-admin/retry-all-dlqs":{"put":{"tags":["hmpps-queue-resource"],"operationId":"retryAllDlqs","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RetryDlqResult"}}}}}}}},"/queue-admin/purge-queue/{queueName}":{"put":{"tags":["hmpps-queue-resource"],"operationId":"purgeQueue","parameters":[{"name":"queueName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeQueueResult"}}}}}}},"/v1/prison/{prisonId}/prisoners/{hmppsId}/transactions":{"post":{"tags":["prison"],"summary":"Make a financial transaction.","description":"Request body
Applicable filters: ","operationId":"postTransactions","parameters":[{"name":"prisonId","in":"path","description":"The ID of the prison that holds the account","required":true,"schema":{"type":"string"}},{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRequest"}}},"required":true},"responses":{"200":{"description":"Successfully created a transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseTransactionCreateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConflict"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/prison/{prisonId}/prisoners/{hmppsId}/transactions/transfer":{"post":{"tags":["prison"],"summary":"Transfer funds between the accounts of a prisoner.","description":"Currently only able to move from spends to savings.
Request body
Applicable filters: ","operationId":"postTransactionsTransfer","parameters":[{"name":"prisonId","in":"path","description":"The ID of the prison that holds the account","required":true,"schema":{"type":"string"}},{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionTransferRequest"}}},"required":true},"responses":{"200":{"description":"Successfully created a transaction transfer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseTransactionTransferCreateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotFound"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionConflict"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/visit/{visitReference}":{"get":{"tags":["prison"],"summary":"Get visit information for a visit by visit reference.","operationId":"getVisitInformationByReference","parameters":[{"name":"visitReference","in":"path","description":"The visit reference number relating to the visit.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found visit information for a given visit reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseVisit"}}}},"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/prison/{prisonId}/visit/search":{"get":{"tags":["visits","prison"],"summary":"Searches for visits by prisonId and criteria.","description":"Applicable filters: ","operationId":"getVisits","parameters":[{"name":"prisonId","in":"path","description":"The ID of the prison to be queried against","required":true,"schema":{"type":"string"}},{"name":"hmppsId","in":"query","description":"The HMPPS ID of the person","required":false,"schema":{"type":"string"}},{"name":"fromDate","in":"query","description":"The start date of the visit","required":false,"schema":{"type":"string"}},{"name":"toDate","in":"query","description":"The end date of the visit","required":false,"schema":{"type":"string"}},{"name":"visitStatus","in":"query","description":"The status of the visit. (BOOKING or CANCELLED)","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"The page number","required":false,"schema":{"minimum":1,"type":"string"}},{"name":"size","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/PaginatedResponseVisit"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponse"}}}},"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/prison/{prisonId}/prisoners/{hmppsId}/transactions/{clientUniqueRef}":{"get":{"tags":["prison"],"summary":"Returns details for a transaction by clientUniqueRef.","description":"Applicable filters: ","operationId":"getTransactionsByClientUniqueRef","parameters":[{"name":"prisonId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}},{"name":"hmppsId","in":"path","description":"The ID of the prison that holds the account","required":true,"schema":{"type":"string"}},{"name":"clientUniqueRef","in":"path","description":"The clientUniqueRef used when the transaction was created","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseTransaction"}}}},"400":{"description":"The request data has an invalid format or the prisoner does not have transaction associated with the clientUniqueRef.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/prison/{prisonId}/prisoners/{hmppsId}/non-associations":{"get":{"tags":["prison"],"summary":"Returns a single prisoners list of non associates.","description":"Applicable filters:
includeOpen is true by default, includeClosed is false by default. At least one must be true. The role READ_NON_ASSOCIATIONS is required for this endpoint.","operationId":"getPrisonersNonAssociates","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the prisoner","required":true,"schema":{"type":"string"}},{"name":"prisonId","in":"path","description":"The prison ID of the prisoner","required":true,"schema":{"type":"string"}},{"name":"includeOpen","in":"query","required":false,"schema":{"type":"boolean","default":true}},{"name":"includeClosed","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successfully found prisoners non associates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseNonAssociations"}}}},"400":{"description":"The HMPPS ID provided has an invalid format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/prison/{prisonId}/prisoners/{hmppsId}/balances":{"get":{"tags":["balances-controller"],"summary":"Returns all accounts for a prisoner that they have at a prison.","description":"Applicable filters: ","operationId":"getBalancesForPerson","parameters":[{"name":"hmppsId","in":"path","required":true,"schema":{"type":"string"}},{"name":"prisonId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoner's accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseBalances"}}}},"400":{"description":"The HMPPS ID provided has an invalid format or the prisoner does hot have accounts at the specified prison.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/prison/{prisonId}/prisoners/{hmppsId}/accounts/{accountCode}/transactions":{"get":{"tags":["prison"],"summary":"Returns all transactions for a prisoner associated with an account code that they have at a prison.","description":"Applicable filters: ","operationId":"getTransactionsByAccountCode","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}},{"name":"prisonId","in":"path","description":"The ID of the prison that holds the account","required":true,"schema":{"type":"string"}},{"name":"accountCode","in":"path","description":"The code of the account to be accessed, one of 'spends', 'savings' or 'cash'","required":true,"schema":{"type":"string"},"example":"spends"},{"name":"from_date","in":"query","description":"Start date for transactions (defaults to today if not supplied)","required":false,"schema":{"type":"string"}},{"name":"to_date","in":"query","description":"To date for transactions (defaults to today if not supplied)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoner's transactions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseTransactions"}}}},"400":{"description":"The request data has an invalid format or the prisoner does hot have transactions at the specified prison.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/prison/{prisonId}/prisoners/{hmppsId}/accounts/{accountCode}/balances":{"get":{"tags":["balances-controller"],"summary":"Returns a specific account for a prisoner that they have at a prison, based on the account code provided.","description":"Applicable filters: ","operationId":"getBalanceForPerson","parameters":[{"name":"hmppsId","in":"path","required":true,"schema":{"type":"string"}},{"name":"prisonId","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountCode","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoner's account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseBalance"}}}},"400":{"description":"The HMPPS ID provided has an invalid format, the account code is not one of the allowable accounts or the prisoner does hot have accounts at the specified prison.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/prison/prisoners":{"get":{"tags":["prison"],"summary":"Returns person(s) by search criteria, sorted by date of birth (newest first). Only queries prisoner search.","description":"Applicable filters: ","operationId":"getPrisoners","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":"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/PaginatedResponsePersonInPrison"}}}},"400":{"description":"There were no query parameters passed in. At least one must be specified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/v1/prison/prisoners/{hmppsId}":{"get":{"tags":["prison"],"summary":"Returns a single prisoners details given an hmppsId, does not query for a probation person.","description":"Applicable filters: ","operationId":"getPerson","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoner with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonInPrison"}}}},"400":{"description":"The HMPPS ID provided has an invalid format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/pnd/persons/{encodedHmppsId}/alerts":{"get":{"tags":["alerts","persons"],"summary":"Returns alerts associated with a person, sorted by dateCreated (newest first).","operationId":"getPndPersonAlerts","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":{"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}/visitor/{contactId}/restrictions":{"get":{"tags":["persons"],"summary":"Gets visitor restrictions.","description":"Returns visitor restrictions for a prisoner","operationId":"getVisitorRestrictions","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS identifier","required":true,"schema":{"type":"string"}},{"name":"contactId","in":"path","description":"A contact ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoners vistor restrictions with the provided HMPPS ID and contact ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePrisonerContactRestrictions"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/visit/future":{"get":{"tags":["persons","visits"],"summary":"Get Future Visit Information.","description":"Applicable filters: ","operationId":"getFutureVisits","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a person's future visits with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseListVisit"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/visit-restrictions":{"get":{"tags":["persons"],"summary":"Gets restrictions for latest booking.","description":"Returns a list of restrictions for the latest booking","operationId":"getRestrictionsForPerson","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a person's visit restrictions with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseListPersonVisitRestriction"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/visit-orders":{"get":{"tags":["persons"],"summary":"Returns visit orders.","operationId":"getPrisonersVisitOrders","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the prisoner","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoners visit orders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseVisitOrders"}}}},"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}/sentences":{"get":{"tags":["persons"],"summary":"Returns sentences associated with a person, sorted by dateOfSentencing (newest first).","description":"Applicable filters: ","operationId":"getPersonSentences","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}},{"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"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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-review-schedule":{"get":{"tags":["alerts","persons"],"summary":"Returns the plp review schedule associated with a person.","operationId":"getReviewSchedule","parameters":[{"name":"hmppsId","in":"path","description":"A HmppsId","required":true,"schema":{"type":"string"},"example":"A123123"},{"name":"statuses","in":"query","description":"Filter by review schedule statuses","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":["COMPLETED","PENDING"]}],"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 current 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/{hmppsId}/plp-induction-schedule/history":{"get":{"tags":["alerts","persons"],"summary":"Returns the plp induction schedule history associated with a person.","operationId":"getInductionScheduleHistory","parameters":[{"name":"hmppsId","in":"path","description":"A HMPPS id","required":true,"schema":{"type":"string"},"example":"A123123"}],"responses":{"200":{"description":"Successfully found induction schedule history for a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseInductionSchedules"}}}},"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}/name":{"get":{"tags":["persons"],"summary":"Returns a person's name","description":"Applicable filters: ","operationId":"getPersonName","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a person with the provided HMPPS ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponsePersonName"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/iep-level":{"get":{"tags":["persons"],"summary":"Returns a prisoners IEP level.","description":"Applicable filters: ","operationId":"getPrisonersIEPLevel","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the prisoner","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a prisoners contacts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseIEPLevel"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/contacts":{"get":{"tags":["persons"],"summary":"Returns a prisoners contacts.","description":"Applicable filters: ","operationId":"getPrisonersContacts","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the prisoner","required":true,"schema":{"type":"string"}},{"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 prisoners contacts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponsePrisonerContact"}}}},"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}/cell-location":{"get":{"tags":["persons"],"summary":"Returns the cell location of a person.","description":"Applicable filters: ","operationId":"getPersonCellLocation","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found a persons cell location.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataResponseCellLocation"}}}},"400":{"description":"The HMPPS ID provided has an invalid format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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}/alerts":{"get":{"tags":["alerts","persons"],"summary":"Returns alerts associated with a person, sorted by dateCreated (newest first).","description":"Applicable filters: ","operationId":"getPersonAlerts","parameters":[{"name":"hmppsId","in":"path","description":"The HMPPS ID of the person","required":true,"schema":{"type":"string"}},{"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"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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/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.","description":"Applicable filters: ","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"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponse"}}}},"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}/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}/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"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponse"}}}},"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"}}}}},"deprecated":true}},"/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":"\n Accepts a HMPPS Id (hmppsId) and looks up the corresponding nomis number.
\n Applicable filters: \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).
Applicable filters: ","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).
Applicable filters: ","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"}}}}}}},"/v1/contacts/{contactId}":{"get":{"tags":["contacts"],"summary":"Returns a contact by ID.","operationId":"getContactById","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully found contact by contact ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDetailedContact"}}}},"400":{"description":"The contact is in invalid format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"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"}}}}}}},"/queue-admin/get-dlq-messages/{dlqName}":{"get":{"tags":["hmpps-queue-resource"],"operationId":"getDlqMessages","parameters":[{"name":"dlqName","in":"path","required":true,"schema":{"type":"string"}},{"name":"maxMessages","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDlqResult"}}}}}}}},"components":{"schemas":{"ResponseUnit":{"required":["data","errors"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Unit"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/UpstreamApiError"}}}},"Unit":{"type":"object"},"UpstreamApiError":{"required":["causedBy","type"],"type":"object","properties":{"causedBy":{"type":"string","enum":["NOMIS","PRISONER_OFFENDER_SEARCH","PROBATION_OFFENDER_SEARCH","NDELIUS","ASSESS_RISKS_AND_NEEDS","EFFECTIVE_PROPOSAL_FRAMEWORK","ADJUDICATIONS","CVL","CASE_NOTES","MANAGE_POM_CASE","RISK_MANAGEMENT_PLAN","TEST","PLP","NON_ASSOCIATIONS","PERSONAL_RELATIONSHIPS","MANAGE_PRISON_VISITS","INCENTIVES"]},"type":{"type":"string","enum":["ENTITY_NOT_FOUND","BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","CONFLICT"]},"description":{"type":"string"}}},"RetryDlqResult":{"required":["messagesFoundCount"],"type":"object","properties":{"messagesFoundCount":{"type":"integer","format":"int32"}}},"PurgeQueueResult":{"required":["messagesFoundCount"],"type":"object","properties":{"messagesFoundCount":{"type":"integer","format":"int32"}}},"TransactionRequest":{"required":["amount","clientTransactionId","clientUniqueRef","type"],"type":"object","properties":{"type":{"type":"string","description":"Transaction type. Determines which accounts will be debited and credited.","example":"CANT"},"description":{"type":"string","description":"Description of the transaction.","example":"Canteen Purchase of £16.34"},"amount":{"type":"integer","description":"Amount of money in pence, must be positive. Whether the transaction is a credit or debit is determined by the type.","format":"int32","example":1234},"clientTransactionId":{"type":"string","description":"Client Transaction ID.","example":"CL123212"},"clientUniqueRef":{"type":"string","description":"A reference unique to the client making the post. Maximum size 64 characters, only alphabetic, numeric, '-' and '_' are allowed.","example":"CLIENT121131-0_11"}}},"DataResponseTransactionCreateResponse":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransactionCreateResponse"}}},"TransactionCreateResponse":{"required":["transactionId"],"type":"object","properties":{"transactionId":{"type":"string"}}},"TransactionTransferRequest":{"required":["amount","clientTransactionId","clientUniqueRef","description","fromAccount","toAccount"],"type":"object","properties":{"description":{"type":"string","description":"Description of the transaction."},"amount":{"type":"integer","description":"Amount of money in pence, must be positive.","format":"int32","example":1234},"clientTransactionId":{"type":"string","description":"Client Transaction Id."},"clientUniqueRef":{"type":"string","description":"A reference unique to the client making the post. Maximum size 64 characters, only alphabetic, numeric, '-' and '_' are allowed."},"fromAccount":{"type":"string","description":"The account to move money from. Must be 'spends'.","example":"spends"},"toAccount":{"type":"string","description":"The account to move money to. Must be 'savings'.","example":"savings"}}},"DataResponseTransactionTransferCreateResponse":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransactionTransferCreateResponse"}}},"TransactionTransferCreateResponse":{"required":["creditTransactionId","debitTransactionId","transactionId"],"type":"object","properties":{"debitTransactionId":{"type":"string","description":"Transaction id for the debit portion of the transaction."},"creditTransactionId":{"type":"string","description":"Transaction id for the credit portion of the transaction."},"transactionId":{"type":"string","description":"Transaction id for the whole transaction."}}},"DataResponseVisit":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Visit"}}},"Visit":{"required":["createdTimestamp","endTimestamp","firstBookedDateTime","modifiedTimestamp","prisonId","prisonName","prisonerId","startTimestamp","visitContact","visitNotes","visitRestriction","visitRoom","visitStatus","visitType","visitorSupport","visitors"],"type":"object","properties":{"applicationReference":{"type":"string","description":"Application Reference","example":"dfs-wjs-eqr"},"reference":{"type":"string","description":"Visit Reference","example":"v9-d7-ed-7u"},"prisonerId":{"type":"string","description":"Prisoner Id","example":"AF34567G"},"prisonId":{"type":"string","description":"Prison Id","example":"MDI"},"prisonName":{"type":"string","description":"Prison Name","example":"Moorland (HMP & YOI)"},"sessionTemplateReference":{"type":"string","description":"Session Template Reference","example":"v9d.7ed.7u"},"visitRoom":{"type":"string","description":"Location of Visit ","example":"Visits Main Hall"},"visitType":{"type":"string","description":"Type of Visit","example":"SOCIAL"},"visitStatus":{"type":"string","description":"Visit Status","example":"BOOKED"},"outcomeStatus":{"type":"string","description":"Outcome Status of Visit","example":"ADMINISTRATIVE_CANCELLATION"},"visitRestriction":{"type":"string","description":"Visit Restriction","example":"OPEN"},"startTimestamp":{"type":"string","description":"The date and time of the visit"},"endTimestamp":{"type":"string","description":"The finishing date and time of the visit"},"visitNotes":{"type":"array","description":"Visit Notes","items":{"$ref":"#/components/schemas/VisitNotes"}},"visitContact":{"$ref":"#/components/schemas/VisitContact"},"visitors":{"type":"array","description":"List of visitors associated with the visit","items":{"$ref":"#/components/schemas/Visitors"}},"visitorSupport":{"$ref":"#/components/schemas/VisitorSupport"},"createdTimestamp":{"type":"string","description":"The visit created date and time"},"modifiedTimestamp":{"type":"string","description":"The visit modified date and time"},"firstBookedDateTime":{"type":"string","description":"Date the visit was first booked or migrated"}}},"VisitContact":{"required":["email","name","telephone"],"type":"object","properties":{"name":{"type":"string","description":"Contact name","example":"John Smith"},"telephone":{"type":"string","description":"Contact Phone Number","example":"01234 567890"},"email":{"type":"string","description":"Contact Email Address","example":"email@example.com"}},"description":"Contact associated with the visit"},"VisitNotes":{"required":["text","type"],"type":"object","properties":{"type":{"type":"string","description":"Note type","example":"VISITOR_CONCERN","enum":["VISITOR_CONCERN","VISIT_OUTCOMES","VISIT_COMMENT","STATUS_CHANGED_REASON"]},"text":{"type":"string","description":"Note Text","example":"Visitor is concerned that his mother in-law is coming!"}},"description":"Visit Notes"},"VisitorSupport":{"required":["description"],"type":"object","properties":{"description":{"type":"string","description":"Support text description","example":"Visually impaired assistance"}},"description":"Additional support associated with the visit"},"Visitors":{"required":["contactId"],"type":"object","properties":{"contactId":{"type":"integer","description":"Person ID (nomis) of the visitor","format":"int64","example":1234},"visitContact":{"type":"boolean","description":"true if visitor is the contact for the visit otherwise false","example":true}},"description":"List of visitors associated with the visit"},"PaginatedResponseVisit":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Visit"}},"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}}},"DataResponseTransaction":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Transaction"}}},"Transaction":{"required":["amount","date","description","id","type"],"type":"object","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type"},"description":{"type":"string"},"amount":{"type":"integer","format":"int32"},"date":{"type":"string"}}},"Type":{"required":["code","desc"],"type":"object","properties":{"code":{"type":"string"},"desc":{"type":"string"}}},"DataResponseNonAssociations":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/NonAssociations"}}},"NonAssociation":{"required":["authorisedBy","comment","id","isClosed","isOpen","otherPrisonerDetails","reason","reasonDescription","restrictionType","restrictionTypeDescription","role","roleDescription","updatedBy","whenCreated","whenUpdated"],"type":"object","properties":{"id":{"type":"integer","description":"The ID of the non association","format":"int32"},"role":{"type":"string","description":"The prisoner's role code in the non-association","example":"VICTIM"},"roleDescription":{"type":"string","description":"The description of the prisoner's role in the non-association","example":"Victim"},"reason":{"type":"string","description":"The reason code why these prisoners should be kept apart","example":"BULLYING"},"reasonDescription":{"type":"string","description":"The reason description why these prisoners should be kept apart","example":"Bullying"},"restrictionType":{"type":"string","description":"Location-based restriction code","example":"CELL"},"restrictionTypeDescription":{"type":"string","description":"Location-based restriction description","example":"Cell only"},"comment":{"type":"string","description":"Explanation of why prisoners are non-associated","example":"John and Luke always end up fighting"},"authorisedBy":{"type":"string","description":"User ID of the person who created the non-association.","example":"OFF3_GEN"},"whenCreated":{"type":"string","description":"When the non-association was created","example":"2021-12-31T12:34:56.789012"},"whenUpdated":{"type":"string","description":"When the non-association was last updated","example":"2021-12-31T12:34:56.789012"},"updatedBy":{"type":"string","description":"User ID of the person who last updated the non-association"},"isClosed":{"type":"boolean","description":"Whether the non-association is closed or is in effect"},"closedBy":{"type":"string","description":"User ID of the person who closed the non-association. Only present when the non-association is closed, null for open non-associations"},"closedReason":{"type":"string","description":"Reason why the non-association was closed. Only present when the non-association is closed, null for open non-associations"},"closedAt":{"type":"string","description":"Date and time of when the non-association was closed. Only present when the non-association is closed, null for open non-associations"},"otherPrisonerDetails":{"$ref":"#/components/schemas/NonAssociationPrisonerDetails"},"isOpen":{"type":"boolean","description":"Whether the non-association is open or closed"}},"description":"List of non-associations"},"NonAssociationPrisonerDetails":{"required":["cellLocation","firstName","lastName","prisonId","prisonName","prisonerNumber","role","roleDescription"],"type":"object","properties":{"prisonerNumber":{"type":"string","description":"Prisoner number","example":"D5678EF"},"role":{"type":"string","description":"Other prisoner’s role code in the non-association","example":"VICTIM"},"roleDescription":{"type":"string","description":"Other prisoner’s role description in the non-association"},"firstName":{"type":"string","description":"First name","example":"John"},"lastName":{"type":"string","description":"Last name","example":"Smith"},"prisonId":{"type":"string","description":"ID of the prison","example":"MDI"},"prisonName":{"type":"string","description":"Name of the prison","example":"Moorland"},"cellLocation":{"type":"string","description":"Cell the prisoner is assigned to","example":"B-2-007"}},"description":"Details about the other person in the non-association."},"NonAssociations":{"required":["nonAssociations"],"type":"object","properties":{"nonAssociations":{"type":"array","description":"List of non-associations","items":{"$ref":"#/components/schemas/NonAssociation"}}}},"AccountBalance":{"required":["accountCode","amount"],"type":"object","properties":{"accountCode":{"type":"string"},"amount":{"type":"integer","format":"int32"}}},"Balances":{"required":["balances"],"type":"object","properties":{"balances":{"type":"array","items":{"$ref":"#/components/schemas/AccountBalance"}}}},"DataResponseBalances":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Balances"}}},"DataResponseTransactions":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Transactions"}}},"Transactions":{"required":["transactions"],"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}}},"Balance":{"required":["balance"],"type":"object","properties":{"balance":{"$ref":"#/components/schemas/AccountBalance"}}},"DataResponseBalance":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/Balance"}}},"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"}}},"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."},"PaginatedResponsePersonInPrison":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PersonInPrison"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"PersonInPrison":{"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)"},"category":{"type":"string","description":"Category","example":"C"},"csra":{"type":"string","description":"Cell sharing risk assessment","example":"HIGH"},"receptionDate":{"type":"string","description":"Date prisoner was received into the prison","example":"2021-12-01"},"status":{"type":"string","description":"Status of the prisoner","example":"ACTIVE IN"},"prisonId":{"type":"string","description":"Prison ID","example":"MDI"},"prisonName":{"type":"string","description":"Name of the prison","example":"HMP Leeds"},"cellLocation":{"type":"string","description":"In prison cell location","example":"A-1-002"}}},"DataResponsePersonInPrison":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonInPrison"}}},"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"}}},"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"}}}},"PaginatedResponsePerson":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"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"}}},"ContactRestriction":{"required":["comments","createdBy","createdTime","enteredByDisplayName","enteredByUsername","expiryDate","restrictionType","restrictionTypeDescription","startDate","updatedBy","updatedTime"],"type":"object","properties":{"restrictionType":{"type":"string","description":"The restriction code"},"restrictionTypeDescription":{"type":"string","description":"The description of the restriction type","example":"Banned"},"startDate":{"type":"string","description":"Restriction created date","example":"2024-01-01"},"expiryDate":{"type":"string","description":"Restriction expiry date","example":"2024-01-01"},"comments":{"type":"string","description":"Comments for the restriction","example":"N/A"},"enteredByUsername":{"type":"string","description":"The username of either the person who created the restriction or the last person to update it if it has been modified","example":"admin"},"enteredByDisplayName":{"type":"string","description":"The display name of either the person who created the restriction or the last person to update it if it has been modified","example":"John Smith"},"createdBy":{"type":"string","description":"User who created the entry","example":"admin"},"createdTime":{"type":"string","description":"Timestamp when the entry was created","example":"2023-09-23T10:15:30"},"updatedBy":{"type":"string","description":"User who updated the entry","example":"admin"},"updatedTime":{"type":"string","description":"Timestamp when the entry was updated","example":"2023-09-23T10:15:30"}},"description":"Global (estate-wide) restrictions for the contact"},"DataResponsePrisonerContactRestrictions":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PrisonerContactRestrictions"}}},"PrisonerContactRestrictions":{"required":["contactGlobalRestrictions","prisonerContactRestrictions"],"type":"object","properties":{"prisonerContactRestrictions":{"type":"array","description":"Relationship specific restrictions","items":{"$ref":"#/components/schemas/ContactRestriction"}},"contactGlobalRestrictions":{"type":"array","description":"Global (estate-wide) restrictions for the contact","items":{"$ref":"#/components/schemas/ContactRestriction"}}}},"DataResponseListVisit":{"required":["data"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Visit"}}}},"DataResponseListPersonVisitRestriction":{"required":["data"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PersonVisitRestriction"}}}},"PersonVisitRestriction":{"required":["active","comment","restrictionId","restrictionType","restrictionTypeDescription","startDate"],"type":"object","properties":{"restrictionId":{"type":"integer","description":"Restriction ID","format":"int64"},"comment":{"type":"string","description":"Restriction comment text"},"restrictionType":{"type":"string","description":"Code of restriction type"},"restrictionTypeDescription":{"type":"string","description":"Description of restriction type"},"startDate":{"type":"string","description":"Date from which the restrictions applies","example":"1980-01-01"},"expiryDate":{"type":"string","description":"Date restriction applies to, or indefinitely if null","example":"1980-01-01"},"active":{"type":"boolean","description":"True if restriction is within the start date and optional expiry date range"}}},"DataResponseVisitOrders":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/VisitOrders"}}},"VisitOrders":{"required":["remainingPrivilegeVisitOrders","remainingVisitOrders"],"type":"object","properties":{"remainingVisitOrders":{"type":"integer","description":"The prisoners remaining visit orders","format":"int64","example":123456},"remainingPrivilegeVisitOrders":{"type":"integer","description":"The prisoners remaining privilege visit orders","format":"int64","example":123456}}},"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","EFFECTIVE_PROPOSAL_FRAMEWORK","ADJUDICATIONS","CVL","CASE_NOTES","MANAGE_POM_CASE","RISK_MANAGEMENT_PLAN","TEST","PLP","NON_ASSOCIATIONS","PERSONAL_RELATIONSHIPS","MANAGE_PRISON_VISITS","INCENTIVES","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"]}}},"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":{"nomisNumber":{"type":"string","description":"The Nomis number of the person.","example":"A1234BC"},"reference":{"type":"string","description":"The UUID reference for the review schedule record.","format":"uuid"},"reviewDateFrom":{"type":"string","description":"The earliest date that the review should be carried out.","format":"date"},"reviewDateTo":{"type":"string","description":"The latest date that the review should be carried out.","format":"date"},"status":{"type":"string","description":"\n The status of this review schedule possible values are:\n SCHEDULED\n EXEMPT_PRISONER_DRUG_OR_ALCOHOL_DEPENDENCY\n EXEMPT_PRISONER_OTHER_HEALTH_ISSUES\n EXEMPT_PRISONER_FAILED_TO_ENGAGE\n EXEMPT_PRISONER_ESCAPED_OR_ABSCONDED\n EXEMPT_PRISONER_SAFETY_ISSUES\n EXEMPT_PRISON_REGIME_CIRCUMSTANCES\n EXEMPT_PRISON_STAFF_REDEPLOYMENT\n EXEMPT_PRISON_OPERATION_OR_SECURITY_ISSUE\n EXEMPT_SECURITY_ISSUE_RISK_TO_STAFF\n EXEMPT_SYSTEM_TECHNICAL_ISSUE\n EXEMPT_PRISONER_TRANSFER\n EXEMPT_PRISONER_RELEASE\n EXEMPT_PRISONER_DEATH\n EXEMPT_PRISONER_MERGE\n EXEMPT_UNKNOWN\n COMPLETED\n "},"calculationRule":{"type":"string","description":"\n The calculation rule that was used to workout the review schedule window.\n Possible values are:\n PRISONER_READMISSION\n PRISONER_TRANSFER\n BETWEEN_RELEASE_AND_3_MONTHS_TO_SERVE\n BETWEEN_3_MONTHS_AND_3_MONTHS_7_DAYS_TO_SERVE\n BETWEEN_3_MONTHS_8_DAYS_AND_6_MONTHS_TO_SERVE\n BETWEEN_6_AND_12_MONTHS_TO_SERVE\n BETWEEN_12_AND_60_MONTHS_TO_SERVE\n MORE_THAN_60_MONTHS_TO_SERVE\n INDETERMINATE_SENTENCE\n PRISONER_ON_REMAND\n PRISONER_UN_SENTENCED\n "},"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","description":"\n The review schedule can change status numerous times.\n The version number indicates which version of the review schedule this one is, the higher the number the newer the update.\n use the version number in conjunction with the reference UUID.\n ie if you group the schedules by reference then the version numbers represent different versions of the same schedule.\n The final status of each grouping is COMPLETED.\n ","format":"int32"},"reviewCompletedBy":{"type":"string","description":"When the review schedule has a completed review this will be populated by the name of the person who did the review."},"reviewCompletedByRole":{"type":"string","description":"When the review schedule has a completed review this will be populated by the role of the person who did the review."},"reviewCompletedAt":{"type":"string","description":"When the review schedule has a completed review this will be populated with the date that the CIAG entered into the system when completing the Review. It is the date that the user did the Review in person, rather than the date that it was entered into the system..","format":"date"},"reviewType":{"type":"string","description":"\n When the review schedule has a completed review this will be populated with the type of the review.\n values are:\n REGULAR,\n PRE_RELEASE\n "},"reviewReason":{"type":"string","description":"\n When the review schedule has a completed review this will be populated with the reason for the review.\n values are:\n REOFFENCE,\n TRANSFER,\n REGULAR\n "}},"description":"\n A list of review schedules for this prisoner.\n Note that this will return multiple versions of the the same schedule.\n This is because down stream clients need to know the previous states of the review schedules.\n grouping by reference and then ordering by highest version number will present the review schedules with the most up to date data.\n "},"ReviewSchedules":{"required":["reviewSchedules"],"type":"object","properties":{"reviewSchedules":{"type":"array","description":"\n A list of review schedules for this prisoner.\n Note that this will return multiple versions of the the same schedule.\n This is because down stream clients need to know the previous states of the review schedules.\n grouping by reference and then ordering by highest version number will present the review schedules with the most up to date data.\n ","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":"\n The current status of the Induction Schedule.\n list of values:\n SCHEDULED\n COMPLETED\n EXEMPT_PRISONER_DRUG_OR_ALCOHOL_DEPENDENCY\n EXEMPT_PRISONER_OTHER_HEALTH_ISSUES\n EXEMPT_PRISONER_FAILED_TO_ENGAGE\n EXEMPT_PRISONER_ESCAPED_OR_ABSCONDED\n EXEMPT_PRISONER_SAFETY_ISSUES\n EXEMPT_PRISON_REGIME_CIRCUMSTANCES\n EXEMPT_PRISON_STAFF_REDEPLOYMENT\n EXEMPT_PRISON_OPERATION_OR_SECURITY_ISSUE\n EXEMPT_SECURITY_ISSUE_RISK_TO_STAFF\n EXEMPT_SYSTEM_TECHNICAL_ISSUE\n EXEMPT_PRISONER_TRANSFER\n EXEMPT_PRISONER_RELEASE\n EXEMPT_PRISONER_DEATH\n EXEMPT_SCREENING_AND_ASSESSMENT_IN_PROGRESS\n EXEMPT_SCREENING_AND_ASSESSMENT_INCOMPLETE\n EXEMPT_PRISONER_MERGE\n ","example":"SCHEDULED"},"calculationRule":{"type":"string","description":"\n The Induction Schedule rule used to determine deadline date.\n list of values are:\n NEW_PRISON_ADMISSION\n EXISTING_PRISONER_LESS_THAN_6_MONTHS_TO_SERVE\n EXISTING_PRISONER_BETWEEN_6_AND_12_MONTHS_TO_SERVE\n EXISTING_PRISONER_BETWEEN_12_AND_60_MONTHS_TO_SERVE\n EXISTING_PRISONER_INDETERMINATE_SENTENCE\n EXISTING_PRISONER_ON_REMAND\n EXISTING_PRISONER_UN_SENTENCED\n ","example":"NEW_PRISON_ADMISSION"},"nomisNumber":{"type":"string","description":"The Nomis number of the person.","example":"A1234BC"},"systemCreatedBy":{"type":"string","description":"The name of the person who used the PLP system to create the Induction Schedule, or 'system' for system generated updates.","example":"John Smith"},"systemCreatedAt":{"type":"string","description":"An ISO-8601 timestamp representing the time the PLP system was used to create the Induction Schedule.","format":"date-time","example":"2023-06-19T09:39:44Z"},"systemCreatedAtPrison":{"type":"string","description":"The code of the prison where the induction was Created","example":"BXI"},"systemUpdatedBy":{"type":"string","description":"\n The name of the person who performed the Induction with the prisoner.\n In the case of system generated updates or setting an exemption this field will not be present.\n ","example":"Fred Jones"},"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"},"systemUpdatedAtPrison":{"type":"string","description":"The code of the prison where the induction was updated","example":"BXI"},"inductionPerformedBy":{"type":"string","description":"\n The name of the person who performed the Induction with the prisoner.\n In the case of system generated updates or setting an exemption this field will not be present.\n ","example":"Fred Jones"},"inductionPerformedAt":{"type":"string","description":"\n When the induction schedule has a completed induction this will be populated with the date that the CIAG entered into the system when completing the Induction. It is the date that the user did the Induction in person, rather than the date that it was entered into the system.\n ","format":"date","example":"2023-06-30"},"inductionPerformedByRole":{"type":"string","description":"\n The role of the person who performed the Induction with the prisoner.\n In the case of system generated updates or setting an exemption this field will not be present.\n ","example":"Peer Mentor"},"inductionPerformedAtPrison":{"type":"string","description":"The prison code that the induction was performed at.","example":"BXI"},"exemptionReason":{"type":"string","description":"If reason the induction schedule was exempted.","example":"EXEMPT_SYSTEM_TECHNICAL_ISSUE"},"version":{"type":"integer","description":"\n The induction schedule can change status numerous times.\n When looking at the plp-induction-schedule/history of the inductions.\n The version number indicates which version of the induction schedule this one is,\n the higher the number the newer the update.\n ","format":"int32"}}},"DataResponseInductionSchedules":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/InductionSchedules"}}},"InductionSchedules":{"required":["inductionSchedules"],"type":"object","properties":{"inductionSchedules":{"type":"array","description":"\n A list of induction schedule versions for this prisoner.\n The prisoner will only have one induction schedule but for various reasons the schedule can be updated.\n This list will show each change the schedule has been through. This allows for reports to be generated.\n ","items":{"$ref":"#/components/schemas/InductionSchedule"}}}},"DataResponsePersonName":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonName"}}},"PersonName":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"}}},"DataResponseIEPLevel":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/IEPLevel"}}},"IEPLevel":{"required":["iepCode","iepLevel"],"type":"object","properties":{"iepCode":{"type":"string","description":"Incentive Level Code","example":"STD"},"iepLevel":{"type":"string","description":"Incentive Level","example":"Standard"}}},"Contact":{"required":["contactId","dateOfBirth","firstName","lastName","phoneNumber","phoneType","phoneTypeDescription"],"type":"object","properties":{"contactId":{"type":"integer","description":"The ID of the contact","format":"int64","example":123456},"lastName":{"type":"string","description":"The last name of the contact","example":"Doe"},"firstName":{"type":"string","description":"The first name of the contact","example":"John"},"middleNames":{"type":"string","description":"The middle names of the contact, if any","example":"William"},"dateOfBirth":{"type":"string","description":"The date of birth of the contact, if known","example":"1980-01-01"},"flat":{"type":"string","description":"Flat number or name","example":"Flat 2B"},"property":{"type":"string","description":"Building or house number or name","example":"Mansion House"},"street":{"type":"string","description":"Street or road name","example":"Acacia Avenue"},"area":{"type":"string","description":"Area","example":"Morton Heights"},"cityCode":{"type":"string","description":"City code","example":"25343"},"cityDescription":{"type":"string","description":"The description of the city code","example":"Sheffield"},"countyCode":{"type":"string","description":"County code","example":"S.YORKSHIRE"},"countyDescription":{"type":"string","description":"The description of county code","example":"South Yorkshire"},"postCode":{"type":"string","description":"Postcode","example":"S13 4FH"},"countryCode":{"type":"string","description":"Country code","example":"ENG"},"countryDescription":{"type":"string","description":"The description of country code","example":"England"},"primaryAddress":{"type":"boolean","description":"True if this is the primary address otherwise false","example":true},"mailAddress":{"type":"boolean","description":"If true this address should be considered for sending mail to","example":true},"phoneType":{"type":"string","description":"Type of phone","example":"MOB"},"phoneTypeDescription":{"type":"string","description":"Description of the type of phone","example":"Mobile"},"phoneNumber":{"type":"string","description":"Phone number","example":"+1234567890"},"extNumber":{"type":"string","description":"Extension number","example":"123"}},"description":"The details of a contact as an individual"},"PaginatedResponsePrisonerContact":{"required":["data","pagination"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PrisonerContact"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"PrisonerContact":{"required":["contact","relationship"],"type":"object","properties":{"contact":{"$ref":"#/components/schemas/Contact"},"relationship":{"$ref":"#/components/schemas/PrisonerContactRelationship"}}},"PrisonerContactRelationship":{"type":"object","properties":{"relationshipTypeCode":{"type":"string","description":"Coded value indicating either a social or official contact. This is a coded value from the group code CONTACT_TYPE in reference data","example":"Social"},"relationshipTypeDescription":{"type":"string","description":"The description of the relationship type","example":"Friend"},"relationshipToPrisonerCode":{"type":"string","description":"The relationship to the prisoner. A code from SOCIAL_RELATIONSHIP or OFFICIAL_RELATIONSHIP reference data groups depending on the relationship type","example":"FRI"},"relationshipToPrisonerDescription":{"type":"string","description":"The description of the relationship to the prisoner","example":"Friend"},"approvedVisitor":{"type":"boolean","description":"Indicates whether the contact is an approved visitor","example":true},"nextOfKin":{"type":"boolean","description":"Is this contact the prisoner's next of kin?","example":false},"emergencyContact":{"type":"boolean","description":"Is this contact the prisoner's emergency contact?","example":true},"isRelationshipActive":{"type":"boolean","description":"Is this contact the prisoner's next of kin?","example":true},"currentTerm":{"type":"boolean","description":"Is this relationship active for the current booking?","example":true},"comments":{"type":"string","description":"Any additional comments","example":"Close family friend"}},"description":"The details of the relationship between the prisoner and this contact"},"CellLocation":{"type":"object","properties":{"prisonCode":{"type":"string"},"prisonName":{"type":"string"},"cell":{"type":"string"}}},"DataResponseCellLocation":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/CellLocation"}}},"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"}}},"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"}}}},"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"}}},"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"}}},"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"}}}},"Response":{"required":["data","errors"],"type":"object","properties":{"data":{"type":"object"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/UpstreamApiError"}}}},"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"}}},"ContactAddress":{"required":["createdBy","createdTime","mailFlag","noFixedAddress","phoneNumbers","primaryAddress","verified"],"type":"object","properties":{"addressType":{"type":"string","description":"The type of the address","example":"HOME"},"addressTypeDescription":{"type":"string","description":"The description of the address type"},"primaryAddress":{"type":"boolean","description":"True if this is the primary address otherwise false","example":true},"flat":{"type":"string","description":"Flat number or name","example":"Flat 2B"},"property":{"type":"string","description":"Building or house number or name","example":"Mansion House"},"street":{"type":"string","description":"Street or road name","example":"Acacia Avenue"},"area":{"type":"string","description":"Area","example":"Morton Heights"},"cityCode":{"type":"string","description":"City code","example":"25343"},"cityDescription":{"type":"string","description":"The description of the city code","example":"Sheffield"},"countyCode":{"type":"string","description":"County code","example":"S.YORKSHIRE"},"countyDescription":{"type":"string","description":"The description of county code","example":"South Yorkshire"},"postcode":{"type":"string","description":"Postcode","example":"S13 4FH"},"countryCode":{"type":"string","description":"Country code","example":"ENG"},"countryDescription":{"type":"string","description":"The description of country code","example":"England"},"verified":{"type":"boolean","description":"Whether the address has been verified by postcode lookup","example":false},"verifiedBy":{"type":"string","description":"Which username ran the postcode lookup check","example":"NJKG44D"},"verifiedTime":{"type":"string","description":"The timestamp of when the postcode lookup was done","example":"2024-01-01T00:00:00Z"},"mailFlag":{"type":"boolean","description":"Flag to indicate whether mail is allowed to be sent to this address","example":false},"startDate":{"type":"string","description":"The start date when this address is to be considered active from","example":"2024-01-01"},"endDate":{"type":"string","description":"The end date when this address is to be considered active from","example":"2024-01-01"},"noFixedAddress":{"type":"boolean","description":"Flag to indicate whether this address indicates no fixed address","example":false},"comments":{"type":"string","description":"Any additional information or comments about the address","example":"Some additional information"},"phoneNumbers":{"type":"array","description":"Phone numbers that are related to this address","items":{"$ref":"#/components/schemas/ContactPhoneNumber"}},"createdBy":{"type":"string","description":"The id of the user who created the contact","example":"JD000001"},"createdTime":{"type":"string","description":"The timestamp of when the contact was created","example":"2024-01-01T00:00:00Z"},"updatedBy":{"type":"string","description":"The id of the user who created the contact address","example":"JD000001"},"updatedTime":{"type":"string","description":"The timestamp of when the contact address was last updated","example":"2024-01-01T00:00:00Z"}},"description":"All addresses for the contact"},"ContactEmailAddress":{"required":["emailAddress"],"type":"object","properties":{"emailAddress":{"type":"string","description":"Email address","example":"test@example.com"}},"description":"All email addresses for the contact"},"ContactPhoneNumber":{"required":["phoneNumber","phoneType","phoneTypeDescription"],"type":"object","properties":{"phoneType":{"type":"string","description":"Type of phone","example":"MOB"},"phoneTypeDescription":{"type":"string","description":"Description of the type of phone","example":"Mobile"},"phoneNumber":{"type":"string","description":"Phone number","example":"+1234567890"},"extNumber":{"type":"string","description":"Extension number","example":"123"}},"description":"All phone numbers for the contact"},"DetailedContact":{"required":["addresses","contactId","emailAddresses","firstName","genderCode","genderDescription","interpreterRequired","isStaff","lastName","phoneNumbers"],"type":"object","properties":{"contactId":{"type":"integer","description":"The ID of the contact","format":"int64","example":123456},"titleCode":{"type":"string","description":"The title code for the contact","example":"MR"},"titleDescription":{"type":"string","description":"The description of the title code, if present","example":"Mr"},"lastName":{"type":"string","description":"The last name of the contact","example":"Doe"},"firstName":{"type":"string","description":"The first name of the contact","example":"John"},"middleNames":{"type":"string","description":"The middle names of the contact, if any","example":"William"},"dateOfBirth":{"type":"string","description":"The date of birth of the contact, if known","example":"1980-01-01"},"isStaff":{"type":"boolean","description":"Whether the contact is a staff member","example":false},"deceasedDate":{"type":"string","description":"The date the contact deceased, if known","example":"1980-01-01"},"languageCode":{"type":"string","description":"The NOMIS code for the contacts language","example":"ENG"},"languageDescription":{"type":"string","description":"The description of the language code","example":"English"},"interpreterRequired":{"type":"boolean","description":"Whether an interpreter is required for this contact","example":true},"addresses":{"type":"array","description":"All addresses for the contact","items":{"$ref":"#/components/schemas/ContactAddress"}},"phoneNumbers":{"type":"array","description":"All phone numbers for the contact","items":{"$ref":"#/components/schemas/ContactPhoneNumber"}},"emailAddresses":{"type":"array","description":"All email addresses for the contact","items":{"$ref":"#/components/schemas/ContactEmailAddress"}},"genderCode":{"type":"string","description":"The NOMIS code for the contacts gender. See reference data with group code 'GENDER'"},"genderDescription":{"type":"string","description":"The description of gender code. See reference data with group code 'GENDER'"}}},"ResponseDetailedContact":{"required":["data","errors"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/DetailedContact"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/UpstreamApiError"}}}},"DlqMessage":{"required":["body","messageId"],"type":"object","properties":{"body":{"type":"object","additionalProperties":{"type":"object"}},"messageId":{"type":"string"}}},"GetDlqResult":{"required":["messages","messagesFoundCount","messagesReturnedCount"],"type":"object","properties":{"messagesFoundCount":{"type":"integer","format":"int32"},"messagesReturnedCount":{"type":"integer","format":"int32"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/DlqMessage"}}}},"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."},"TransactionConflict":{"properties":{"status":{"type":"number","example":409},"userMessage":{"type":"string","example":"Conflict"},"developerMessage":{"type":"string","example":"Duplicate post - The client_unique_ref has been used before"}},"description":"Duplicate post - The client_unique_ref has been used before"},"ForbiddenResponse":{"properties":{"status":{"type":"number","example":403},"userMessage":{"type":"string","example":"Forbidden to complete action by upstream service"},"developerMessage":{"type":"string","example":"Forbidden to complete action by upstream service"}},"description":"Forbidden to complete action by upstream service"}},"securitySchemes":{"dn":{"type":"apiKey","description":"Example: O=test,CN=automated-test-client","name":"subject-distinguished-name","in":"header"}}}}
\ No newline at end of file