0

Can magento do processing and changing the order status over api?

We're planning to do drop-shipping for another webshop, running magento. We're supposed to get the orders by pulling from the API (possible). But it does not seem possible to tell the magento shop that the order have been processed and the payment can now be drawn from the credit card, let alone know if the payment have failed, so the order should not be sent. (We have the rule in our country that we can not get the money before we are shipping the order).

Am I missing something; I can't see anything in the api documentation.

1 Answer 1

0

As far as I'm aware, the only way to change the order status is to ship an item for an order (e.g. creating a shipment) via /V1/order/{orderId}/ship (http://devdocs.magento.com/swagger/index_20.html#!/salesShipOrderV1/salesShipOrderV1ExecutePost). Once all items are shipped, the order will change its status to "shipped".

You can filter the API call /V1/invoices ( http://devdocs.magento.com/swagger/index_20.html#!/salesInvoiceRepositoryV1/salesInvoiceRepositoryV1GetListGet ) for orderId of the order you're fulfilling and then call /V1/invoices/:id/capture (http://devdocs.magento.com/swagger/index_20.html#!/salesInvoiceManagementV1/salesInvoiceManagementV1SetCapturePost) to capture the payment.

1
  • How to add sipping address field in object json ? Jun 23, 2018 at 12:43

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.