diff --git a/drafts/SJM-update-plp-path-2/api-changes-and-versioning.html b/drafts/SJM-update-plp-path-2/api-changes-and-versioning.html new file mode 100644 index 00000000..8dbefdcc --- /dev/null +++ b/drafts/SJM-update-plp-path-2/api-changes-and-versioning.html @@ -0,0 +1,358 @@ + + + + + + + + API Changes and Versioning - HMPPS Integration API And Events Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ Skip to main content + + + +
+ +
+ +
+ +
+
+
+ + + + +
+
+ +
+
+

API Changes and Versioning

+

As HMPPS Integration API evolves, more features will be added, and features that already exist will change. Both consumers and MOJ must be prepared to handle these changes, and to manage them carefully.

+

There will broadly speaking be two kinds of changes - “non-breaking” changes, where consumers should be able to use the new version without modifying their usage, and “breaking” changes where we would expect that consumers would not be able to seamlessly use the new version.

+

Non-Breaking Change

+

We would like to minimise the number of breaking changes, and where this is not possible, we will increment the API version and manage the migration.

+ +
    +
  • MOJ - must not change or remove an existing data element unless we are certain it is not in use
  • +
  • MOJ - must update documentation to reflect any changes
  • +
  • MOJ - may add new elements and change/remove elements that we know are not in use
  • +
  • Consumers - implementation must accept new elements and changes to elements that are not in use (i.e. it must be resilient to non-breaking API changes)
  • +
+

Breaking Change

+

Where a non-breaking change is not possible, there is then a breaking change. In this case, we will increment the version of the API

+ +
    +
  • MOJ - must update documentation, and explicitly call out the change between versions
  • +
  • MOJ - must distribute the new documentation as soon as practical
  • +
  • MOJ - must run both versions of the API, as long as this is practical, for at least 1 month
  • +
  • Consumers - must commit to moving to the new version of the API within a reasonable timescale, usually 1 month
  • +
  • Depending on the size of the change, MOJ may require the Consumer to go through additional re-assurance steps
  • +
+

Ongoing Assurance

+

As part of including new functionality into the system, new processes will be available to be undertaken via the API. As these are introduced, we will ask consumers to go through further rounds of assurance, broadly similar to the initial round described above.

+

URI Path

+

Where versioning must be implemented, it will be in the form of a path parameter:

+
https://integration-api.hmpps.service.justice.gov.uk/v1/images/123456
+

Versions will increment by major version only and no minor version updates will be supported.

+ +
+
+ This page was last reviewed on 3 September 2024. + + It needs to be reviewed again on 3 December 2024 + by the page owner #hmpps-integration-api-alerts + . +
+ + +
+ +
+ + + + + +
+
+
+ + + + + + diff --git a/drafts/SJM-update-plp-path-2/api/pages.json b/drafts/SJM-update-plp-path-2/api/pages.json new file mode 100644 index 00000000..5568ae33 --- /dev/null +++ b/drafts/SJM-update-plp-path-2/api/pages.json @@ -0,0 +1 @@ +[{"title":"Search","url":"../search/index.html","review_by":null,"owner_slack":null},{"title":"Architecture Decision Records","url":"../documentation/adr/index.html","review_by":"2024-12-03","owner_slack":"#hmpps-integration-api-alerts"},{"title":"Open API Specification","url":"../documentation/api/index.html","review_by":"2024-12-03","owner_slack":"\u0026#35;hmpps-integration-api-alerts (Slack Channel)"},{"title":"Get started","url":"../documentation/get-started/index.html","review_by":"2024-12-03","owner_slack":"#hmpps-integration-api-alerts"},{"title":"About","url":"../index.html","review_by":"2024-12-03","owner_slack":"#hmpps-integration-api-alerts"},{"title":"Authentication","url":"../authentication.html","review_by":"2024-12-03","owner_slack":"#hmpps-integration-api-alerts"},{"title":"API Changes and Versioning","url":"../api-changes-and-versioning.html","review_by":"2024-12-03","owner_slack":"#hmpps-integration-api-alerts"}] diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/bold-affa96571d-v2.woff b/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/bold-affa96571d-v2.woff new file mode 100644 index 00000000..48fbcf59 Binary files /dev/null and b/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/bold-affa96571d-v2.woff differ diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/bold-b542beb274-v2.woff2 b/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/bold-b542beb274-v2.woff2 new file mode 100644 index 00000000..81fd1498 Binary files /dev/null and b/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/bold-b542beb274-v2.woff2 differ diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/light-94a07e06a1-v2.woff2 b/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/light-94a07e06a1-v2.woff2 new file mode 100644 index 00000000..1eb10157 Binary files /dev/null and b/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/light-94a07e06a1-v2.woff2 differ diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/light-f591b13f7d-v2.woff b/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/light-f591b13f7d-v2.woff new file mode 100644 index 00000000..3b26d5ff Binary files /dev/null and b/drafts/SJM-update-plp-path-2/assets/govuk/assets/fonts/light-f591b13f7d-v2.woff differ diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/favicon.ico b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/favicon.ico new file mode 100644 index 00000000..20129a0b Binary files /dev/null and b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/favicon.ico differ diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/favicon.svg b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/favicon.svg new file mode 100644 index 00000000..67d7ef91 --- /dev/null +++ b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/favicon.svg @@ -0,0 +1 @@ + diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-crest.svg b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-crest.svg new file mode 100644 index 00000000..db3e20ab --- /dev/null +++ b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-crest.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-180.png b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-180.png new file mode 100644 index 00000000..7c33beba Binary files /dev/null and b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-180.png differ diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-192.png b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-192.png new file mode 100644 index 00000000..35e51d7a Binary files /dev/null and b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-192.png differ diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-512.png b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-512.png new file mode 100644 index 00000000..f5eb6f46 Binary files /dev/null and b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-512.png differ diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-mask.svg b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-mask.svg new file mode 100644 index 00000000..e10ff6cc --- /dev/null +++ b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-icon-mask.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-opengraph-image.png b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-opengraph-image.png new file mode 100644 index 00000000..4d0e312f Binary files /dev/null and b/drafts/SJM-update-plp-path-2/assets/govuk/assets/images/govuk-opengraph-image.png differ diff --git a/drafts/SJM-update-plp-path-2/assets/govuk/assets/manifest.json b/drafts/SJM-update-plp-path-2/assets/govuk/assets/manifest.json new file mode 100644 index 00000000..0d183a2a --- /dev/null +++ b/drafts/SJM-update-plp-path-2/assets/govuk/assets/manifest.json @@ -0,0 +1,39 @@ +{ + "icons": [ + { + "src": "images/favicon.ico", + "type": "image/x-icon", + "sizes": "48x48" + }, + { + "src": "images/favicon.svg", + "type": "image/svg+xml", + "sizes": "150x150", + "purpose": "any" + }, + { + "src": "images/govuk-icon-180.png", + "type": "image/png", + "sizes": "180x180", + "purpose": "maskable" + }, + { + "src": "images/govuk-icon-192.png", + "type": "image/png", + "sizes": "192x192", + "purpose": "maskable" + }, + { + "src": "images/govuk-icon-512.png", + "type": "image/png", + "sizes": "512x512", + "purpose": "maskable" + }, + { + "src": "images/govuk-icon-mask.svg", + "type": "image/svg+xml", + "sizes": "150x150", + "purpose": "monochrome" + } + ] +} diff --git a/drafts/SJM-update-plp-path-2/authentication.html b/drafts/SJM-update-plp-path-2/authentication.html new file mode 100644 index 00000000..ba723388 --- /dev/null +++ b/drafts/SJM-update-plp-path-2/authentication.html @@ -0,0 +1,349 @@ + + + + + + + + Authentication - HMPPS Integration API And Events Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ Skip to main content + + + +
+ +
+ +
+ +
+
+
+ + + + +
+
+ +
+
+

Authentication

+

Reading from the API

+

API consumers are authenticated on a service to service level using:

+ +
    +
  • Mutual TLS to ensure trust on both the server and client side
  • +
  • API keys to track and manage usage of the client
  • +
+

Using mutual TLS authentication allows HMPPS to additionally verify the identity of a consumer before securely providing any data and therefore a client must present it’s own TLS certificate, issued by HMPPS, as part of making a request. Providing an API key enables per-client management of API interactions such as rate limiting and therefore a valid API key must also be presented as part of making a request.

+

Providing a client certificate and key for mTLS is dependent on the tools used to make the request. As an example when using curl the certificate and key are provided as request parameters. If a valid TLS certificate and private key is not supplied the TLS handshake will not complete.

+

Providing an API key can be done using an HTTP header called x-api-key with the value of the API key as the header value, ensuring it’s not encoded in Base64. If a valid API key is not supplied a 403 Forbidden HTTP response is returned.

+

Example: Read from an API Endpoint

+

To make an authenticated data request to the API using the client-specific TLS certificate, private key and API key:

+
curl --cert <client-cert-file> --key <client-key-file> -X GET https://<environment>.integration-api.hmpps.service.justice.gov.uk/v1/persons/X802678/risks/scores -H 'x-api-key: <api-key>'
+

Interacting with an HMPPS SQS Queue

+

For consumers that have an SQS queue configured, temporary AWS access credentials that can be used with standard AWS tooling to interact with SQS can be obtained by calling the /token endpoint. Both a valid TLS certificate and an API key must be supplied with the token request. Note that the token endpoint is not versioned.

+

Example: Create and Read a Temporary SQS Token

+

To make an authenticated token request to the API using the client-specific TLS certificate, private key and API key:

+
curl --cert <client-cert-file> --key <client-key-file> -X POST https://<environment>.integration-api.hmpps.service.justice.gov.uk/token -H 'x-api-key: <api-key>'
+
+
+
+ This page was last reviewed on 3 September 2024. + + It needs to be reviewed again on 3 December 2024 + by the page owner #hmpps-integration-api-alerts + . +
+ + +
+ +
+ + + + + +
+
+
+ + + + + + diff --git a/drafts/SJM-update-plp-path-2/documentation/adr/index.html b/drafts/SJM-update-plp-path-2/documentation/adr/index.html new file mode 100644 index 00000000..743f0368 --- /dev/null +++ b/drafts/SJM-update-plp-path-2/documentation/adr/index.html @@ -0,0 +1,351 @@ + + + + + + + + Architecture Decision Records - HMPPS Integration API And Events Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ Skip to main content + + + +
+ +
+ +
+ +
+
+
+ + + + +
+
+ +
+
+

Relevant Architecture Decision Records

+
+ + + + + + + + + + + + + + + + + + +
StatusAdr No.Title
ACCEPTED0004Always return a JSON object for JSON responses
ACCEPTED0006URL-encode path parameters that contain a forward slash
ACCEPTED0007Version through URL path
+
+
+
+ This page was last reviewed on 3 September 2024. + + It needs to be reviewed again on 3 December 2024 + by the page owner #hmpps-integration-api-alerts + . +
+ + +
+ +
+ + + + + +
+
+
+ + + + + + diff --git a/drafts/SJM-update-plp-path-2/documentation/api/index.html b/drafts/SJM-update-plp-path-2/documentation/api/index.html new file mode 100644 index 00000000..ac0ca161 --- /dev/null +++ b/drafts/SJM-update-plp-path-2/documentation/api/index.html @@ -0,0 +1,10778 @@ + + + + + + + + Open API Specification - HMPPS Integration API And Events Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ Skip to main content + + + +
+ +
+ +
+ +
+
+
+ + + + +
+
+ +
+
+

HMPPS Integration API v1.0

+

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.

+ + + + +

Servers

+
+ + +

Development server

+

+ + https://dev.integration-api.hmpps.service.justice.gov.uk + + +

Pre-production server, containing live data

+

+ + https://preprod.integration-api.hmpps.service.justice.gov.uk + + +

Production

+

+ + https://integration-api.hmpps.service.justice.gov.uk + +
+ + + +

/v1/persons

+ +

get

+ +

Returns person(s) by search criteria, sorted by date of birth (newest first). At least one query parameter must be specified.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
first_namequerystringfalse

The first name of the person

+ + +
last_namequerystringfalse

The last name of the person

+ + +
pnc_numberquerystringfalse

A URL-encoded pnc identifier

+ + +
date_of_birthquerystringfalse

The date of birth of the person

+ + +
search_within_aliasesquerybooleanfalse

Whether to return results that match the search criteria within the aliases of a person.

+ + +
pagequerystringfalse

The page number (starting from 1)

+ + +
perPagequerystringfalse

The maximum number of results for a page

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully performed the query on upstream APIs. An empty list is returned when no results are found.

+ + + +
{
+  "data": [
+    {
+      "firstName": "John",
+      "lastName": "Morgan",
+      "middleName": "John",
+      "dateOfBirth": "1965-12-01",
+      "gender": "Male",
+      "ethnicity": "White: Eng./Welsh/Scot./N.Irish/British",
+      "aliases": [
+        {
+          "firstName": "John",
+          "lastName": "Marston",
+          "middleName": "Marston",
+          "dateOfBirth": "1965-12-01",
+          "gender": "Male",
+          "ethnicity": "Prefer not to say"
+        }
+      ],
+      "identifiers": {
+        "nomisNumber": "A1234AA",
+        "croNumber": "SF80/655108T",
+        "deliusCrn": "X00001"
+      },
+      "pncId": "string",
+      "hmppsId": "2008/0545166T",
+      "contactDetails": {
+        "phoneNumbers": [
+          {
+            "number": "079123456789",
+            "type": "TELEPHONE"
+          }
+        ],
+        "emails": [
+          {
+          }
+        ]
+      }
+    }
+  ],
+  "pagination": {
+    "isLastPage": true,
+    "count": 1,
+    "page": 1,
+    "perPage": 10,
+    "totalCount": 1,
+    "totalPages": 1
+  }
+}
+ +
+PaginatedResponsePerson +
400 +

