-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Description
Preconditions and environment
- 2.4.7-p8 with AC-15210 applied
- REST API credentials entered into backend, and allowed methods configured
This patch isn't ready for production use:
- it does NOT provide tracking information
- It doesn't preserve the Allowed Methods settings if the API choice is changed.
- it should protect against sending unneeded requests to the USPS API, because:
- it does not report or protect against the "429" Quota limit result. Hitting the limit means no rates are returned from the interface. If you are presenting rates to a customer, this is a disaster.
Here is an example from the debug.log of a tracking request. It doesn't look like it's even POSTing a proper tracking request. This doesn't appear to have ANY of the information required by the REST api for a tracking request:
[2025-12-25T21:03:42.453158+00:00] main.DEBUG: array (
'9400136106195372355532' =>
array (
'request' => '{}',
'result' => '',
),
) [] []
Here is an example quota limit exceeded result, after too many requests have been sent to the USPS API portal.
'request' =>
array (
'originZIPCode' => '97123',
'pricingOptions' =>
array (
0 =>
array (
'priceType' => 'RETAIL',
),
),
'packageDescription' =>
array (
'weight' => 1,
'mailClass' => 'ALL',
'length' => 1,
'height' => 1,
'width' => 1,
'girth' => 1,
),
'destinationZIPCode' => '97007',
),
'result' => '
{
"apiVersion": "/shipments/v3",
"error": {
"code": "429",
"message": "Exceeded quota limit. Please contact https://emailus.usps.com/s/web-tools-inquiry and a representative will assist.",
"errors": [{"title":"Too Many Requests.","detail":"Quota limit exceeded. The number of requests has exceeded the quota established for the time period.","status":"429","source":{"parameter":"API product or default","APIProduct":"Public Access I"}}]
}
}
',
) [] []
Steps to reproduce
Running 2.4.6 or newer, install quality patch AC-15210
Go to Configuration->Sales->Delivery Methods->USPS
Switch USPS type to USPS REST APIs, enter credentials, choose Allowed Methods, etc.
Try tracking a previously-shipped parcel through the backend.
Expected result
- You should get proper tracking information.
- You should be able to switch between USPS WEBtools api and REST api, and have your settings retained.
- It needs to protect against sending unneeded requests, so that the vendor's quota isn't exceeded,
- Because if the quota is exceeded, the interface refuses to produce shipping rate quotes - and the CUSTOMER will not see shipping rates to choose from on the front end.
Actual result
- No tracking, no tracking request POSTed or request is incomplete
- Backend Allowed Methods not preserved when switching APIs
- Sends lots of requests, risks vendor reaching USPS quote quota limit
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Type
Projects
Status
Ready for Confirmation