Domestic Mail
Service
Standards

Version 2.1 (01/25/2015)

 

 

USPS Web Tools™

Application Programming Interface

User’s Guide

 

 

 

 

 

 

 

United States Postal Service Logo 

 

 


 


Contents

Introduction to Web Tools. 3

Before you get started: 3

USPS Priority Mail API. 3

Overview.. 3

API Signature. 3

Tag Descriptions - Request 4

Tag Descriptions - Response. 4

Sample Requests. 5

Error Responses. 5

USPS Package Services API. 6

Overview.. 6

API Signature. 6

Tag Descriptions - Request 6

Tag Descriptions – Response. 7

Sample Requests. 7

Error Responses. 8

USPS First Class Mail API. 9

Overview.. 9

API Signature. 9

Tag Descriptions - Request 9

Tag Descriptions – Response. 10

Sample Requests. 10

Error Responses. 11

USPS Express Mail Service Commitments API. 12

Overview.. 12

API Signature. 12

Tag Descriptions - Request 12

Tag Descriptions – Response. 14

Sample Requests. 16

Error Responses. 17

 


Introduction to Web Tools

This document contains a Reference Guide to the Domestice Service Standards APIs. See the Developer’s 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 trouble-shooting.

 

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. The Web Tool 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.

Before you get started:

Please refer to the Getting Started section of the Web Tools Developer page for instructions on registering with Web Tools at usps.com/webtools

USPS Priority Mail API

Overview

The Priority Mail Service Standards Web Tool receives requests and returns the number of days (on average) it will take a Priority Mail package to arrive at its destination. Ensure that end-users understand that these are service standards and not guaranteed commitments unless noted in the <IsGuaranteed> tag. The Priority Mail Service Standards Web Tool processes a single request.

API Signature

Scheme

Host

Path

API

XML

http://

production.shippingapis.com

/ShippingAPI.dll

?API=PriorityMail

&XML=(see below)

Tag Descriptions - Request

Tag Name

Occurs

Description

Type

PriorityMailRequest

required 

 

(group)

PriorityMailRequest USERID

required

This attribute specifies your Web Tools ID. See the Developer's Guide for information on obtaining your USERID.

 

For Example:

<TrackRequest USERID=”yourID”>

string

PriorityMailRequest / OriginZip

required

Origination and destination ZIP Codes must be valid.  Either  the first 3 digits or first 5 digits of the Zip Code are entered between the open tag and close tag. 

 

For example: <OriginZip>90210</OriginZip>

string

PriorityMailRequest / DestinationZip

required

Origination and destination ZIP Codes must be valid.  Either  the first 3 digits or first 5 digits of the Zip Code are entered between the open tag and close tag. 

 

For example: <DestinationZip>20770</DestinationZip>

string

PriorityMailRequest / DestinationType

optional

Destination Type for package. 

 

Valid Values:

“1” = PO-Addressee – Street (Default Value)

“2” = PO-Addressee – PO Box

“3” = Hold For Pick-up

 

For example: <DestinationType>1</DestinationType>

string

PriorityMailRequest / PMGuarantee

optional

Indicator to display Priority Mail Guarantee information.

 

Valid Values:

“Y” = Yes, display

“N” = No, do not display (Default Value)

string

Tag Descriptions - Response

Tag Name

Occurs

Description

Type

PriorityMailResponse

required 

 

(group)

PriorityMailResponse / OriginZip

required

OriginationZip sent in request.

 

string

PriorityMailResponse / DestinationZip

required

DestinationZip sent in request.

 

string

PriorityMailResponse / Days

optional

Numbers of days expected to deliver.

 

string

PriorityMailResponse / IsGuaranteed

optional

Indicates if Guaranee is offered. Will only be returned if the PMGuarantee in the request is set to “Y”.

 

Valid Values:

  “1” = Guaranteed

  “2” = No Guarantee

  “3” = Temporary No Guarantee

string

PriorityMailResponse / Message

optional

Service Standards Messaging. Appears when applicable.

string

PriorityMailResponse / EffectiveAcceptanceDate

optional

Effective Acceptance Date is returned when <DestinationType> is specified in the request.

string

PriorityMailResponse / ScheduledDeliveryDate

optional

Scheduled Delivery Date is returned when <DestinationType> is specified in the request.

string

 

Sample Requests