There were no query parameters passed in. At least one must be specified.

+ + + +
{
+  "status": 400,
+  "userMessage": "Validation failure: No query parameters specified.",
+  "developerMessage": "No query parameters specified."
+}
+ +
+BadRequest +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}

+ +

get

+ +

Returns a person.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found a person with the provided HMPPS ID.

+ + + +
{
+  "data": {
+    "prisonerOffenderSearch": {
+      "firstName": "John",
+      "lastName": "Morgan",
+      "middleName": "John",
+      "dateOfBirth": "1965-12-01",
+      "gender": "Male",
+      "ethnicity": "White: Eng./Welsh/Scot./N.Irish/British",
+      "aliases": [
+        {
+          "firstName": "John",
+          "lastName": "Marston",
+          "middleName": "Marston",
+          "dateOfBirth": "1965-12-01",
+          "gender": "Male",
+          "ethnicity": "Prefer not to say"
+        }
+      ],
+      "identifiers": {
+        "nomisNumber": "A1234AA",
+        "croNumber": "SF80/655108T",
+        "deliusCrn": "X00001"
+      },
+      "pncId": "string",
+      "hmppsId": "2008/0545166T",
+      "contactDetails": {
+        "phoneNumbers": [
+          {
+            "number": "079123456789",
+            "type": "TELEPHONE"
+          }
+        ],
+        "emails": [
+          {
+          }
+        ]
+      }
+    },
+    "probationOffenderSearch": {
+      "person": {
+        "firstName": "John",
+        "lastName": "Morgan",
+        "middleName": "John",
+        "dateOfBirth": "1965-12-01",
+        "gender": "Male",
+        "ethnicity": "White: Eng./Welsh/Scot./N.Irish/British",
+        "aliases": [
+          {
+            "firstName": "John",
+            "lastName": "Marston",
+            "middleName": "Marston",
+            "dateOfBirth": "1965-12-01",
+            "gender": "Male",
+            "ethnicity": "Prefer not to say"
+          }
+        ],
+        "identifiers": {
+          "nomisNumber": "A1234AA",
+          "croNumber": "SF80/655108T",
+          "deliusCrn": "X00001"
+        },
+        "pncId": "string",
+        "hmppsId": "2008/0545166T",
+        "contactDetails": {
+          "phoneNumbers": [
+            {
+              "number": "079123456789",
+              "type": "TELEPHONE"
+            }
+          ],
+          "emails": [
+            {
+            }
+          ]
+        }
+      },
+      "underActiveSupervision": "boolean",
+      "firstName": "string",
+      "lastName": "string",
+      "middleName": "string",
+      "dateOfBirth": "string",
+      "gender": "string",
+      "ethnicity": "string",
+      "aliases": [
+        {
+          "firstName": "John",
+          "lastName": "Marston",
+          "middleName": "Marston",
+          "dateOfBirth": "1965-12-01",
+          "gender": "Male",
+          "ethnicity": "Prefer not to say"
+        }
+      ],
+      "identifiers": {
+        "nomisNumber": "A1234AA",
+        "croNumber": "SF80/655108T",
+        "deliusCrn": "X00001"
+      },
+      "pncId": "string",
+      "hmppsId": "string",
+      "contactDetails": {
+        "phoneNumbers": [
+          {
+            "number": "079123456789",
+            "type": "TELEPHONE"
+          }
+        ],
+        "emails": [
+          {
+          }
+        ]
+      }
+    }
+  }
+}
+ +
+DataResponseOffenderSearchResponse +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/status-information

+ +

get

+ +

Returns the status information associated with a person.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
pagequerystringfalse

The page number (starting from 1)

+ + +
perPagequerystringfalse

The maximum number of results for a page

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found status information for a person with the provided HMPPS ID.

+ + + +
{
+  "data": [
+    {
+      "code": "ASFO",
+      "description": "Serious Further Offence - Subject to SFO review/investigation",
+      "startDate": "2022-01-01",
+      "reviewDate": "2025-01-01",
+      "notes": "This is a note"
+    }
+  ],
+  "pagination": {
+    "isLastPage": true,
+    "count": 1,
+    "page": 1,
+    "perPage": 10,
+    "totalCount": 1,
+    "totalPages": 1
+  }
+}
+ +
+PaginatedResponseStatusInformation +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/sentences

+ +

get

+ +

Returns sentences associated with a person, sorted by dateOfSentencing (newest first).

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
pagequerystringfalse

The page number (starting from 1)

+ + +
perPagequerystringfalse

The maximum number of results for a page

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found sentences for a person with the provided HMPPS ID.

+ + + +
{
+  "data": [
+    {
+      "serviceSource": "NOMIS",
+      "systemSource": "PROBATION_SYSTEMS",
+      "dateOfSentencing": "2009-09-09",
+      "description": "Young Offender Inst - >=12 mths",
+      "isActive": true,
+      "isCustodial": true,
+      "fineAmount": 480.59,
+      "length": {
+        "duration": 10,
+        "units": "Hours",
+        "terms": [
+          {
+            "years": 5,
+            "months": 4,
+            "weeks": 3,
+            "days": 2,
+            "hours": 1,
+            "prisonTermCode": "IMP"
+          }
+        ]
+      }
+    }
+  ],
+  "pagination": {
+    "isLastPage": true,
+    "count": 1,
+    "page": 1,
+    "perPage": 10,
+    "totalCount": 1,
+    "totalPages": 1
+  }
+}
+ +
+PaginatedResponseSentence +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/sentences/latest-key-dates-and-adjustments

+ +

get

+ +

Returns the key dates and adjustments about a person’s release from prison for their latest sentence.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found latest sentence key dates and adjustments for a person with the provided HMPPS ID.

+ + + +
{
+  "data": {
+    "adjustments": {
+      "additionalDaysAwarded": 10,
+      "unlawfullyAtLarge": 16,
+      "lawfullyAtLarge": 11,
+      "restoredAdditionalDaysAwarded": 20,
+      "specialRemission": 14,
+      "recallSentenceRemand": 7,
+      "recallSentenceTaggedBail": 19,
+      "remand": 3,
+      "taggedBail": 13,
+      "unusedRemand": 13
+    },
+    "automaticRelease": {
+      "date": "2023-03-01",
+      "overrideDate": "2023-03-01"
+    },
+    "conditionalRelease": {
+      "date": "2023-03-01",
+      "overrideDate": "2023-03-01"
+    },
+    "dtoPostRecallRelease": {
+      "date": "2023-03-01",
+      "overrideDate": "2023-03-01"
+    },
+    "earlyTerm": {
+      "date": "2023-03-01",
+      "overrideDate": "2023-03-01",
+      "calculatedDate": "2023-03-01"
+    },
+    "homeDetentionCurfew": {
+      "actualDate": "string",
+      "eligibilityCalculatedDate": "string",
+      "eligibilityDate": "string",
+      "eligibilityOverrideDate": "string",
+      "endDate": "string"
+    },
+    "lateTerm": {
+      "date": "2023-03-01",
+      "overrideDate": "2023-03-01",
+      "calculatedDate": "2023-03-01"
+    },
+    "licenceExpiry": {
+      "date": "2023-03-01",
+      "overrideDate": "2023-03-01",
+      "calculatedDate": "2023-03-01"
+    },
+    "midTerm": {
+      "date": "2023-03-01",
+      "overrideDate": "2023-03-01",
+      "calculatedDate": "2023-03-01"
+    },
+    "nonDto": {
+      "date": "2023-03-01",
+      "releaseDateType": "ARD"
+    },
+    "nonParole": {
+      "date": "2023-03-01",
+      "overrideDate": "2023-03-01"
+    },
+    "paroleEligibility": {
+      "date": "2023-03-01",
+      "overrideDate": "2023-03-01",
+      "calculatedDate": "2023-03-01"
+    },
+    "postRecallRelease": {
+      "date": "2023-03-01",
+      "overrideDate": "2023-03-01"
+    },
+    "release": {
+      "date": "2023-03-01",
+      "confirmedDate": "2023-03-01"
+    },
+    "sentence": {
+      "effectiveEndDate": "2023-03-01",
+      "expiryCalculatedDate": "2023-03-01",
+      "expiryDate": "2023-03-01",
+      "expiryOverrideDate": "2023-03-01",
+      "startDate": "2023-03-01"
+    },
+    "topupSupervision": {
+      "expiryCalculatedDate": "2023-03-01",
+      "expiryDate": "2023-03-01",
+      "expiryOverrideDate": "2023-03-01",
+      "startDate": "2023-03-01"
+    },
+    "actualParoleDate": "2023-03-01",
+    "earlyRemovalSchemeEligibilityDate": "2023-03-01",
+    "releaseOnTemporaryLicenceDate": "2023-03-01",
+    "tariffDate": "2023-03-01",
+    "tariffEarlyRemovalSchemeEligibilityDate": "2023-03-01"
+  }
+}
+ +
+DataResponseLatestSentenceKeyDatesAndAdjustments +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/risks/serious-harm

+ +

get

+ +

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.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found risks for a person with the provided HMPPS ID.

+ + + +
{
+  "data": {
+    "assessedOn": "string",
+    "riskToSelf": {
+      "suicide": {
+        "risk": "YES",
+        "previous": "NO",
+        "previousConcernsText": "Risk of self harm concerns due to ...",
+        "current": "YES",
+        "currentConcernsText": "Risk of self harm concerns due to ..."
+      },
+      "selfHarm": {
+        "risk": "YES",
+        "previous": "NO",
+        "previousConcernsText": "Risk of self harm concerns due to ...",
+        "current": "YES",
+        "currentConcernsText": "Risk of self harm concerns due to ..."
+      },
+      "custody": {
+        "risk": "YES",
+        "previous": "NO",
+        "previousConcernsText": "Risk of self harm concerns due to ...",
+        "current": "YES",
+        "currentConcernsText": "Risk of self harm concerns due to ..."
+      },
+      "hostelSetting": {
+        "risk": "YES",
+        "previous": "NO",
+        "previousConcernsText": "Risk of self harm concerns due to ...",
+        "current": "YES",
+        "currentConcernsText": "Risk of self harm concerns due to ..."
+      },
+      "vulnerability": {
+        "risk": "YES",
+        "previous": "NO",
+        "previousConcernsText": "Risk of self harm concerns due to ...",
+        "current": "YES",
+        "currentConcernsText": "Risk of self harm concerns due to ..."
+      }
+    },
+    "otherRisks": {
+      "escapeOrAbscond": "YES",
+      "controlIssuesDisruptiveBehaviour": "DK",
+      "breachOfTrust": "NO",
+      "riskToOtherPrisoners": "YES"
+    },
+    "summary": {
+      "whoIsAtRisk": "X, Y and Z are at risk",
+      "natureOfRisk": "The nature of the risk is X",
+      "riskImminence": "The risk is imminent and more probable in X situation",
+      "riskIncreaseFactors": "If offender in situation X the risk can be higher",
+      "riskMitigationFactors": "Giving offender therapy in X will reduce the risk",
+      "overallRiskLevel": "HIGH",
+      "riskInCommunity": {
+      },
+      "riskInCustody": {
+      }
+    }
+  }
+}
+ +
+DataResponseRisks +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/risks/scores

+ +

get

+ +

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.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
pagequerystringfalse

The page number (starting from 1)

+ + +
perPagequerystringfalse

The maximum number of results for a page

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found risk scores for a person with the provided HMPPS ID.

+ + + +
{
+  "data": [
+    {
+      "completedDate": "string",
+      "assessmentStatus": "COMPLETED",
+      "generalPredictor": {
+        "scoreLevel": "VERY_HIGH"
+      },
+      "violencePredictor": {
+        "scoreLevel": "MEDIUM"
+      },
+      "groupReconviction": {
+        "scoreLevel": "LOW"
+      },
+      "riskOfSeriousRecidivism": {
+        "scoreLevel": "MEDIUM"
+      },
+      "sexualPredictor": {
+        "indecentScoreLevel": "MEDIUM",
+        "contactScoreLevel": "MEDIUM"
+      }
+    }
+  ],
+  "pagination": {
+    "isLastPage": true,
+    "count": 1,
+    "page": 1,
+    "perPage": 10,
+    "totalCount": 1,
+    "totalPages": 1
+  }
+}
+ +
+PaginatedResponseRiskPredictorScore +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/risks/mappadetail

+ +

get

+ +

Returns the mappa detail related to a person.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found mappa detail for a person with the provided HMPPS ID.

