Finalize orders using API

Hi

We build a WMS system… and some of our customers import orders from Shopify into our system.

They ask of us to build in the possibility that we can complete the order from our system using the API. Which means… close the order… capture payment and send email to customer with tracking etc.

In other shop systems there is a workflow for this who can be activated using the API. Are there a similar function for this in Shopify, or do we need to do this in several steps (fulfill the order, capture money, change order status, send mail etc.)?

Hi @HansPoulsen - thanks for getting in touch, this is a great question. I was able to look into this on our end here and it doesn’t look like we have a method to “finalize” orders through our REST Admin API, but there are ways you could streamline the process using our GraphQL API to potentially automate sequential mutations within one API call to cut down on having to do this in multiple steps.

For example you could use our orderCapture mutation in GraphQL and then use the orderClose mutation to trigger a relevant order to capture payment and then close the order before it’s imported to your WMS all in one API call. At the moment you are correct that these would still be considered as separate “steps”, but we don’t prevent multiple mutations being run in a single call, so this could be a potential way to reduce the segmentation of each step.

Hope this provided some next steps and some insight - I’m also going to forward along some feedback to our developers so they can take a look at potentially creating a mutation that allows you to finalize orders in a more efficient way. Can’t guarantee anything on that front, but I’ll send a note up a little later today - thanks for bringing this up to us, it’s really appreciated!

Cheers.