All requests should hit the http://production.shippingapis.com/ShippingAPI.dll end point with the API=PriorityMail and XML=<the sample XML request below> key value pairs using either a HTTP POST or a HTTP GET.

Test XML Request:

<PriorityMailRequest USERID=”xxxxxxxx”>

                <OriginZip>90201</OriginZip>

                <DestinationZip>21114</DestinationZip>

              <PMGuarantee>Y</PMGuarantee>

</PriorityMailRequest> 

 

Test XML Response:

<PriorityMailResponse>

<OriginZip>90201</OriginZip>

<DestinationZip>21114</DestinationZip>

<Days>4</Days>

<IsGuaranteed>1</IsGuaranteed >

</PriorityMailResponse>

Error Responses

Error conditions are handled at the main XML document level.  When parsing, it is best to check for an error document first before checking for good data.  Error documents have the following format:

<Error>

<Number></Number>

<Source></Source>

<Description></Description>

<HelpFile></HelpFile>

<HelpContext></HelpContext>

</Error>

Where:

·         Number = the error number generated by the Web Tools server.

·         Source = the component and interface that generated the error on the Web Tools server.

·         Description = the error description.

·         HelpFile = [reserved for future use].

·         HelpContext = [reserved for future use].

 Below is an example for an error that occurred because the origin zip code was sent as “abcde”, which is not numeric:

 

<Error>

<Number>-2147219046</Number>

<Source>clsPriorityMail:lGetServiceStandard</Source>

<Description>Error processing Destination Zip Code.  Zip Codes must be numeric.</Description>

<HelpFile></HelpFile>

<HelpContext></HelpContext>

</Error>

 

If you need assistance with an error response, contact the Internet Customer Care Center uspstechnicalsupport@mailps.custhelp.com.

USPS Package Services API

Overview

The Package Services Service Standards Web Tool receives requests and returns the average number of days it will take a package to arrive at its destination.  There are four types of Package Services: Standard Post, Bound Printed Matter, Library Mail, and Media Mail.  The Package Services Service Standards Web Tool processes a single request.  Ensure that end-users understand that these are service standards and not guaranteed commitments.

API Signature

Scheme

Host

Path

API

XML

http://

production.shippingapis.com

/ShippingAPI.dll

?API=StandardB

&XML=(see below)

Tag Descriptions - Request

Tag Name

Occurs

Description

Type

StandardBlRequest

required 

 

(group)

StandardBRequest USERID

required

This attribute specifies your Web Tools ID. See the Developer's Guide for information on obtaining your USERID.

 

For Example:

<TrackRequest USERID=”yourID”>

string

StandardBRequest / OriginZip

required

Origination and destination ZIP Codes must be valid.  Either  the first 3 digits or first 5 digits of the Zip Code are entered between the open tag and close tag. 

 

For example: <OriginZip>90210</OriginZip>

string

StandardBRequest / DestinationZip

required

Origination and destination ZIP Codes must be valid.  Either  the first 3 digits or first 5 digits of the Zip Code are entered between the open tag and close tag. 

 

For example: <DestinationZip>20770</DestinationZip>

string

StandardBRequest / DestinationType

optional

Destination Type for package. 

 

Valid Vvalues:

“1” = PO-Addressee – Street (Default Value)

“2” = PO-Addressee – PO Box

“3” = Hold For Pick-up

 

For example: <DestinationType>1</DestinationType>

string

Tag Descriptions – Response

Tag Name

Occurs

Description

Type

StandardBResponse

required 

 

(group)

StandardBResponse / OriginZip

required

OriginationZip sent in request.

 

string

StandardBResponse / DestinationZip

required

DestinationZip sent in request.

 

string

StandardBResponse / Days

optional

Numbers of days expected to deliver.

 

string

StandardBResponse / Message

optional

Service Standards Messaging. Appears when applicable.

string

StandardBResponse / EffectiveAcceptanceDate

optional

Effective Acceptance Date is returned when <DestinationType> is specified in the request.

string

StandardBResponse / ScheduledDeliveryDate

optional

Scheduled Delivery Date is returned when <DestinationType> is specified in the request.

string

Sample Requests

All requests should hit the http://production.shippingapis.com/ShippingAPI.dll end point with the API=StandardB and XML=<the sample XML request below> key value pairs using either a HTTP POST or a HTTP GET.

 

Test XML Request:

