Hi! i have this function on PHP
function fulfill_order_by_id($order_id,$tracking_number){
$url=shopi_api_url().‘orders/’.$order_id.‘/fulfillments.json’;
$client = new \GuzzleHttp\Client();
$response = $client->request(‘POST’, $url,[‘form_params’ => [
‘fulfillment’=> [
‘location_id’ =>‘63110676671’,
‘notify_customer’ => ‘true’,
‘tracking_company’ => ‘Other’,
‘tracking_url’ => ‘https://www.starken.cl/seguimiento’,
‘tracking_number’ => $tracking_number ]]]);
$json_body = json_decode($response->getBody(),true);
return $json_body;
}
and is giving me 404 error i try evertyng but nothing works and i dont find any info.
this is what i try now and save not exists
$fulfillment = $shopify->Fulfillment();
/*$fulfillment->update_tracking(, // Params
[“fulfillment” => [, “tracking_info” => [“company” => “Other”, */
$fulfillment->line_items_by_fulfillment_order = [
“location_id”=> “63110676671”,
“order_id”=> $order_id,
“notify_customer” => true
];
$fulfillment->tracking_info = [
“company” => “Other”,
“number” => $tracking_number,
“url” => “https://www.starken.cl/seguimiento”
];
echo"
“;";
print_r($fulfillment);
echo”
$fulfillment->save(
true, // Update Object
);