Hello,
I’m wondering is there anyway to create an Order using API and attribute the order to a particular location?
I tried to create a Draft Order and complete it. However it will be attributed to a default location.
Any help would be greatly appreciated!
Hi @jasontxf ,
Create a fulfillment service, then that service can move orders into a new location but only after it has accepted a fulfillment request.
Are you developing an app for a client or for your own shop?
Regards,
Sam - Owner / Lead Developer
Achieve Applabs
Hello,
Thanks for your reply.
The solution is to create a draft order, complete the draft order, find the fulfillmentOrder Id from order. Then move the fulfillmentOrder to a new location with the code below.
mutation fulfillmentOrderMove($id: ID!, $newLocationId: ID!) {
fulfillmentOrderMove(id: $id, newLocationId: $newLocationId) {
movedFulfillmentOrder {
id
}
originalFulfillmentOrder {
id
}
remainingFulfillmentOrder {
id
}
userErrors {
field
message
}
}
}
Hope that helps someone.
Cheers!