No action in fulfill order in rest API

Shopify Partner
1 0 0


I am trying to fulfill my order by admin rest API, An it shows error when some parameter missing like location_id required etc, But when adding complete code, There is no response.
Here is my code.



$fulfill_data_new_1 = array(
                                     "fulfillment" => array(
                                     "message" => "The package was shipped.",
                                     "notify_customer" => false,
                                     "tracking_info" => array(
                                     "number" => "123456TN",
                                    "company" => "ABC"


$SHOPIFY_API = "https://$apiKey:$adminToken@$storeName/admin/api/2021-07/orders/".$order->shopify_id."/fulfillments.json";

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $SHOPIFY_API);
$headers = array(
"Authorization: Basic ".base64_encode("$apiKey:$adminToken"),
"Content-Type: application/json",
"charset: utf-8"
curl_setopt($curl, CURLOPT_HTTPHEADER,$headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_VERBOSE, 0);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($fulfill_data_new_1));
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
$response = curl_exec ($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
echo $httpCode;

Error code is 404,
Please let me know if anything wrong here.


Reply 1 (1)

Shopify Staff
70 10 22

You are calling an API that has been deprecated and removed.  The migration guide is here:

To learn more visit the Shopify Help Center or the Community Blog.