The appropriate local authority must be informed of the matters mentioned in subsection (4) when—
a person to whom subsection (2) applies is to be brought before a court in accordance with section 21(2), or
a person to whom subsection (2) applies is released from police custody on an undertaking given under section 25(2)(a).
This subsection applies to a person who is under 18 years of age.
…
The matters referred to in subsection (1) are—
the court before which the person mentioned in paragraph (a) or (as the case may be) (b) of that subsection is to be brought,
the date on which the person is to be brought before the court, and
the general nature of the offence which the person has been officially accused of committing.
For the purpose of subsection (1), the appropriate local authority is the local authority in whose area the court referred to in subsection (4)(a) sits.