I'm trying to post to the Fulfillment API to fulfill line items on an order using following code:
$config = array(
'ShopUrl' => 'XXXX.myshopify.com',
'AccessToken' => 'myAccessToken'
$shopify = new ShopifySDK($config);
$orderID = 111111111111;
$line_items = array();
$line_items = array("id" => 22222222222222);
$data = array(
"location_id" => "33333333",
"tracking_number" => null,
"status" => "open",
"line_items" => $line_items
$fulfillmentData = $shopify->Order($orderID)->Fulfillment->post($data);
However I'm getting response "Request failed with HTTP Code 404" back from the API. I've verified OrderID, LocationId & LineItemId they are correct (using dummy data in this post)
I've tried it with tracking_number: null, and also with no tracking number at all, but it's always the same: 404.
It was working up until a few days ago.
I can't figure out why it stopped working. I hope someone can help.
Hey @MikeMeshkati - thanks for getting in touch. Could you share an X-Request-ID that would have been sent out in the response headers for your API Call? There could be a few reasons why we might expect a 404 error here and having that ID would help us narrow down what could have happened in this specific case.
Hope to hear from you soon - happy to dig into this with you.
Hey Mike - no worries. I was able to do a little bit of digging on my end and based on the logs associated with that X-Request ID you shared the endpoint that was called was :"/admin/api/2022-07/orders/[ordernumber]/fulfillment.json"
Could you try using fulfillments.json instead of fulfillment.json as the endpoint and let us know if that works? This is the only reason why I could think you'd receive a 400 error on this as the rest of your info appears to be correct.
Hope this helps - as always let us know if we can clarify anything further on our end. Cheers!
I tried https://mystore.myshopify.com/admin/api/2022-07/orders/XXXXXXXXX/fulfillments.json as you suggested. It still gives 404 Error. Here is the X-Request-ID: 7249f8cc-5588-4883-bafb-98349d6aa324 from this call.
Hope to hear from you soon.
Hope you doing well!
I getting the same error 404
Hi @Alan I do encounter the same issue.
Getting 404 errors . Used to work all year long until a couple of days ago.
Here is what I submit:
Any update regarding a solution?
Thank you very much.
I tried https://mystore.myshopify.com/admin/api/2022-04/orders/XXXXXXXXX/fulfillments.json with
"notify_customer" : false,
It worked but with 2022-04 API version but when I tried the same thing with 2022-07 API version, it didn't work and returned 404 Status code.
Here is the x-request-id: b4aa6fd2-ab9b-455f-a9d6-213fdd06b1f3 from 2022-07 api version call.
Looking forward for your reply.
Same issue for here, we are not able to create the fulfill for the order and everything was working fine until 2 months ago
having the same issue,
tried all api versions 2022/07 and above
it is becoming kinda urgent as we received an email from shopify saying that api version must be updated until April
hm I am using POST /admin/api/2022-07/fulfillments.json but it doesnt work and returns 404 error,
maybe I need to create a new topic if it is not related to this post