When I create an order through the REST_API I’d like to specify where the order is meant to be fulfilled. I thought creating pending fulfillments in the order would achieve this and in a way it did, however it also fulfilled the order which I don’t want.
"order":
{
"email":"example@example.ca",
"phone":"1-999-999-9999",
"inventory_behaviour": "decrement_obeying_policy",
"fulfillments":[
{
"location_id":71703036117,
"assigned_location_id":71703036117,
"fulfillment_status":null,
"status":"pending",
"request_status":"submitted",
"line_items":[
{
"variant_id":43775418335445,
"quantity":1,
"assigned_location_id":71703036117,
"fulfillment_status":null,
"status":"pending",
"fulfillable_quantity":1
}
]
}
],
"line_items":[
{
"variant_id":43775418335445,
"quantity":1,
"assigned_location_id":71703036117,
"origin_location":71703036117,
"location_id":71703036117,
"fulfillment_status":null,
"status":"pending",
"fulfillable_quantity":1
}
],
"fulfillment_status":null,
"financial_status":"paid",
"status":"pending",
"metafields":[
{"key":"readyTime","value":"2023-03-13T15:10:50+0000","type":"date_time","namespace":"text"},
{"key":"orderId","value":"text","type":"single_line_text_field","namespace":"text"}
],
"assigned_location_id":71703036117
}
As you can see I’ve tried setting location and status every way that I can think and the only thing that has any effect is the fulfillments but the moment I add it the order auto fulfills on creation. If anyone has any suggestions they would be much appreciated.