# How to PATCH a line item?

**URL:** <https://community.hubspot.com/t/how-to-patch-a-line-item/102176>\
**Category:** APIs & Integrations\
**Tags:** python, object, starter\
**Created:** [March 11, 2024, 5:54am UTC](https://community.hubspot.com/t/how-to-patch-a-line-item/102176 "2024-03-11T05:54:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![G\_Gorgiladze](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/g_gorgiladze/32/12622_2.png) [@G\_Gorgiladze](https://community.hubspot.com/u/G_Gorgiladze)\
**Post date:** [March 11, 2024, 5:54am UTC](https://community.hubspot.com/t/how-to-patch-a-line-item/102176/1 "2024-03-11T05:54:53Z")

</div>

Hello everyone,  
I’m writing a code that will check and update a “price” value of an existing line item based on an according product’s price (f.e.: if product’s price was changed after creation of a line item, or some error ocured while creating it, and etc.). To do this, I’m sending a PATCH reqiest (with a JSON body contayning a new price) to the url:  
[https://api.hubapi.com/crm/v3/objects/line\_items/{line\_item\_id](https://api.hubapi.com/crm/v3/objects/line_items/%7Bline_item_id)}  
But, unfortunately it doesn’t have any effect - despite getting 200 response, after running a GET request the “price” value still remains unchanged.  
Can anyone help me to figure out the reason?  
Thank you all in advance for your help.  
P.S. - while I’m at it, might as well ask - how can i check whether a discount was applied to the deal using api, as this information doesn’t appear in a simple GET response?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [March 12, 2024, 6:16pm UTC](https://community.hubspot.com/t/how-to-patch-a-line-item/102176/2 "2024-03-12T18:16:04Z")

</div>

Hey, [@G\_Gorgiladze](https://community.hubspot.com/t5/user/viewprofilepage/user-id/723475) 👋 Thank for your question. I hope you got this resolved, but if not, here’s an example I made of updating the price of a line item via our API.

Steps:

- I created a new Line Item and associated it to an existing deal  
Request

 ![CleanShot 2024-03-12 at 10.58.31.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/7/07af843c07911c35a6b64212ff67e36bb7556f1c.png)

- I made a Patch request to update the price  
Request

 ![CleanShot 2024-03-12 at 11.00.48.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/f/9fc93b2ab6d2c149b8cc9c645719d019f05431d3.png)

- Verified the price change via a Get request (to be thorough)  
Request
