Lodging Events - ministryofjustice/hmpps-book-secure-move-api GitHub Wiki
This page documents lodging events in the Book A Secure Move API
LodgingCreate
Description
Indicates that an overnight lodging is planned to take place during a move.
Attributes
start_date
- The date that the lodging will startend_date
- The date that the lodging will endlocation
- The location that the lodging will take place at
Request Example
Created automatically when a lodging is created via the lodgings controller.
Validations
start_date
- presence, iso8601 date timeend_date
- presence, iso8601 date timelocation
- presence, must be an existing location
Triggers
None
LodgingUpdate
Description
Indicates that the details of an overnight lodging have changed.
Attributes
start_date
andold_start_date
- The original and new dates that the lodging will startend_date
andold_end_date
- The original and new dates that the lodging will endlocation_id
andold_location_id
- The original and new locations that the lodging will take place at
Request Example
Created automatically when a lodging is updated via the lodgings controller.
Validations
One of the following pairs of attributes must be present:
start_date
andold_start_date
- iso8601 date timesend_date
andold_end_date
- iso8601 date timeslocation_id
andold_location_id
- IDs of existing locations
Triggers
None
LodgingCancel
Description
Indicates that an overnight lodging has been cancelled for a move.
Attributes
start_date
- The date that the lodging will startend_date
- The date that the lodging will endcancellation_reason
- The reason code for the cancellationcancellation_reason_comment
- Optional comment about why the lodging was cancelled
Request Example
Created automatically when a lodging is cancelled via the lodgings controller.
Validations
start_date
- presence, iso8601 date timeend_date
- presence, iso8601 date timecancellation_reason
- presence, must be one of: (made_in_error | supplier_declined_to_move | cancelled_by_pmu | other)
Triggers
None