Package Pickup
API
USPS Web Tools™
Application Programming Interface
User Guide
Version 2.6 (10/7/2024)
Table of Contents
2.0 Package Pickup Web Tools APIs
3.0 Package Pickup Availability API
4.0 Package Pickup Schedule API
7.0 Package Pickup Inquiry API
This
document contains a Reference Guide to the Web Tools Package Pickup APIs. See the Developers Guide to learn the administrative process for gaining
access to the Web Tools APIs as well as the basic mechanism for calling the
APIs and processing the results. The Developer’s Guide also contains
information on testing and troubleshooting.
Note: The Request Parameter sections present the XML input tags for generating live requests along with the restrictions on the values allowed. An error message will be returned if an incorrect value is entered. Also, be aware of the maximum character amounts allowed for some tags. If the user enters more than those amounts, an error will not be generated. Web Tools will simply pass in the characters up to the maximum amount allowed and disregard the rest. This is important since the resulting value could prevent a correct response.
When building the XML request, pay particular attention to the order and case for tags. An error message will be returned if an incorrect value is entered. Remember that all data and attribute values in this document are for illustration purposes and are to be replaced by your actual values. For instance, a line of sample code may be:
<DestinationZIP>12345</DestinationZIP>
In
this instance, you will replace “12345” with the destination Zip Code for your
request.
For information on registering and getting started with Web Tools, please refer to the Step-By-Step guide found on the Web Tools Technical Documentation Page.
The Package Pickup Web Tools APIs provide convenience to you and your customers. Your carrier will pick up your packages on the next USPS delivery day (Monday through Saturday, excluding holidays) for free. Package Pickup is available for sending packages using Priority Mail Express, Priority Mail, Gound Advantage, international delivery services, or for returned merchandise. Customers requiring pickup of their packages by the USPS currently have two pickup options available to them: next delivery day Package Pickup and Pickup On-Demand. This Web Tools API User Guide applies to next delivery day Package Pickup only. Pickup On-Demand is only available through the USPS website. The information below is presented to illustrate the differences between these two options:
Package Pickup |
Pickup On Demand |
Free, regardless of the number of packages. |
Per pickup fee, regardless of
the number of packages. |
Your carrier picks up the next
USPS delivery day when your mail is delivered. |
Packages are picked up in a
specified timeframe. |
Available with domestic
Priority Mail Express, Priority Mail, ExpressMail, Ground Advantage
Commercial, international delivery services, or for merchandise returns. |
Available for Express Mail,
Priority Mail, single piece paid Standard Post, Express Mail International,
Priority Mail International. |
Requests must be received by
2:00 AM CT. You can edit or cancel a scheduled pickup request until 2:00 AM CT on the day of the
pickup. |
Allow a two-hour timeframe for
pickups. Pickup must be cancelled before 5:00 am local time the day of the
pickup. |
Individual items cannot exceed
70 pounds. |
Individual items cannot exceed
70 pounds. |
Postage must be prepaid and attached to
package(s). |
Apply postage to each package. |
Packages must be properly sealed and ready
for shipment. |
Have your packages ready for
pickup at the time and day specified. |
Packages requiring insurance services need
to be taken to a post office. |
|
Full Package
Pickup functionality relies on the implementation of five separate APIs:
·
Package
Pickup Availability API
·
Package
Pickup Schedule API
·
Package
Pickup Cancel API
·
Package
Pickup Change API
·
Package
Pickup Inquiry API
The five Package Pickup
Web Tools work together to provide seamless service to you and your customers.
Specifically, the functions of each are as follows:
For more information regarding Package
Pickup Services, please visit https://faq.usps.com/s/article/What-is-Package-Pickup.
The Package Pickup Availability API checks the availability for Package Pickup at a specific address and informs the user of the first available date for pickup. Package Pickup is not available for all addresses.
Scheme |
Host |
Path |
API |
XML |
https:// |
secure.shippingapis.com |
/ShippingAPI.dll? |
API=CarrierPickupAvailability |
&XML=(see below) |
Tag Name |
Occurs |
Description |
Type |
Validation |
CarrierPickupAvailabilityRequest |
Required |
|
(Alias) |
|
CarrierPickupAvailabilityRequest /
USERID |
Required |
This attribute specifies your Web Tools
user ID. See the Developer's
Guide for information on obtaining your USERID. For Example: USERID="XXXXXXX" |
NMTOKEN |
|
CarrierPickupAvailabilityRequest /
PASSWORD |
Optional |
This attribute specifies your Web Tools
password. See the Developer's
Guide for information on your Password. For Example: PASSWORD="XXXXXXX" |
NMTOKEN |
|
CarrierPickupAvailabilityRequest/ FirmName |
Optional |
Use this tag for a firm or company name. FirmName is Optional except if needed to uniquely
identify an address. Some firms/companies that have their own ZIP codes
require the use of firm name to properly identify their address. Example: <FirmName>ABC
Company</FirmName> |
String |
minLength=0 |
CarrierPickupAvailabilityRequest/ SuiteOrApt |
Required |
Use this tag for an apartment or suite
number. SuiteOrApt is Optional except if
needed to uniquely identify an address at a multiple dwelling address, for
example, an apartment building. For example: <SuiteOrApt>Suite
777</SuiteOrApt> |
String |
minLength=0 |
CarrierPickupAvailabilityRequest/ Address2 |
Required |
Use this tag for a street address. For example: <Address2>1390 Market
Street</Address2> |
String |
minLength=0 |
CarrierPickupAvailabilityRequest/ Urbanization |
Required |
Use this tag for Urbanization (for Puerto
Rico only). ZIP Code prefixes 006 to 009, if area is so designated. |
String |
minLength=0 |
CarrierPickupAvailabilityRequest/ City |
Required |
Use this tag for a city. Either ZIP5
or City and State are Required. For
example: <City>Houston</City> |
String |
minLength=0 |
CarrierPickupAvailabilityRequest/ State |
Required |
Use this tag for a state abbreviation.
Either ZIP5 or City and State are Required. For
example: <State>TX</State> |
String |
minLength=0 |
CarrierPickupAvailabilityRequest/ ZIP5 |
Required |
Use this tag for a 5
digit ZIP Code. Either ZIP5 or City and State are Required. For
example: <ZIP5>77058</ZIP5> |
String |
minLength=0 |
CarrierPickupAvailabilityRequest/ ZIP4 |
Required |
Maximum characters allowed: 4. For
example: <ZIP4>1234</ZIP4> |
String |
minLength=0 |
CarrierPickupAvailabilityRequest/ Date |
Optional |
Use this tag to request a pickup
date/time. For
example: 2006-05-04T18:13:51.0Z |
String |
minOccurs=0 |
CarrierPickupAvailabilityRequest |
Required |
|
(Alias) |
|
<CarrierPickupAvailabilityRequest USERID="XXXXXXXXX" PASSWORD=""> |
<FirmName>ABC Corp.</FirmName> |
<SuiteOrApt>Suite 777</SuiteOrApt> |
<Address2>1390 Market Street</Address2> |
<Urbanization></Urbanization> |
<City>Houston</City> |
<State>TX</State> |
<ZIP5>77058</ZIP5> |
<ZIP4>1234</ZIP4> |
</CarrierPickupAvailabilityRequest> |
Tag Name |
Occurs |
Description |
Type |
Validation |
CarrierPickupAvailabilityResponse |
Required |
|
(Alias) |
|
CarrierPickupAvailabilityResponse/ FirmName |
Optional |
Firm name sending request |
String |
|
CarrierPickupAvailabilityResponse/ SuiteOrApt |
Required |
Suite or apartment (only returned in
response if needed to uniquely identify the address, for example, at a
multiple dwelling address) |
String |
|
CarrierPickupAvailabilityResponse/
Address2 |
Required |
Pickup address |
String |
|
CarrierPickupAvailabilityResponse/
Urbanization |
Required |
Urbanization |
String |
|
CarrierPickupAvailabilityResponse/
City |
Required |
Pickup city |
String |
|
CarrierPickupAvailabilityResponse/
State |
Required |
Pickup state |
String |
|
CarrierPickupAvailabilityResponse/
ZIP5 |
Required |
Pickup ZIP Code |
String |
|
CarrierPickupAvailabilityResponse/
ZIP4 |
Required |
Pickup ZIP Code+4 |
String |
|
CarrierPickupAvailabilityResponse/ DayOfWeek |
Required |
Day of week for pickup |
String |
|
CarrierPickupAvailabilityResponse/
Date |
Required |
Scheduled date for pickup |
String |
|
CarrierPickupAvailabilityResponse/ CarrierRoute |
Optional |
Carrier Route (can be C for City, H for
Highway, R for Rural) |
String |
|
CarrierPickupAvailabilityResponse |
Required |
|
(Alias) |
|
<CarrierPickupAvailabilityResponse> |
<FirmName>ABC
Corp.</FirmName> |
<SuiteOrApt>Suite
777</SuiteOrApt> |
<Address2>1390 Market
Street</Address2> |
<Urbanization></Urbanization> |
<City>Houston</City> |
<State>TX</State> |
<ZIP5>77058</ZIP5> |
<ZIP4>1234</ZIP4> |
<DayOfWeek>Monday</DayOfWeek> |
<Date>4/01/2004</Date> |
<CarrierRoute>C</CarrierRoute> |
</CarrierPickupAvailabilityResponse> |
The Package Pickup Schedule API schedules a Package Pickup and provides the user a confirmation number for the scheduled pickup. Prior to making a Pickup Schedule call, it is recommended to use the Pickup Availability API to confirm that service is available.
Scheme |
Host |
Path |
API |
XML |
https:// |
secure.shippingapis.com |
/ShippingAPI.dll? |
API=CarrierPickupSchedule |
&XML=(see below) |
Tag
Name |
Occurs |
Description |
Type |
Validation |
CarrierPickupScheduleRequest |
Required |
|
(Alias) |
|
CarrierPickupScheduleRequest /
USERID |
Required |
This attribute specifies your Web Tools
user ID. See the Developer's
Guide for information on obtaining your USERID. For Example: USERID="XXXXXXX" |
NMTOKEN |
|
CarrierPickupScheduleRequest /
PASSWORD |
Optional |
This attribute specifies your Web Tools
password. See the Developer's
Guide for information on your Password. For Example: PASSWORD="XXXXXXX" |
NMTOKEN |
|
CarrierPickupScheduleRequest / FirstName |
Required |
Only alpha characters, apostrophes,
spaces, periods, and hyphens "-" may be used. For
example:
<FirstName>John</FirstName> |
String |
minLength=0 |
CarrierPickupScheduleRequest / LastName |
Required |
Only alpha
characters, apostrophes, spaces, periods and hyphens "-" may
be used. For example: <LastName>Doe</LastName> |
String |
minLength=0 |
CarrierPickupScheduleRequest / FirmName |
Optional |
Only alpha
and numeric characters, apostrophes, spaces, hyphens "-" and
ampersands "&" may be used. Use this tag
for a firm or company name. Some
firms/companies that have their own ZIP codes require the use of firm name to
properly identify their address. Note: FirmName is Optional except if the First Name and Last
Name tags are null. For example: <FirmName>ABC Company</FirmName> |
String |
minLength=0 |
CarrierPickupScheduleRequest / SuiteOrApt |
Required |
Apartment or
suite number. Optional except if needed to uniquely identify an address at a
multiple dwelling address, for example, an apartment building. For
example: <SuiteOrApt>Suite 777</SuiteOrApt> |
String |
minLength=0 |
CarrierPickupScheduleRequest / Address2 |
Required |
Street
address. For
example: <Address2>1390
Market Street</Address2> |
String |
minLength=0 |
CarrierPickupScheduleRequest / Urbanization |
Required |
Use this tag
for Urbanization (for Puerto Rico only). ZIP Code prefixes 006 to 009, if
area is so designated. |
String |
minLength=0 |
CarrierPickupScheduleRequest / City |
Required |
City name.
Either ZIP5 or City and State are required. For example: <City>Houston</City> |
String |
minLength=0 |
CarrierPickupScheduleRequest / State |
Required |
State
abbreviation. Either ZIP5 or City and State are required. For example:
<State>TX</State> |
String |
minLength=0 |
CarrierPickupScheduleRequest / ZIP5 |
Required |
5-digit ZIP
Code. Either ZIP5 or City and State are required. For example: <ZIP5>77058</ZIP5> |
String |
minLength=0 |
CarrierPickupScheduleRequest / ZIP4 |
Required |
Use this tag
for a 4 digit ZIP Code. For example: <ZIP4>1234</ZIP4> |
String |
minLength=0 |
CarrierPickupScheduleRequest / Phone |
Required |
Two formats
are allowed: (###) 123-4567 or ###-123-4567. For example: <Phone>5555551234</Phone> or
<Phone>555-555-1234</Phone> |
String |
minLength=0 |
CarrierPickupScheduleRequest / Extension |
Optional |
Optional
value for Phone Extension. For example:
<Extension>201</Extension> |
String |
minOccurs=0 minLength=0 |
CarrierPickupScheduleRequest / Package |
Required |
No values
entered with this tag. <ServiceType> and
<Count> tags are embedded under this. Refer to the XML request example
section, below, to see how these embedded tags are formatted. If the
<Count> for a service type is zero, you do not need to encode a
<Package> but you must have at least one <Package> with embedded
<ServiceType> and <Count> tags. |
(Group) |
|
CarrierPickupScheduleRequest / Package/ ServiceType |
Required |
This tag is
embedded under the <Package> tag. If your
pickup contains more than one Service Type, use additional <Package>
tags for each service type with the accompanying <ServiceType>
and <Count> tags. Refer to the XML Request Example below to see
how these embedded tags are formatted. For example: <ServiceType>PriorityMailExpress</ServiceType> Note: A pickup cannot be scheduled or changed when
there are only packages with <ServiceType>="OtherPackages” |
String |
minLength="0" Enumeration= · PriorityMailExpress · PriorityMail · ExpressMail · GroundAdvantage · Returns · International · OtherPackages |
CarrierPickupScheduleRequest / Package/ Count |
Required |
This tag is
embedded under the <Package> tag. Enter the number of packages
for the accompanying <ServiceType> tag.
Maximum characters allowed: 3 or 999 packages. If your pickup contains more
than one Service Type, use additional <Package> tags for each service
type with the accompanying <ServiceType> and
<Count> tags. Refer to the XML request example section, below, to
see how these embedded tags are formatted. For example:
<Count>2</Count> |
String |
minLength=0 minInclusive=1 |
CarrierPickupScheduleRequest / EstimatedWeight |
Required |
Enter the
estimated aggregate weight (in pounds) of all packages being picked up.
For example: <EstimatedWeight>14</EstimatedWeight> |
String |
minLength=0 |
CarrierPickupScheduleRequest / PackageLocation |
Required |
Enter one of
the following values: Note:
"Other" requires information in the value for the <SpecialInstructions> tag. For example:
<PackageLocation>Front Door</PackageLocation> |
String |
Enumeration= · Front Door · Back Door · Side Door · Knock on
Door/Ring Bell · Mail Room · Office · Reception · In/At
Mailbox · Other |
CarrierPickupScheduleRequest / SpecialInstructions |
Optional /
Required |
Value
Required when PackageLocation is “Other”. Only alpha,
numeric, commas, periods, apostrophes, _, &, -, ( ),
?, #, / +, @ and space characters may be used. For example:
<SpecialInstructions>Packages are behind the
screen door.</SpecialInstructions> |
String |
minLength=0 |
CarrierPickupScheduleRequest / EmailAddress |
Optional |
If provided,
email notifications will be sent confirming package pickup, or request
changes and cancellations. Maximum characters allowed: 50. For example: |
String |
minOccurs=0 minLength=0 |
CarrierPickupScheduleRequest |
Required |
|
(Alias) |
|
<CarrierPickupScheduleRequest USERID="XXXXXXXXX"
PASSWORD=""> <FirstName>John</FirstName> <LastName>Doe</LastName> <FirmName>ABC Corp.</FirmName> <SuiteOrApt>Suite 777</SuiteOrApt> <Address2>1390
Market Street</Address2> <Urbanization></Urbanization> <City>Houston</City> <State>TX</State> <ZIP5>77058</ZIP5> <ZIP4>1234</ZIP4> <Phone>5555551234</Phone> <Extension>201</Extension> <Package> <ServiceType>PriorityMailExpress</ServiceType> <Count>2</Count> </Package> <Package> <ServiceType>PriorityMail</ServiceType> <Count>1</Count> </Package> <EstimatedWeight>14</EstimatedWeight> <PackageLocation>Front Door</PackageLocation> <SpecialInstructions>Packages are behind the screen door.</SpecialInstructions> </CarrierPickupScheduleRequest> |
Tag Name |
Occurs |
Description |
Type |
Validation |
CarrierPickupScheduleResponse |
Required |
|
(Alias) |
|
CarrierPickupScheduleResponse /
FirstName |
Required |
First name of person
sending request. |
String |
|
CarrierPickupScheduleResponse /
LastName |
Required |
Last name of person
sending request. |
String |
|
CarrierPickupScheduleResponse /
FirmName |
Optional |
Firm name sending
request (if supplied in request). |
String |
|
CarrierPickupScheduleResponse /
SuiteOrApt |
Required |
Suite or apartment
(only returned in response if needed to uniquely identify the address, for
example, at a multiple dwelling address). |
String |
|
CarrierPickupScheduleResponse /
Address2 |
Required |
Pickup address |
String |
|
CarrierPickupScheduleResponse /
Urbanization |
Required |
Urbanization (if
supplied in request). |
String |
|
CarrierPickupScheduleResponse /
City |
Required |
Pickup city. |
String |
|
CarrierPickupScheduleResponse /
State |
Required |
Pickup state. |
String |
|
CarrierPickupScheduleResponse /
ZIP5 |
Required |
Pickup ZIP Code. |
String |
|
CarrierPickupScheduleResponse /
ZIP4 |
Required |
Pickup ZIP Code+4. |
String |
|
CarrierPickupScheduleResponse /
Phone |
Required |
Phone number of the sender. |
String |
|
CarrierPickupScheduleResponse /
Extension |
Required |
Phone extension of
sender (if supplied in request). |
String |
|
CarrierPickupScheduleResponse /
Package |
Required |
Packages to be
picked up. Can be multiple <Packages> with accompanying <ServiceType> and <Count> tags. |
(Group) |
|
CarrierPickupScheduleResponse /
Package/ ServiceType |
Required |
Types of package
services requested. |
String |
|
CarrierPickupScheduleResponse /
Package/ Count |
Required |
Number of packages
for each service type requested. |
String |
|
CarrierPickupScheduleResponse /
EstimatedWeight |
Required |
Total estimated
weight of all packages to be picked up. |
String |
|
CarrierPickupScheduleResponse /
PackageLocation |
Required |
Location of pickup. |
String |
|
CarrierPickupScheduleResponse /
SpecialInstructions |
Required |
Special instructions
for pickup. |
String |
|
CarrierPickupScheduleResponse /
ConfirmationNumber |
Required |
Confirmation number
for pickup. |
String |
|
CarrierPickupScheduleResponse /
DayOfWeek |
Required |
Day of week for
pickup. |
String |
|
CarrierPickupScheduleResponse /
Date |
Required |
Scheduled date for
pickup. |
String |
|
CarrierPickupScheduleResponse /
CarrierRoute |
Optional |
Carrier Route (can
be C for City, H for Highway, R for Rural). |
String |
|
CarrierPickupScheduleResponse /
EmailAddress |
Optional |
Email Address (if
supplied in request). |
String |
|
CarrierPickupScheduleResponse |
Required |
|
(Alias) |
|
<CarrierPickupScheduleResponse> <FirstName>John</FirstName> <LastName>Doe</LastName> <FirmName>ABC
Corp.</FirmName> <SuiteOrApt>Suite
777</SuiteOrApt> <Address2>1390 Market
Street</Address2> <Urbanization></Urbanization> <City>Houston</City> <State>TX</State> <ZIP5>77058</ZIP5> <ZIP4>1234</ZIP4> <Phone>(555)
555-1234</Phone> <Extension>201</Extension> <Package> <ServiceType>PriorityMailExpress</ServiceType> <Count>2</Count> </Package> <Package> <ServiceType>PriorityMail</ServiceType> <Count>1</Count> </Package> <EstimatedWeight>14</EstimatedWeight> <PackageLocation>Front
Door</PackageLocation> <SpecialInstructions>
Packages are behind the screen door.</SpecialInstructions> <ConfirmationNumber>ABC12345</ConfirmationNumber> <DayOfWeek>Monday</DayOfWeek> <Date>04/01/2004</Date> <CarrierRoute>C</CarrierRoute> </CarrierPickupScheduleResponse> |
The Package Pickup Cancel API cancels a scheduled Package Pickup. To use either the Pickup Cancel or Pickup Change Web Tools, the exact data from the original Schedule API response must be entered. You must enter address information and the confirmation number. Confirmation number alone cannot be used to cancel or change a scheduled pickup. Address information must be identical to what was entered when the pickup was scheduled.
Scheme |
Host |
Path |
API |
XML |
https:// |
secure.shippingapis.com |
/ShippingAPI.dll |
?API=CarrierPickupCancel |
&XML=(see below) |
Tag Name |
Occurs |
Description |
Type |
Validation |
CarrierPickupCancelRequest |
Required |
|
(Alias) |
|
CarrierPickupCancelRequest /
USERID |
Required |
This attribute specifies your Web Tools
user ID. See the Developer's
Guide for information on obtaining your USERID. For Example: USERID="XXXXXXX" |
NMTOKEN |
|
CarrierPickupCancelRequest /
PASSWORD |
Optional |
This attribute specifies your Web Tools
password. See the Developer's
Guide for information on your Password. For Example: PASSWORD="XXXXXXX" |
NMTOKEN |
|
CarrierPickupCancelRequest/ FirmName |
Optional |
Maximum characters allowed: 50. Only
alpha and numeric characters, apostrophes, spaces, hyphens "-" and
ampersands "&" may be used. Firm or company name is optional except if
needed to uniquely identify an address. Some firms/companies that have
their own ZIP codes require the use of firm name to properly identify their
address. For example:
<FirmName>ABC Company</FirmName> |
String |
minLength=0 |
CarrierPickupCancelRequest/ SuiteOrApt |
Required |
Apartment or suite number. Optional except
if needed to uniquely identify an address at a multiple dwelling address, for
example, an apartment building. For
example: <SuiteOrApt>Suite
777</SuiteOrApt> |
String |
minLength=0 |
CarrierPickupCancelRequest/
Address2 |
Required |
Street address. For
example: <Address2>1390 Market
Street</Address2> |
String |
minLength=0 |
CarrierPickupCancelRequest/
Urbanization |
Required |
Urbanization (for Puerto Rico only). ZIP
Code prefixes 006 to 009, if area is so designated. |
String |
minLength=0 |
CarrierPickupCancelRequest/
City |
Required |
City name. Either ZIP5 or City and
State are Required For
example: <City>Houston</City> |
String |
minLength=0 |
CarrierPickupCancelRequest/
State |
Required |
State abbreviation. Either ZIP5 or
City and State are Required. For
example: <State>TX</State> |
String |
minLength=0 |
CarrierPickupCancelRequest/
ZIP5 |
Required |
5 digit
ZIP Code. Either ZIP5 or City and State are Required. For
example: <ZIP5>77058</ZIP5> |
String |
minLength=0 maxLength=5 |
CarrierPickupCancelRequest/
ZIP4 |
Required |
4 digit
ZIP Code. For example:
<ZIP4>1234</ZIP4> |
String |
minLength=0 maxLength=4 |
CarrierPickupCancelRequest/ ConfirmationNumber |
Required |
Enter exact Confirmation Number returned
with Package Pickup Schedule request. For
example: <ConfirmationNumber>ABC12345</ConfirmationNumber> |
String |
minLength=0 maxLength=30 |
CarrierPickupCancelRequest |
Required |
|
(Alias) |
|
<CarrierPickupCancelRequest USERID="XXXXXXXXX"
PASSWORD=""> <FirmName>ABC Corp.</FirmName> <SuiteOrApt>Suite 777</SuiteOrApt> <Address2>1390
Market Street</Address2> <Urbanization></Urbanization> <City>Houston</City> <State>TX</State> <ZIP5>77058</ZIP5> <ZIP4>1234</ZIP4> <ConfirmationNumber>ABC12345</ConfirmationNumber> </CarrierPickupCancelRequest> |
Tag Name |
Occurs |
Description |
Type |
Validation |
CarrierPickupCancelResponse |
Required |
|
(Alias) |
|
CarrierPickupCancelResponse/ FirmName |
Required |
Firm name sending
request (if supplied in request) |
String |
|
CarrierPickupCancelResponse/ SuiteOrApt |
Required |
Suite or apartment
(only returned in response if needed to uniquely identify the address, for
example, at a multiple dwelling address) |
String |
|
CarrierPickupCancelResponse/ Address2 |
Required |
Pickup address |
String |
|
CarrierPickupCancelResponse/ Urbanization |
Required |
Urbanization (if
supplied in request) |
String |
|
CarrierPickupCancelResponse/ City |
Required |
Pickup city |
String |
|
CarrierPickupCancelResponse/ State |
Required |
Pickup state |
String |
|
CarrierPickupCancelResponse/ ZIP5 |
Required |
Pickup ZIP Code |
String |
|
CarrierPickupCancelResponse/ ZIP4 |
Required |
Pickup ZIP Code+4
(if supplied in request) |
String |
|
CarrierPickupCancelResponse/ ConfirmationNumber |
Required |
Confirmation number
for pickup |
String |
|
CarrierPickupCancelResponse/ Status |
Required |
Status of request to
cancel |
String |
|
CarrierPickupCancelResponse |
Required |
Type of Response |
(Alias) |
|
<FirmName>ABC
Corp.</FirmName> <SuiteOrApt>Suite
777</SuiteOrApt> <Address2>1390 Market
Street</Address2> <Urbanization></Urbanization> <City>Houston</City> <State>TX</State> <ZIP5>77058</ZIP5> <ZIP4>1234</ZIP4> <ConfirmationNumber>ABC12345</ConfirmationNumber> <Status>Your pickup request was cancelled.</Status> </CarrierPickupCancelRequest> |
Allows users to change certain data in their original Pickup Schedule API request. To use either the Pickup Cancel or Pickup Change API, the exact data from the original Pickup Schedule API response must be entered. You must enter address information and the confirmation number. The confirmation number alone cannot be used to cancel or change a scheduled pickup. The number and types of package services, the weight of the packages, and the location of the pickup can be changed. Address data and the confirmation number cannot be changed and must be identical to the original Schedule request. To verify the accuracy of your data, you can use the Pickup Inquiry API.
Scheme |
Host |
Path |
API |
XML |
https:// |
secure.shippingapis.com |
/ShippingAPI.dll? |
API=CarrierPickupChange |
&XML=(see below) |
Tag Name |
Occurs |
Description |
Type |
Validation |
CarrierPickupChangeRequest |
Required |
|
(Alias) |
|
CarrierPickupChangeRequest /
USERID |
Required |
This attribute specifies your Web Tools
user ID. See the Developer's
Guide for information on obtaining your USERID. For Example: USERID="XXXXXXX" |
NMTOKEN |
|
CarrierPickupChangeRequest /
PASSWORD |
Optional |
This attribute specifies your Web Tools
password. See the Developer's
Guide for information on your Password. For Example: PASSWORD="XXXXXXX" |
NMTOKEN |
|
CarrierPickupChangeRequest/
FirstName |
Required |
Only alpha characters, apostrophes,
spaces, periods and hyphens "-" may be used. For
example: <FirstName>John</FirstName> |
String |
minLength=0 |
CarrierPickupChangeRequest/
LastName |
Required |
Only alpha characters, apostrophes,
spaces, periods and hyphens "-" may be used. For
example: <LastName>Doe</LastName> |
String |
minLength=0 |
CarrierPickupChangeRequest/ FirmName |
Optional |
Only alpha and numeric characters,
apostrophes, spaces, hyphens "-" and ampersands "&"
may be used. Use this tag for a firm or company
name. FirmName is Optional except if First
Name and Last Name tags are null. Some firms/companies that have their
own ZIP codes require the use of firm name to properly identify their
address. For
example: <FirmName>ABC
Company</FirmName> |
String |
minLength=0 |
CarrierPickupChangeRequest/ SuiteOrApt |
Optional |
Apartment or suite number. Optional
except if needed to uniquely identify an address at a multiple dwelling
address, for example, an apartment building. For
example: <SuiteOrApt>Suite
777</SuiteOrApt> |
String |
minLength=0 |
CarrierPickupChangeRequest/
Address2 |
Required |
Use this tag for a street address. For example: <Address2>1390 Market
Street</Address2> |
String |
minLength=0 |
CarrierPickupChangeRequest/
Urbanization |
Required |
Use this tag for Urbanization (for Puerto
Rico only). ZIP Code prefixes 006 to 009, if area is so designated. |
String |
minLength=0 |
CarrierPickupChangeRequest/
City |
Required |
Use this tag for a city. Either ZIP5
or City and State are Required. For
example: <City>Houston</City> |
String |
minLength=0 |
CarrierPickupChangeRequest/
State |
Required |
Use this tag for a state
abbreviation. Either ZIP5 or City and State are Required. For
example: <State>TX</State> |
String |
minLength=0 |
CarrierPickupChangeRequest/
ZIP5 |
Required |
Use this tag for a 5
digit ZIP Code. Either ZIP5 or City and State are Required. For
example: <ZIP5>77058</ZIP5> |
String |
minLength=0 |
CarrierPickupChangeRequest/
ZIP4 |
Required |
Use this tag for a 4
digit ZIP Code. For
example: <ZIP4>1234</ZIP4> |
String |
minLength=0 |
CarrierPickupChangeRequest/
Phone |
Required |
Two formats are allowed: (###) 123-4567 or
###-123-4567. For
example: <Phone>(555)
555-1234</Phone> or <Phone>555-555-1234</Phone> |
String |
minLength=0 |
CarrierPickupChangeRequest/
Extension |
Required |
Extension related to the Phone Number For
example: <Extension>201</Extension> |
String |
minLength=0 |
CarrierPickupChangeRequest/
Package |
Required |
No values entered with this tag.
<ServiceType> and <Count> tags are
embedded under this. Refer to the XML request example section,
below, to see how these embedded tags are formatted. If the
<Count> for a service type is zero, you do not need to encode a
<Package> but you must have at least one <Package> with embedded
<ServiceType> and <Count> tags. |
(Group) |
|
CarrierPickupChangeRequest/
Package/ ServiceType |
Required |
This tag is embedded under the
<Package> tag. If your pickup contains more than one
Service Type, use additional <Package> tags for each service type with
the accompanying <ServiceType> and
<Count> tags. Refer to the Live XML Request Example
section, below, to see how these embedded tags are formatted. For
example: <ServiceType>PriorityMailExpress</ServiceType> Note: A pickup cannot be scheduled or changed when
there are only packages with <ServiceType>=
"OtherPackages” |
String |
Enumerations: · PriorityMailExpress · PriorityMail · ExpressMail · GroundAdvantage · Returns · International
· OtherPackages |
CarrierPickupChangeRequest/
Package/ Count |
Required |
This tag is embedded under the <Package>
tag. Enter the number of packages for the accompanying <ServiceType> tag. Maximum characters allowed: 3
or 999 packages There must be at least one Priority Mail Express Package or
one Priority Mail package or one returned merchandise package to make this a
valid request. If your pickup contains more than one Service Type, use
additional <Package> tags for each service type with the accompanying
<ServiceType> and <Count> tags.
Refer to the Live XML Request Example section, below, to see how these
embedded tags are formatted. For
example: <Count>2</Count> |
String |
minLength=0 minInclusive=1 |
CarrierPickupChangeRequest/ EstimatedWeight |
Required |
Enter the estimated aggregate weight (in
pounds) of all packages being picked up. For
example: <EstimatedWeight>14</EstimatedWeight> |
String |
minLength=0 |
CarrierPickupChangeRequest/ PackageLocation |
Required |
Note: "Other" requires
information in the value for the <SpecialInstructions>
tag. For
example: <PackageLocation>Front
Door</PackageLocation> |
String |
Enumeration: · Front Door · Back Door · Side Door · Knock on
Door/Ring Bell · Mail Room · Office · Reception · In/At
Mailbox · Other |
CarrierPickupChangeRequest/ SpecialInstructions |
Optional / Required |
Only alpha, numeric, commas, periods,
apostrophes, _, &, -, ( ), ?, #, / +, @ and
space characters may be used. Required when Package Location tag is
“Other” For
example: <SpecialInstructions>Packages
are behind the screen door.</SpecialInstructions> |
String |
minLength=0 |
CarrierPickupChangeRequest/ ConfirmationNumber |
Required |
Enter exact Confirmation Number returned
with Package Pickup Schedule request. For
example: ConfirmationNumber>ABC12345</ConfirmationNumber> |
String |
minLength=0 |
CarrierPickupChangeRequest/ EmailAddress |
Optional |
If provided, email notifications will be
sent confirming package pickup, or request changes and cancellations. Maximum
characters allowed: 50. For example: <EmailAddress>cpapple@email.com</EmailAddress> |
String |
minOccurs="0" minLength=0 |
CarrierPickupChangeRequest |
Required |
|
(Alias) |
|
<CarrierPickupChangeRequest USERID="XXXXXXXXX" PASSWORD=""> |
<FirstName>John</FirstName> |
<LastName>Doe</LastName> |
<FirmName>ABC Corp.</FirmName> |
<SuiteOrApt>Suite 777</SuiteOrApt> |
<Address2>1390 Market Street</Address2> |
<Urbanization></Urbanization> |
<City>Houston</City> |
<State>TX</State> |
<ZIP5>77058</ZIP5> |
<ZIP4>1234</ZIP4> |
<Phone>(555) 555-1234</Phone> |
<Extension>201</Extension> |
<Package> |
<ServiceType>PriorityMailExpress</ServiceType> |
<Count>2</Count> |
</Package> |
<Package> |
<ServiceType>PriorityMail</ServiceType> |
<Count>1</Count> |
</Package> |
<EstimatedWeight>14</EstimatedWeight> |
<PackageLocation>Front Door</PackageLocation> |
<SpecialInstructions> Packages are behind the screen door.</SpecialInstructions> |
<ConfirmationNumber>ABC12345</ConfirmationNumber> |
</CarrierPickupChangeRequest> |
Tag Name |
Occurs |
Description |
Type |
Validation |
CarrierPickupChangeResponse |
Required |
|
(Alias) |
|
CarrierPickupChangeResponse/
FirstName |
Required |
First name of person
sending request |
String |
|
CarrierPickupChangeResponse/
LastName |
Required |
Last name of person
sending request |
String |
|
CarrierPickupChangeResponse/ FirmName |
Optional |
Firm name sending
request (if supplied in request) |
String |
|
CarrierPickupChangeResponse/ SuiteOrApt |
Required |
Suite or apartment
(only returned in response if needed to uniquely identify the address, for
example, at a multiple dwelling address) |
String |
|
CarrierPickupChangeResponse/
Address2 |
Required |
Pickup address |
String |
|
CarrierPickupChangeResponse/
Urbanization |
Required |
Urbanization (if
supplied in request) |
String |
|
CarrierPickupChangeResponse/
City |
Required |
Pickup city |
String |
|
CarrierPickupChangeResponse/
State |
Required |
Pickup state |
String |
|
CarrierPickupChangeResponse/
ZIP5 |
Required |
Pickup ZIP Code |
String |
|
CarrierPickupChangeResponse/
ZIP4 |
Required |
Pickup ZIP Code+4 |
String |
|
CarrierPickupChangeResponse/
Phone |
Required |
Phone number of sender |
String |
|
CarrierPickupChangeResponse/
Extension |
Required |
Phone extension of
sender (if supplied in request) |
String |
|
CarrierPickupChangeResponse/
Package |
Required |
Packages to be
picked up (multiple <Package> tags can be returned with accompanying
<ServiceType> and <Count> tags. |
(group) |
|
CarrierPickupChangeResponse/
Package/ ServiceType |
Required |
Types of package
services requested |
String |
|
CarrierPickupChangeResponse/
Package/ Count |
Required |
Number of packages
for each service type requested |
String |
|
CarrierPickupChangeResponse/ EstimatedWeight |
Required |
Total estimated
weight of all packages to be picked up |
String |
|
CarrierPickupChangeResponse/ PackageLocation |
Required |
Location of pickup |
String |
|
CarrierPickupChangeResponse/ SpecialInstructions |
Optional |
Special instructions
for pickup |
String |
|
CarrierPickupChangeResponse/ ConfirmationNumber |
Required |
Confirmation number
for pickup |
String |
|
CarrierPickupChangeResponse/ DayOfWeek |
Required |
Day of week for
pickup |
String |
|
CarrierPickupChangeResponse/
Date |
Required |
Scheduled date for
pickup |
String |
|
CarrierPickupChangeResponse/
Status |
Optional |
Status of request to
change |
String |
|
CarrierPickupChangeResponse/ EmailAddress |
Optional |
Email Address (if
supplied in request) |
String |
|
CarrierPickupChangeResponse |
Required |
|
(Alias) |
|
<CarrierPickupChangeResponse> |
<FirstName>John</FirstName> |
<LastName>Doe</LastName> |
<FirmName>ABC Corp.</FirmName> |
<SuiteOrApt>Suite 777</SuiteOrApt> |
<Address2>1390 Market Street</Address2> |
<Urbanization></Urbanization> |
<City>Houston</City> |
<State>TX</State> |
<ZIP5>77058</ZIP5> |
<ZIP4>1234</ZIP4> |
<Phone>(555) 555-1234</Phone> |
<Extension>201</Extension> |
<Package> |
<ServiceType>PriorityMailExpress</ServiceType> |
<Count>2</Count> |
</Package> |
<Package> |
<ServiceType>PriorityMail</ServiceType> |
<Count>1</Count> |
</Package> |
<EstimatedWeight>14</EstimatedWeight> |
<PackageLocation>Front Door</PackageLocation> |
<SpecialInstructions>Packages are behind the screen door.</SpecialInstructions> |
<ConfirmationNumber>ABC12345</ConfirmationNumber> |
<DayOfWeek>Monday</DayOfWeek> |
<Date>04/01/2004</Date> |
<Status>Update successful</Status> |
</CarrierPickupChangeResponse> |
The Package Pickup Inquiry API provides the data contained in your original Pickup Schedule request. To use either the Pickup Cancel or Pickup Change API, the exact data from the original Schedule response must be entered. By using the Pickup Inquiry API, you can obtain the data needed.
Scheme |
Host |
Path |
API |
XML |
https:// |
secure.shippingapis.com |
/ShippingAPI.dll? |
API=CarrierPickupInquiry |
&XML=(see below) |
Tag Name |
Occurs |
Description |
Type |
Validation |
CarrierPickupInquiryRequest |
Required |
|
(Alias) |
|
CarrierPickupInquiryRequest
/ USERID |
Required |
This attribute specifies your Web Tools
user ID. See the Developer's
Guide for information on obtaining your USERID. For Example: USERID="XXXXXXX" |
NMTOKEN |
|
CarrierPickupInquiryRequest
/ PASSWORD |
Optional |
This attribute specifies your Web Tools
password. See the Developer's
Guide for information on your Password. For Example: PASSWORD="XXXXXXX" |
NMTOKEN |
|
CarrierPickupInquiryRequest
/ FirmName |
Optional |
Only alpha and numeric characters,
apostrophes, spaces, hyphens "-" and ampersands "&"
may be used. Firm or company name is optional except if
needed to uniquely identify an address. Some firms/companies that have their
own ZIP codes require the use of firm name to properly identify their
address. For
example: <FirmName>ABC
Company</FirmName> |
String |
minLength=0 |
CarrierPickupInquiryRequest
/ SuiteOrApt |
Required |
Apartment or suite number is optional
except if needed to uniquely identify an address at a multiple dwelling
address, for example, an apartment building. For
example: <SuiteOrApt>Suite
777</SuiteOrApt> |
String |
minLength=0 |
CarrierPickupInquiryRequest
/ Address2 |
Required |
Use this tag for a street address. For example: <Address2>1390 Market
Street</Address2> |
String |
minLength=0 |
CarrierPickupInquiryRequest
/ Urbanization |
Required |
Use this tag for an Urbanization (for
Puerto Rico only). ZIP Code prefixes 006 to 009, if area is so
designated. |
String |
minLength=0 |
CarrierPickupInquiryRequest
/ City |
Required |
Use this tag for a city. Either ZIP5
or City and State are Required For
example: <City>Houston</City> |
String |
minLength=0 |
CarrierPickupInquiryRequest
/ State |
Required |
Use this tag for a state
abbreviation. Either ZIP5 or City and State are Required. For
example: <State>TX</State> |
String |
minLength=0 |
CarrierPickupInquiryRequest
/ ZIP5 |
Required |
Use this tag for a 5
digit ZIP Code. Maximum characters allowed: 5. Either ZIP5 or City and
State are Required. For
example: <ZIP5>77058</ZIP5> |
String |
minLength=0 |
CarrierPickupInquiryRequest
/ ZIP4 |
Required |
Maximum characters allowed: 4. For
example: <ZIP4>1234</ZIP4> |
String |
minLength=0 |
CarrierPickupInquiryRequest
/ ConfirmationNumber |
Required |
Enter exact Confirmation Number returned
with Package Pickup Schedule request. For
example: <ConfirmationNumber>ABC12345</ConfirmationNumber> |
String |
minLength=1 |
CarrierPickupInquiryRequest |
Required |
|
(Alias) |
|
<CarrierPickupInquiryRequest USERID="XXXXXXXXX"
PASSWORD=""> |
<FirmName>ABC Corp.</FirmName> |
<SuiteOrApt>Suite 777</SuiteOrApt> |
<Address2>1390
Market Street</Address2> |
<Urbanization></Urbanization> |
<City>Houston</City> |
<State>TX</State> |
<ZIP5>77058</ZIP5> |
<ZIP4>1234</ZIP4> |
<ConfirmationNumber>ABC12345</ConfirmationNumber> |
</CarrierPickupInquiryRequest> |
Tag Name |
Occurs |
Description |
Type |
Validation |
CarrierPickupInquiryResponse/ |
Required |
|
(Alias) |
|
CarrierPickupInquiryResponse/ FirstName |
Required |
First name of person
sending request |
String |
|
CarrierPickupInquiryResponse/ LastName |
Required |
Last name of person
sending request |
String |
|
CarrierPickupInquiryResponse/ FirmName |
Required |
Firm name sending
request (if supplied in request) |
String |
|
CarrierPickupInquiryResponse/ SuiteOrApt |
Required |
Suite or apartment
(only returned in response if needed to uniquely identify the address, for example, at a multiple dwelling address) |
String |
|
CarrierPickupInquiryResponse/ Address2 |
Required |
Pickup address |
String |
|
CarrierPickupInquiryResponse/ Urbanization |
Required |
Urbanization (if supplied in request) |
String |
|
CarrierPickupInquiryResponse/ City |
Required |
Pickup city |
String |
|
CarrierPickupInquiryResponse/ State |
Required |
Pickup state |
String |
|
CarrierPickupInquiryResponse/ ZIP5 |
Required |
Pickup ZIP Code |
String |
|
CarrierPickupInquiryResponse/ ZIP4 |
Required |
Pickup ZIP Code+4 |
String |
|
CarrierPickupInquiryResponse/ Phone |
Required |
Phone number of the sender. |
String |
|
CarrierPickupInquiryResponse/ Extension |
Required |
Phone extension of sender (if supplied in request) |
String |
|
CarrierPickupInquiryResponse/ Package |
Required |
Packages to be picked up (multiple <Package>
tags can be returned with accompanying <ServiceType>
and <Count> tags. |
(group) |
|
CarrierPickupInquiryResponse/ Package/ ServiceType |
Required |
Types of package services requested |
String |
|
CarrierPickupInquiryResponse/ Package/ Count |
Required |
Number of packages for each service type requested |
String |
|
CarrierPickupInquiryResponse/ EstimatedWeight |
Required |
Total estimated weight of all packages to be picked up |
String |
|
CarrierPickupInquiryResponse/ PackageLocation |
Required |
Location of pickup |
String |
|
CarrierPickupInquiryResponse/ SpecialInstructions |
Required |
Special instructions for pickup |
String |
|
CarrierPickupInquiryResponse/ ConfirmationNumber |
Required |
Confirmation number for pickup |
String |
|
CarrierPickupInquiryResponse/ DayOfWeek |
Required |
Day of week for pickup |
String |
|
CarrierPickupInquiryResponse/ Date |
Required |
Scheduled date for pickup |
String |
|
CarrierPickupInquiryResponse/ EmailAddress |
Optional |
Email Address |
String |
|
CarrierPickupInquiryResponse/ |
Required |
|
(Alias) |
|
<CarrierPickupInquiryResponse> |
<FirstName>John</FirstName> |
<LastName>Doe</LastName> |
<FirmName>ABC Corp.</FirmName> |
<SuiteOrApt>Suite 777</SuiteOrApt> |
<Address2>1390 Market Street</Address2> |
<Urbanization></Urbanization> |
<City>Houston</City> |
<State>TX</State> |
<ZIP5>77058</ZIP5> |
<ZIP4>1234</ZIP4> |
<Phone>5555551234</Phone> |
<Extension>201</Extension> |
<Package> |
<ServiceType>PriorityMailExpress</ServiceType> |
<Count>2</Count> |
</Package> |
<Package> |
<ServiceType>PriorityMail</ServiceType> |
<Count>1</Count> |
</Package> |
<EstimatedWeight>14</EstimatedWeight> |
<PackageLocation>Front Door</PackageLocation> |
<SpecialInstructions> Packages are behind the screen door.</SpecialInstructions> |
<ConfirmationNumber>ABC12345</ConfirmationNumber> |
<DayOfWeek>Monday</DayOfWeek> |
<Date>04/01/2004</Date> |
</CarrierPickupInquiryResponse> |