question

dzyc81 avatar image
1 Like"
dzyc81 asked ·

Partial update tracking for fulfillment

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.

fullfillment api
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered ·

Hi @dzyc81,

1. You can use our fulfillment API for your use case. Please take a overview of the API by going through the link given below:

Ref:
https://developer.ebay.com/api-docs/sell/fulfillment/overview.html
https://developer.ebay.com/api-docs/sell/static/orders/handling-orders.html

2. To update the information like tracking number, shipping service and shipped date for a order, you use CreateShippingFulfillment call of fulfillment API.

Ref: https://developer.ebay.com/api-docs/sell/fulfillment/resources/order/shipping_fulfillment/methods/createShippingFulfillment

Best regards ,
eBay Developer Support

· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi, the createShippingFulfillment API doesn't seem to support 1 order with multiple tracking number. Can you give me a specific answer on how to update multiple tracking into 1 order? For example, an order with 3 phones. I want to ship them with 3 shipping labels. How can I update 3 tracking to the order?

0 Likes 0 ·
sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered ·

Hi @dzyc81,

You can not add multiple tracking number to a line item of a order from the API. You can perform such task from eBay UI.

On eBay UI when you print the label for the a package, the next screen has a link for "Print another label for this order" which brings up a new label preparation page where you can adjust the package weight, dimensions, etc. as needed before purchasing the second label, and so on.

Best regards ,
eBay Developer Support

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.