Page 1 of 2
USPS retiring Rate V3 Api
Posted: Thu May 08, 2014 10:09 am
by jmestep
Here we go again with the Post Office.
USPS Web Tools will be retiring our RateV3 API later this year (target date: September 28, 2014). We encourage you to upgrade to RateV4 to avoid any disruption in service. For detailed instructions on upgrading to RateV4, please see the RateV4 Transition Guide on the Web Tools site under Web Tools Announcements.
Will this require a change in code?
Re: USPS retiring Rate V3 Api
Posted: Mon May 12, 2014 4:56 am
by Naveed
Yes, It seems this will require code changes, as we are using Rate V3 API, and we have to update our API to RateV4.
Re: USPS retiring Rate V3 Api
Posted: Thu Jun 05, 2014 12:11 pm
by sloDavid
Will there be a hot patch for existing (7.x) versions, or will we need to upgrade to the latest GOLD R-version?
Re: USPS retiring Rate V3 Api
Posted: Tue Jun 17, 2014 11:03 am
by kstevenson
Could you please let us know if you are going to do a patch for USPS V4 or if we have to fix up the provider ourselves? There are some differences in behavior between V3 and V4 where data sent in the request in V3 works fine but V4 throws errors in the response.
We have not started on porting all our code into Gold yet and the latest source version I have is b5410. I confirmed that it still uses V3. Could you please let me know if you upgraded the provider to use V4 since b5410? We can get the latest source and backport the code if any version of Gold is V4 already.
Could you please let us know?
Re: USPS retiring Rate V3 Api
Posted: Tue Jun 17, 2014 11:22 am
by Shopping Cart Admin
Hello,
We've just started investigating this as there wasn't time to get it into the latest release of GOLD. We'll update this thread further as information becomes available from development.
Re: USPS retiring Rate V3 Api
Posted: Tue Jun 17, 2014 12:44 pm
by kstevenson
Thank you so much! I'll keep an eye on the thread and ask my developer to hold off until we hear from you.
Re: USPS retiring Rate V3 Api
Posted: Tue Jul 22, 2014 1:00 pm
by kstevenson
Is there any update on this?
We looked into the code and it seems the main problem is that the functionality for shared packages (more than 1 item in the basket) relies on the USPS V3 behavior to return all options if you send an incorrect container and size values while V4 throws an error instead. Can you give any hint what your approach will be to fix this? We're worried that we get into a crunch having to work with a number of customers for site and shipmethod updates when USPS shuts the V3 API down.
Any update is greatly appreciated.
Thanks in advance,
Re: USPS retiring Rate V3 Api
Posted: Tue Jul 22, 2014 3:50 pm
by Katie
Hello Karin,
Do you get a specific error? If you can get that for me, then I might be able to help. We have V4 working in Gold. I am in the process of testing it now.
Earlier this week, we sent out a notice concerning end of life for AbleCommerce 7. I'm sorry, but we need to allocate our resources towards the future instead of the past. We do plan on releasing the 7.0.x source for USPS to anyone with a current subscription. We understand that upgrading can be difficult when a site has been customized. Perhaps someone will want to update USPS and release it...
Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 6:09 am
by jmestep
Katie, do you have a target release date for the patch for 7 and Gold? People are getting anxious.
Thanks
Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 6:43 am
by kstevenson
Hi Katie,
The USPS an error about an invalid container type. I don't have the exact error (need to get with the developer). We don't need a patch for 7.0.7, just the fix that you are doing for V4 because we have done a different fix than you guys for the last USPS issue to make it more maintainable for our publishers. So, we'll just merge this one for V4 into our customized source. Since Gold and 7.0.7 are pretty similar, if not the same, for the USPS provider, we don't care which one we get as long as it's soon