<StandardBRequest USERID=”xxxxxxxx”>

                <OriginZip>90201</OriginZip>

                <DestinationZip>21114</DestinationZip>

                </ StandardBRequest > 

 

Test XML Response:

< StandardBRequest >

<OriginZip>90201</OriginZip>

<DestinationZip>21114</DestinationZip>

<Days>7</Days>

</ StandardBRequest >

Error Responses

Error conditions are handled at the main XML document level.  When parsing, it is best to check for an error document first before checking for good data.  Error documents have the following format:

<Error>

<Number></Number>

<Source></Source>

<Description></Description>

<HelpFile></HelpFile>

<HelpContext></HelpContext>

</Error>

Where:

·         Number = the error number generated by the Web Tools server.

·         Source = the component and interface that generated the error on the Web Tools server.

·         Description = the error description.

·         HelpFile = [reserved for future use].

·         HelpContext = [reserved for future use].

Below is an example for an error that occurred because the origin zip code was sent as “abcde”, which is not numeric:

 

<Error>

<Number>-2147219047</Number>

<Source>clsStandardB:lGetServiceStandard</Source>

<Description>Error processing Destination Zip Code.  Zip Codes must be numeric.</Description>

<HelpFile></HelpFile>

<HelpContext></HelpContext>

</Error>

 

If you need assistance with an error response, contact the Internet Customer Care Center uspstechnicalsupport@mailps.custhelp.com.

 

USPS First Class Mail API

Overview

The First Class Mail Service Standards Web Tool receives requests and returns the average number of days it will take a package to arrive at its destination.  The First Class Mail Service Standards Web Tool processes a single request.  Ensure that end-users understand that these are service standards and not guaranteed commitments.

API Signature

Scheme

Host

Path

API

XML

http://

production.shippingapis.com

/ShippingAPI.dll

?API=FirstClassMail

&XML=(see below)

Tag Descriptions - Request

Tag Name

Occurs

Description

Type

FirstClassMailRequest

required 

 

(group)

FirstClassMailRequest USERID

required

This attribute specifies your Web Tools ID. See the Developer's Guide for information on obtaining your USERID.

 

For Example:

<TrackRequest USERID=”yourID”>

string

FirstClassMailRequest / OriginZip

required

Origination and destination ZIP Codes must be valid.  Either  the first 3 digits or first 5 digits of the Zip Code are entered between the open tag and close tag. 

 

For example: <OriginZip>90210</OriginZip>

string

FirstClassMailRequest / DestinationZip

required

Origination and destination ZIP Codes must be valid.  Either  the first 3 digits or first 5 digits of the Zip Code are entered between the open tag and close tag. 

 

For example: <DestinationZip>20770</DestinationZip>

string

FirstClassMailRequest / DestinationType

optional

Destination Type for package. 

 

Valid Values:

“1” = PO-Addressee – Street (Default Value)

“2” = PO-Addressee – PO Box

“3” = Hold For Pick-up

 

For example: <DestinationType>1</DestinationType>

string

FirstClassMailRequest / ClientType

optional

Client Type to designate sender.

 

Valid Values:

  “1” = POS

  “2” = SSK

  “3” = PTR

  “4” = WebTools

  “5” = CARS

  “6” = RSS

  “7” = RateCalc SDK

  “8” = CNS

  “9” = CNS-B

“10” = CCC

“11” = EVS

“14” = RateCalc

Note: If the tag is not sent, a default value of “4” will be used.

 

For example: <ClientType>8</ClientType>

string

Tag Descriptions – Response

Tag Name

Occurs

Description

Type

FirstClassMailResponse

required 

 

(group)

FirstClassMailResponse / OriginZip

required

OriginationZip sent in request.

 

string

FirstClassMailResponse / DestinationZip

required

DestinationZip sent in request.

 

string

FirstClassMailResponse / Days

optional

Numbers of days expected to deliver.

 

string

FirstClassMailResponse / Message

optional

Service Standards Messaging. Appears when applicable.

string

FirstClassMailResponse / EffectiveAcceptanceDate

optional

Effective Acceptance Date is returned when <DestinationType> is specified in the request.

string

FirstClassMailResponse / ScheduledDeliveryDate

optional

Scheduled Delivery Date is returned when <DestinationType> is specified in the request.

string

Sample Requests

