Added

Placement Periods API controls which placement searches close on create

Placement Periods API controls which placement searches close on create

POST /api/v1/placement_periods now accepts an optional top-level meta
object, sent alongside placement_period (not inside it). Its
searches_to_close key lists the IDs of the child's open placement searches to
close as a result of the new placement:

  • Omitting searches_to_close closes all of the child's open placement
    searches.
  • An empty array ("searches_to_close": []) closes none.
  • A list of IDs closes only those searches.

For example:

{
  "placement_period": {
    "child_id": 93893,
    "placement_type": "placed_with_family",
    "start_date": "2026-09-29",
    "agency_placement_id": 136560
  },
  "meta": { "searches_to_close": [] }
}

Previously, creating a placement period through the API closed no placement
searches. Send "searches_to_close": [] to keep that behavior. Respite
placements never close placement searches.

The request returns 422 when meta is not an object, when meta contains a
key other than searches_to_close, when searches_to_close is not an array of
integer IDs, or when an ID is not one of the child's placement searches. Nothing
is saved when the request is rejected. IDs of searches that are already closed
are ignored.