# Question about the relationship between the three lists “line\_items”, “taxes”, and “discounts” in “order”

**URL:** <https://developer.squareup.com/forums/t/question-about-the-relationship-between-the-three-lists-line-items-taxes-and-discounts-in-order/20068>\
**Category:** Questions\
**Tags:** orders-api\
**Created:** [December 12, 2024, 12:08pm UTC](https://developer.squareup.com/forums/t/question-about-the-relationship-between-the-three-lists-line-items-taxes-and-discounts-in-order/20068 "2024-12-12T12:08:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bc\_u](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@bc\_u](https://developer.squareup.com/forums/u/bc_u)\
**Post date:** [December 12, 2024, 12:08pm UTC](https://developer.squareup.com/forums/t/question-about-the-relationship-between-the-three-lists-line-items-taxes-and-discounts-in-order/20068/1 "2024-12-12T12:08:41Z")

</div>

I have a question about the relationship between the three lists “line\_items”, “taxes” and “discounts” in “order”:

> [https://developer.squareup.com/reference/square/orders-api/retrieve-order](https://developer.squareup.com/reference/square/orders-api/retrieve-order)

It seems that each object (line\_item) in line\_items is connected to objects in taxes and discounts by “uid”,  
However, this “uid” is clearly marked as BETA version, so I’m not sure about using it.  
I would like to ask some questions,  
1: Is there any possibility that this “uid” will be discontinued in the near future?  
2: Is there any way to associate the three listings without using the “uid”?  
In short, we want to be able to search.

The “line\_items” also includes lists such as “applied\_taxes” and “applied\_discounts”, but I am hesitant to use them because they are also BETA.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [December 12, 2024, 12:09pm UTC](https://developer.squareup.com/forums/t/question-about-the-relationship-between-the-three-lists-line-items-taxes-and-discounts-in-order/20068/2 "2024-12-12T12:09:03Z")

</div>

👋 I’m Square Dev AI, here to help answer your question!  
Based on the information you’ve provided, the following documentation will help answer your question:

> **[Apply Taxes, Discounts, and Service Charges](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts)**
>
> Learn how to apply taxes and discount to an order's price calculation when using the Square Orders API.

> **[Orders API: How It Works](https://developer.squareup.com/docs/orders-api/how-it-works)**
>
> Learn how the Orders API processes and returns information about purchase transactions.

> **Additional Documentation**
>
> [Orders API](https://developer.squareup.com/docs/orders-api/what-it-does)  
> [Apply Square-Defined Discounts to Orders](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-discounts)  
> [Apply Catalog Taxes to Orders](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.  
Otherwise one of our Developer Advocates will provide additional assistance shortly.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [December 12, 2024, 5:33pm UTC](https://developer.squareup.com/forums/t/question-about-the-relationship-between-the-three-lists-line-items-taxes-and-discounts-in-order/20068/3 "2024-12-12T17:33:22Z")

</div>

The “uid” field in the Order object is used to uniquely identify each line item, tax, and discount within an order. It is currently in Beta, which means it is subject to change, but there is no indication that it will be discontinued in the near future.

If you want to associate line items with taxes and discounts without using the “uid”, you could potentially use other attributes of these objects, but it would likely be more complex and less reliable. The “uid” is designed specifically for this purpose.

The “applied\_taxes” and “applied\_discounts” fields within the “line\_items” object are also in Beta, but they provide a direct way to associate taxes and discounts with specific line items.

While these features are in Beta, they are generally stable and usable. However, you should monitor Square’s developer updates for any changes to these fields.

_This answer was reviewed by @Bryan-Square._
