Update USPS sandbox APIs to apis-tem.usps.com#1118
Conversation
|
@zebradots is attempting to deploy a commit to the karrio Team on Vercel. A member of the Team first needs to authorize it. |
| @property | ||
| def server_url(self): | ||
| return "https://api-cat.usps.com" if self.test_mode else "https://api.usps.com" | ||
| return "https://apis-tem.usps.com" if self.test_mode else "https://api.usps.com" |
There was a problem hiding this comment.
Can you check if the production one here should also go to the 'plural' one like the non international one did? It seems like that change happened during the same transition?
Looks like this commit d7ad6af did just the one and should have changed all 4?
Might as well catch the other too imo
There was a problem hiding this comment.
@ChrisNolan you are correct. We confirmed that the USPS International production server points to the wrong endpoint and should be plural, just as you pointed out. Updated in this additional commit.
The previous PR only addressed testing endpoints for both USPS and USPS International, but apparently USPS International will not function at all (neither in testing nor production) until this gets merged.
USPS (domestic) currently points to the correct production endpoint, so only 3 changes are required:
- USPS Testing:
https://apis-tem.usps.com - USPS Production:
https://apis.usps.com<-- Only one that is currently correct - USPS International Testing:
https://apis-tem.usps.com - USPS International Production:
https://apis.usps.com
|
Thanks @zebradots, good catch on the sandbox endpoint. Queuing for review and merge. |
As of Jan 25, 2026, USPS retired the USPS Web Tools APIs. With this change, the sandbox / test server API hostname moved from
api-cat.usps.comtoapis-tem.usps.com. See Slide 5 of The Retirement of USPS Web ToolsAPIs Presentation for details.
In Karrio 2026.1.31, transactions sent in Test Mode to USPS will fail with a confusing "Invalid credentials" error until the correct test server hostname is fixed.
This pull request simply updates providers
uspsandusps-internationalto point to the correct test mode API endpoints.