All requests should hit the http://production.shippingapis.com/ShippingAPI.dll end point with the API=FirstClassMail and XML=<the sample XML request below> key value pairs using either a HTTP POST or a HTTP GET.

Test XML Request:

<FirstClassMailRequest USERID=”xxxxxxxx”>

                <OriginZip>90201</OriginZip>

                <DestinationZip>21114</DestinationZip>

                <ClientType>8</ClientType>

</FirstClassMailRequest> 

 

Test XML Response:

<FirstClassMailResponse>

<OriginZip>90201</OriginZip>

<DestinationZip>21114</DestinationZip>

<Days>3</Days>

</FirstClassMailResponse>

Error Responses

Error conditions are handled at the main XML document level.  When parsing, it is best to check for an error document first before checking for good data.  Error documents have the following format:

<Error>

<Number></Number>

<Source></Source>

<Description></Description>

<HelpFile></HelpFile>

<HelpContext></HelpContext>

</Error>

Where:

·         Number = the error number generated by the Web Tools server.

·         Source = the component and interface that generated the error on the Web Tools server.

·         Description = the error description.

·         HelpFile = [reserved for future use].

·         HelpContext = [reserved for future use].

Below is an example for an error that occurred because the origin zip code was sent as “abcde”, which is not numeric:

 

<Error>

<Number>-2147219047</Number>

<Source>clsFirstClassMail:lGetServiceStandard</Source>

<Description>Error processing Destination Zip Code.  Zip Codes must be numeric.</Description>

<HelpFile></HelpFile>

<HelpContext></HelpContext>

</Error>

 

If you need assistance with an error response, contact the Internet Customer Care Center uspstechnicalsupport@mailps.custhelp.com.

 

USPS Express Mail Service Commitments API

Overview

The Express Mail Service Commitments Web Tool provides delivery commitments for Express Mail packages.  A user provides an origination and a destination ZIP Code and an optional current or future date that the package will be shipped.  The Web Tool returns all the Express Mail Service Commitments for the given locations to include package drop-off information.

API Signature

Scheme

Host

Path

API

XML

http://

production.shippingapis.com

/ShippingAPI.dll

?API=ExpressMailCommitment

&XML=(see below)

Tag Descriptions - Request

Tag Name

Occurs

Description

Type

ExpressMailCommitmentRequest

required 

 

(group)

ExpressMailCommitmentRequest USERID

required

This attribute specifies your Web Tools ID. See the Developer's Guide for information on obtaining your USERID.

 

For Example:

<TrackRequest USERID=”yourID”>

string

ExpressMailCommitmentRequest / OriginZip

required

5 Digit ZIP Code of the package destination. 

 

For example: <OriginZip>90210</OriginZip>

string

ExpressMailCommitmentRequest / DestinationZip

required

Origination and destination ZIP Codes must be valid.  Either  the first 3 digits or first 5 digits of the Zip Code are entered between the open tag and close tag. 

 

For example: <DestinationZip>20770</DestinationZip>

string

ExpressMailCommitmentRequest / Date

required

Date package is shipped.  Can be left blank.  Can use formats MM/DD/YYYY or DD-MMM-YYYY.

 

For example:

<Date>05-May-2014</Date>

string

ExpressMailCommitmentRequest / DropOffTime

optional

Time package is shipped.  This tag can be omitted or left blank.  Use format HH:MM such as 13:30.

 

For example:

< DropOffTime >15:00</ DropOffTime >

string

ExpressMailCommitmentRequest / ReturnDates

optional

Indicates if Scheduled Delivery and Effective Acceptance dates should be returned.  Specify ‘true’ or ‘false’

 

For example:

<ReturnDates>true</ReturnDates>

string

ExpressMailCommitmentRequest / PMGuarantee

optional

Indicator to display Priority Mail Guarantee information.

 

Valid Values:

“Y” = Yes, display

“N” = No, do not display (Default Value)

string

 


 

Tag Descriptions – Response

Tag Name

Occurs

Description

Type

ExpressMailCommitmentResponse

required 

 

(group)

ExpressMailCommitmentResponse / OriginZip

required

OriginationZip sent in request.

 

string

ExpressMailCommitmentResponse / OriginCity

required

Originating City.

string

ExpressMailCommitmentResponse / OriginState

required

Originating State.

string

ExpressMailCommitmentResponse / DestinationZip

required

DestinationZip sent in request.

 

string

ExpressMailCommitmentResponse / DestinationCity

