Unable to solve {“errors”:{“fulfillment”:“Required parameter missing or invalid”}} with the API https://shopify.dev/docs/api/admin-rest/2024-07/resources/assignedfulfillmentorder
I am passing the fullfilment id and not order Id
My curl request
$data = array(
[“fulfillment” =>
[“notify_customer” => true, “tracking_info” =>
[“company” => “UPS”, “number” => “1Z001985YW99744790”]]]
);
$postdata = json_encode($data);
$channelUrl = “https://” . $api_key . “:” . $api_password . [email removed] . $shopifyUsername . “.myshopify.com/admin/api/2024-07/fulfillments/”.$_fulfillmentId.“/update_tracking.json”;
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $channelUrl,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 100,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “POST”,
CURLOPT_POSTFIELDS => $postdata,
CURLOPT_HTTPHEADER => array(
“Content-Type: application/json”,
),
));
$response = curl_exec($curl);
$jsonDecode = json_decode($response, true);
$err = curl_error($curl);
curl_close($curl);