Hey @Ralph-HA ,
Happy I could help. I will try to answer your follow up questions as best that I can:
It sounds as if the order.line_items.total_discounts can not be populated via the Order API. Is that correct? If not, what is this field used for and how does it get populated? Again there is very little information in the documentation about this.
Yes, order.line_items.total_discounts can not be populated via the Order API. From my knowledge, this field is only ever populated from Shopify POS since this sales channel is capable of applying discounts specifically to line items in an order without the need to use a discount code (https://help.shopify.com/en/manual/sell-in-person/transactions/cart/discounts/line-item-pos-discount). I do agree however that our documentation could be better at explaining this.
Also, is there a way to display the line item discount on the Order admin?
Yes, but it depends on the type of discount applied. If the discount applied was intended to take money off of specific products/line items, the Shopify Web Admin will reflect that these line items were reduced from their original price. It would look like this:
However if the discount was applied to the whole order in general - even if in our internal API data models will calculate that overall discount split across the line items - our Shopify Web Admin will just show the discount taken off the total price and not demonstrate the line item discount. It would like this:
However in this case, if the merchant was really interested in seeing how Shopify split this overall discount was split against the line items, they could add the text “.json” to the end of the URL in their browser and see the API data model of this order.

