question

lisatak avatar image
lisatak asked David Marginian Deactivated commented

Accessing a line item with a line item id

Is there a way to get the price of a line item through using the lineItemId? The only way I see for accessing a line item is through getting the whole list of line items for an order and using the line item's index number. However, I want to be able to access a specific line item without having to know what index number it is at.

OrdersLineItems
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

It is unclear what APIs you are using and how you are integrating. You certainly do not want to be using the line item's index, if you need to match you should be using the id/uuid.

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

lisatak avatar image lisatak commented ·
I'm building with android, using the OrderV31Connector. There is no method to retrieve a single line item with the line item id.
0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ lisatak commented ·
If you have the id, you can rip through the order's line item and match via id, why would you try to use the "index"? What exactly are you trying to accomplish?
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community