cancel
Showing results for 
Search instead for 
Did you mean: 

Custom prices vie REST API

Custom prices vie REST API

Hi guys,

 

I have to import old orders from another system so the customer can see their old orders listed on Magento (new system).

 

The problem is: We use a custom pricing algorithm, so basically, every order has it's own product prices.

 

As the Magento solution is being developed by another team, we would like to do as much as possible directly from our side trough the REST API.

 

Is there a way to send custom product prices per order/item via REST API?

 

Thank you

6 REPLIES

Re: Custom prices vie REST API

Hi @lucas_pickler knaul,

 

This questions is the same than https://community.magento.com/t5/Magento-2-x-Programming/Custom-shipping-price-trough-the-REST-API/m... , right?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Custom prices vie REST API

Hi Damian,

 

No,

 

The other is about shipping prices, this one is about order item product prices.

Re: Custom prices vie REST API

Hi @lucas_pickler knaul,

 

Take a look at https://devdocs.magento.com/swagger/#!/salesShipmentRepositoryV1/salesShipmentRepositoryV1SavePost

 

The anchors won't work so look for the method salesShipmentRepositoryV1 and the the POST method.

I didn't tried but maybe you can explore there?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Custom prices vie REST API

thank you,

 

I will give it a try, but do you know how can I have custom Order Item prices?

Re: Custom prices vie REST API

Hi @lucas_pickler knaul,

 

If you check the params you'll see you can send the price of the product.

I didn't tried but maybe you can use it and share the results.

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Custom prices vie REST API

I already tried to send the price parameter of the item on the item endpoint and it didn't work,

 

but I  will try it trough the shipment endpoint then and report back

 

Thank you