0

On the documentation https://developer.ups.com/api/reference?loc=en_US#operation/getSingleTrackResponseUsingGET

We can have the postalCode and Weight in the response, but when I try with API of UPS, there aren't.

curl -i -X GET \
  'https://onlinetools.ups.com/api/track/v1/details/1Z0088XW0360412370?locale=en_US&returnSignature=true' \
  -H 'Authorization: Bearer ......' \
  -H 'Content-Type: application/json' \
  -H 'transId: test123' \
  -H 'transactionSrc: prod'

I have this response:

{"trackResponse":{"shipment":[{"inquiryNumber":"1Z0088XW0360412370","package":[{"trackingNumber":"1Z0088XW0360412370","deliveryDate":[{"type":"DEL","date":"20230405"}],"deliveryTime":{"type":"DEL","endTime":"113010"},"activity":[{"location":{"address":{"city":"NORTH HIGHLANDS","stateProvince":"CA","countryCode":"US","country":"US"},"slic":"9581"},"status":{"type":"D","description":"DELIVERED ","code":"9E","statusCode":"011"},"date":"20230405","time":"113010"},{"location":{"address":{"city":"West Sacramento","stateProvince":"CA","countryCode":"US","country":"US"},"slic":"9581"},"status":{"type":"I","description":"Out For Delivery Today","code":"OT","statusCode":"021"},"date":"20230405","time":"092430"},{"location":{"address":{"city":"West Sacramento","stateProvince":"CA","countryCode":"US","country":"US"},"slic":"9589"},"status":{"type":"I","description":"Processing at UPS Facility","code":"YP","statusCode":"071"},"date":"20230405","time":"043623"},{"location":{"address":{"city":"West Sacramento","stateProvince":"CA","countryCode":"US","country":"US"},"slic":"8959"},"status":{"type":"I","description":"Arrived at Facility","code":"AR","statusCode":"005"},"date":"20230405","time":"021100"},{"location":{"address":{"city":"Sparks","stateProvince":"NV","countryCode":"US","country":"US"},"slic":"8959"},"status":{"type":"I","description":"Departed from Facility","code":"DP","statusCode":"005"},"date":"20230404","time":"235100"},{"location":{"address":{"city":"Sparks","stateProvince":"NV","countryCode":"US","country":"US"},"slic":"8959"},"status":{"type":"I","description":"Origin Scan","code":"OR","statusCode":"005"},"date":"20230404","time":"204555"},{"location":{"address":{"countryCode":"US","country":"US"}},"status":{"type":"M","description":"Shipper created a label, UPS has not received the package yet. ","code":"MP","statusCode":"003"},"date":"20230405","time":"022029"}],"currentStatus":{"description":"Delivered","code":"011"},"packageAddress":[{"type":"ORIGIN","address":{"city":"SPARKS","stateProvince":"NV","countryCode":"US","country":"US"}},{"type":"DESTINATION","address":{"city":"NORTH HIGHLANDS","stateProvince":"CA","countryCode":"US","country":"US"}}],"service":{"code":"518","levelCode":"003","description":"UPS Ground"},"packageCount":6}]}]}}

I need the postalcode of destination and the weight of package like the documentation, but there aren't in the response.

Do you know why? Have I missed some parameters?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
binbin
  • 131
  • 1
  • 11
  • I have this same issue with the new UPS Tracking API (REST/JSON). Some of the details, like package weight and Origin/Destination address details - I appreciated from the UPS Tracking Web Services API (SOAP/XML), are now missing from the new API or are documented in the new API but not returned in the response. I suggest editing the *response* above to remove all the stuff not related to your question. – gridtrak Aug 01 '23 at 17:46

1 Answers1

0

This isn't really helpful to fix the problem, but I contacted support from UPS on the weight missing from the API responses and they sent me this reply:

Thank you for your response. At this time not all options available within the OAuth Tracking API to show information. In future enhancements the information will be available.

So they don't have all the fields implemented yet.

bguebert
  • 9
  • 3