After asking a similar question on the autodesk forums, I have found that I can use Extended Data to add my numeric ID.
Extended Data is appended at the end of the entity and in my case I will solve it by appending the following:
1001
MYAPP
1002
{
1070
12
1002
}
- Where 1001 marks the start of extended data
- 1002 marks the beginning end end of list
- 1070 is a 16-bit integer
It's also possible to add extended data from Autocad software using the command _xdata