^^^ Discomick's correct. The front bolt just secures the coupling head to the drawbar tube and the rear bolt does the same, but also secures the the damper in place (inside the drawbar tube).
Most expedient way is to use a 4" grinder, with a thin (1mm) disc and cut the top off the two caps. Take you 15 seconds per cap. This will allow access to the M12 bolt. Use two 19mm sockets (on 3/8" or 1/2" ratchets - or a combination of both
) and undo as normal. You may need to 'assist' the bolt out by knocking it with a hammer and drift.
The damper will then push forward, once you've removed the bolt. This is normal. When you put the new head on you'll need to line this up (with a screwdriver or similar) and hold it in position, before pushing the rear retaining bolt through from the other side.
PS. You could always not remove the head..... and just drill right the way through the coupling head (and handle), where the original lock was and put a nice heavy, long shank padlock through it. You could get a lot of nice, heavy long shank padlocks for £80...