+ + + +
{
+  "data": {
+    "level": 1,
+    "levelDescription": "Description of M1",
+    "category": 2,
+    "categoryDescription": "Description of M2",
+    "startDate": "2024-02-07",
+    "reviewDate": "2024-02-07",
+    "notes": "Mappa Detail for X00001"
+  }
+}
+ +
+DataResponseMappaDetail +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/risks/dynamic

+ +

get

+ +

Returns dynamic risks associated with a person.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
pagequerystringfalse

The page number (starting from 1)

+ + +
perPagequerystringfalse

The maximum number of results for a page

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found dynamic risks for a person with the provided HMPPS ID.

+ + + +
{
+  "data": [
+    {
+      "code": "RCCO",
+      "description": "Child Concerns - Safeguarding concerns where a child is at risk from the offender",
+      "startDate": "2022-01-01",
+      "reviewDate": "2025-01-01",
+      "notes": "This is a note"
+    }
+  ],
+  "pagination": {
+    "isLastPage": true,
+    "count": 1,
+    "page": 1,
+    "perPage": 10,
+    "totalCount": 1,
+    "totalPages": 1
+  }
+}
+ +
+PaginatedResponseDynamicRisk +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/risks/categories

+ +

get

+ +

Returns the categories related to an offender.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found risk categories for a person with the provided HMPPS ID.

+ + + +
{
+  "data": {
+    "offenderNo": "string",
+    "assessments": [
+      {
+        "classificationCode": "C",
+        "classification": "Cat C",
+        "assessmentCode": "CATEGORY",
+        "assessmentDescription": "Categorisation",
+        "assessmentDate": "2018-02-11",
+        "nextReviewDate": "2018-02-11",
+        "assessmentAgencyId": "MDI",
+        "assessmentStatus": "P",
+        "assessmentComment": "Comment details"
+      }
+    ],
+    "category": "string",
+    "categoryCode": "string"
+  }
+}
+ +
+DataResponseRiskCategory +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/risk-management-plan

+ +

get

+ +

Returns a list of Risk Management Plans created for the person with the provided HMPPS ID.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
pagequerystringfalse

The page number (starting from 1)

+ + +
perPagequerystringfalse

The maximum number of results for a page

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found risk management plans for a person with the provided HMPPS ID.

+ + + +
{
+  "data": [
+    {
+      "assessmentId": "123456",
+      "dateCompleted": "2024-05-04T01:04:20",
+      "initiationDate": "2024-05-04T01:04:20",
+      "assessmentStatus": "COMPLETE",
+      "assessmentType": "string",
+      "keyInformationCurrentSituation": "string",
+      "furtherConsiderationsCurrentSituation": "string",
+      "supervision": "string",
+      "monitoringAndControl": "string",
+      "interventionsAndTreatment": "string",
+      "victimSafetyPlanning": "string",
+      "contingencyPlans": "string",
+      "latestSignLockDate": "2024-05-04T01:04:20",
+      "latestCompleteDate": "2024-05-04T01:04:20"
+    }
+  ],
+  "pagination": {
+    "isLastPage": true,
+    "count": 1,
+    "page": 1,
+    "perPage": 10,
+    "totalCount": 1,
+    "totalPages": 1
+  }
+}
+ +
+PaginatedResponseRiskManagementPlan +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/reported-adjudications

+ +

get

+ +

Returns adjudications associated with a person, sorted by dateTimeOfIncident (newest first).

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
pagequerystringfalse

The page number (starting from 1)

+ + +
perPagequerystringfalse

The maximum number of results for a page

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

OK

+ + + +
{
+  "data": [
+    {
+      "incidentDetails": {
+        "dateTimeOfIncident": "string"
+      },
+      "isYouthOffender": "boolean",
+      "incidentRole": {
+        "roleCode": "string",
+        "offenceRule": {
+          "paragraphNumber": "string",
+          "paragraphDescription": "string"
+        }
+      },
+      "offenceDetails": {
+        "offenceCode": "number",
+        "offenceRule": {
+          "paragraphNumber": "string",
+          "paragraphDescription": "string"
+        }
+      },
+      "status": "string",
+      "statusReason": "string",
+      "statusDetails": "string",
+      "hearings": [
+        {
+          "dateTimeOfHearing": "string",
+          "oicHearingType": "string",
+          "outcome": {
+            "code": "string",
+            "reason": "string",
+            "details": "string",
+            "plea": "string"
+          }
+        }
+      ],
+      "outcomes": [
+        {
+          "hearing": {
+            "dateTimeOfHearing": "string",
+            "oicHearingType": "string",
+            "outcome": {
+              "code": "string",
+              "reason": "string",
+              "details": "string",
+              "plea": "string"
+            }
+          },
+          "outcome": {
+            "outcome": {
+              "code": "string",
+              "details": "string",
+              "reason": "string",
+              "quashedReason": "string",
+              "canRemove": "boolean"
+            },
+            "referralOutcome": {
+              "code": "string",
+              "details": "string",
+              "reason": "string",
+              "quashedReason": "string",
+              "canRemove": "boolean"
+            }
+          }
+        }
+      ],
+      "punishments": [
+        {
+          "type": "string",
+          "privilegeType": "string",
+          "otherPrivilege": "string",
+          "schedule": {
+            "days": "number",
+            "startDate": "string",
+            "endDate": "string",
+            "suspendedUntil": "string"
+          }
+        }
+      ],
+      "punishmentComments": [
+        {
+          "comment": "string",
+          "reasonForChange": "string",
+          "dateTime": "string"
+        }
+      ]
+    }
+  ],
+  "pagination": {
+    "isLastPage": true,
+    "count": 1,
+    "page": 1,
+    "perPage": 10,
+    "totalCount": 1,
+    "totalPages": 1
+  }
+}
+ +
+PaginatedResponseAdjudication +
404 +

Failed to find adjudications for the person with the provided hmppsId.

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/protected-characteristics

+ +

get

+ +

Returns protected characteristics of a person.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

OK

+ + + +
{
+  "data": {
+    "age": 35,
+    "gender": "Female",
+    "sexualOrientation": "Unknown",
+    "ethnicity": "White: Eng./Welsh/Scot./N.Irish/British",
+    "nationality": "Egyptian",
+    "religion": "Church of England (Anglican)",
+    "disabilities": [
+      {
+        "disabilityType": {
+          "code": "string",
+          "description": "string"
+        },
+        "condition": {
+          "code": "string",
+          "description": "string"
+        },
+        "startDate": "string",
+        "endDate": "string",
+        "notes": "Walking issue"
+      }
+    ],
+    "maritalStatus": "Widowed",
+    "reasonableAdjustments": [
+      {
+        "treatmentCode": "WHEELCHR_ACC",
+        "commentText": "abcd",
+        "startDate": "2013-04-11",
+        "endDate": "2023-04-11",
+        "treatmentDescription": "Wheelchair accessibility"
+      }
+    ]
+  }
+}
+ +
+DataResponsePersonProtectedCharacteristics +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/plp-induction-schedule

+ +

get

+ +

Returns plp the induction schedule associated with a person.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found induction schedule for a person with the provided HMPPS ID.

+ + + +
{
+  "data": {
+    "deadlineDate": "2023-09-01",
+    "status": "SCHEDULED",
+    "calculationRule": "NEW_PRISON_ADMISSION",
+    "nomisNumber": "A1234BC",
+    "systemUpdatedBy": "John Smith",
+    "systemUpdatedAt": "2023-06-19T09:39:44Z",
+    "inductionPerformedBy": "Fred Jones",
+    "inductionPerformedAt": "2023-06-30"
+  }
+}
+ +
+DataResponseInductionSchedule +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/person-responsible-officer

+ +

get

+ +

Returns the person responsible officer associated with a person.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found the person responsible officer for a person with the provided HMPPS ID.

+ + + +
{
+  "data": {
+    "prisonOffenderManager": {
+      "forename": "string",
+      "surname": "string",
+      "prison": {
+        "code": "string"
+      }
+    },
+    "communityOffenderManager": {
+      "name": {
+        "forename": "string",
+        "surname": "string"
+      },
+      "email": "string",
+      "telephoneNumber": "string",
+      "team": {
+        "code": "string",
+        "description": "string",
+        "email": "string",
+        "telephoneNumber": "string"
+      }
+    }
+  }
+}
+ +
+DataResponsePersonResponsibleOfficer +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/offences

+ +

get

+ +

+ Returns offences associated with a person, ordered by startDate (newest first). + > Note: This API does not contain the complete list of offences for a person. + > Offences are retrieved from Prison and Probation systems exclusively. + > 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. +

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
pagequerystringfalse

The page number (starting from 1)

+ + +
perPagequerystringfalse

The maximum number of results for a page

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found offences for a person with the provided HMPPS ID.

+ + + +
{
+  "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"
+    }
+  ]
+}
+ +
+PaginatedResponse +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/needs

+ +

get

+ +

+ Returns criminogenic needs associated with a person. This endpoint does not serve LAO (Limited Access Offender) data. + + 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. + 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. +

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found criminogenic needs for a person with the provided HMPPS ID.

+ + + +
{
+  "data": {
+    "assessedOn": "string",
+    "identifiedNeeds": [
+      {
+        "type": "DRUG_MISUSE",
+        "riskOfHarm": "boolean",
+        "riskOfReoffending": "boolean",
+        "severity": "NO_NEED"
+      }
+    ],
+    "notIdentifiedNeeds": [
+      {
+        "type": "DRUG_MISUSE",
+        "riskOfHarm": "boolean",
+        "riskOfReoffending": "boolean",
+        "severity": "NO_NEED"
+      }
+    ],
+    "unansweredNeeds": [
+      {
+        "type": "DRUG_MISUSE",
+        "riskOfHarm": "boolean",
+        "riskOfReoffending": "boolean",
+        "severity": "NO_NEED"
+      }
+    ]
+  }
+}
+ +
+DataResponseNeeds +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/name

+ +

get

+ +

Returns a person’s name

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found a person with the provided HMPPS ID.

+ + + +
{
+  "data": {
+    "firstName": "string",
+    "lastName": "string"
+  }
+}
+ +
+DataResponsePersonName +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/licences/conditions

+ +

get

+ +

Returns license conditions associated with a person, sorted by createdDateTime (newest first).

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found licenses for a person with the provided HMPPS ID.

+ + + +
{
+  "data": {
+    "hmppsId": "2008/0545166T",
+    "offenderNumber": "Z1234ZZ",
+    "licences": [
+      {
+        "status": "string",
+        "typeCode": "string",
+        "createdDate": "string",
+        "approvedDate": "string",
+        "updatedDate": "string",
+        "conditions": [
+          {
+            "type": "string",
+            "code": "string",
+            "category": "string",
+            "condition": "string"
+          }
+        ]
+      }
+    ]
+  }
+}
+ +
+DataResponsePersonLicences +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/images

+ +

get

+ +

Returns metadata of images associated with a person sorted by captureDateTime (newest first).

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
pagequerystringfalse

The page number (starting from 1)

+ + +
perPagequerystringfalse

The maximum number of results for a page

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

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.

+ + + +
{
+  "data": [
+    {
+      "id": 2461788,
+      "active": true,
+      "captureDateTime": "string",
+      "view": "FACE",
+      "orientation": "FRONT",
+      "type": "OFF_BKG"
+    }
+  ],
+  "pagination": {
+    "isLastPage": true,
+    "count": 1,
+    "page": 1,
+    "perPage": 10,
+    "totalCount": 1,
+    "totalPages": 1
+  }
+}
+ +
+PaginatedResponseImageMetadata +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/cell-location

+ +

get

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

OK

+ + + +
{
+  "data": {
+    "prisonCode": "string",
+    "prisonName": "string",
+    "cell": "string"
+  }
+}
+ +
+DataResponseCellLocation +
+ + + + +

/v1/persons/{encodedHmppsId}/case-notes

+ +

get

+ +

Returns case notes associated with a person.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
startDatequerystringfalse

Filter case notes from this date

+ + +
endDatequerystringfalse

Filter case notes up to this date

+ + +
locationIdquerystringfalse

Filter by the location. example MDI

+ + +
pagequeryintegerfalse + +
perPagequeryintegerfalse + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found case notes for a person with the provided HMPPS ID.

+ + + +
{
+  "data": [
+    {
+      "caseNoteId": "1234",
+      "offenderIdentifier": "A1234AA",
+      "type": "KA",
+      "typeDescription": "Key Worker",
+      "subType": "KS",
+      "subTypeDescription": "Key Worker Session",
+      "creationDateTime": "string",
+      "occurrenceDateTime": "string",
+      "text": "This is some text",
+      "locationId": "MDI",
+      "sensitive": "boolean",
+      "amendments": [
+        {
+          "caseNoteAmendmentId": 123232,
+          "creationDateTime": "string",
+          "additionalNoteText": "Some Additional Text"
+        }
+      ]
+    }
+  ],
+  "pagination": {
+    "isLastPage": true,
+    "count": 1,
+    "page": 1,
+    "perPage": 10,
+    "totalCount": 1,
+    "totalPages": 1
+  }
+}
+ +
+PaginatedResponseCaseNote +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/alerts

+ +

get

+ +

Returns alerts associated with a person, sorted by dateCreated (newest first).

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
pagequerystringfalse

The page number (starting from 1)

+ + +
perPagequerystringfalse

