提醒:For Post Office holiday schedules, select a specific location to see details on extended holiday hours and pickup times.

Web Tools API Portal

Free Ecommerce Website Shipping & Shopping Cart APIs

The USPS Web Tools® API library gives ecommerce website shopping carts and shipping software access to valuable USPS® data—free of charge! You can check shipping rates, track packages, and schedule a package pickup all through USPS Web Tools. Get started now or read on to learn more.

Register Now View Documentation & Updates

Announcements

Web Tools 2019 Release Notes (PDF)

Updated documentation is now available (Updated 10/22/2019).

ExpressMail to ExpressMailCommitment API Transition Guide - HTM | PDF

New label API restrictions:

获取电子邮件更新

Receive email notifications about Web Tools maintenance updates.

Subscribe Now

开发人员

Start making live calls to Web Tools APIs and integrate with USPS Web Tools to make shipping easier for you and your clients. See available API technical documentation and helpful tips.

Learn More about Web tools for developers

Shippers

Register to get access to the USPS Web Tools support center and documentation. Plus, find experts to help you with Web Tools integration.

Learn More about Web tools for shippers

Developer Center

第 1 步:注册

Complete the online registration form for access. Please note registration is required for Web Tools access and is separate from any other USPS.com credentials.

立即注册

Once registered, you’ll receive an email with your assigned Web Tools User ID. You’ll then have access to our most popular offerings like the price calculator, tracking information, and address validation/standardization APIs. For access to more secure APIs, like Label Printing, you’ll need to request additional permissions in Step 3.

第 2 步:View Documentation

Explore API Technical Docs and use the Quick Code provided below to test in your favorite browser.

For developers integrating Web Tools into a custom application, we specifically recommend:

第 3 步:Integrate and Request Additional Permissions

Integrate with USPS Web Tools to start making live calls to Web Tools APIs and make shipping easier for you and your clients.

For access to more secure APIs, like Label Printing, you’ll need additional permissions. Contact the Internet Customer Care Center with the following information:

  • "Web Tools API Access" in the subject line of the email
  • Which APIs you want to access beyond those provided automatically
  • If you'll be modifying the label image

需要更多帮助?查看常见问题

展开全部

View API Technical Documentation

Get Started with Price Calculator

Try the Domestic or International Postage Rate APIs first or jump right into the technical documentation and start developing.

Explore Web Tools Right from Your Browser's Search Bar

Once you have completed registration, explore the most popular Web Tools APIs and make live calls to Web Tools® right from your browser. To make live calls:

  1. Open a new .txt or word .doc and copy and paste the User ID from the email you received from registration@shippingapis.com. Keep it on hand for the following steps.
  2. Insert your Web Tools user ID into the USERID="" value
  3. Insert today's date into the value of the "ShipDate" tag (if applicable)
  4. Select the entire XML code below and paste it into the search bar of your browser
  5. Hit enter to make the call and receive a response in your browser
  6. Experiment with Web Tools and change some of the values of the XML tags

Try the Domestic Rate Calculator

轻松快捷地在线计算国内及国际邮寄邮资费率。Try the Domestic Rate API below or jump into the technical documentation and start developing.

View Technical Document

测试 XML 请求

https://secure.shippingapis.com/shippingapi.dll?API=RateV4&XML=<RateV4Request USERID="XXXXXXXXXXXX">

<Revision>2</Revision>
<Package ID="1ST">
<Service>优先</Service>
<ZipOrigination>33420</ZipOrigination>
<ZipDestination>54174</ZipDestination>
<Pounds>0</Pounds>
<Ounces>2</Ounces>
<Container></Container>
<Width></Width>
<Length></Length>
<Height></Height>
<Girth></Girth>
<Machinable>错误</Machinable>
</Package>
</RateV4Request>

Try the International Price Calculator

The International Rate API calculates international postage rates quickly and easily. Try it out below or jump into the technical documentation and start developing.

View Technical Document

测试 XML 请求

https://secure.shippingapis.com/shippingapi.dll?API=IntlRateV2&XML=<IntlRateV2Request USERID="XXXXXXXXXXXX">

