We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
就像你一样,我也一直在努力寻找这个问题的答案,但并没有看到我们 API 用户可以轻松获得这些信息。据我所知,无法从 API 本身获取此信息。不过,有一些解决方法:
UPS:
输入您的起始邮政编码后,通过以下链接从 UPS 下载美国费率/区域图表:
http://www.ups.com/content/us /en/shipping/cost/zones/Continental_us.html
另一方面,国际则是一个不同的故事,我不知道有什么方法可以解决这个问题。
联邦快递
您可以向以下 URL 发出 GET 请求,将 origPostalCd、destCountryCd 和 destPostalCd 参数替换为所需数据,然后解析 HTML。这是快速区域之前的位置表单元格:
国际区域时好时坏,因为似乎某些位置(例如温哥华)不返回区域。
Just like you, I have been trying to find the answer for this as well, but it does not see that that information is easily available for us API users. From what I can tell, there is no way to get this information from the APIs themselves. There are workarounds for this though:
UPS:
Download the US rate/zone chart from UPS at the following link, after entering your origin zip:
http://www.ups.com/content/us/en/shipping/cost/zones/continental_us.html
International on the other hand is a different story, and I don't know of a way to figure this out.
FedEx
You can make a GET request to the following URL, after replacing the origPostalCd, destCountryCd, and destPostalCd parameters with the needed data, then parsing the HTML out. Here is the location table cell before the express zone:
International zones are hit and miss, as it seems some locations (such as Vancouver) don't return a zone.
FedEx 和 UPS 都有用于跟踪包裹和打印运输标签等的网络服务。FedEx
提供了一个随时可用的访问其(跟踪)网络服务的示例,该服务可能已经包含您需要的信息。
UPS、OTOH 不给您示例代码,因此您必须阅读他们的规范并自己解析 xml。
(至少大约 6 个月前,当我使用这两个 API 时,这是真的)
Both FedEx and UPS have web-services for tracking packages and printing shipping labels etc.
FedEx provides a ready to use sample of accessing their (Tracking) web-service which probably already has the information you need.
UPS, OTOH, doesn't give you sample code, so you must read their spec and parse the xml yourself.
(At least this was true ~6 months ago, when I worked with both API's)