cancel
Showing results for 
Search instead for 
Did you mean: 

API: Add product with custom price

API: Add product with custom price

Hello folks,

 

i'm currently call API "POST - /rest/V1/carts/mine/items" for add product to my current cart.

 

It's possible to set a custom price for the item via this API (or other API)?

 

Tnx

3 REPLIES 3

Re: API: Add product with custom price

Hello manueldistefano,

There is any option to set the custom price for the cart item. You have to create your own api. But the same thing can achieve via coupon code as I understood you want to add the item to cart with the custom price that means you need some discount. So you can apply the coupon at checkout. There is default api for the apply coupon code.

If you have your own requirement then explain a little bit so that we will try to give a perfect solution.

Re: API: Add product with custom price

Hello ipragmatech,

 

by default some of my products have price set to 0. I need that because the real value of the products it sended to me via API (add item to cart). 

 

At the moment i'm using an observer on "sales_quote_product_after". I just asking myself if there is a way to set price via api. If it's not possible i'm ok with the obs

Re: API: Add product with custom price

How are you getting the observer to fire when using the Rest API?  I can't get it to fire and the code never dispatches the event.  Any help would be appreciated.