<Revision>2</Revision>
<Package ID="1ST">
<Pounds>2</Pounds>
<Ounces>0</Ounces>
<Machinable>正确</Machinable>
<MailType>包裹</MailType>
<ValueOfContents>20</ValueOfContents>
<Country>危地马拉</Country>
<Container></Container>
<Size></Size>
<Width></Width>
<Length></Length>
<Height></Height>
<Girth></Girth>
<OriginZip>18701</OriginZip>
<CommercialFlag>N</CommercialFlag>
<DestinationPostalCode></DestinationPostalCode>
</Package>
</IntlRateV2Request>

Verify an Address

Save time and money by reducing shipping errors due to incorrect address entry. 该工具可用于纠正街道地址错误,包括缩写和遗失信息。同时它还支持 ZIP+4® 编码。

View Technical Document

测试 XML 请求

地址验证

https://secure.shippingapis.com/ShippingAPI.dll?API=Verify&XML=<AddressValidateRequest USERID="XXXXXXXXXXXX">

<Address>
<Address1></Address1>
<Address2>6406 IVY LANE</Address2>
<City>GREENBELT</City>
<State>MD</State>
<Zip5>20770</Zip5>
<Zip4></Zip4>
</Address>
</AddressValidateRequest>

ZIP Code 查找

https://secure.shippingapis.com/ShippingAPI.dll?API=ZipCodeLookup&XML=<ZipCodeLookupRequest USERID="XXXXXXXXXXXX">

<Address>
<Address1></Address1>
<Address2>6406 IVY LANE</Address2>
<City>GREENBELT</City>
<State>MD</State>
</Address>
</ZipCodeLookupRequest>

城市/州查找

https://secure.shippingapis.com/ShippingAPI.dll?API=CityStateLookup&XML=<CityStateLookupRequest USERID="XXXXXXXXXXXX">

<ZipCode ID="0">
<Zip5>90210</Zip5>
</ZipCode>
</CityStateLookupRequest>

追踪包裹

Get estimated delivery information and track any package shipped via Priority Mail Express®, Global Express Guaranteed®, or Priority Mail Express International® services. Check the tracking information for packages shipped with USPS Tracking®, Signature Confirmation, Certified Mail®, or Registered Mail® services.

View Technical Document

测试 XML 请求

https://secure.shippingapis.com/shippingapi.dll?API=TrackV2&XML=<TrackRequest USERID="XXXXXXXXXXXX">

<TrackID ID="XXXXXXXXXXXXXX"/>
</TrackRequest>

打印寄件标签

Integrate with our Shipping Label APIs to print shipping labels with a tracking barcode.

Electronic Merchandise Return Service Label API

Let online customers print return labels for Priority Mail®, First-Class Mail®, and Ground services.

View Technical Document

Look Up Delivery Dates

利用服务标准与承诺 API 获取预计及保证投递日期。

测试 XML 请求

Priority Mail® 服务标准

https://secure.shippingapis.com/ShippingAPI.dll?API=PriorityMail&XML=<PriorityMailRequest USERID="XXXXXXXXXXXX">

<OriginZip>21403</OriginZip>
<DestinationZip>90210</DestinationZip>
</PriorityMailRequest>

View Technical Document

First-Class Mail® Service Standards

https://secure.shippingapis.com/ShippingAPI.dll?API=FirstClassMail&XML=<FirstClassMailRequest USERID="XXXXXXXXXXXX">

<OriginZip>90210</OriginZip>
<DestinationZip>26505</DestinationZip>
</FirstClassMailRequest>

View Technical Document

Priority Mail Express® Service Commitments

https://secure.shippingapis.com/ShippingAPI.dll?API=ExpressmailCommitment&XML=<ExpressMailCommitmentRequest USERID="XXXXXXXXXXXX">

<OriginZIP>20862</OriginZIP>
<DestinationZIP>11210</DestinationZIP>
<Date></Date>
</ExpressMailCommitmentRequest>

View Technical Document

Service Delivery Calculator

https://secure.shippingapis.com/ShippingAPI.dll?API=SDCGetLocations&XML=<SDCGetLocationsRequest USERID="XXXXXXXXXXXX">

<MailClass>0</MailClass>
<OriginZip>70601</OriginZip>
<DestinationZip>21817</DestinationZip>
<AcceptDate>6-August-2019</AcceptDate>
<AcceptTime>0900</AcceptTime>
<NonEMDetail>正确</NonEMDetail>
</SDCGetLocationsRequest>

View Technical Document

Open or Close content below Are the USPS APIs free?

Customers who have registered for a USPS Web Tools® account and agreed to the terms and conditions of use can access USPS APIs for free.

