4

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
  • 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. Oct 1, 2018 at 12:28

2 Answers 2

4

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"

1
0

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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.