cancel
Showing results for 
Search instead for 
Did you mean: 

How can i cancel an order of a customer and reorder in Magento2 using REST API

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

How can i cancel an order of a customer and reorder in Magento2 using REST API

which end point should i use to cancel and reorder the user orders in magento 2. i tried like this. help meScreen Shot 2018-09-20 at 2.50.10 PM.png

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How can i cancel an order of a customer and reorder in Magento2 using REST API

@pratap_penmetsa

 

Change Type to POST instead of GET. It will work

Magento REST API documentation.png

Manish Mittal
https://www.manishmittal.com/

View solution in original post

5 REPLIES 5

Re: How can i cancel an order of a customer and reorder in Magento2 using REST API

Hello @pratap_penmetsa

 

You can use predefined endpoint: http://www.example.com/rest/V1/orders/Smiley Surprisedrderid/cancel to cancel order.

 

Please check your URL once.

Manish Mittal
https://www.manishmittal.com/

Re: How can i cancel an order of a customer and reorder in Magento2 using REST API

what parameters should i pass in headers and should i pass an body

 

Re: How can i cancel an order of a customer and reorder in Magento2 using REST API

@pratap_penmetsa

 

Please pass below mentioned param:

 

[{"key":"Authorization","value":"Bearer lljno83kuf9rgy0t3wxl1aj8huxb4bn",},{"key":"Content-Type","value":"application/json","description":""}]

 

In Get method you cannot pass body.

 

Just pass order id in URL.

Manish Mittal
https://www.manishmittal.com/

Re: How can i cancel an order of a customer and reorder in Magento2 using REST API

@pratap_penmetsa

 

Change Type to POST instead of GET. It will work

Magento REST API documentation.png

Manish Mittal
https://www.manishmittal.com/

Re: How can i cancel an order of a customer and reorder in Magento2 using REST API

How can i reorder using the REST API