Update tracking information not working since migration

The following code was working prior to migration and now I can’t update the fulfillment status or tracking information.

I really need to know what to replace it with because I have tried solutions but nothing works.

// Start the process
$location_id = 'LOCATION NUMBER';
$ordernumber = $row['shopifynumber'];
$trackingnumber = $row['trackingnumber'];
$tracking_company = $row['courier'];
$orderid = $row['referencenumber'];

$postTracking = 'https://MYURL.myshopify.com/admin/api/2020-10/orders/' . $ordernumber . '/fulfillments.json';

// Setup request to send json via POST
$data = array(
'location_id' => $location_id,
'tracking_number' => $trackingnumber,
'tracking_company' => $tracking_company,
'notify_customer' => true,
);

$payload = json_encode(array("fulfillment" => $data));

// Setup request to send json via POST
$session = curl_init();
curl_setopt($session, CURLOPT_URL, $postTracking);
curl_setopt($session, CURLOPT_POSTFIELDS, $payload);
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_HTTPHEADER, array(
'Accept: application/json',
'Content-Type: application/json',
));