The maximum number of results for a page

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found alerts for a person with the provided HMPPS ID.

+ + + +
{
+  "data": [
+    {
+      "offenderNo": "Z1234ZZ",
+      "type": "X",
+      "typeDescription": "Security",
+      "code": "PO",
+      "codeDescription": "MAPPA Nominal",
+      "comment": "Professional lock pick",
+      "dateCreated": "2014-09-23",
+      "dateExpired": "2015-09-23",
+      "expired": true,
+      "active": true
+    }
+  ],
+  "pagination": {
+    "isLastPage": true,
+    "count": 1,
+    "page": 1,
+    "perPage": 10,
+    "totalCount": 1,
+    "totalPages": 1
+  }
+}
+ +
+PaginatedResponseAlert +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/alerts/pnd

+ +

get

+ +

Returns alerts associated with a person, sorted by dateCreated (newest first).

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
pagequerystringfalse

The page number (starting from 1)

+ + +
perPagequerystringfalse

The maximum number of results for a page

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found alerts for a person with the provided HMPPS ID.

+ + + +
{
+  "data": [
+    {
+      "offenderNo": "Z1234ZZ",
+      "type": "X",
+      "typeDescription": "Security",
+      "code": "PO",
+      "codeDescription": "MAPPA Nominal",
+      "comment": "Professional lock pick",
+      "dateCreated": "2014-09-23",
+      "dateExpired": "2015-09-23",
+      "expired": true,
+      "active": true
+    }
+  ],
+  "pagination": {
+    "isLastPage": true,
+    "count": 1,
+    "page": 1,
+    "perPage": 10,
+    "totalCount": 1,
+    "totalPages": 1
+  }
+}
+ +
+PaginatedResponseAlert +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/persons/{encodedHmppsId}/addresses

+ +

get

+ +

Returns addresses associated with a person, ordered by startDate.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
encodedHmppsIdpathstringtrue

A URL-encoded HMPPS identifier

+ + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found a person with the provided HMPPS ID.

+ + + +
{
+  "data": [
+    {
+      "country": "England",
+      "county": "Greater London",
+      "endDate": "string",
+      "locality": "London Bridge",
+      "name": "Name of the building of residence",
+      "noFixedAddress": true,
+      "number": "1",
+      "postcode": "SE1 1TE",
+      "startDate": "string",
+      "street": "O'Meara Street",
+      "town": "London",
+      "types": [
+        {
+          "code": "BUS",
+          "description": "Business Address"
+        }
+      ],
+      "notes": "This is their partner's address."
+    }
+  ]
+}
+ +
+DataResponseListAddress +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/images/{id}

+ +

get

+ +

Returns an image in bytes as a JPEG.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
idpathintegertrue + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully found an image with the provided ID.

+ + + +
+ +
404 +

Failed to find an image with the provided ID.

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/hmpps/reference-data

+ +

get

+ +

Returns probation and prison reference data codes descriptions for values returned by the API

+ + + + + + + +

Responses

+ + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

Successfully returned prison and probation reference data.

+ + + +
{
+  "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": [
+
+  ]
+}
+ +
+Response +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + +

/v1/hmpps/id/nomis-number/by-hmpps-id/{hmppsId}

+ +

get

+ +

Return nomis number for a given HMPPS Id

+ + +

Accepts a HMPPS Id (hmppsId) and looks up the corresponding nomis number.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
hmppsIdpathstringtrue + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

OK

+ + + +
{
+  "data": {
+    "nomisNumber": "string"
+  }
+}
+ +
+DataResponseNomisNumber +
404 +

Nomis number could not be found.

+ + + +
{
+  "data": {
+    "nomisNumber": "string"
+  }
+}
+ +
+DataResponseNomisNumber +
400 +

Invalid hmppsId.

+ + + +
{
+  "data": {
+    "nomisNumber": "string"
+  }
+}
+ +
+DataResponseNomisNumber +
+ + + + +

/v1/hmpps/id/nomis-number/{nomisNumber}

+ +

get

+ +

Return a HMPPS id for a given nomis number

+ + +

Accepts a nomis number and looks up the corresponding HMPPS Id (hmppsId).

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
nomisNumberpathstringtrue + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

OK

+ + + +
{
+  "data": {
+    "hmppsId": "string"
+  }
+}
+ +
+DataResponseHmppsId +
404 +

Nomis number could not be found.

+ + + +
{
+  "data": {
+    "hmppsId": "string"
+  }
+}
+ +
+DataResponseHmppsId +
400 +

Invalid hmppsId.

+ + + +
{
+  "data": {
+    "hmppsId": "string"
+  }
+}
+ +
+DataResponseHmppsId +
+ + + + +

/v1/hmpps/id/by-nomis-number/{nomisNumber}

+ +

get

+ +

Return a HMPPS id for a given nomis number

+ + +

Accepts a nomis number and looks up the corresponding HMPPS Id (hmppsId).

+ + + + +

Parameters

+ + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
nomisNumberpathstringtrue + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

OK

+ + + +
{
+  "data": {
+    "hmppsId": "string"
+  }
+}
+ +
+DataResponseHmppsId +
404 +

Nomis number could not be found.

+ + + +
{
+  "data": {
+    "hmppsId": "string"
+  }
+}
+ +
+DataResponseHmppsId +
400 +

Invalid hmppsId.

+ + + +
{
+  "data": {
+    "hmppsId": "string"
+  }
+}
+ +
+DataResponseHmppsId +
+ + + + +

/v1/epf/person-details/{hmppsId}/{eventNumber}

+ +

get

+ +

Probation case information for the Effective Proposals Framework service

+ + +

Accepts an HMPPS Id (hmppsId) and Delius Event number + and returns a data structure giving background information on the probation case + for use in the Effective Proposals Framework system. The information is used to + reduce the need for the EPF user to re-key information already held in Delius.

+ + + + +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + +
ParameterInTypeRequiredDescription
hmppsIdpathstringtrue + +
eventNumberpathintegertrue + +
+ + + + +

Responses

+ + + + + + + + + + + + + + + + + + + + + + + + + +
StatusDescriptionSchema
200 +

OK

+ + + +
{
+  "data": {
+    "nomsId": "string",
+    "name": {
+      "forename": "string",
+      "middleName": "string",
+      "surname": "string"
+    },
+    "dateOfBirth": "string",
+    "gender": "string",
+    "courtAppearance": {
+      "date": "string",
+      "court": {
+        "name": "Manchester Crown Court"
+      }
+    },
+    "sentence": {
+      "date": "string",
+      "sentencingCourt": {
+        "name": "string"
+      },
+      "releaseDate": "string",
+      "expectedReleaseDate": "string"
+    },
+    "responsibleProvider": {
+      "code": "string",
+      "name": "string"
+    },
+    "ogrsScore": "integer",
+    "rsrScore": "number",
+    "age": "integer",
+    "ageAtRelease": "integer"
+  },
+  "errors": [
+    {
+      "causedBy": "string",
+      "type": "string",
+      "description": "string"
+    }
+  ]
+}
+ +
+ResponseCaseDetail +
404 +

Not Found

+ + + +
{
+  "status": 404,
+  "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.",
+  "developerMessage": "Could not find person with HMPPS id: 2003/0011991D."
+}
+ +
+PersonNotFound +
500 +

Internal Server Error

+ + + +
{
+  "status": 500,
+  "userMessage": "Internal Server Error",
+  "developerMessage": "Unable to complete request as an upstream service is not responding."
+}
+ +
+InternalServerError +
+ + + + + +

Schemas

+

Alias

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
firstNamestringtrue

first name

+
+ +
lastNamestringtrue

last name

+
+ +
middleNamestringfalse

last name

+
+ +
dateOfBirthstringfalse

date of birth

+
+ +
genderstringfalse

gender

+
+ +
ethnicitystringfalse

ethnicity

+
+ +
+ +

ContactDetailsWithEmailAndPhone

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
phoneNumbersarrayfalse + PhoneNumber +
emailsarrayfalse

A list of email addresses

+
+ +
+ +

Identifiers

+

Other unique identifiers for a person.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
nomisNumberstringfalse

A prisoner identifier from NOMIS.

+
+ +
croNumberstringfalse

A Criminal Records Office identifier from National Identification Service (NIS) or National Automated Fingerprint Identification System (NAFIS).

+
+ +
deliusCrnstringfalse

A Case Reference Number from Delius.

+
+ +
+ +

PaginatedResponsePerson

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataarraytrue + Person +
paginationobjecttrue + Pagination +
+ +

Pagination

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
isLastPagebooleantrue

Is the current page the last one?

+
+ +
countintegertrue

The number of results in data for the current page

+
+ +
pageintegertrue

The current page number

+
+ +
perPageintegertrue

The maximum number of results in data for a page

+
+ +
totalCountintegertrue

The total number of results in data across all pages

+
+ +
totalPagesintegertrue

The total number of pages

+
+ +
+ +

Person

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
firstNamestringtrue

First name

+
+ +
lastNamestringtrue

Last name

+
+ +
middleNamestringfalse

Middle name

+
+ +
dateOfBirthstringfalse

Date of birth

+
+ +
genderstringfalse

Gender

+
+ +
ethnicitystringfalse

Ethnicity

+
+ +
aliasesarraytrue + Alias +
identifiersobjecttrue

Other unique identifiers for a person.

+
+ Identifiers +
pncIdstringfalse

An identifier from the Police National Computer (PNC)

+
+ +
hmppsIdstringfalse

HMPPS identifier

+
+ +
contactDetailsobjectfalse + ContactDetailsWithEmailAndPhone +
+ +

PhoneNumber

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
numberstringfalse

A phone number

+
+ +
typestringfalse

The type of number

+
+ +
+ +

DataResponseOffenderSearchResponse

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + OffenderSearchResponse +
+ +

OffenderSearchResponse

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
prisonerOffenderSearchobjectfalse + Person +
probationOffenderSearchobjectfalse + PersonOnProbation +
+ +

PersonOnProbation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
personobjectfalse + Person +
underActiveSupervisionbooleantrue + +
firstNamestringtrue + +
lastNamestringtrue + +
middleNamestringfalse + +
dateOfBirthstringfalse + +
genderstringfalse + +
ethnicitystringfalse + +
aliasesarraytrue + Alias +
identifiersobjecttrue

Other unique identifiers for a person.

+
+ Identifiers +
pncIdstringfalse + +
hmppsIdstringfalse + +
contactDetailsobjectfalse + ContactDetailsWithEmailAndPhone +
+ +

PaginatedResponseStatusInformation

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataarraytrue + StatusInformation +
paginationobjecttrue + Pagination +
+ +

StatusInformation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
codestringfalse + +
descriptionstringfalse + +
startDatestringfalse + +
reviewDatestringfalse + +
notesstringfalse + +
+ +

PaginatedResponseSentence

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataarraytrue + Sentence +
paginationobjecttrue + Pagination +
+ +

Sentence

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
serviceSourcestringtrue
  Which upstream API service the sentence originates from. Possible values are:
+  `NOMIS`,
+  `NDELIUS`
+
+ +
systemSourcestringtrue
  Which upstream API system the sentence originates from. Possible values are:
+  `PRISON_SYSTEMS`,
+  `PROBATION_SYSTEMS`
+
+ +
dateOfSentencingstringfalse

Date of sentencing

+
+ +
descriptionstringfalse

Description of the sentence

+
+ +
isActivebooleanfalse

Whether the sentence is active

+
+ +
isCustodialbooleantrue

Whether the sentence is custodial

+
+ +
fineAmountnumberfalse

The amount of fine related to the sentence and offence

+
+ +
lengthobjecttrue + SentenceLength +
+ +

SentenceLength

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
durationintegerfalse

Duration of the sentence

+
+ +
unitsstringfalse
  Time unit that is used in combination with the duration field. Possible values are:
+  `Hours`,
+  `Days`,
+  `Weeks`,
+  `Months`,
+  `Years`
+
+ +
termsarraytrue + SentenceTerm +
+ +

SentenceTerm

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
yearsintegerfalse

Number of years in the term

+
+ +
monthsintegerfalse

Number of months in the term

+
+ +
weeksintegerfalse

Number of weeks in the term

+
+ +
daysintegerfalse

Number of days in the term

+
+ +
hoursintegerfalse

Number of hours in the term

+
+ +
prisonTermCodestringfalse
  The sentence term code
+  Possible values are:
+  `CUR` - Curfew Period,
+  `DEF` - Deferment Period,
+  `DET` - Detention,
+  `HOURS` - Hours Ordered,
+  `IMP` - Imprisonment,
+  `LIC` - Licence,
+  `PSYCH` - Psychiatric Hospital,
+  `SCUS` - Custodial Period,
+  `SEC104` - Breach of supervision requirements,
+  `SEC105` - Breach due to imprisonable offence,
+  `SEC86` - Section 86 of 2000 Act,
+  `SUP` - Sentence Length,
+  `SUSP` - Suspension Period
+
+ +
+ +

DataResponseLatestSentenceKeyDatesAndAdjustments

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + LatestSentenceKeyDatesAndAdjustments +
+ +

HomeDetentionCurfewDate

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
actualDatestringfalse + +
eligibilityCalculatedDatestringfalse + +
eligibilityDatestringfalse + +
eligibilityOverrideDatestringfalse + +
endDatestringfalse + +
+ +

