-
Notifications
You must be signed in to change notification settings - Fork 1
Move events
This page documents move events in the Book A Secure Move API
Accepting a move will change the move status from requested
to booked
.
Common attributes, only
POST /api/events
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:28 +0000",
"recorded_at": "2020-12-03 10:51:28 +0000",
"notes": "Additional information about this event",
"details": {
},
"event_type": "MoveAccept"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "18cf2777-a0e4-4cac-947b-44316580b33d"
}
}
}
}
}
Common validations, only
Accepting a move will change the move status from requested
to booked
.
Approving a move will change the move status to requested
and update with the provided move date.
-
date
- Date on which the move is scheduled -
create_in_nomis
- Indicates if the move should be automatically created in NOMIS
POST /api/events
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:30 +0000",
"recorded_at": "2020-12-03 10:51:30 +0000",
"notes": "Additional information about this event",
"details": {
"date": "2020-06-16",
"create_in_nomis": true
},
"event_type": "MoveApprove"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "34dadfc0-1f24-45c5-ba40-fc95e1097119"
}
}
}
}
}
-
date
- presence, iso8601 date
Approving a move will change the move status to requested
and update with the provided move date.
Rejecting a move will change the move status to cancelled
, the move cancellation reason to rejected
and update with the provided rejection reason.
-
rejection_reason
- Indicates if the move should be automatically rebooked in 7 days time -
cancellation_reason_comment
- Optional comment explaining why the move was cancelled -
rebook
- The reason the move has been rejected
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:29 +0000",
"recorded_at": "2020-12-03 10:51:29 +0000",
"notes": "Additional information about this event",
"details": {
"rejection_reason": "no_space_at_receiving_prison",
"cancellation_reason_comment": "It was a mistake",
"rebook": false
},
"event_type": "MoveReject"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "db6a65c8-4385-4d17-afcd-767d06529a61"
}
}
}
}
}
-
rejection_reason
- presence, one of no_space_at_receiving_prison, no_transport_available
Rejecting a move will change the move status to cancelled
, the move cancellation reason to rejected
and update with the provided rejection reason.
Cancelling a move will change the move status to be cancelled
.
Move events do not alter the child journeys associated with the move: additional API calls may be necessary to complete or cancel existing journeys.
-
cancellation_reason
- The reason the move has been cancelled -
cancellation_reason_comment
- Optional comment explaining why the move was cancelled
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:29 +0000",
"recorded_at": "2020-12-03 10:51:29 +0000",
"notes": "Additional information about this event",
"details": {
"cancellation_reason": "made_in_error",
"cancellation_reason_comment": "It was a mistake"
},
"event_type": "MoveCancel"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "a3d77087-6ede-4805-9488-8ebdaa58cbd7"
}
}
}
}
}
-
cancellation_reason
- presence, one of made_in_error, supplier_declined_to_move, cancelled_by_pmu, rejected, other
Cancelling a move will change the move status to be cancelled
.
Move events do not alter the child journeys associated with the move: additional API calls may be necessary to complete or cancel existing journeys.
Starting a move will change the move status from booked
to in_transit
.
A move should only be started when the Escorting Escort Vehicle is loaded and ready for exit from the Designated Location.
Common attributes, only
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:28 +0000",
"recorded_at": "2020-12-03 10:51:28 +0000",
"notes": "Additional information about this event",
"details": {
},
"event_type": "MoveStart"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "ce0f04c6-5b10-4978-b7e3-49e616ea20e2"
}
}
}
}
}
Common validations, only
Starting a move will change the move status from booked
to in_transit
.
A move should only be started when the Escorting Escort Vehicle is loaded and ready for exit from the Designated Location.
Redirecting a move changes the move's to_location.
Move events do not alter the child journeys associated with the move: additional API calls may be necessary to complete or cancel existing journeys.
-
to_location
- The location that the move is being redirected to. -
move_type
- Indicates the type of move, e.g. prison transfer or court appearance (optional) -
reason
- Indicates the reason for the redirect (optional)
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:28 +0000",
"recorded_at": "2020-12-03 10:51:28 +0000",
"notes": "Additional information about this event",
"details": {
"reason": "no_space",
"move_type": "court_appearance"
},
"event_type": "MoveRedirect"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "ca3e5f7c-1592-4256-8953-218cea2e98df"
}
},
"to_location": {
"data": {
"id": "0459732f-0794-4807-b345-36a490224efe",
"type": "locations"
}
}
}
}
}
-
to_location
- presence, is an existing location identifier -
reason
- optional, one of no_space, serious_incident, covid, receiving_prison_request, force_majeure or other -
move_type
- optional, one of court_appearance, court_other, hospital, police_transfer, prison_recall, prison_remand, prison_transfer or video_remand
Sets the move_type
on the move
Sets the to_location
on the move
Completing a move will change the move status to completed
.
Move events do not alter the child journeys associated with the move: additional API calls may be necessary to complete or cancel existing journeys.
Common attributes, only
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:30 +0000",
"recorded_at": "2020-12-03 10:51:30 +0000",
"notes": "Additional information about this event",
"details": {
},
"event_type": "MoveComplete"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "95e6d8c0-9339-4ca9-b721-d8abc57d8b46"
}
}
}
}
}
Common validations, only
Updates the move status
to completed
Recording a lockout event does not change the moves status. After recording the lockout, if (with the agreement of the Authority) the move has a new final destination, then the move should be redirected to the new destination. If the final destination is unaltered, then the move should not be redirected.
Move events do not alter the child journeys associated with the move: additional API calls may be necessary to complete or cancel existing journeys.
-
from_location
- The location that the vehicle was locked out from. -
reason
- The reason for the lockout. -
authorised_by
- The authoriser of the creation of this lockout event. -
authorised_at
- The date time of the the authoriser authorised the lockout event.
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:30 +0000",
"recorded_at": "2020-12-03 10:51:30 +0000",
"notes": "Additional information about this event",
"details": {
"reason": "no_space",
"authorised_at": "2020-12-03T10:51:30+00:00",
"authorised_by": "PMU"
},
"event_type": "MoveLockout"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "1e33a1a7-cb08-454d-9f53-df900842f7ed"
}
},
"from_location": {
"data": {
"id": "deb9ae4c-39f4-40ab-a1a7-2a88bd7fbad4",
"type": "locations"
}
}
}
}
}
-
from_location
- presence, is an existing location identifier -
reason
- optional, one of no_space, unachievable_redirection, late_sitting_court, unavailable_resource_vehicle_or_staff, traffic_issues, mechanical_or_other_vehicle_failure, ineffective_route_planning, unachievable_ptr_request, other -
authorised_at
- optional, iso8601 date time -
authorised_by
- presence, one of PMU, CDM, Other
None
Indicates when a lodging was started and at which location.
Recording a lodging event does not change the move's state and is purely an auditing event.
The common occurred_at
field is used to indicate the start of the lodging.
-
location
- The location of the lodging -
reason
- The reason for the lodging
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:30 +0000",
"recorded_at": "2020-12-03 10:51:30 +0000",
"notes": "Additional information about this event",
"details": {
"reason": "overnight_lodging"
},
"event_type": "MoveLodgingStart"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "7712fe99-dd51-4a7f-897d-b13dde4016de"
}
},
"location": {
"data": {
"id": "6f807f8e-be9e-4b19-96cb-5f52d9f96230",
"type": "locations"
}
}
}
}
}
-
location
- presence, is an existing location identifier -
reason
- presence, one of overnight_lodging, lockout, operation_hmcts, court_cells, operation_tornado, operation_safeguard, other
None
Indicates when a lodging ended at a given location.
Recording a lodging event does not change the move's state and is purely an auditing event.
The common occurred_at
field is used to indicate the end of the lodging.
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:29 +0000",
"recorded_at": "2020-12-03 10:51:29 +0000",
"notes": "Additional information about this event",
"details": {
},
"event_type": "MoveLodgingEnd"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "189753a8-3539-4184-bc56-ed36d983d43c"
}
},
"location": {
"data": {
"id": "752b83ce-1da7-4fff-9a8b-6696250b2736",
"type": "locations"
}
}
}
}
}
-
location
- The location of the lodging
-
location
- presence, is an existing location identifier
The procedure the Authority has in place to manage the detention of Prisoners when prison operational capacity is reached. The Supplier may be required to provide Escort Vehicles and Supplier Personnel for the movement of Prisoners between Courts and Police Premises, and between Police Premises and Prisons when so notified by PMU.
-
authorised_by
- The authoriser of the creation of this safeguard event. -
authorised_at
- The date time of the the authoriser authorised the safeguard event.
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:29 +0000",
"recorded_at": "2020-12-03 10:51:29 +0000",
"notes": "Additional information about this event",
"details": {
"authorised_at": "2020-12-03T10:51:29+00:00",
"authorised_by": "PMU"
},
"event_type": "MoveOperationSafeguard"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "d08055f2-cfef-422a-91e5-822a59704866"
}
}
}
}
}
-
authorised_at
- optional, iso8601 date time -
authorised_by
- presence, one of PMU, CDM, Other
None
The procedure the Authority has in place to decant detained Prisoners where prisons suddenly need to be vacated as a result of fire, breakdown of infrastructure, loss of accommodation or transfer Prisoners to maintain order and control.
-
authorised_by
- The authoriser of the creation of this safeguard event. -
authorised_at
- The date time of the the authoriser authorised the safeguard event.
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:30 +0000",
"recorded_at": "2020-12-03 10:51:30 +0000",
"notes": "Additional information about this event",
"details": {
"authorised_at": "2020-12-03T10:51:30+00:00",
"authorised_by": "PMU"
},
"event_type": "MoveOperationTornado"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "69b3da08-cb09-42a1-8f0a-ac9ee4a4a6d2"
}
}
}
}
}
-
authorised_at
- optional, iso8601 date time -
authorised_by
- presence, one of PMU, CDM, Other
None
Formal arrangement for the utilisation of HMCTS Courthouse cells ("HMCTS Court Cells") to accommodate Prisoners overnight Monday to Friday, and Saturday afternoon through to Monday morning, when Operation Safeguard has reached its operational capacity.
-
authorised_by
- The authoriser of the creation of this HMCTS event. -
authorised_at
- The date time of the the authoriser authorised the HMCTS event. -
court_cell_number
- The unique cell number that indicates where the person is staying during HMCTS.
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:29 +0000",
"recorded_at": "2020-12-03 10:51:29 +0000",
"notes": "Additional information about this event",
"details": {
"authorised_at": "2020-12-03T10:51:29+00:00",
"authorised_by": "PMU",
"court_cell_number": "6b"
},
"event_type": "MoveOperationHmcts"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "83f4379b-f77f-428c-ba81-fe94bc27e5bc"
}
}
}
}
}
-
authorised_at
- optional, iso8601 date time -
authorised_by
- presence, one of PMU, CDM, Other
None
Supplier provides estimated collection time to the designated pick up location.
The common occurred_at
field should be used to indicate when the notification was sent to the supplier.
Use expected_at
to indicate when the vehicle is expected to arrive at the collection premises
-
expected_at
- A date time indicating when the vehicle is expected to arrive at the collection premises.
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:30 +0000",
"recorded_at": "2020-12-03 10:51:30 +0000",
"notes": "Additional information about this event",
"details": {
"expected_at": "2020-06-16T10:20:30+01:00"
},
"event_type": "MoveNotifyPremisesOfExpectedCollectionTime"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "46edd570-ade0-4686-9506-0e0e394a735e"
}
}
}
}
}
-
expected_at
- presence, iso8601 datetime
None
Supplier notifies the relevant premises of the expected time of arrival
The common occurred_at
field should be used to indicate when the notification was sent to the supplier.
Use expected_at
to indicate when the vehicle is expected to arrive at the arrival premises
-
expected_at
- A date time indicating when the vehicle is expected to arrive at the premises.
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:28 +0000",
"recorded_at": "2020-12-03 10:51:28 +0000",
"notes": "Additional information about this event",
"details": {
"expected_at": "2020-06-16T10:20:30+01:00"
},
"event_type": "MoveNotifyPremisesOfEta"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "e2b37d20-0c80-44d3-beeb-91337deda52d"
}
}
}
}
}
-
expected_at
- presence, iso8601 datetime
None
Supplier notified the relevant premises 30 mins before arrival time
The common occurred_at
field should be used to indicate when the notification was sent to the supplier.
Common attributes, only
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:29 +0000",
"recorded_at": "2020-12-03 10:51:29 +0000",
"notes": "Additional information about this event",
"details": {
},
"event_type": "MoveNotifyPremisesOfArrivalIn30Mins"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "088f40bc-16f4-4beb-932b-483010e01cc0"
}
}
}
}
}
Common validations, only
None
Indicates the time that the person is handed over to the custody of the supplier as signed for on the PER.
The common occurred_at
field is used to indicate when the custody handover occurred.
-
vehicle_type
- Indicates the type of the vehicle used for the escort
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:29 +0000",
"recorded_at": "2020-12-03 10:51:29 +0000",
"notes": "Additional information about this event",
"details": {
"vehicle_type": "pro_cab"
},
"event_type": "MoveCollectionByEscort"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "1f94d5bc-d8d7-4e6a-807f-212ed64bb975"
}
}
}
}
}
-
vehicle_type
- presence, one of c4, pro_cab, mpv, 2_cell, 3_cell, 6_cell, 12_cell
None
As a sending supplier handing over custody of a person during a move to another supplier, this event captures the moment when the person was dropped off to the new supplier.
Common attributes, only.
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:28 +0000",
"recorded_at": "2020-12-03 10:51:28 +0000",
"notes": "Additional information about this event",
"details": {
},
"event_type": "MoveCrossSupplierDropOff"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "f0223880-f53d-4cab-84fb-94d964bd758c"
}
}
}
}
}
Common validations, only.
None
As a receiving supplier receiving a handover of custody of a person during a move from another supplier, this event captures the moment the receiving supplier received custody of the person being handed over.
Use the previous_move
relationship to tie this event and its move to the move record attached to the previous supplier.
previous_move
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:29 +0000",
"recorded_at": "2020-12-03 10:51:29 +0000",
"notes": "Additional information about this event",
"details": {
},
"event_type": "MoveCrossSupplierPickUp"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "30256e9a-b81d-4c78-b939-f0f0437ebff7"
}
},
"previous_move": {
"data": {
"id": "f8b042a9-96ed-4e08-8cf4-25c089fd095e",
"type": "locations"
}
}
}
}
}
-
previous_move
- presence, must exist in PECs database
None
NB: this event is for Court to Prison moves only
Indicates the time a person was booked into the receiving prison from a court: i.e. when the supplier informs the receiving prison of an incoming person (person booked into receiving establishment) - this is sent prior to the person being moved.
(Adults) Where unavailable CDI to fall back on the latest time the person was returned to the court custody area from the court dock.
-
supplier_personnel_number
- Supplier personnel indicator that indicates the representative from the supplier -
location
- The receiving establishment location
POST /api/events
{
"data": {
"type": "events",
"attributes": {
"occurred_at": "2020-12-03 10:51:29 +0000",
"recorded_at": "2020-12-03 10:51:29 +0000",
"notes": "Additional information about this event",
"details": {
"supplier_personnel_number": "dd8b1f8a-45dd-4bdc-8a5c-2a124b676b8c"
},
"event_type": "PersonMoveBookedIntoReceivingEstablishment"
},
"relationships": {
"eventable": {
"data": {
"type": "moves",
"id": "2dcbca4e-702f-47a8-bbe5-2ca50edb32c8"
}
},
"location": {
"data": {
"id": "3f7d60e0-c2a2-4547-a79f-3d1e16bd8cfa",
"type": "locations"
}
}
}
}
}
-
supplier_personnel_number
- presence -
location
- presence, is an existing location identifier
None
- API Guide
- Version 2
- Asked Questions
- Webhook & Email notifications
- Walkthroughs
- Deployment
- Useful Queries
- Data quality improvements
-
Journeys and Payment Related Calls
- Single journey move
- Redirection before move commences
- Redirection after move commences
- Lockouts and Lodgings
- Assessments
- Event Documentation
- GPS Track a move