question

packlinkstore2 avatar image
0 Likes"
packlinkstore2 asked

Multiple tracking numbers in the same shipment

Hi, I want to add 3 different tracking numbers for the same order. I do this by using the **CompleteSaleCall** with the java sdk (trading api). I set the **completeSaleCall.Shipment.ShipmentTrackingDetails** with a list of **ShipmentTrackingDetailsType** elements, each of which have the **ShipmentTrackingNumber** and the **ShippingCarrierUsed** set. The code looks like this: { CompleteSaleCall completeSaleCall = new CompleteSaleCall(); ShipmentTrackingDetailsType[] details = prepareTrackingIds(trackingIds, carrier); ShipmentType shipmentType = new ShipmentType(); shipmentType.setShipmentTrackingDetails(details); shipmentType.setShippedTime(Calendar.getInstance()); shipmentType.setNotes(service); completeSaleCall.setOrderID(orderId); completeSaleCall.setShipped(true); completeSaleCall.setShipment(shipmentType); // make the call ... } ... private ShipmentTrackingDetailsType[] prepareTrackingIds (List trackingIds, String carrier) { return trackingIds.stream().map( track -> { ShipmentTrackingDetailsType trackingType = new ShipmentTrackingDetailsType(); trackingType.setShipmentTrackingNumber(track); trackingType.setShippingCarrierUsed(carrier); return trackingType; } ).collect(Collectors.toList()).toArray(new ShipmentTrackingDetailsType[trackingIds.size()]); } The call is successful but in ebay.com I only see the first tracking number I sent, and the other two appear nowhere. Am I doing something wrong in the call? Or the api doesn't support this scenario? Thanks in advance
tracking-numbers
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.

1 Answer

· Write an Answer
packlinkstore2 avatar image
0 Likes"
packlinkstore2 answered
Hi, For anyone with the same problem, the issue is with the spanish site. My code is correct, but if the site in the ApiContext is Spain (id: 186), that's when only the first tracking id is 'taken'. If the site is any other country, then all works out correctly. From what ebay has told me, the problem is that currently the only support 1 tracking number in the spanish site (obviously). I'm waiting to see if they can provide a solution for this. Cheers
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.