LatestSentenceKeyDatesAndAdjustments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
adjustmentsobjectfalse + SentenceAdjustment +
automaticReleaseobjectfalse + SentenceKeyDate +
conditionalReleaseobjectfalse + SentenceKeyDate +
dtoPostRecallReleaseobjectfalse + SentenceKeyDate +
earlyTermobjectfalse + SentenceKeyDateWithCalculatedDate +
homeDetentionCurfewobjectfalse + HomeDetentionCurfewDate +
lateTermobjectfalse + SentenceKeyDateWithCalculatedDate +
licenceExpiryobjectfalse + SentenceKeyDateWithCalculatedDate +
midTermobjectfalse + SentenceKeyDateWithCalculatedDate +
nonDtoobjectfalse + NonDtoDate +
nonParoleobjectfalse + SentenceKeyDate +
paroleEligibilityobjectfalse + SentenceKeyDateWithCalculatedDate +
postRecallReleaseobjectfalse + SentenceKeyDate +
releaseobjectfalse + ReleaseDate +
sentenceobjectfalse + SentenceDate +
topupSupervisionobjectfalse + TopupSupervision +
actualParoleDatestringfalse

the offender’s actual parole date

+
+ +
earlyRemovalSchemeEligibilityDatestringfalse

the date on which offender will be eligible for early removal (under the Early Removal Scheme for foreign nationals).

+
+ +
releaseOnTemporaryLicenceDatestringfalse

the date on which offender will be released on temporary licence.

+
+ +
tariffDatestringfalse

date on which minimum term is reached for parole (indeterminate/life sentences).

+
+ +
tariffEarlyRemovalSchemeEligibilityDatestringfalse

tariffEarlyRemovalSchemeEligibilityDate.

+
+ +
+ +

NonDtoDate

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
datestringfalse

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.

+
+ +
releaseDateTypestringfalse
  Indicates which type of non-DTO release date is the effective release date. One of 'ARD', 'CRD', 'NPD' or 'PRRD'. Possible values are:
+  `ARD`,
+  `CRD`,
+  `NPD`,
+  `PRRD`.
+
+ +
+ +

ReleaseDate

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
datestringfalse
  Confirmed, actual, approved, provisional or calculated release date for offender, according to offender release date algorithm.
+
+  Algorithm
+  If there is a confirmed release date, the offender release date is the confirmed release date.
+  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.
+  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)
+
+ +
confirmedDatestringfalse

Confirmed release date for offender.

+
+ +
+ +

SentenceAdjustment

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
additionalDaysAwardednumberfalse

Number of additional days awarded

+
+ +
unlawfullyAtLargenumberfalse

Number unlawfully at large days

+
+ +
lawfullyAtLargenumberfalse

Number of lawfully at large days

+
+ +
restoredAdditionalDaysAwardednumberfalse

Number of restored additional days awarded

+
+ +
specialRemissionnumberfalse

Number of special remission days

+
+ +
recallSentenceRemandnumberfalse

Number of recall sentence remand days

+
+ +
recallSentenceTaggedBailnumberfalse

Number of recall sentence tagged bail days

+
+ +
remandnumberfalse

Number of remand days

+
+ +
taggedBailnumberfalse

Number of tagged bail days

+
+ +
unusedRemandnumberfalse

Number of unused remand days

+
+ +
+ +

SentenceDate

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
effectiveEndDatestringfalse

Effective sentence end date.

+
+ +
expiryCalculatedDatestringfalse

date on which sentence expired (as calculated by NOMIS).

+
+ +
expiryDatestringfalse

date on which sentence expires.

+
+ +
expiryOverrideDatestringfalse

date on which sentence expires (override).

+
+ +
startDatestringfalse

Sentence start date.

+
+ +
+ +

SentenceKeyDate

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
datestringfalse

release date for offender

+
+ +
overrideDatestringfalse

release override date for offender

+
+ +
+ +

SentenceKeyDateWithCalculatedDate

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
datestringfalse

release date for offender

+
+ +
overrideDatestringfalse

release override date for offender

+
+ +
calculatedDatestringfalse

release calculated date for offender

+
+ +
+ +

TopupSupervision

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
expiryCalculatedDatestringfalse

(calculated) - top-up supervision expiry date for offender.

+
+ +
expiryDatestringfalse

top-up supervision expiry date for offender.

+
+ +
expiryOverrideDatestringfalse

(override) - top-up supervision expiry date for offender.

+
+ +
startDatestringfalse

Top-up supervision start date for offender - calculated as licence end date + 1 day or releaseDate if licence end date not set.

+
+ +
+ +

DataResponseRisks

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + Risks +
+ +

OtherRisks

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
escapeOrAbscondstringfalse
  Risk of escape/abscond. Possible values are:
+  `YES`,
+  `NO`,
+  `DK`,
+  `NA`
+
+ +
controlIssuesDisruptiveBehaviourstringfalse
  Risk control issues/disruptive behaviour. Possible values are:
+  `YES`,
+  `NO`,
+  `DK`,
+  `NA`
+
+ +
breachOfTruststringfalse
  Risk of breach of trust. Possible values are:
+  `YES`,
+  `NO`,
+  `DK`,
+  `NA`
+
+ +
riskToOtherPrisonersstringfalse
  Risk to other prisoners. Possible values are:
+  `YES`,
+  `NO`,
+  `DK`,
+  `NA`
+
+ +
+ +

Risk

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
riskstringfalse
  Presence of risk. Possible values are:
+  `YES`,
+  `NO`,
+  `DK`,
+  `NA`
+
+ +
previousstringfalse
  Previous concerns. Possible values are:
+  `YES`,
+  `NO`,
+  `DK`,
+  `NA`
+
+ +
previousConcernsTextstringfalse

Supporting comments for any previous concerns.

+
+ +
currentstringfalse
  Current concerns. Possible values are:
+  `YES`,
+  `NO`,
+  `DK`,
+  `NA`
+
+ +
currentConcernsTextstringfalse

Supporting comments for any current concerns.

+
+ +
+ +

RiskSummary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
whoIsAtRiskstringfalse

Who is at risk

+
+ +
natureOfRiskstringfalse

What is the nature of the risk

+
+ +
riskImminencestringfalse

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.

+
+ +
riskIncreaseFactorsstringfalse

What circumstances are likely to increase risk. Describe factors, actions, events which might increase level of risk, now and in the future.

+
+ +
riskMitigationFactorsstringfalse

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?

+
+ +
overallRiskLevelstringfalse

The overall risk level

+
+ +
riskInCommunityobjectfalse

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.

+
+ +
riskInCustodyobjectfalse

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.

+
+ +
+ +

RiskToSelf

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
suicideobjecttrue + Risk +
selfHarmobjecttrue + Risk +
custodyobjecttrue + Risk +
hostelSettingobjecttrue + Risk +
vulnerabilityobjecttrue + Risk +
+ +

Risks

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
assessedOnstringfalse

Date of risk assessment

+
+ +
riskToSelfobjecttrue + RiskToSelf +
otherRisksobjecttrue + OtherRisks +
summaryobjecttrue + RiskSummary +
+ +

GeneralPredictor

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
scoreLevelstringfalse
Indicator for general prediction. Possible values are:
+`LOW`,
+`MEDIUM`,
+`HIGH`,
+`VERY_HIGH`,
+`NOT_APPLICABLE`
+
+ +
+ +

GroupReconviction

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
scoreLevelstringfalse
  Indicator for risk of group reconviction. Possible values are:
+  `LOW`,
+  `MEDIUM`,
+  `HIGH`,
+  `VERY_HIGH`,
+  `NOT_APPLICABLE`
+
+ +
+ +

PaginatedResponseRiskPredictorScore

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataarraytrue + RiskPredictorScore +
paginationobjecttrue + Pagination +
+ +

RiskOfSeriousRecidivism

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
scoreLevelstringfalse
    Indicator for risk of serious recidivism. Possible values are:
+    `LOW`,
+    `MEDIUM`,
+    `HIGH`,
+    `VERY_HIGH`,
+    `NOT_APPLICABLE`
+
+ +
+ +

RiskPredictorScore

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
completedDatestringfalse

Risk scores calculation completion date

+
+ +
assessmentStatusstringfalse
  Whether the risk score calculation is complete. Possible values are:
+  `COMPLETE`,
+  `LOCKED_INCOMPLETE`
+
+ +
generalPredictorobjecttrue + GeneralPredictor +
violencePredictorobjecttrue + ViolencePredictor +
groupReconvictionobjecttrue + GroupReconviction +
riskOfSeriousRecidivismobjecttrue + RiskOfSeriousRecidivism +
sexualPredictorobjecttrue + SexualPredictor +
+ +

SexualPredictor

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
indecentScoreLevelstringfalse
  Indicator for risk of sexual indecency. Possible values are:
+  `LOW`,
+  `MEDIUM`,
+  `HIGH`,
+  `VERY_HIGH`,
+  `NOT_APPLICABLE`,
+
+ +
contactScoreLevelstringfalse
  Indicator for risk of sexual contact. Possible values are:
+  `LOW`,
+  `MEDIUM`,
+  `HIGH`,
+  `VERY_HIGH`,
+  `NOT_APPLICABLE`,
+
+ +
+ +

ViolencePredictor

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
scoreLevelstringfalse
Indicator for risk of violence. Possible values are:
+`LOW`,
+`MEDIUM`,
+`HIGH`,
+`VERY_HIGH`,
+`NOT_APPLICABLE`
+
+ +
+ +

DataResponseMappaDetail

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + MappaDetail +
+ +

MappaDetail

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
levelnumberfalse + +
levelDescriptionstringfalse + +
categorynumberfalse + +
categoryDescriptionstringfalse + +
startDatestringfalse + +
reviewDatestringfalse + +
notesstringfalse + +
+ +

DynamicRisk

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
codestringfalse + +
descriptionstringfalse + +
startDatestringfalse + +
reviewDatestringfalse + +
notesstringfalse + +
+ +

PaginatedResponseDynamicRisk

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataarraytrue + DynamicRisk +
paginationobjecttrue + Pagination +
+ +

DataResponseRiskCategory

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + RiskCategory +
+ +

RiskAssessment

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
classificationCodestringfalse

The classification code of the risk

+
+ +
classificationstringfalse

The classification of the code

+
+ +
assessmentCodestringfalse

The assessment code

+
+ +
assessmentDescriptionstringfalse

The description of the assessment

+
+ +
assessmentDatestringfalse

The date of the assessment

+
+ +
nextReviewDatestringfalse

Next review date

+
+ +
assessmentAgencyIdstringfalse

Agency ID of the assessment

+
+ +
assessmentStatusstringfalse

The status of the assessment

+
+ +
assessmentCommentstringfalse

Comments regarding the assessment

+
+ +
+ +

RiskCategory

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
offenderNostringfalse + +
assessmentsarraytrue + RiskAssessment +
categorystringfalse + +
categoryCodestringfalse + +
+ +

PaginatedResponseRiskManagementPlan

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataarraytrue + RiskManagementPlan +
paginationobjecttrue + Pagination +
+ +

RiskManagementPlan

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
assessmentIdstringtrue

The unique ID of the risk management plan

+
+ +
dateCompletedstringtrue

The date that the risk management plan was completed

+
+ +
initiationDatestringtrue

The date of plan initiation

+
+ +
assessmentStatusstringtrue

The status of the plan

+
+ +
assessmentTypestringtrue

The type of assessment

+
+ +
keyInformationCurrentSituationstringtrue

Key information about the current situation of the subject being assessed

+
+ +
furtherConsiderationsCurrentSituationstringtrue

Further considerations about the situation of the subject being assessed

+
+ +
supervisionstringtrue

Who they see, when and why, any support they get from their community, and how well they’re desisting from problematic behaviour

+
+ +
monitoringAndControlstringtrue

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.

+
+ +
interventionsAndTreatmentstringtrue

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.

+
+ +
victimSafetyPlanningstringtrue

Restrictions in place to specifically protect victims of, adults known to, and children potentially at risk from the offender.

+
+ +
contingencyPlansstringtrue

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.

+
+ +
latestSignLockDatestringtrue

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.

+
+ +
latestCompleteDatestringtrue

Once a countersignature has been applied to the plan, the plan is considered complete. This is the date the plan has been countersigned.

+
+ +
+ +

Adjudication

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
incidentDetailsobjectfalse + IncidentDetailsDto +
isYouthOffenderbooleanfalse + +
incidentRoleobjectfalse + IncidentRoleDto +
offenceDetailsobjectfalse + OffenceDto +
statusstringfalse + +
statusReasonstringfalse + +
statusDetailsstringfalse + +
hearingsarrayfalse + HearingDto +
outcomesarrayfalse + OutcomeHistoryDto +
punishmentsarrayfalse + PunishmentDto +
punishmentCommentsarrayfalse + PunishmentCommentDto +
+ +

CombinedOutcomeDto

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
outcomeobjectfalse + OutcomeDto +
referralOutcomeobjectfalse + OutcomeDto +
+ +

HearingDto

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dateTimeOfHearingstringfalse + +
oicHearingTypestringfalse + +
outcomeobjectfalse + HearingOutcomeDto +
+ +

