We want to solve the following problem:
Our fulfillment service is providing us the tracking data for Cash on Delivery Orders after the order status was set to fulfilled in shopify (due to automatic processes within our ERP Tool).
That's why we want to:
A: Edit the order after that and add the tracking data
B: Resend the delivery confirmation to the customer
We were thinking of fetching the orders via API - edit the orders and push it back to shopify.
What is the right way to do this?
If the order is being marked as fulfilled automatically, this means a fulfillment is being created for the order so you can use the update_tracking call to add that information. This call will let you add a tracking number and trigger another shipping confirmation. You'll need the fulfillment ID before adding tracking, you can get this by querying the order first or subscribing to the fulfillment#create webhook.