I want to partially update the tracking for an order, for example, an order has 3 items. I want to update each of them to have 1 tracking(total 3). How can I do that? I used the create fulfillment api with 1 item line 3 times with 3 different tracking. But on my order, I only see 1 tracking(the last tracking from the update).
Below is my code.
$line_items = []; foreach (json_decode($ebay_order->item_info) as $item) { $temp = []; $temp['lineItemId'] = trim(explode('-', $item->sku)[0]); $temp['quantity'] = $item->amount; $line_items[] = $temp; } $params = [ 'trackingNumber' => $track_number, 'shippingCarrierCode' => $carrier_code, 'lineItems' => $line_items, ]; $header = [ 'Authorization: Bearer ' . $access_token, 'Content-Type: application/json', 'Accept: application/json', 'X-EBAY-C-MARKETPLACE-ID: EBAY_US', ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING , ''); $result = curl_exec($ch);
Any help will be appreciated.