Hello,
We are a logistics company and some of our clients use Shopify.
We manage the connection between our systems and Shopify using custom apps, so all the code is really in our systems.
The Rest API is used for this and I have found out that the /orders/fulfillments endpoints will no longer work on april of this year (2023).
We are having problems splitting fulfillments.
In our orders, some items might be out of stock partially.
E.g. you might have an order for 4 items A and 10 items B but you only have 6 items B.
So what we do is “split the fulfillment”:
-
we cancell the original fulfillment
-
we create 2 fulfillments, 1 for 4 items A and 6 items B, and 1 for 4 items B
We changed the endpoints to create the fulfillments, but no matter what line items we send, the fulfillment is always created for all the items on the order.
{
"fulfillment": {
"order_id": xxx,
"location_id": xxx,
"status": "open",
"notify_customer": false,
"line_items_by_fulfillment_order": [{
"fulfillment_order_id": xxx,
"fulfillment_order_line_item": [{
"id": xxx,
"quantity": 4
}, {
"id": xxx,
"quantity": 6
}]
}]
}
}
this call creates a fulfillment for all items (not just 4 and 6)
{
"fulfillment": {
"order_id": xxx,
"location_id": xxx,
"status": "open",
"notify_customer": false,
"line_items_by_fulfillment_order": [{
"fulfillment_order_id": xxx,
"fulfillment_order_line_item": [{
"id": xxx,
"quantity": 4
}]
}]
}
}
this calls fails with error
{
"errors": ["Fulfillment order xxx has an unfulfillable status= closed."]
}
Tu sum this up: I need to split the order items into 2 fulfillments (or fulfillment orders), both for the same locations but different items, any help?
Thanks in advance.