Line items are assigned numeric IDs, but line item metadata is not exposed in the API at that level of detail because there is no requirement to address them individually. An export can be configured to provide line item names, which are unique within the scope of each module.
What you have outlined is exactly how i have done it however the challenge i am facing is some of the line item names are bigger than 60 char which is prohibiting me for using these as codes when bringing back into my anaplan model .
Bit of a background i have written up a python script which collects line item level information from various models (exporting grid -line items ) DEV , UAT , Prod and brings into another anaplan model on a routine bases . My client uses this to perform some analytics in-terms of how each model is growing space wise and some other KPI's .
Challenge i am facing is a line one i highlighted above + line item name will be same in let say DEV and prod . Also cases like what if line item name was updated ? . Therefore i was hoping to get some uniqueness