USPS / api-examples

85 stars 18 forks source link

API v3 response format for tracking detail has suddenly changed #15

Open etelford opened 1 year ago

etelford commented 1 year ago

Overview

Using the v3 tracking API (/tracking/v3/tracking/{TrackingNumber}?expand=DETAIL) to get tracking history and details is suddenly returning differently formatted results than what is outlined in the README. This was not the case a couple of weeks ago.

The v1 API endpoint (/v1/tracking/{TrackingNumber}?expand=detail) still does return the JSON structure as defined in the README.

Steps to reproduce the behavior

  1. Grab an OAuth token using the v3 API
  2. Find a tracking number and make a GET request to /tracking/v3/tracking/{TrackingNumber}?expand=DETAIL
  3. See that results are formatted like this:
Screenshot 2023-08-05 at 12 56 42 PM

Additionally, as noted in the screenshot above, the eventTimestamp field for each trackingEvent is simply a time and does not include a date. That means that with this response structure, there is no context of any dates that each event took place on making using this not usable for detailed tracking,

Compare to API v1

  1. Grab an OAuth token using the v1 API
  2. Find a tracking number and make a GET request to /tracking/v1/tracking/{TrackingNumber}?expand=detail
  3. See that results are formatted as shown in the README:
Screenshot 2023-08-05 at 1 06 23 PM

Expected behavior

Responses for the v3 tracking detail API should produce JSON results formatted according to the response structure mentioned in the README.

kabutotx commented 1 year ago

Send to the apisupport@usps.gov email also.

etelford commented 1 year ago

Send to the apisupport@usps.gov email also.

I have sent a message to support.

Moscato00 commented 1 year ago

I have the same problem. Does the stuff reply to your message ? @etelford It will double the requests to get the exactly event time.

John-0927 commented 1 year ago

I had same issues and it's been like 2 months. Did they ever fix either the format or "eventTimeStamp" issue?

kabutotx commented 1 year ago

Still broke. I sent emails again. Never heard anything on my first ones.

kabutotx commented 1 year ago

Got reply to email they are going to try to fix tonight.

John-0927 commented 1 year ago

"Maintenance and Upgrades" updated 3 hours ago, but still not working. :(

kabutotx commented 1 year ago

I got an email this morning they are escalating the issue and should get with me in 48 hours. Will see.

npiasecki commented 1 year ago

I noticed this issue and also reported it but haven't received a response from the email address.

npiasecki commented 1 year ago

"The date/time stamp issue with the new API is a known issue and a fix is scheduled to be released next week (23rd)."

is what I got today after trying a different contact. Hopefully it's true!

npiasecki commented 1 year ago

They finally fixed this issue. Still trying to get them to fix https://github.com/USPS/api-examples/issues/17

image