Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Empty Values for Tracking Event Postal Code #6

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

ericcholis
Copy link
Contributor

Tracking Event Postal Code does not support empty values. Sample valid Tracking Event for the UPS Tracking Number 1Z1E21800376693932

{
      "occurred_at": "2020-09-15T20:55:13Z",
      "carrier_occurred_at": "2020-09-15T20:55:13",
      "description": "Destination Scan",
      "city_locality": "Buffalo",
      "state_province": "NY",
      "postal_code": "",
      "country_code": "US",
      "company_name": null,
      "signer": "",
      "event_code": "I",
      "latitude": 42.7898,
      "longitude": -78.8226
 }

Tracking Event Postal Code does not support empty values.
@JamesMessinger
Copy link
Contributor

Good catch. Thanks @ericcholis!

@JamesMessinger JamesMessinger merged commit 0c740e4 into ShipEngine:master Sep 17, 2020
@ericcholis
Copy link
Contributor Author

@JamesMessinger It looks like there are some other edge cases for tracking events. state_province can be empty as well as some other fields. Here's a full example that is bringing these errors up

{
  "tracking_number": "1Z1E21800376693932",
  "status_code": "DE",
  "status_description": "Delivered",
  "carrier_status_code": "D",
  "carrier_status_description": "Delivered",
  "ship_date": "2020-09-15T07:00:00Z",
  "estimated_delivery_date": "2020-09-16T07:00:00Z",
  "actual_delivery_date": "2020-09-17T00:04:32Z",
  "exception_description": null,
  "events": [
    {
      "occurred_at": "2020-09-16T17:04:32Z",
      "carrier_occurred_at": "2020-09-16T17:04:32",
      "description": "Delivered",
      "city_locality": "BUFFALO",
      "state_province": "NY",
      "postal_code": "14223",
      "country_code": "US",
      "company_name": null,
      "signer": "DRIVER RELEASE",
      "event_code": "D",
      "latitude": 42.7898,
      "longitude": -78.8226
    },
    {
      "occurred_at": "2020-09-16T09:09:50Z",
      "carrier_occurred_at": "2020-09-16T09:09:50",
      "description": "Out For Delivery Today",
      "city_locality": "Buffalo",
      "state_province": "NY",
      "postal_code": "",
      "country_code": "US",
      "company_name": null,
      "signer": "",
      "event_code": "I",
      "latitude": 42.7898,
      "longitude": -78.8226
    },
    {
      "occurred_at": "2020-09-16T02:12:28Z",
      "carrier_occurred_at": "2020-09-16T02:12:28",
      "description": "Loaded on Delivery Vehicle",
      "city_locality": "Buffalo",
      "state_province": "NY",
      "postal_code": "",
      "country_code": "US",
      "company_name": null,
      "signer": "",
      "event_code": "I",
      "latitude": 42.7898,
      "longitude": -78.8226
    },
    {
      "occurred_at": "2020-09-15T20:55:13Z",
      "carrier_occurred_at": "2020-09-15T20:55:13",
      "description": "Destination Scan",
      "city_locality": "Buffalo",
      "state_province": "NY",
      "postal_code": "",
      "country_code": "US",
      "company_name": null,
      "signer": "",
      "event_code": "I",
      "latitude": 42.7898,
      "longitude": -78.8226
    },
    {
      "occurred_at": "2020-09-15T18:19:06Z",
      "carrier_occurred_at": "2020-09-15T18:19:06",
      "description": "Order Processed: Ready for UPS",
      "city_locality": "",
      "state_province": "",
      "postal_code": "",
      "country_code": "US",
      "company_name": null,
      "signer": "",
      "event_code": "M",
      "latitude": null,
      "longitude": null
    }
  ]
}

@JamesMessinger
Copy link
Contributor

Thanks for pointing these out, @ericcholis!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants