Order of line items created by API

An answer has been found for this as explained in this thread:

Basically there is a hubspot property for the order:

hs_position_on_quote