HearingOutcomeDto

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
codestringfalse + +
reasonstringfalse + +
detailsstringfalse + +
pleastringfalse + +
+ +

IncidentDetailsDto

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dateTimeOfIncidentstringfalse + +
+ +

IncidentRoleDto

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
roleCodestringfalse + +
offenceRuleobjectfalse + OffenceRuleDetailsDto +
+ +

OffenceDto

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
offenceCodenumberfalse + +
offenceRuleobjectfalse + OffenceRuleDto +
+ +

OffenceRuleDetailsDto

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
paragraphNumberstringfalse + +
paragraphDescriptionstringfalse + +
+ +

OffenceRuleDto

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
paragraphNumberstringfalse + +
paragraphDescriptionstringfalse + +
+ +

OutcomeDto

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
codestringfalse + +
detailsstringfalse + +
reasonstringfalse + +
quashedReasonstringfalse + +
canRemovebooleanfalse + +
+ +

OutcomeHistoryDto

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
hearingobjectfalse + HearingDto +
outcomeobjectfalse + CombinedOutcomeDto +
+ +

PaginatedResponseAdjudication

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataarraytrue + Adjudication +
paginationobjecttrue + Pagination +
+ +

PunishmentCommentDto

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
commentstringfalse + +
reasonForChangestringfalse + +
dateTimestringfalse + +
+ +

PunishmentDto

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
typestringfalse + +
privilegeTypestringfalse + +
otherPrivilegestringfalse + +
scheduleobjectfalse + PunishmentScheduleDto +
+ +

PunishmentScheduleDto

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
daysnumberfalse + +
startDatestringfalse + +
endDatestringfalse + +
suspendedUntilstringfalse + +
+ +

DataResponsePersonProtectedCharacteristics

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + PersonProtectedCharacteristics +
+ +

Disability

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
disabilityTypeobjectfalse + KeyValue +
conditionobjectfalse + KeyValue +
startDatestringfalse + +
endDatestringfalse + +
notesstringfalse + +
+ +

KeyValue

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
codestringfalse + +
descriptionstringfalse + +
+ +

PersonProtectedCharacteristics

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
agenumbertrue

Age of the person

+
+ +
genderstringfalse

Gender of the person

+
+ +
sexualOrientationstringfalse

Sexual orientation of the person

+
+ +
ethnicitystringfalse

Ethnicity of the person

+
+ +
nationalitystringfalse

Nationality of the person

+
+ +
religionstringfalse

Religion of the person

+
+ +
disabilitiesarraytrue + Disability +
maritalStatusstringfalse

Marital status of the person

+
+ +
reasonableAdjustmentsarraytrue + ReasonableAdjustment +
+ +

ReasonableAdjustment

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
treatmentCodestringfalse

Treatment code

+
+ +
commentTextstringfalse

Comment text

+
+ +
startDatestringfalse

Start date

+
+ +
endDatestringfalse

End date

+
+ +
treatmentDescriptionstringfalse

Treatment description

+
+ +
+ +

DataResponseInductionSchedule

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + InductionSchedule +
+ +

InductionSchedule

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
deadlineDatestringfalse

An ISO-8601 date representing when the Induction should be completed by.

+
+ +
statusstringfalse

The current status of the Induction Schedule

+
+ +
calculationRulestringfalse

The Induction Schedule rule used to determine deadline date.

+
+ +
nomisNumberstringfalse

The Nomis number of the person.

+
+ +
systemUpdatedBystringfalse

The name of the person who used the PLP system to update the Induction Schedule, or ‘system’ for system generated updates.

+
+ +
systemUpdatedAtstringfalse

An ISO-8601 timestamp representing the time the PLP system was used to update the Induction Schedule.

+
+ +
inductionPerformedBystringfalse

The name of the person who performed the Induction with the prisoner. In the case of system generated updates or setting an exemption this field will not be present.

+
+ +
inductionPerformedAtstringfalse

An ISO-8601 date representing when the Induction was performed with the prisoner. In the case of system generated updates this field will not be present.

+
+ +
+ +

CommunityOffenderManager

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
nameobjecttrue + PersonResponsibleOfficerName +
emailstringfalse + +
telephoneNumberstringfalse + +
teamobjecttrue + PersonResponsibleOfficerTeam +
+ +

DataResponsePersonResponsibleOfficer

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + PersonResponsibleOfficer +
+ +

PersonResponsibleOfficer

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
prisonOffenderManagerobjecttrue + PrisonOffenderManager +
communityOffenderManagerobjecttrue + CommunityOffenderManager +
+ +

PersonResponsibleOfficerName

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
forenamestringfalse + +
surnamestringfalse + +
+ +

PersonResponsibleOfficerTeam

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
codestringfalse + +
descriptionstringfalse + +
emailstringfalse + +
telephoneNumberstringfalse + +
+ +

Prison

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
codestringfalse

The prison code, which is usually short for the prison name.

+
+ +
+ +

PrisonOffenderManager

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
forenamestringfalse + +
surnamestringfalse + +
prisonobjecttrue + Prison +
+ +

PaginatedResponse

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataarraytrue + +
paginationobjecttrue + Pagination +
+ +

DataResponseNeeds

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + Needs +
+ +

Need

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
typestringfalse

The type of need

+
+ +
riskOfHarmbooleanfalse

Risk of harm

+
+ +
riskOfReoffendingbooleanfalse

Risk of reoffending

+
+ +
severitystringfalse

Severity of need

+
+ +
+ +

Needs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
assessedOnstringfalse

Needs assessment completion date

+
+ +
identifiedNeedsarraytrue + Need +
notIdentifiedNeedsarraytrue + Need +
unansweredNeedsarraytrue + Need +
+ +

DataResponsePersonName

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + PersonName +
+ +

PersonName

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
firstNamestringfalse + +
lastNamestringfalse + +
+ +

DataResponsePersonLicences

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + PersonLicences +
+ +

Licence

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
statusstringfalse + +
typeCodestringfalse + +
createdDatestringfalse + +
approvedDatestringfalse + +
updatedDatestringfalse + +
conditionsarraytrue + LicenceCondition +
+ +

LicenceCondition

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
typestringfalse + +
codestringfalse + +
categorystringfalse + +
conditionstringfalse + +
+ +

PersonLicences

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
hmppsIdstringtrue + +
offenderNumberstringfalse + +
licencesarraytrue + Licence +
+ +

ImageMetadata

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

PaginatedResponseImageMetadata

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

CellLocation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
prisonCodestringfalse + +
prisonNamestringfalse + +
cellstringfalse + +
+ +

DataResponseCellLocation

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + CellLocation +
+ +

CaseNote

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
caseNoteIdstringfalse + +
offenderIdentifierstringfalse + +
typestringfalse + +
typeDescriptionstringfalse + +
subTypestringfalse + +
subTypeDescriptionstringfalse + +
creationDateTimestringfalse

Date and Time of Case Note creation

+
+ +
occurrenceDateTimestringfalse

Date and Time of when case note contact with offender was made

+
+ +
textstringfalse + +
locationIdstringfalse + +
sensitivebooleantrue + +
amendmentsarraytrue

List of amendments to the case note

+
+ CaseNoteAmendment +
+ +

CaseNoteAmendment

+

List of amendments to the case note

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
caseNoteAmendmentIdintegerfalse + +
creationDateTimestringfalse

Date and Time of Case Note creation

+
+ +
additionalNoteTextstringfalse + +
+ +

PaginatedResponseCaseNote

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataarraytrue + CaseNote +
paginationobjecttrue + Pagination +
+ +

Alert

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
offenderNostringfalse

Offender unique reference

+
+ +
typestringfalse

Alert type

+
+ +
typeDescriptionstringfalse

Alert type description

+
+ +
codestringfalse

Alert code

+
+ +
codeDescriptionstringfalse

Alert code description

+
+ +
commentstringfalse

Alert comment

+
+ +
dateCreatedstringfalse

Date of the alert, which might differ from the date it was created

+
+ +
dateExpiredstringfalse

Date that the alert expires

+
+ +
expiredbooleanfalse

Whether the alert has expired

+
+ +
activebooleanfalse

Whether the alert is active

+
+ +
+ +

PaginatedResponseAlert

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataarraytrue + Alert +
paginationobjecttrue + Pagination +
+ +

Address

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
countrystringfalse + +
countystringfalse + +
endDatestringfalse + +
localitystringfalse + +
namestringfalse + +
noFixedAddressbooleantrue

Indicates whether the person has a permanent place of residence

+
+ +
numberstringfalse + +
postcodestringfalse + +
startDatestringfalse + +
streetstringfalse + +
townstringfalse + +
typesarraytrue + Type +
notesstringfalse + +
+ +

DataResponseListAddress

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataarraytrue + Address +
+ +

Type

+

Type or usage of address, for example Business Address, Home Address, Work Address.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
codestringfalse

Address type code, for example: BUS, HOME, WORK.

+
+ +
descriptionstringfalse

Description of address type, for example: Business Address, Home Address, Work Address.

+
+ +
+ +

Response

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + +
errorsarraytrue + UpstreamApiError +
+ +

UpstreamApiError

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
causedBystringtrue + +
typestringtrue + +
descriptionstringfalse + +
+ +

DataResponseNomisNumber

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + NomisNumber +
+ +

NomisNumber

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
nomisNumberstringfalse + +
+ +

DataResponseHmppsId

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + HmppsId +
+ +

HmppsId

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
hmppsIdstringfalse + +
+ +

CaseDetail

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
nomsIdstringfalse + +
nameobjectfalse + Name +
dateOfBirthstringfalse + +
genderstringfalse + +
courtAppearanceobjectfalse + CourtAppearance +
sentenceobjectfalse + CaseSentence +
responsibleProviderobjectfalse + ResponsibleProvider +
ogrsScoreintegerfalse + +
rsrScorenumberfalse + +
ageintegerfalse + +
ageAtReleaseintegerfalse + +
+ +

CaseSentence

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
datestringfalse + +
sentencingCourtobjectfalse + SentencingCourt +
releaseDatestringfalse + +
expectedReleaseDatestringfalse + +
+ +

CourtAppearance

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
datestringfalse + +
courtobjectfalse + CourtDetails +
+ +

CourtDetails

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
namestringfalse

The name of the court

+
+ +
+ +

Name

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
forenamestringfalse + +
middleNamestringfalse + +
surnamestringfalse + +
+ +

ResponseCaseDetail

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
dataobjecttrue + CaseDetail +
errorsarraytrue + UpstreamApiError +
+ +

ResponsibleProvider

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
codestringfalse + +
namestringfalse + +
+ +

SentencingCourt

+ + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
namestringfalse + +
+ +

BadRequest

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
statusnumberfalse + +
userMessagestringfalse + +
developerMessagestringfalse + +
+ +

PersonNotFound

+

Failed to find a person with the provided HMPPS ID.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
statusnumberfalse + +
userMessagestringfalse + +
developerMessagestringfalse + +
+ +

InternalServerError

+

An upstream service was not responding, so we cannot verify the accuracy of any data we did get.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredDescriptionSchema
statusnumberfalse + +
userMessagestringfalse + +
developerMessagestringfalse + +
+ + +

OpenAPI Specification

+

View our OpenAPI specification file in JSON format.

+ +
+
+ This page was last reviewed on 3 September 2024. + + It needs to be reviewed again on 3 December 2024 + by the page owner #hmpps-integration-api-alerts (Slack Channel) + . +
+ + +
+ +
+ + + + + +
+
+
+ + + + + + diff --git a/drafts/SJM-update-plp-path-2/documentation/get-started/index.html b/drafts/SJM-update-plp-path-2/documentation/get-started/index.html new file mode 100644 index 00000000..0d41223e --- /dev/null +++ b/drafts/SJM-update-plp-path-2/documentation/get-started/index.html @@ -0,0 +1,344 @@ + + + + + + + + Get started - HMPPS Integration API And Events Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ Skip to main content + + + +
+ +
+ +
+ +
+
+
+ + + + +
+
+ +
+
+

Get started

+

Request access

+

Email hmpps-integration-api@digital.justice.gov.uk to request access to this API and Events.

+

All requests will be manually approved.

+

You may also request access to our non-live environment for testing purposes.

+

You will receive access credentials including:

+ +
    +
  1. API Key
  2. +
  3. Client Certificate
  4. +
+

For information on how to use these credentials, see our Authentication section.

+

Explore Available Endpoints

+

You will have access to all our endpoints.

