After order is placed i am getting order_id and how can i get invoice of placed order (or) invoice_id after order is placed using Magento REST API.
-
does not find any api like this require. May you need to create custom API.SEE devdocs.magento.com/swagger/#– Amit Bera ♦Oct 1, 2018 at 11:37
-
@Lavaraju Please check the answer, and let me know if you have any query.– Aditya ShahOct 1, 2018 at 12:28
2 Answers
You can use the searchCriteria to get all invoices for this placed order
Please try this endpoint
let us say that the order id = 20
Method = "GET"
EndPoint = "/V1/invoices?searchCriteria[filter_groups][0][filters][0][field]=order_id&searchCriteria[filter_groups][0][filters][0][value]=20&searchCriteria[filter_groups][0][filters][0][condition_type]=eq"
-
@WISAM, please check once the following magento.stackexchange.com/questions/247617/… Nov 1, 2018 at 5:08
You can get invoice by using
invoice_id
REST API
http://magento.host/rest/default/V1/invoices/{invoice_id}
method GET
Authorization Bearer <admin token>