-
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": {
"event_type": "MoveAccept",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": ""
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" },
}
}
}
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": {
"event_type": "MoveApprove",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"date": "2020-05-17",
"create_in_nomis": "true",
"notes": ""
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" },
}
}
}
-
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": {
"event_type": "MoveReject",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "There was no space at the prison",
"details": {
"rejection_reason": "no_space_at_receiving_prison",
"rebook": true,
"cancellation_reason_comment": "There was no space at the prison"
}
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" }
}
}
}
-
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": {
"event_type": "MoveCancel",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "",
"details": {
"cancellation_reason": "made_in_error",
"cancellation_reason_comment": "Administrative error"
}
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" }
}
}
}
-
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": {
"event_type": "MoveStart",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": ""
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" }
}
}
}
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": {
"event_type": "MoveRedirect",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "",
"details": { "move_type": "court_appearance" }
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" },
"to_location": { "type": "locations", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" }
}
}
}
-
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": {
"event_type": "MoveComplete",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": ""
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" }
}
}
}
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": {
"event_type": "MoveLockout",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "There was no space at the designated location so we locked out.",
"details": {
"reason": "no_space",
"authorised_at": "2020-06-16T10:20:30+01:00",
"authorised_by": "PMU",
}
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" },
"from_location": { "type": "locations", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" },
}
}
}
-
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": {
"event_type": "MoveLodgingStart",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "",
"details": {
"reason": "lockout"
}
},
"relationships": {
"eventable": { "type": "journey", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" },
"location": { "type": "locations", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" }
}
}
}
-
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": {
"event_type": "MoveLodgingEnd",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": ""
},
"relationships": {
"eventable": { "type": "journey", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" },
"location": { "type": "locations", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" }
}
}
}
-
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": {
"event_type": "MoveOperationSafeguard",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "",
"details": {
"reason": "no_space",
"authorised_at": "2020-06-16T10:20:30+01:00",
"authorised_by": "PMU",
}
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" },
}
}
}
-
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": {
"event_type": "MoveOperationTornado",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "",
"details": {
"authorised_at": "2020-06-16T10:20:30+01:00",
"authorised_by": "PMU"
}
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" },
}
}
}
-
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": {
"event_type": "MoveOperationHMCTS",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "",
"details": {
"authorised_at": "2020-06-16T10:20:30+01:00",
"authorised_by": "PMU",
"court_cell_number": "17b"
}
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" },
}
}
}
-
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": {
"event_type": "MoveNotifyPremisesOfEta",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "No traffic.",
"details": {
"expected_at": "2020-06-16T10:20:30+01:00"
}
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" }
}
}
}
-
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": {
"event_type": "MoveNotifyPremisesOfEta",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "Arriving in 30 minutes",
"details": {
"expected_at": "2020-06-16T10:20:30+01:00"
}
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" }
}
}
}
-
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": {
"event_type": "MoveNotifyPremisesOfArrivalIn30Mins",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "Arriving in 30 minutes"
},
"relationships": {
"eventable": { "type": "moves", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" },
}
}
}
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 being escort
{
"data": {
"type": "events",
"attributes": {
"event_type": "MoveCollectionByEscort",
"occurred_at": "2020-06-16T10:20:30+01:00",
"recorded_at": "2020-06-16T10:20:30+01:00",
"notes": "",
"details": {
"vehicle_type": "pro_cab"
}
},
"relationships": {
"eventable": { "type": "move", "id": "0003a13f-a6e4-4b33-aa57-60c172f993e7" }
}
}
}
-
vehicle_type
- presence, one of c4, pro_cab, mpv, 2_cell, 3_cell, 6_cell, 12_cell
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