0

I'm searching for Purchase Order endpoint in Magento 2 rest API here https://devdocs.magento.com/redoc/2.2/. it seems that it's not available. There's an order endpoint but I believe it's for the sales order.

Thanks!

1 Answer 1

0

This will depend on your version of Magento. Your link won't load for me; but if you really do need a purchase order REST API endpoint for 2.2, then you're out of luck. These endpoints weren't introduced until 2.4.x.

For 2.4.x, you'll want to visit this link, and search for purchase-order. That should at least get you started in the right direction.

3
  • Thanks, I saw some endpoints available for purchase-order but i can't see where i can get the list of all purchase-order. Oct 5, 2021 at 1:24
  • From what I can tell, Magento doesn't provide this functionality. If you open vendor/magento/module-purchase-order/etc/webapi.xml and review the endpoints configured here, you'll see that none of them appear to provide a list of all purchase orders. I think you'll need to build a custom endpoint, and the devdocs are not especially clear on how to do this. I would start with this tutorial and search for others to supplement whatever else you need to know: meetanshi.com/blog/create-custom-rest-api-in-magento-2.
    – kookaburra
    Oct 5, 2021 at 1:54
  • will try this one and keep you posted. Thanks! Oct 5, 2021 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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