Herramientas web
Abril 2019
ExpressMail API Retirement Transition Guide
Índice
1.1 Request XML Considerations
1.2 Response XML Considerations
We are advising applications currently using the Web Tools ExpressMail API to transition over to the ExpressMailCommitment API at your earliest convenience to receive accurate Priority Mail Express service standards and commitments. You may use your current USERID and the following URL scheme, host and path to access the ExpressMailCommitment API:
· TEST: http://stg-production.shippingapis.com/ShippingApi.dll
· PROD: http://production.shippingapis.com/ShippingApi.dll
The steps below will outline the best way to transition. Please be sure to review the API documentation at https://es.usps.com/business/web-tools-apis/welcome.htm for more details on all of the features and functionality.
The below table includes the XML request tags that currently exist in the ExpressMailCommitment API:
Tag Name |
Occurs |
Descripción |
Tipo |
ExpressMailCommitmentRequest |
obligatorio |
|
(group)
|
ExpressMailCommitmentRequest USERID |
obligatorio |
This attribute specifies your Web Tools ID. See the Developer's Guide for information on obtaining your USERID. Por Ejemplo: <ExpressMailCommitmentRequest USERID="your USERID"> |
string |
ExpressMailCommitmentRequest / OriginZIP |
obligatorio
|
5 Digit ZIP Code of the package destination. Por ejemplo: <OriginZIP>90210</OriginZIP> |
string |
ExpressMailCommitmentRequest / DestinationZIP |
obligatorio |
Origination and destination ZIP Codes must be valid and must be 5 digits. Por ejemplo: <DestinationZIP>20770</DestinationZIP> |
string |
ExpressMailCommitmentRequest / Date |
obligatorio |
Date package is shipped. Can be left blank. Can use formats MM/DD/YYYY or DD-MMM-YYYY. Por ejemplo: <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. Por ejemplo: <DropOffTime>15:00</DropOffTime> |
string |
ExpressMailCommitmentRequest / ReturnDates |
optional |
Indicates if Scheduled Delivery and Effective Acceptance dates should be returned. Specify ‘true’ or ‘false’ Por ejemplo: <ReturnDates>true</ReturnDates> |
string |
ExpressMailCommitmentRequest / PMGuarantee |
optional |
Indicator to display Guarantee information for applicable service types. Valid Values: “Y” = Yes, display “N” = No, do not display (Default Value) |
String |
ExpressMailCommitmentRequest |
required once |
|
(alias) |
The following table demonstrates the XML request and the highlighted updates needed when transitioning to ExpressMailCommitment:
Step 1) Replace the API Name in the URL and opening request tags:
· API=ExpressMail&XML=<ExpressMailRequest
· à API=ExpressMailCommitment&XML=<ExpressMailCommitmentRequest
Step 2) Replace the API Name in the closing request tags:
· </ExpessMailRequest> à </ExpressMailCommitmentRequest>
http://production.shippingapis.com/ShippingApi.dll?API=ExpressMailCommitment&XML=<ExpressMailCommitmentRequest USERID=" XXXXXXXX"> <OriginZIP>90210</OriginZIP> <DestinationZIP>26505</DestinationZIP> <Date></Date> </ExpressMailCommitmentRequest>
|
The below table includes the XML response tags that currently exist in the ExpressMailCommitment API:
Tag Name |
Occurs |
Descripción |
Tipo |
ExpressMailCommitmentResponse |
obligatorio |
|
(group)
|
ExpressMailCommitmentResponse / OriginZip |
obligatorio
|
OriginationZip sent in request. |
string |
ExpressMailCommitmentResponse / OriginCity |
obligatorio
|
Originating City. |
string |
ExpressMailCommitmentResponse / OriginState |
obligatorio
|
Originating State. |
string |
ExpressMailCommitmentResponse / DestinationZip |
obligatorio |
DestinationZip sent in request. |
string |
ExpressMailCommitmentResponse / DestinationCity |
obligatorio
|
Destinating City. |
string |
ExpressMailCommitmentResponse / DestinationState |
obligatorio
|
Destinating State. |
string |
ExpressMailCommitmentResponse / Date |
obligatorio |
Date package shipped. |
string |
ExpressMailCommitmentResponse / Time |
obligatorio |
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 Dirección militar |
string |
ExpressMailCommitmentResponse / Commitment / Time |
optional |
Commitment Time. (eg: 3:00 p.m.) |
string |
ExpressMailCommitmentResponse / Commitment / Sequence |
optional |
Commitment Sequence Valid Values: Seq # Service Standard A0110 1-Day at 10:30 a.m. B0110 1-Day at 10:30 AM HFPU A0112 1-Day at 12:00 p.m. A0115 1-Day at 3:00 p.m. B0115 1-Day at 3:00 PM HFPU A0210 2-Day at 10:30 a.m. A0212 2-Day at 12:00 p.m. A0215 2-Day at 3:00 p.m. B0210 2-Day at 10:30 a.m. 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 |
Fecha de entrega programada. 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 Guarantee 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 |
The ExpressMailCommitment API will return additional information as well as all the information previously returned for the ExpressMail API. To demonstrate see the response below for the above XML request:
ExpressMailCommitment Response |
<ExpressMailCommitmentResponse> <OriginZIP>90210</OriginZIP> <OriginCity>BEVERLY HILLS</OriginCity> <OriginState>CA</OriginState> <DestinationZIP>26505</DestinationZIP> <DestinationCity>MORGANTOWN</DestinationCity> <DestinationState>WV</DestinationState> <Date>16-Jan-2019</Date> <Time>8:58AM</Time> -<Commitment> <CommitmentName>1-Day</CommitmentName> <CommitmentTime>3:00 p.m.</CommitmentTime> <CommitmentSequence>A0115</CommitmentSequence> -<Location> <CutOff>4:00 p.m.</CutOff> <Facility>EN OFICINA POSTAL</Facility> <Street>325 N MAPLE DR</Street> <City>BEVERLY HILLS</City> <State>CA</State> <Zip>90210</Zip> </Location> -<Location> <CutOff>3:00 p.m.</CutOff> <Facility>EN OFICINA POSTAL</Facility> <Street>323 N CRESCENT DR</Street> <City>BEVERLY HILLS</City> <State>CA</State> <Zip>90210</Zip> </Location> +<Location> +<Location> +<Location> +<Location> +<Location> </Commitment> -<Commitment> <CommitmentName>1-Day</CommitmentName> <CommitmentTime>3:00 p.m.</CommitmentTime> <CommitmentSequence>B0115</CommitmentSequence> +<Location> +<Location> +<Location> +<Location> +<Location> +<Location> -<Location> <CutOff>4:30 p.m.</CutOff> <Facility>BUZÓN DE EXPRESS MAIL</Facility> <Street>9665 WILSHIRE BLVD</Street> <City>BEVERLY HILLS</City> <State>CA</State> <Zip>90210</Zip> </Location> </Commitment> </ExpressMailCommitmentResponse> |