lat9 / usps

USPS shipping module for Zen Cart
Other
1 stars 3 forks source link

Support "USPS Ground Advantage" and "HAZMAT" changes #38

Closed lat9 closed 1 year ago

lat9 commented 1 year ago

... as described in this USPS article. Essentially, all the First Class Package Service shipping methods and Retail Ground will be combined into a single shipping method (1 oz to 70 lbs). Since the First Class methods are being deprecated, the "USPS First Class Filter" setting will be removed.

Noting that, for whatever reason, the <Service> requested by the shipping module for the "Retail Ground" method is PARCEL, not RETAIL GROUND. Not sure if that's to make it the same service request regardless whether "Retail" or "Commercial" pricing is requested. Update, looks like the rates returned for 'PARCEL' and 'RETAIL GROUND' are the same.

Note: Still waiting for the USPS definition of the enumerated value to use for the packages' <Service> code when requesting "Ground Advantage". The new <Service> enumeration for USPS Ground Advantage™ has been defined as GROUND ADVANTAGE, see below.

As of 2023-07-02, the USPS test server is still not recognizing 'GROUND ADVANTAGE' as an accepted <Service> enumeration. Finally (2023-07-05), the USPS test server is now recognizing 'GROUND ADVANTAGE'!

image

From https://www.usps.com/business/web-tools-apis/2023-web-tools-release-notes.pdf (Package Version 1.17 and later):

  1. Summary: USPS will offer enhanced ground product USPS Ground Advantage. USPS Ground Advantage will combine USPS Retail Ground, First-Class Package, and Parcel Select Ground services (as well as returns options such as First-Class Package Return service and Ground Returns) into a single, streamlined ground shipping service. Web Tools will support backwards compatibility such that integrators may continue to pass existing API inputs for USPS Retail Ground, First-Class Package Service, and Parcel Select Ground which will return new USPS Ground Advantage outputs. Note: USPS Ground Advantage will only incorporate USPS First-Class Package Service, not USPS First-Class Mail. Reference https://about.usps.com/newsroom/national-releases/2023/0210-usps-ground-advantageproduct-and-pricing-simplicity.htm and https://www.usps.com/ship/ground-advantage.htm for additional details.
  2. Domestic Price Calculator API (API=RateV4) Updates:
    • New “GROUND ADVANTAGE” and “GROUND ADVANTAGE CUBIC” service (i.e., ) enumerations will be added for USPS Ground Advantage and USPS Ground Advantage Cubic.
    • Current service (i.e., ) enumerations “FIRST CLASS”, “PARCEL SELECT GROUND”, “PARCEL SELECT GROUND CUBIC”, and “RETAIL GROUND” will be accepted but return USPS Ground Advantage pricing and availability in XML response.
    • Web Tools will make updates to support $100 baked-in insurance for USPS Ground Advantage.
    • Web Tools will make updates to support Nonstandard Length and Volume Fees for parcels that exceed 2 cubic feet (3546 cubic inches) or have a length greater than 22 inches applicable for USPS Ground Advantage.
    • Reference https://pe.usps.com/PriceChange for details.

Another USPS Ground Advantage link (https://www.usps.com/ship/ground-advantage.htm), for posterity.

lat9 commented 1 year ago

Noting also that the "HAZMAT" interface to USPS is also changing, such that the type of hazardous material needs to be identified. See section 2.5.4 of the USPS' 2023 release notes (https://www.usps.com/business/web-to...ease-notes.pdf) for more information.

For the initial K11i release, I'll be commenting that out but providing documentation regarding how a site can inject that into a rate-request via the Zen Cart notify/observer interface.

Along the same vein, there is no longer (not sure when it was dropped) FRAGILE package-contents' specifier ... anywhere in the API. I'll be removing that handling in K11i.