1) nRF51 IC revision, RAM size and Flash size can be retrieved by calling the nrf_ic_info_get function in the ic_info library in nRF51 SDK 8.1.0+
2) Packet variant and build code can be read from markings on top of the nRF51 IC.
3) The x in the build code could be A..Z for engineering release, or 0..9 for production release. (HWID is given for x = 0, if X ≠ 0 the HWID will be different).