What's the requirement to DIY PD aware USB connector?
As PlasmaHH says, the needed info is indeed in the USB3.1 specifications.
A quick scan of USB_PD_R2_0 V1.1 - 20150507.pdf seems to indicate that getting 12Volts requires an intelligent charger.  The specifications call for only allowing 12V after negotiation over the data bus.

To get that PDF, you have to down load a 54MB zip file from here   Once you unpack it, you get a big pile of PDFs, including USB_PD_R2_0 V1.1

Section 3.4 describes the various ways the cable can identify itself, and section 6.4.2 mentions the messages needed to request 12V.