required

Destinating City.

string

ExpressMailCommitmentResponse / DestinationState

required

Destinating State.

string

ExpressMailCommitmentResponse / Date

required

Date package shipped.

string

ExpressMailCommitmentResponse / Time

required

Time.

string

ExpressMailCommitmentResponse / ExpeditedTransMessage

optional

Expedited Transportation Message. Returned when applicable and the request has the ReturnDates set to true.

string

ExpressMailCommitmentResponse / MsgCode

optional

Message Code. Returned when applicable and the request has the ReturnDates set to true.

string

ExpressMailCommitmentResponse / Msg

optional

Message Text. Returned when applicable and the request has the ReturnDates set to true.

string

ExpressMailCommitmentResponse / EffectiveAcceptanceDate

optional

Effective Acceptance Date. Returned when the request has the ReturnDates set to true.

string

ExpressMailCommitmentResponse / Commitment

optional

Holds the details of a commitment. Returned if valid.

(group)

ExpressMailCommitmentResponse / Commitment / Name

optional

Commitment Name

 

Valid Values:

‘Blank’

1-Day

2-Day

3-Day

DPO

Military

string

ExpressMailCommitmentResponse / Commitment / Time

optional

Commitment Time. (eg: 3:00 PM)

string

ExpressMailCommitmentResponse / Commitment / Sequence

optional

Commitment Sequence

 

Valid Values:

Seq #     Service Standard

A0110    1-Day at 10:30 AM 

B0110    1-Day at 10:30 AM  HFPU

A0112  1-Day at 12:00 PM 

A0115    1-Day at 3:00 PM 

B0115    1-Day at 3:00 PM  HFPU

A0210   2-Day at 10:30 AM 

A0212   2-Day at 12:00 PM 

A0215    2-Day at 3:00 PM 

B0210    2-Day at 10:30 AM  HFPU

B0215   2-Day at 3:00 PM  HFPU

string

ExpressMailCommitmentResponse / Commitment / Location

optional

Groups drop off location information.

(group)

ExpressMailCommitmentResponse / Commitment / Location / ScheduledDeliveryDate

optional

Scheduled Delivery Date. Returned when the request has the ReturnDates set to true.

string

ExpressMailCommitmentResponse / Commitment / Location / CutOff

optional

Cut-Off Time.

string

ExpressMailCommitmentResponse / Commitment / Location / Facility

optional

Facility Type

 

Valid Values:

 “POST OFFICE”

“PRIORITY MAIL EXPRESS COLLECTION BOX”

“AIR MAIL FACILITY”

string

ExpressMailCommitmentResponse / Commitment / Location / Street

optional

Facility Street

string

ExpressMailCommitmentResponse / Commitment / Location / City

optional

Facility City

string

ExpressMailCommitmentResponse / Commitment / Location / State

optional

Facility State

string

ExpressMailCommitmentResponse / Commitment / Location / ZIp

optional

Facility Zip Code

string

ExpressMailCommitmentResponse / Commitment / Location /  IsGuaranteed

optional

Indicates if Guaranee is offered. Will only be returned if the PMGuarantee in the request is set to “Y”.

 

Valid Values:

  “1” = Guaranteed

  “2” = No Guarantee

  “3” = Temporary No Guarantee

string

ExpressMailCommitmentResponse / Message

optional

Message indicating over 200 location, when there are more than the 200 returned.

string

 

Sample Requests

All requests should hit the http://production.shippingapis.com/ShippingAPI.dll end point with the API=ExpressMailCommitment and XML=<the sample XML request below> key value pairs using either a HTTP POST or a HTTP GET.

Test XML Request:

<ExpressMailCommitmentRequest USERID=”xxxxxxxx”>

                <OriginZip>90201</OriginZip>

                <DestinationZip>21114</DestinationZip>

              <Date></Date>

              <PMGuarantee>Y</PMGuarantee>

              <ClientType>8</ClientType>

</ExpressMailCommitmentRequest> 

 

Test XML Response:

