I'm trying to import orders via the REST API, and I would like them to be marked as "delivered." The orders are linked to a "company," which is, in turn, associated with a customer.
I've tried several methods, such as creating an order and then updating the fulfillment order object with a "shipment_status" of "delivered." However, the API responds that there is no location.
Then, I used the /fulfillment routes, and I can successfully add a tracking code, but I can't update the status. (By the way, I couldn't find any documentation regarding a possible PUT method, even though it's mentioned in this post: https://community.shopify.com/c/fulfillment-and-inventory/api-for-updating-the-delivery-status-of-an...
The ideal scenario would be to import orders directly with the correct status without having to manipulate other routes. Do you also think that the concept of "company" could potentially pose a problem? I've noticed that it's often less well-documented in the REST API compared to the GraphQL API.
Do you have any ideas?
The error message regarding no location likely means that a fulfillment location has not been assigned to the order. Each order should be associated with a location, which represents where the order is to be fulfilled from. This is usually either a merchant's location or a third-party location like a warehouse.
When creating an order, you should include the
location_id in your request body. This ID is a unique identifier for the location associated the order. You can retrieve a list of all locations associated with a shop by making a GET request to the
After the order is created, you can use the Fulfillment API to mark the order as delivered. The Fulfillment API allows you to create fulfillments for an order, which includes updating the shipment status.
When creating a fulfillment, you should specify the
tracking_numbers with the tracking numbers for the order, and
tracking_urls with the corresponding URLs where the tracking number can be used to track the shipment. The
location_id should also be included in the fulfillment creation request.
I hope this helps!
Hello, thank you very much, your solution works. I hadn't understood the nuance of the location_id, which I thought was the customer's address, not our warehouse's.
Thank you very much,