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.
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/… Commented 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>