+ +
+
+ This page was last reviewed on 3 September 2024. + + It needs to be reviewed again on 3 December 2024 + by the page owner #hmpps-integration-api-alerts + . +
+ + +
+ +
+ + + + + +
+
+
+ + + + + + diff --git a/drafts/SJM-update-plp-path-2/images/anchored-heading-icon-2x.png b/drafts/SJM-update-plp-path-2/images/anchored-heading-icon-2x.png new file mode 100644 index 00000000..6e05889d Binary files /dev/null and b/drafts/SJM-update-plp-path-2/images/anchored-heading-icon-2x.png differ diff --git a/drafts/SJM-update-plp-path-2/images/anchored-heading-icon.png b/drafts/SJM-update-plp-path-2/images/anchored-heading-icon.png new file mode 100644 index 00000000..41a12a14 Binary files /dev/null and b/drafts/SJM-update-plp-path-2/images/anchored-heading-icon.png differ diff --git a/drafts/SJM-update-plp-path-2/images/example-person-image.jpg b/drafts/SJM-update-plp-path-2/images/example-person-image.jpg new file mode 100644 index 00000000..9c587f18 Binary files /dev/null and b/drafts/SJM-update-plp-path-2/images/example-person-image.jpg differ diff --git a/drafts/SJM-update-plp-path-2/images/govuk-icn-close.png b/drafts/SJM-update-plp-path-2/images/govuk-icn-close.png new file mode 100644 index 00000000..6b29eff8 Binary files /dev/null and b/drafts/SJM-update-plp-path-2/images/govuk-icn-close.png differ diff --git a/drafts/SJM-update-plp-path-2/images/govuk-icn-close@2x.png b/drafts/SJM-update-plp-path-2/images/govuk-icn-close@2x.png new file mode 100644 index 00000000..327b1d1b Binary files /dev/null and b/drafts/SJM-update-plp-path-2/images/govuk-icn-close@2x.png differ diff --git a/drafts/SJM-update-plp-path-2/images/govuk-icn-numbered-list.png b/drafts/SJM-update-plp-path-2/images/govuk-icn-numbered-list.png new file mode 100644 index 00000000..c4d25800 Binary files /dev/null and b/drafts/SJM-update-plp-path-2/images/govuk-icn-numbered-list.png differ diff --git a/drafts/SJM-update-plp-path-2/images/govuk-icn-numbered-list@2x.png b/drafts/SJM-update-plp-path-2/images/govuk-icn-numbered-list@2x.png new file mode 100644 index 00000000..b88ddb20 Binary files /dev/null and b/drafts/SJM-update-plp-path-2/images/govuk-icn-numbered-list@2x.png differ diff --git a/drafts/SJM-update-plp-path-2/images/search-button.png b/drafts/SJM-update-plp-path-2/images/search-button.png new file mode 100644 index 00000000..0cbe2c7f Binary files /dev/null and b/drafts/SJM-update-plp-path-2/images/search-button.png differ diff --git a/drafts/SJM-update-plp-path-2/images/search-result-caret.svg b/drafts/SJM-update-plp-path-2/images/search-result-caret.svg new file mode 100644 index 00000000..f8128ee3 --- /dev/null +++ b/drafts/SJM-update-plp-path-2/images/search-result-caret.svg @@ -0,0 +1,13 @@ + + + + Page 1 + Created with Sketch. + + + + + + + + \ No newline at end of file diff --git a/drafts/SJM-update-plp-path-2/index.html b/drafts/SJM-update-plp-path-2/index.html new file mode 100644 index 00000000..1cddc81f --- /dev/null +++ b/drafts/SJM-update-plp-path-2/index.html @@ -0,0 +1,341 @@ + + + + + + + + About - HMPPS Integration API And Events Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ Skip to main content + + + +
+ +
+ +
+ +
+
+
+ + + + +
+
+ +
+
+

About

+

HMPPS Integration API is a RESTFul API that provides a single point of entry for organisations to access data about a person within the prison and probation services of Ministry of Justice (MOJ) such as the National Offender Management Information System (NOMIS). It uses a HMPPS ID for a person.

+

Additionally the API is supported by an events based system which triggers SNS notifications by processing upstream MoJ domain events which are related to the information served by the API. This allows the clients of our API to be notified when a change occurs to a domain that is of interest to them.

+

Diagrams

+

The C4 model is used for visualising the technical architecture of the service.

+

Context diagram

+

The context diagram provides a high-level overview of the current systems that make up HMPPS Integration API as well as those that are yet to be implemented.

+

Context diagram

+

Container diagram

+

The API container diagram provides a more in-depth view of the different upstreams APIs that are used to retrieve data from the HMPPS systems such as the Prison API for NOMIS.

+

Container diagram