<ExpressMailCommitmentResponse>

  <OriginZIP>90201</OriginZIP>

  <OriginCity>BELL GARDENS</OriginCity>

  <OriginState>CA</OriginState>

  <DestinationZIP>21114</DestinationZIP>

  <DestinationCity>CROFTON</DestinationCity>

  <DestinationState>MD</DestinationState>

  <Date>3-Jul-2014</Date>

  <Time>7:51AM</Time>

  <EffectiveAcceptanceDate>2014-07-03</EffectiveAcceptanceDate>

  <Commitment>

    <CommitmentName>2-Day</CommitmentName>

    <CommitmentTime>3:00 PM</CommitmentTime>

    <CommitmentSequence>A0215</CommitmentSequence>

    <Location>

      <ScheduledDeliveryDate>2014-07-05</ScheduledDeliveryDate>

      <CutOff>5:00 PM</CutOff>

      <Facility>POST OFFICE</Facility>

      <Street>7001 GARFIELD AVE</Street>

      <City>BELL GARDENS</City>

      <State>CA</State>

      <Zip>90201</Zip>

      <IsGuaranteed>1</IsGuaranteed>

    </Location>

    <Location>

      <ScheduledDeliveryDate>2014-07-05</ScheduledDeliveryDate>

      <CutOff>4:45 PM</CutOff>

      <Facility>POST OFFICE</Facility>

      <Street>4619 ELIZABETH ST</Street>

      <City>CUDAHY</City>

      <State>CA</State>

      <Zip>90201</Zip>

      <IsGuaranteed>1</IsGuaranteed>

    </Location>

    <Location>

      <ScheduledDeliveryDate>2014-07-05</ScheduledDeliveryDate>

      <CutOff>2:00 PM</CutOff>

      <Facility>POST OFFICE</Facility>

      <Street>5555 BANDINI BLVD</Street>

      <City>BELL GARDENS</City>

      <State>CA</State>

      <Zip>90201</Zip>

      <IsGuaranteed>1</IsGuaranteed>

    </Location>

  </Commitment>

  <Commitment>

    <CommitmentName>2-Day</CommitmentName>

    <CommitmentTime>3:00 PM</CommitmentTime>

    <CommitmentSequence>B0215</CommitmentSequence>

    <Location>

      <ScheduledDeliveryDate>2014-07-07</ScheduledDeliveryDate>

      <CutOff>5:00 PM</CutOff>

      <Facility>POST OFFICE</Facility>

      <Street>7001 GARFIELD AVE</Street>

      <City>BELL GARDENS</City>

      <State>CA</State>

      <Zip>90201</Zip>

      <IsGuaranteed>1</IsGuaranteed>

    </Location>

    <Location>

      <ScheduledDeliveryDate>2014-07-07</ScheduledDeliveryDate>

      <CutOff>4:45 PM</CutOff>

      <Facility>POST OFFICE</Facility>

      <Street>4619 ELIZABETH ST</Street>

      <City>CUDAHY</City>

      <State>CA</State>

      <Zip>90201</Zip>

      <IsGuaranteed>1</IsGuaranteed>

    </Location>

    <Location>

      <ScheduledDeliveryDate>2014-07-07</ScheduledDeliveryDate>

      <CutOff>2:00 PM</CutOff>

      <Facility>POST OFFICE</Facility>

      <Street>5555 BANDINI BLVD</Street>

      <City>BELL GARDENS</City>

      <State>CA</State>

      <Zip>90201</Zip>

      <IsGuaranteed>1</IsGuaranteed>

    </Location>

  </Commitment>

</ExpressMailCommitmentResponse>

Error Responses

Error conditions are handled at the main XML document level.  When parsing, it is best to check for an error document first before checking for good data.  Error documents have the following format:

<Error>

<Number></Number>

<Source></Source>

<Description></Description>

<HelpFile></HelpFile>

<HelpContext></HelpContext>

</Error>

Where:

·         Number = the error number generated by the Web Tools server.

·         Source = the component and interface that generated the error on the Web Tools server.

·         Description = the error description.

·         HelpFile = [reserved for future use].

·         HelpContext = [reserved for future use].

An error code can be returned for invalid data as well as messages pertaining to given zip codes/ Below is an example for an error that was returned because the service is not guaranteed.

 

<Error>

<Number>-2147219293</Number>

<Source>clsEMCommitments:Respond</Source>

<Description>Priority Mail Express service is available to your supplied destination ZIP Code. However the delivery date cannot  be guaranteed.Description>

<HelpFile></HelpFile>

<HelpContext></HelpContext>

</Error>

 

If you need assistance with an error response, contact the Internet Customer Care Center uspstechnicalsupport@mailps.custhelp.com.