.
Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 7:25 am
by Katie
We had some trouble with the container type as well. This is the only note I could find:
Some notes about RateV4 API:
For a REGULAR sized package, the container type is totally ignored. The only case where the container type has any effect is when the package size is LARGE. For the LARGE size package the container type will be either RECTANGULAR/NONRECTANGULAR or VARIABLE.
Therefore, In our current implementation, the container options Flat Rate Box and Flat Rate Envelope do absolutely nothing to the quote as they are totally ignored.
Concerning AC7 and USPS...we were not planning on updating the API. That is sort of why we sent out a notice last week saying that AC7 has come to the end of its life. However, once we get Gold and the USPS patches for older versions of Gold released, then we will try to do something for AC7. Keep in mind that it has been over 3 years now since 7.07 was released. Our development resources are being pushed to the limit when we keep having to produce patches for version 7. I just cannot make any guarantees right now as to when we can do something for version 7.
We have to get the Gold releases done first, and then we will try to work on version 7 before the deadline in Sept. We anticipate releasing Gold R9 in the first weeks of Sept. It depends on how long the QA cycles takes to complete. The features should be wrapped up my mid August, and then we can start testing and have a better idea of the release date.
Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 8:36 am
by kstevenson
Katie,
Could you possibly provide the source change snippets you are doing before that? August/September is cutting it way too close for comfort. I'm going to be gone the first half of September, to boot.
The current USPS provider implemenation is coded to always send "FLAT RATE ENVELOPE" and "REGULAR" when you have multiple items in the basket and that causes the error when the weight is too high. I am mostly trying to figure out how you are handling the Container Type and Size selection with shared packages. We've been looking into 3D Bin calculations for accurate dimensions for container selection but it's a pain in the neck to say the very least. And if you send Variable, you set everything back and customer might see 3 different flatbox rates during checkout which is, of course, not acceptable. So, I am really interested in seeing what you're doing for the issue. If necessary, of course, you can contact me via my email directly.
Thanks again for your help!
Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 9:40 am
by calvis
Katie wrote:Concerning AC7 and USPS...we were not planning on updating the API. That is sort of why we sent out a notice last week saying that AC7 has come to the end of its life.
We never got such a notice. At least I can't find it.
Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 10:16 am
by compunerdy
I never got a notice either..
Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 3:15 pm
by Katie
Are you guys signed up for the mailing lists? You can go to the account profile page and do that. I will check with Mike and ask him to post more notices concerning AC7.
Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 3:25 pm
by calvis
subscribed_to.jpg
Yep it looks like it.
Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 4:34 pm
by Katie
You should have received it. I'm not in charge of the mailings, so let me check to make sure you are on the list we are using.
Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 4:45 pm
by NC Software
Oh I love the End of Life discussion. Windows XP is EOL and no one at Microsoft uses it. However.... I digress
For these things you guys really should consider posting the source on one of the social code sharing networks wherever as there are several. Empower your devs to work for you on these things, merge in their updates and then you can publish them or make it available (ala FedEx I suppose). Let people fork off your source, make changes, then you can merge them back in. Done.
AC 7.0.7 is far from end of life....and the fact is people don't want to move to Gold (yet) so you really should keep it going, if not for YOURSELF

Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 7:01 pm
by compunerdy
If nothing else do the updates and only make them available for current subscribers.. gold or otherwise. I have been paying for Gold since it came out and have kept a current license pretty much since 2007. You gave V7 a pretty short lifespan and then changed so much when going to Gold, I think the least you can do is keep major systems functioning in v7 so people have more time...
Re: USPS retiring Rate V3 Api
Posted: Wed Jul 23, 2014 8:13 pm
by Katie
I was thinking along those same lines Tim. Once testing is completed, I will see if we can merge the changes for version 7 and provide the update for subscription holders, and make it a paid update for non-subscription holders.
Re: USPS retiring Rate V3 Api
Posted: Thu Jul 24, 2014 5:46 am
by kstevenson
Katie,
I'll be happy to take the code before you're done testing. We'll need to do our own QA anyway and can help with the validation as a second set of eyes.
And, btw, not that it matters but we got no notification last week either. I only knew about it due to the notification that was sent out last year. I don't know which email list that was sent to but I was not on it.
Re: USPS retiring Rate V3 Api
Posted: Thu Jul 24, 2014 7:12 am
by rmaweb
Just piping in my 2 cents so that Katie doesn't feel like she's losing her mind, I did receive the July Ablecommerce FYI email sent on July 17th.
Re: USPS retiring Rate V3 Api
Posted: Thu Jul 24, 2014 7:17 am
by Katie
Just piping in my 2 cents so that Katie doesn't feel like she's losing her mind, I did receive the July Ablecommerce FYI email sent on July 17th.
Oh Thank You!!! I was starting to think we sent that email to a bunch of strangers...
I'll be happy to take the code before you're done testing. We'll need to do our own QA anyway and can help with the validation as a second set of eyes.
Karin, you are too kind