Open or Close content below How do I get access to USPS APIs and receive my user ID?

Get access to USPS APIs when you register for a Web Tools user account.

立即注册

Once registered, you will automatically receive an email containing your assigned Web Tools User ID. After you receive this email, you can use the following APIs:

  • 价格计算器
  • Package Tracking
  • 服务标准及承诺
  • 地址信息
  • 包裹领取

Open or Close content below The labels I am able to print contain a “SAMPLE-DO NOT MAIL” watermark. How can I print actual labels?

The API containing "Certify" is our testing API and will print labels with the sample watermark. In order to generate actual labels, you must remove "Certify" from all of your Web Tools XML requests.

Open or Close content below Does USPS have an EDDM API available?

We currently only offer Every Door Direct Mail® (EDDM®) services through our online application.

Go to EDDM

Open or Close content below Have there been any recent or upcoming changes to Web Tools API?

To provide the very best API offering, we periodically update our systems which may require current customers to update their software. To determine if these changes/updates apply to you, refer to our most recent Release Notes. This document contains all new changes and steps to resolve if you are affected. Please remember to first contact your software provider for any integration-related questions.

Shipper Support Center

USPS Web Tools are ecommerce application program interfaces (APIs) that can be used for online stores or customer service centers—free of charge.

Ecommerce Website Support

Get access to our Web Tools through a simple registration process. 查看常见问题

立即注册

Once registered, you’ll receive an email with your assigned Web Tools User ID. You’ll then have access to the most popular APIs. For access to more secure APIs, like Label Printing, you’ll need additional permissions. Contact the Internet Customer Care Center with the following information:

  • "Web Tools API Access" in the subject line of the email
  • The software vendor you are using
  • Which APIs you want to access beyond those provided automatically

想雇佣一名专业人士?

To assist companies that need help integrating USPS Web Tools into their sites, the Postal Service publishes contact information for some companies willing to provide services that meet our criteria. These lists are not exhaustive and being listed is not an endorsement by USPS.

USPS Web Tools Integrators

Some companies that may be able to assist with the integration of USPS Web Tools or help you build a customer solution using Web Tools ecommerce APIs.
View List of Integrators (RTF)

USPS 网站工具产品供应商

Some companies that sell products with Web Tools already integrated.
View List of Product Providers (RTF)

Open or Close content below Why are my Web Tools credentials not working when I try to login on USPS.com?

The login page on USPS.com® is not related to APIs. There is no "log in" functionality for your Web Tools credentials. Your username and password will allow you to gain access to the Web Tools servers.

Use your credentials to:

  • Log into the interface of your third-party software
  • Add authentication to your back-end programming in the API, XML

The login page shown on the usps.com website is not associated to APIs. Please review the technical documentation if you need more information about integration.

Open or Close content below Why are the production server URLs I received not working when I click on them?

The production URLs included in the email confirming your registration with Web Tools are not links to a viewable website. These URLs must be included in the XML Request used to connect to our APIs (please refer to our technical documentation) for more information. If you are using a third party ecommerce software, it’s possible that these URLs are not required, and therefore, do not apply to all customers using our APIs. Please contact your software provider for more specific details concerning integration requirements.

Open or Close content below I am using a third-party ecommerce software to connect to USPS APIs, and I am having issues retrieving prices or services from USPS.

Since USPS® does not know every specific integration requirements of all the possible software options available, we recommend that customers first contact their provider to troubleshoot integration-specific questions.

Open or Close content below I have contacted my software provider, and I still have questions for USPS. How do I proceed?

We will be happy to assist all customers provided the following information is included when you contact the Internet Customer Care Center.

Customers must provide:

  • Copy of a sample XML request resulting in the issue or error, pasted into the body of the email
  • Complete description of exact issue you are experiencing
  • Name of API
  • Name of third party software provider

Please note that without the above information, our USPS® agents will not have sufficient information to investigate Web Tools API issues properly.

联系我们

If you have technical questions or need more information, contact the Internet Customer Care Center (ICCC).

营业时间

Monday–Friday: 8 AM–8:30 PM ET
周六:8 AM–6PM ET
休息时间:周日及邮递假日
假日营业时间:9 AM–6 PM ET

  • Martin Luther King Jr. Day
  • Presidents' Day
  • Columbus 日
  • Veterans Day

联系信息

Email Internet Customer Care Center
致电:1-800-344-7779

Powered By OneLink