Covers all questions related to inventory management, order fulfillment, and shipping.
I am trying to partially fulfill a test order, but all the lines are being fulfilled. Am I doing something wrong?
I'm sending a post request to https://[site].myshopify.com/admin/api/2021-04/orders/[order number]/fulfillments.json
with a JSON of
{
"fulfillment": {
"location_id": [shop location id]
,"tracking_numbers": ["1Z6A3Y98030000ABCD"]
,"tracking_company": "UPS"
,"notify_customer": true
,"Line_items": [{"id": [line item id],"quantity": 0 },{"id": [line item id],"quantity": 1 },{"id": [line item id],"quantity": 1 }]
}
}
Thanks
George
Hi George,
you need to upgrade your code to use the new fulfillment api.. You might think that your code is using the 2021-04 api version but it isn't Shopify only maintains the api version going back a single year.. so in reality your calls are using the 2022-04 api.
Take a look at the documentation for 2023-04
https://shopify.dev/docs/api/admin-rest/2023-04/resources/fulfillment#post-fulfillments
Cheers,
Gary