+ +
+
+ This page was last reviewed on 3 September 2024. + + It needs to be reviewed again on 3 December 2024 + by the page owner #hmpps-integration-api-alerts + . +
+ + +
+ +
+ + + + + +
+
+
+ + + + + + diff --git a/drafts/SJM-update-plp-path-2/javascripts/application.js b/drafts/SJM-update-plp-path-2/javascripts/application.js new file mode 100644 index 00000000..758362d0 --- /dev/null +++ b/drafts/SJM-update-plp-path-2/javascripts/application.js @@ -0,0 +1,12 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,(function(e,t){"use strict";function n(e,t,n){var r,i,o=(n=n||fe).createElement("script");if(o.text=e,t)for(r in de)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function r(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?re[ie.call(e)]||"object":typeof e}function i(e){var t=!!e&&"length"in e&&e.length,n=r(e);return!ce(e)&&!le(e)&&("array"===n||0===t||"number"==typeof t&&0w.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function r(e){return e[F]=!0,e}function i(e){var t=D.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return r((function(t){return t=+t,r((function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function f(e){return e&&void 0!==e.getElementsByTagName&&e}function d(){}function p(e){for(var t=0,n=e.length,r="";t+~]|"+te+")"+te+"*"),ce=new RegExp(te+"|>"),le=new RegExp(ie),fe=new RegExp("^"+ne+"$"),de={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+te+"*(even|odd|(([+-]|)(\\d*)n|)"+te+"*(?:([+-]|)"+te+"*(\\d+)|))"+te+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+te+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+te+"*((?:-\\d)?\\d*)"+te+"*\\)|)(?=[^-]|$)","i")},pe=/HTML$/i,he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,xe=new RegExp("\\\\[\\da-fA-F]{1,6}"+te+"?|\\\\([^\\r\\n\\f])","g"),be=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ke=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Se=function(){O()},Te=h((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{K.apply(G=Y.call(q.childNodes),q.childNodes),G[q.childNodes.length].nodeType}catch(x){K={apply:G.length?function(e,t){Q.apply(e,Y.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}for(x in b=t.support={},S=t.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!pe.test(t||n&&n.nodeName||"HTML")},O=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:q;return r!=D&&9===r.nodeType&&r.documentElement&&(I=(D=r).documentElement,L=!S(D),q!=D&&(n=D.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Se,!1):n.attachEvent&&n.attachEvent("onunload",Se)),b.scope=i((function(e){return I.appendChild(e).appendChild(D.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),b.attributes=i((function(e){return e.className="i",!e.getAttribute("className")})),b.getElementsByTagName=i((function(e){return e.appendChild(D.createComment("")),!e.getElementsByTagName("*").length})),b.getElementsByClassName=ve.test(D.getElementsByClassName),b.getById=i((function(e){return I.appendChild(e).id=F,!D.getElementsByName||!D.getElementsByName(F).length})),b.getById?(w.filter.ID=function(e){var t=e.replace(xe,be);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&L){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(xe,be);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&L){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&L)return t.getElementsByClassName(e)},P=[],R=[],(b.qsa=ve.test(D.querySelectorAll))&&(i((function(e){var t;I.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+te+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||R.push("\\["+te+"*(?:value|"+ee+")"),e.querySelectorAll("[id~="+F+"-]").length||R.push("~="),(t=D.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||R.push("\\["+te+"*name"+te+"*="+te+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||R.push(":checked"),e.querySelectorAll("a#"+F+"+*").length||R.push(".#.+[+~]"),e.querySelectorAll("\\\f"),R.push("[\\r\\n\\f]")})),i((function(e){e.innerHTML="";var t=D.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&R.push("name"+te+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&R.push(":enabled",":disabled"),I.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&R.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),R.push(",.*:")}))),(b.matchesSelector=ve.test(_=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&i((function(e){b.disconnectedMatch=_.call(e,"*"),_.call(e,"[s!='']:x"),P.push("!=",ie)})),R=R.length&&new RegExp(R.join("|")),P=P.length&&new RegExp(P.join("|")),t=ve.test(I.compareDocumentPosition),M=t||ve.test(I.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!b.sortDetached&&t.compareDocumentPosition(e)===n?e==D||e.ownerDocument==q&&M(q,e)?-1:t==D||t.ownerDocument==q&&M(q,t)?1:j?Z(j,e)-Z(j,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],u=[t];if(!i||!o)return e==D?-1:t==D?1:i?-1:o?1:j?Z(j,e)-Z(j,t):0;if(i===o)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?s(a[r],u[r]):a[r]==q?-1:u[r]==q?1:0}),D},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if(O(e),b.matchesSelector&&L&&!U[n+" "]&&(!P||!P.test(n))&&(!R||!R.test(n)))try{var r=_.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){U(n,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,be),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=T(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+te+")"+e+"("+te+"|$)"))&&W(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;he.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?he.find.matchesSelector(r,e)?[r]:[]:he.find.matches(e,he.grep(t,(function(e){return 1===e.nodeType})))},he.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(he(e).filter((function(){for(t=0;t)[^>]*|#([\w-]+))$/;(he.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||be,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:we.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof he?t[0]:t,he.merge(this,he.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:fe,!0)),xe.test(r[1])&&he.isPlainObject(t))for(r in t)ce(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=fe.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ce(e)?void 0!==n.ready?n.ready(e):e(he):he.makeArray(e,this)}).prototype=he.fn,be=he(fe);var ke=/^(?:parents|prev(?:Until|All))/,Se={children:!0,contents:!0,next:!0,prev:!0};he.fn.extend({has:function(e){var t=he(e,this),n=t.length;return this.filter((function(){for(var e=0;e\x20\t\r\n\f]*)/i,Je=/^$|^module$|\/(?:java|ecma)script/i;ze=fe.createDocumentFragment().appendChild(fe.createElement("div")),(Be=fe.createElement("input")).setAttribute("type","radio"),Be.setAttribute("checked","checked"),Be.setAttribute("name","t"),ze.appendChild(Be),ue.checkClone=ze.cloneNode(!0).cloneNode(!0).lastChild.checked,ze.innerHTML="",ue.noCloneChecked=!!ze.cloneNode(!0).lastChild.defaultValue,ze.innerHTML="",ue.option=!!ze.lastChild;var Ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,Ge.th=Ge.td,ue.option||(Ge.optgroup=Ge.option=[1,""]);var Xe=/<|&#?\w+;/,Qe=/^key/,Ke=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ye=/^([^.]*)(?:\.(.+)|)/;he.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,c,l,f,d,p,h,g,v=De.get(e);if(Oe(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&he.find.matchesSelector(Fe,i),n.guid||(n.guid=he.guid++),(u=v.events)||(u=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(t){return void 0!==he&&he.event.triggered!==t.type?he.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(Te)||[""]).length;c--;)p=g=(a=Ye.exec(t[c])||[])[1],h=(a[2]||"").split(".").sort(),p&&(f=he.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=he.event.special[p]||{},l=he.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&he.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||((d=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,s)||e.addEventListener&&e.addEventListener(p,s)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),he.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,c,l,f,d,p,h,g,v=De.hasData(e)&&De.get(e);if(v&&(u=v.events)){for(c=(t=(t||"").match(Te)||[""]).length;c--;)if(p=g=(a=Ye.exec(t[c])||[])[1],h=(a[2]||"").split(".").sort(),p){for(f=he.event.special[p]||{},d=u[p=(r?f.delegateType:f.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)l=d[o],!i&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(o,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(e,l));s&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||he.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)he.event.remove(e,p+t[c],n,r,!0);he.isEmptyObject(u)&&De.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=new Array(arguments.length),u=he.event.fix(e),c=(De.get(this,"events")||Object.create(null))[u.type]||[],l=he.event.special[u.type]||{};for(a[0]=u,t=1;t\s*$/g;he.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,s,a,u,c,l=e.cloneNode(!0),f=qe(e);if(!(ue.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||he.isXMLDoc(e)))for(s=y(l),r=0,i=(o=y(e)).length;r").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),fe.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Ut,Vt=[],Jt=/(=)\?(?=&|$)|\?\?/;he.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vt.pop()||he.expando+"_"+Nt.guid++;return this[e]=!0,e}}),he.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,s,a=!1!==t.jsonp&&(Jt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Jt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=ce(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Jt,"$1"+i):!1!==t.jsonp&&(t.url+=(jt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||he.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},r.always((function(){void 0===o?he(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Vt.push(i)),s&&ce(o)&&o(s[0]),s=o=void 0})),"script"})),ue.createHTMLDocument=((Ut=fe.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),he.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(ue.createHTMLDocument?((r=(t=fe.implementation.createHTMLDocument("")).createElement("base")).href=fe.location.href,t.head.appendChild(r)):t=fe),o=!n&&[],(i=xe.exec(e))?[t.createElement(i[1])]:(i=b([e],t,o),o&&o.length&&he(o).remove(),he.merge([],i.childNodes)));var r,i,o},he.fn.load=function(e,t,n){var r,i,o,s=this,a=e.indexOf(" ");return-1").append(he.parseHTML(e)).find(r):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},he.expr.pseudos.animated=function(e){return he.grep(he.timers,(function(t){return e===t.elem})).length},he.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,c=he.css(e,"position"),l=he(e),f={};"static"===c&&(e.style.position="relative"),a=l.offset(),o=he.css(e,"top"),u=he.css(e,"left"),("absolute"===c||"fixed"===c)&&-1<(o+u).indexOf("auto")?(s=(r=l.position()).top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),ce(t)&&(t=t.call(e,n,he.extend({},a))),null!=t.top&&(f.top=t.top-a.top+s),null!=t.left&&(f.left=t.left-a.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),l.css(f))}},he.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){he.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===he.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===he.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=he(e).offset()).top+=he.css(e,"borderTopWidth",!0),i.left+=he.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-he.css(r,"marginTop",!0),left:t.left-i.left-he.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===he.css(e,"position");)e=e.offsetParent;return e||Fe}))}}),he.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;he.fn[e]=function(r){return Ne(this,(function(e,r,i){var o;if(le(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),he.each(["top","left"],(function(e,t){he.cssHooks[t]=L(ue.pixelPosition,(function(e,n){if(n)return n=I(e,t),nt.test(n)?he(e).position()[t]+"px":n}))})),he.each({Height:"height",Width:"width"},(function(e,t){he.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){he.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return Ne(this,(function(t,n,i){var o;return le(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?he.css(t,n,a):he.style(t,n,i,a)}),t,s?i:void 0,s)}}))})),he.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){he.fn[t]=function(e){return this.on(t,e)}})),he.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),he.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){he.fn[t]=function(e,n){return 0d;d++)if(g=e[d],v=j.style[g],s(g,"-")&&(g=u(g)),j.style[g]!==n){if(o||r(i,"undefined"))return c(),"pfx"!=t||g;try{j.style[g]=i}catch(e){}if(j.style[g]!=v)return c(),"pfx"!=t||g}return c(),!1}function v(e,t,n,i,o){var s=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+E.join(s+" ")+s).split(" ");return r(t,"string")||r(t,"undefined")?g(a,t,i,o):l(a=(e+" "+C.join(s+" ")+s).split(" "),t,n)}function m(e,t,r){return v(e,n,n,t,r)}var y=[],x=[],b={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout((function(){t(n[e])}),0)},addTest:function(e,t,n){x.push({name:e,fn:t,options:n})},addAsyncTest:function(e){x.push({name:null,fn:e})}},w=function(){};w.prototype=b,(w=new w).addTest("history",(function(){var t=navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(e.history&&"pushState"in e.history)}));var k=t.documentElement,S="svg"===k.nodeName.toLowerCase();S||function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=T.elements;return"string"==typeof e?e.split(" "):e}function i(e,t){var n=T.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),T.elements=n+" "+e,c(t)}function o(e){var t=S[e[w]];return t||(t={},k++,e[w]=k,S[k]=t),t}function s(e,n,r){return n||(n=t),v?n.createElement(e):(r||(r=o(n)),!(i=r.cache[e]?r.cache[e].cloneNode():b.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e)).canHaveChildren||x.test(e)||i.tagUrn?i:r.frag.appendChild(i));var i}function a(e,n){if(e||(e=t),v)return e.createDocumentFragment();for(var i=(n=n||o(e)).frag.cloneNode(),s=0,a=r(),u=a.length;u>s;s++)i.createElement(a[s]);return i}function u(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return T.shivMethods?s(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(T,t.frag)}function c(e){e||(e=t);var r=o(e);return!T.shivCSS||g||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),v||u(e,r),e}function l(e){for(var t,n=e.getElementsByTagName("*"),i=n.length,o=RegExp("^(?:"+r().join("|")+")$","i"),s=[];i--;)t=n[i],o.test(t.nodeName)&&s.push(t.applyElement(f(t)));return s}function f(e){for(var t,n=e.attributes,r=n.length,i=e.ownerDocument.createElement(C+":"+e.nodeName);r--;)(t=n[r]).specified&&i.setAttribute(t.nodeName,t.nodeValue);return i.style.cssText=e.style.cssText,i}function d(e){for(var t,n=e.split("{"),i=n.length,o=RegExp("(^|[\\s,>+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),s="$1"+C+"\\:$2";i--;)(t=n[i]=n[i].split("}"))[t.length-1]=t[t.length-1].replace(o,s),n[i]=t.join("}");return n.join("{")}function p(e){for(var t=e.length;t--;)e[t].removeNode()}function h(e){function t(){clearTimeout(s._removeSheetTimer),r&&r.removeNode(!0),r=null}var r,i,s=o(e),a=e.namespaces,u=e.parentWindow;return!N||e.printShived||(void 0===a[C]&&a.add(C),u.attachEvent("onbeforeprint",(function(){t();for(var o,s,a,u=e.styleSheets,c=[],f=u.length,p=Array(f);f--;)p[f]=u[f];for(;a=p.pop();)if(!a.disabled&&E.test(a.media)){try{s=(o=a.imports).length}catch(e){s=0}for(f=0;s>f;f++)p.push(o[f]);try{c.push(a.cssText)}catch(e){}}c=d(c.reverse().join("")),i=l(e),r=n(e,c)})),u.attachEvent("onafterprint",(function(){p(i),clearTimeout(s._removeSheetTimer),s._removeSheetTimer=setTimeout(t,500)})),e.printShived=!0),e}var g,v,m="3.7.3",y=e.html5||{},x=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,b=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,w="_html5shiv",k=0,S={};!function(){try{var e=t.createElement("a");e.innerHTML="",g="hidden"in e,v=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return void 0===e.cloneNode||void 0===e.createDocumentFragment||void 0===e.createElement}()}catch(e){g=!0,v=!0}}();var T={elements:y.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:!1!==y.shivCSS,supportsUnknownElements:v,shivMethods:!1!==y.shivMethods,type:"default",shivDocument:c,createElement:s,createDocumentFragment:a,addElements:i};e.html5=T,c(t);var E=/^$|\b(?:all|print)\b/,C="html5shiv",N=!v&&function(){var n=t.documentElement;return!(void 0===t.namespaces||void 0===t.parentWindow||void 0===n.applyElement||void 0===n.removeNode||void 0===e.attachEvent)}();T.type+=" print",T.shivPrint=h,h(t),"object"==typeof module&&module.exports&&(module.exports=T)}(void 0!==e?e:this,t);var T="Moz O ms Webkit",E=b._config.usePrefixes?T.split(" "):[];b._cssomPrefixes=E;var C=b._config.usePrefixes?T.toLowerCase().split(" "):[];b._domPrefixes=C;var N={elem:a("modernizr")};w._q.push((function(){delete N.elem}));var j={style:N.elem.style};w._q.unshift((function(){delete j.style})),b.testAllProps=v, +b.testAllProps=m,w.addTest("flexbox",m("flexBasis","1px",!0)),w.addTest("flexboxtweener",m("flexAlign","end",!0)),i(),o(y),delete b.addTest,delete b.addAsyncTest;for(var A=0;Ad+g-u&&d+g-u>=y+(l||0)}if(e.offsetWidth){var s,a,u,c=t(e),l=c.outerHeight(),f=c.data(o.keys.offset),d=o.getScrollTop(),p=c.is("."+o.classes.active),h=function(e){c[e?"addClass":"removeClass"](o.classes.active)[e?"removeClass":"addClass"](o.classes.inactive)},g=t(window).height(),v=c.data(o.keys.position),m=c.parent(),y=m.offset().top,x=m.outerHeight();void 0===f?(f=c.offset().top,c.data(o.keys.offset,f),c.after(t("
").addClass(o.classes.clone).height(l))):c.next("."+o.classes.clone).height(l),v||((s="auto"!==c.css("top")||"auto"!==c.css("bottom"))||c.css("position","fixed"),v={top:"auto"!==c.css("top"),bottom:"auto"!==c.css("bottom")},s||c.css("position",""),c.data(o.keys.position,v)),a=r(c.css("top")),u=r(c.css("bottom")),v.top&&n()||v.bottom&&i()?p||h(!0):p&&h(!1)}},destroy:function(n){var r=t(n);return o.bypass()?r:r.each((function(){var n=t(this),r=n.data(o.keys.id);t(e).unbind(".fixedsticky"+r),n.removeData([o.keys.offset,o.keys.position,o.keys.id]).removeClass(o.classes.active).removeClass(o.classes.inactive).next("."+o.classes.clone).remove()}))},init:function(n){var r=t(n);return o.bypass()?r:r.each((function(){var n=this,s=i++;t(this).data(o.keys.id,s),t(e).bind("scroll.fixedsticky"+s,(function(){o.update(n)})).trigger("scroll.fixedsticky"+s),t(e).bind("resize.fixedsticky"+s,(function(){r.is("."+o.classes.active)&&o.update(n)}))}))}};e.FixedSticky=o,t.fn.fixedsticky=function(e){if("function"==typeof o[e])return o[e].call(o,this);if("object"!=typeof e&&e)throw new Error("Method `"+e+"` does not exist on jQuery.fixedsticky");return o.init.call(o,this)},e.FixedFixed||t(e.document.documentElement).addClass(o.classes.withoutFixedFixed)}(window,jQuery),function(){function e(){}function t(e){return null==e?e===c?g:p:j&&j in Object(e)?n(e):r(e)}function n(e){var t=E.call(e,j),n=e[j];try{e[j]=c;var r=!0}catch(e){}var i=C.call(e);return r&&(t?e[j]=n:delete e[j]),i}function r(e){return C.call(e)}function i(e,t,n){function r(t){var n=v,r=m;return v=m=c,k=t,x=e.apply(r,n)}function i(e){return k=e,b=setTimeout(l,t),S?r(e):x}function s(e){var n=t-(e-w);return T?O(n,y-(e-k)):n}function a(e){var n=e-w;return w===c||n>=t||n<0||T&&e-k>=y}function l(){var e=D();if(a(e))return d(e);b=setTimeout(l,s(e))}function d(e){return b=c,E&&v?r(e):(v=m=c,x)}function p(){b!==c&&clearTimeout(b),k=0,v=w=m=b=c}function h(){return b===c?x:d(D())}function g(){var e=D(),n=a(e);if(v=arguments,m=this,w=e,n){if(b===c)return i(w);if(T)return b=setTimeout(l,t),r(w)}return b===c&&(b=setTimeout(l,t)),x}var v,m,y,x,b,w,k=0,S=!1,T=!1,E=!0;if("function"!=typeof e)throw new TypeError(f);return t=u(t)||0,o(n)&&(S=!!n.leading,y=(T="maxWait"in n)?A(u(n.maxWait)||0,t):y,E="trailing"in n?!!n.trailing:E),g.cancel=p,g.flush=h,g}function o(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function s(e){return null!=e&&"object"==typeof e}function a(e){return"symbol"==typeof e||s(e)&&t(e)==h}function u(e){if("number"==typeof e)return e;if(a(e))return d;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(v,"");var n=y.test(e);return n||x.test(e)?b(e.slice(2),n?2:8):m.test(e)?d:+e}var c,l="4.17.5",f="Expected a function",d=NaN,p="[object Null]",h="[object Symbol]",g="[object Undefined]",v=/^\s+|\s+$/g,m=/^[-+]0x[0-9a-f]+$/i,y=/^0b[01]+$/i,x=/^0o[0-7]+$/i,b=parseInt,w="object"==typeof global&&global&&global.Object===Object&&global,k="object"==typeof self&&self&&self.Object===Object&&self,S=w||k||Function("return this")(),T=Object.prototype,E=T.hasOwnProperty,C=T.toString,N=S.Symbol,j=N?N.toStringTag:c,A=Math.max,O=Math.min,D=function(){return S.Date.now()};e.debounce=i,e.isObject=o,e.isObjectLike=s,e.isSymbol=a,e.now=D,e.toNumber=u,e.VERSION=l,S._=e}.call(this),function(e){function t(t,n){var r=e.trim(n.text()),i=n.attr("href");ga("send","event","SM Technical Documentation",t,r+"|"+i)}function n(n){return function(){t(n,e(this))}}function r(){var t=window.location.hash;e(t).get(0)||ga("send","event","Broken fragment ID","pageview",window.location.pathname+t)}e(document).on("ready",(function(){"undefined"!=typeof ga&&(e(".technical-documentation a").on("click",n("inTextClick")),e(".header a").on("click",n("topNavigationClick")),e(".toc a").on("click",n("tableOfContentsNavigationClick")),r(),window.stripPIIFromString=function(e){var t=/[^\s=/?&]+(?:@|%40)[^\s=/?&]+/g,n=/[A-PR-UWYZ][A-HJ-Z]?[0-9][0-9A-HJKMNPR-Y]?(?:[\s+]|%20)*[0-9][ABD-HJLNPQ-Z]{2}/gi,r=/\d{4}(-?)\d{2}(-?)\d{2}/g;return e.replace(t,"[email]").replace(r,"[date]").replace(n,"[postcode]")})}))}(jQuery),function(e,t){"use strict";t.GOVUK=t.GOVUK||{},GOVUK.Modules=GOVUK.Modules||{},GOVUK.modules={find:function(t){var n,r="[data-module]",i=t||e("body");return n=i.find(r),i.is(r)&&(n=n.add(i)),n},start:function(t){function n(e){return i(r(e))}function r(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}function i(e){return e.charAt(0).toUpperCase()+e.slice(1)}for(var o=this.find(t),s=0,a=o.length;s