I am working with the dev team to get you what you need. It will probably be about a week though...so early August which is right around the corner.
I will still try to figure out what is wrong with the email list. We may end up sending it again...
Re: USPS retiring Rate V3 Api
Posted: Thu Jul 24, 2014 7:38 am
by kstevenson
Karin, you are too kind I am working with the dev team to get you what you need. It will probably be about a week though...so early August which is right around the corner.
Thanks, Katie, pure self interest is ruling on my end.

We've been exploring a bunch of options to work around the problem, so seeing what the rest of the AbleCommerce world is going to get is very helpful.
Thanks again and I hope you have a grand weekend.
Re: USPS retiring Rate V3 Api
Posted: Sat Jul 26, 2014 8:51 pm
by Katie
THESE ARE THE SOURCE CODE CHANGES FOR VERSION 7:
Following updates needed inside BuildProviderRequest method in USPS.cs:
Locate:
Code: Select all
string _requestXml = string.Format("<?xml version=\"1.0\"?><RateV3Request USERID=\"{0}\"></RateV3Request>",this.UserId);
and replace with:
Code: Select all
string _requestXml = string.Format("<?xml version=\"1.0\"?><RateV4Request USERID=\"{0}\"></RateV4Request>",this.UserId);
Locate:
Code: Select all
//For International rate requests ounces weight should also be integer value
int ounces = (int)(package.Weight - (pounds * 16));
and replace with:
Code: Select all
//For International rate requests ounces weight should also be integer value
int ounces = (int)(package.Weight - (pounds * 16));
//SET THE CONTAINER TO RECTANGULAR/NONRECTANGULAR WHEN PACKAGE SIZE IS LARGE AND VARIABLE WHEN SIZE IS REGULAR
//CONTAINER TYPE IS RECTANGULAR WHEN PACKAGE SIZE IS LARGE AND DIMENSIONS GREATER THAN ZERO OTHERWISE NONRECTANGULAR
string containerValue = null;
if (GetContainerValue(package) == "FLAT RATE ENVELOPE" || GetContainerValue(package) == "FLAT RATE BOX" || GetContainerValue(package) == "VARIABLE")
{
if (GetPackageSizeValue(package) == "LARGE" && package.Length > 0 && package.Width > 0 && package.Height > 0)
{
containerValue = "NONRECTANGULAR";
}
else if (GetPackageSizeValue(package) == "REGULAR")
{
containerValue = "VARIABLE";
}
else
{
containerValue = "RECTANGULAR";
}
}
Locate:
Code: Select all
XmlUtility.SetElementValue(packageElement, "Container", GetContainerValue(package));
and replace with:
Code: Select all
XmlUtility.SetElementValue(packageElement, "Container", containerValue);
Similarly, locate the following line of code inside GetAllProviderShipRateQuotes method
Code: Select all
//SEND THIS REQUEST TO THE PROVIDER
XmlDocument providerResponse = SendRequestToProvider(providerRequest, domestic ? "RateV3" : "IntlRate");
and replace with:
Code: Select all
//SEND THIS REQUEST TO THE PROVIDER
XmlDocument providerResponse = SendRequestToProvider(providerRequest, domestic ? "RateV4" : "IntlRate");
These are the only changes required for USPS RateV4.
TESTING IS STILL IN PROGRESS. THE CHANGES ABOVE HAVE NOT PASSED FINAL QA.