Rate Calculator APIs
USPS Web Tools™
Application Programming Interface
用户指南
Version 3.19 (11/01/2024)
目录
1.1........ Before you get started:
2.0 Domestic Rates API - RateV4
2.2........ Request Descriptions
2.3........ Response Descriptions
3.0 International Rates API – IntlRateV2
3.2........ Request Descriptions
3.3........ Response Descriptions
5.0 Appendix A – RateV4 CLASSID Values
6.0 Appendix B – IntlRateV2 Service ID Values
This document contains a Reference Guide to the Rate Calculator APIs, RateV4 and IntlRateV2. 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 troubleshooting.
备注: 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:
<Pounds>2</Pounds>
In this instance, you will replace “2” with the weight in pounds for the package.
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. If you need assistance with an error response, contact the USPS Internet Customer Care Center (ICCC) https://Emailus.usps.com/.
The RateV4 API lets customers calculate the rate for domestic packages and envelopes given the weight and dimensions of the item. The RateV4 API limits the data requested to twenty-five (25) packages per transaction.
Scheme |
Host |
小道 |
API |
XML |
https:// |
secure.shippingapis.com |
/ShippingAPI.dll? |
API=RateV4 |
&XML=(see Tag Descriptions below) |
Tag Name |
Occurs |
描述 |
类型 |
Validation |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request |
需要 |
API=RateV4 This API returns the current USPS postage corresponding to the parameters given. |
(Group) |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / USERID |
需要 |
This attribute specifies your Web Tools user ID. See the Developer's Guide for information on obtaining your USERID. 例如:USERID="XXXXXXX" |
NMTOKEN |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / PASSWORD |
Optional |
This attribute specifies your Web Tools password. See the Developer's Guide for information on your Password. 例如:PASSWORD="XXXXXXX" |
NMTOKEN |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Revision |
Optional |
Set this value to “2” to return all currently documented response fields. 例如: <Revision>2</Revision> |
String |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package |
Required repeating up to 25 times |
See the RateV4 Service Request chart for valid combinations of the following tags. |
(Group) |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Service |
需要 |
Web Tools validates the entry to one of the service types. 例如: <Service>PRIORITY MAIL EXPRESS</Service> 注意: For users that want to return all eligible products in a single RateV4 API call, please see details below regarding “ALL” calls:
|
String |
whiteSpace=collapse · ALL · ONLINE · PLUS · PRIORITY · PRIORITY COMMERCIAL · PRIORITY MAIL CUBIC · PRIORITY MAIL RETURN · PRIORITY MAIL CUBIC RETURN · FIRST CLASS · FIRST CLASS COMMERCIAL · PRIORITY MAIL EXPRESS · PRIORITY MAIL EXPRESS COMMERCIAL · PRIORITY MAIL EXPRESS RETURN · GROUND ADVANTAGE · GROUND ADVANTAGE COMMERCIAL · GROUND ADVANTAGE CUBIC · GROUND ADVANTAGE RETURN · PARCEL SELECT DE · MEDIA · LIBRARY · BPM · CONNECT LOCAL |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Service DelOpt |
Optional |
This attribute specifies the service delivery option beyond normal/standard delivery. When the service delivery option attribute is indicated, the results returned will satisfy both the mail class and delivery option indicated. 例如: <Service DelOpt="HAZMAT">PRIORITY</Service>
|
String |
Default=UNKNOWN Enumerations= · HAZMAT · PARCELLOCKER · HFP · SUNHOL · STANDARD · UNKNOWN |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / FirstClassMailType |
Optional |
The <FirstClassMailType> tag is returned only if the <ServiceType> submitted is “First Class” <FirstClassMailType>LETTER</FirstClassMailType> 注意: Flats are also known as Large Envelopes |
String |
whiteSpace=collapse Enumerations= · LETTER · FLAT · POSTCARD · LARGE POSTCARD |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / ZipOrigination |
需要 |
ZIP code must be valid. 例如: <ZipOrigination>20770</ZipOrigination> |
String |
whiteSpace=collapse |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / ZipDestination |
需要 |
ZIP code must be valid. 例如: <ZipDestination>54324</ZipDestination> |
String |
length=5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Pounds |
需要 |
Value must be numeric. Package weight cannot exceed 70 pounds. 例如: <Pounds>2</Pounds> <Pounds>2.12345678</Pounds> |
String |
maxInclusive=70 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Ounces |
需要 |
Value must be numeric. Package weight cannot exceed 70 pounds (1120 ounces). 例如: <Ounces>0</Ounces> <Ounces>0.12345678</Ounces> |
String |
maxInclusive=1120.0 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Container |
需要 |
Use to specify container attributes that may affect postage; otherwise, leave blank. 注意: When <Service>=“PRIORITY MAIL CUBIC”, “PRIORITY MAIL CUBIC RETURN” or “GROUND ADVANTAGE CUBIC”, the only valid containers are “CUBIC PARCELS” or “CUBIC SOFT PACK”. It is recommended to pass the largest Cubic dimension as “Length” in <Length> request tag and the second largest dimension as “Width” in <Width> request tag. 注意: “VARIABLE” is used to denote that a customer is using packaging other than a USPS-produced Flat Rate Box/Envelope”. 注意: <Container> enumerations: “SM FLAT RATE BAG”, “LG FLAT RATE BAG”, “FLAT RATE BOX” only applicable when <Service>=“Connect Local.” |
String |
whiteSpace=collapse · VARIABLE · FLAT RATE ENVELOPE · PADDED FLAT RATE ENVELOPE · LEGAL FLAT RATE ENVELOPE · SM FLAT RATE ENVELOPE · WINDOW FLAT RATE ENVELOPE · GIFT CARD FLAT RATE ENVELOPE · SM FLAT RATE BOX · MD FLAT RATE BOX · LG FLAT RATE BOX · CUBIC PARCELS · CUBIC SOFT PACK · SM FLAT RATE BAG · LG FLAT RATE BAG · FLAT RATE BOX |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Width |
Optional |
Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference DMM https://pe.usps.com/text/dmm300/index.htm |
Decimal |
minExclusive=0.0 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Length |
Optional |
Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference DMM https://pe.usps.com/text/dmm300/index.htm |
Decimal |
minExclusive=0.0 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Height |
Optional |
Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference DMM https://pe.usps.com/text/dmm300/index.htm |
Decimal |
minExclusive=0.0 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Girth |
Optional |
Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference DMM https://pe.usps.com/text/dmm300/index.htm |
Decimal |
minExclusive=0.0 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Value |
Optional |
Available when RateV4Request [Revision='2']. Package value. Used to determine availability and cost of extra services. 例如: <Value>150.00</Value> |
String |
minOccurs=0 maxOccurs=1 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / AmountToCollect |
Optional |
Available when RateV4Request [Revision='2']. Collect on delivery amount. Used to determine availability and cost of extra services. 例如: <AmountToCollect>150.00</AmountToCollect> |
String |
minExclusive=0.0 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / SpecialServices |
Optional |
Available when RateV4Request [Revision='2']. Groups the SpecialServices elements. Special Services prices and availability will not be returned when Service = “ALL”, “ONLINE”, or “PLUS” Inclusion of SpecialServices will return <CommitmentName> and <CommitmentDate> in the response. |
(Group) |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / SpecialServices / SpecialService |
Optional, repeating up to 10 times |
Available when RateV4Request [Revision='2']. Defines extra services in order to determine price and availability of additional services. An initial call without the SpecialService tag specified is recommended to determine base availability of special services for each mail class (<Service>). The extra service definitions are as follows:
例如: <SpecialServices> <SpecialService>100<SpecialService> <SpecialService>108<SpecialService> </SpecialServices> 注:When <SpecialService>= “125” and <Value> is less than or equal to $100, the insurance price returned will be zero (“$0.00”) to reflect baked-in insurance. If <Value> is greater than $100, the insurance price returned will reflect an extra cost since baked-in insurance was exceeded. |
String |
Enumerations= · 100 · 101 · 102 · 103 · 104 · 105 · 106 · 108 · 109 · 110 · 112 · 118 · 119 · 120 · 125 · 155 · 156 · 160 · 170 · 171 · 172 · 173 · 174 · 175 · 176 · 177 · 178 · 179 · 180 · 181 · 182 · 447 HAZMAT Services: · 810 · 811 · 812 · 813 · 814 · 815 · 816 · 817 · 818 · 819 · 820 · 821 · 822 · 823 · 824 · 825 · 826 · 827 · 828 · 829 · 830 · 831 · 832 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Content |
Optional |
Available when RateV4Request[Revision='2']. Groups the ContentType and ContentDescription elements. |
团体 |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Content / ContentType |
Optional |
Available when RateV4Request [Revision=’2’]. Defines the type of content of the package. Inclusion of ContentType will return <CommitmentName> and <CommitmentDate> in the response. |
String |
Enumerations= · CREMATEDREMAINS · PERISHABLE · PHARMACEUTICALS · MEDICAL SUPPLIES · LIVES |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Content / ContentDescription |
Optional |
Available when RateV4Request[Revision=’2’]. Describes the content of the package. Optional but required for ContentType ‘LIVES’. |
String |
Enumerations= · BEES · DAYOLDPOULTRY · ADULTBIRDS · OTHER |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / GroundOnly |
Optional |
Available when RateV4Request [Revision=’2’]. RateV4Request [Service=“GROUND ADVANTAGE’’] Use “true” when shipment contains mailable hazardous materials, live animals and other “surface-only” items. |
Boolean |
Enumerations= · true · false |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / SortBy |
Optional |
Available when RateV4Request [Revision='2']. Returns all mailing services available based on item shape. When specified, value in <Container> is ignored. Available when: RateV4Request[Service='ALL'] RateV4Request[Service='ONLINE'] 例如: <SortBy>PACKAGE</SortBy> |
String |
Enumerations= · LETTER · LARGEENVELOPE · PACKAGE · FLATRATE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / Machinable |
Optional |
Machinable parcels are defined as parcels less than or equal to 15”x18”x22” inches and less than or equal 25 pounds. Any parcel that exceeds either threshold (dimensions or weight) will be considered nonmachinable. 说明:The API will validate provided dimensions and/or weight to determine machinability. In this case the <Machinable> tag will be ignored. If these are not provided, then the <Machinable> tag will be used to designate if shipment is Machinable (true) or Nonmachinable (false).
<Machinable>正确</Machinable> |
Boolean |
whiteSpace=collapse Enumerations= · true · false |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / ReturnLocations |
Optional |
Include Dropoff Locations in Response if available. Requires "ShipDate" tag. |
Boolean |
Enumerations= · true · false |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / ReturnServiceInfo |
Optional |
If a value of “true” is indicated in the request then the response will include the <ServiceInformation> tag containing mail service specific information |
Boolean |
Enumerations= · true · false |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / DropOffTime |
Optional |
Time Package Will Be Mailed. Enter drop off time in format: HH:mm, such as 13:45. Inclusion of Drop Off Time will return increased accuracy for <CommitmentName> and <CommitmentDate> in the response. 例如: <DropOffTime>13:45</DropOffTime> |
String |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / ShipDate |
Optional |
Date Package Will Be Mailed. Ship date may be today plus 0 to 30 days in advance. Enter the date in format: yyyy-mm-dd, such as 2013-07-28. If <ShipDate> value is not provided, the current date will be used for delivery date calculations. Inclusion of Ship Date will return <CommitmentName> and <CommitmentDate> in the response.
<ShipDate>2013-07-28</ShipDate> |
String |
pattern=\d{2}-[a-zA-z]{3}-\d{4} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Optional |
The value of this attribute specifies how the RateV4Response will structure the ShipDate Commitment data elements. EMSH stands for Express Mail Sunday/Holiday and will return that response structure when used. When HFP (Hold For Pickup) is used, an additional <CommitmentTime> element is returned and the Hold For Pickup response structure is used. 例如: <ShipDate Option="HFP">2013-07-28</ ShipDate> |
String |
Default=EMSH Enumerations= · HFP |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / SortationLevel |
Optional |
Reference https://pe.usps.com/pricechange for additional details. |
String |
Enumerations= · 3D · 5D · AADC · BAS · CR · MIX · NDC · NONE · PST · SCF · TBE · TBF · TBT · TBH |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / DestinationEntryFacilityType |
Conditionally Required |
Drop Off location for destination entry products. 注意: Required when <Service>=“PARCEL SELECT DE”.
|
String |
Default = NONE Enumerations= · DDU · DHUB · DNDC · DSCF · NONE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / ReturnDimensionalWeight |
Optional |
This tag must be explicitly set to “true” for dimensional weight to be returned in the xml response. |
Boolean |
Enumerations= · true · false |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package /TrackingRetentionPeriod |
Optional |
Used to determine period of Retention for tracking data.
|
String |
minOccurs=0 maxOccurs=1 Enumerations= · 0.5 · 1 · 3 · 5 · 7 · 10 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / ReturnFees |
Optional |
This tag must be set to “true” for <Fees> to be returned. This tag is used so customers can see what fees apply to their postage. |
Boolean |
Default=false Enumerations= · true · false |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request / Package / ReturnHSCodeReqd |
Optional |
Include <ReturnHSCodeReqd>=“Y” (Yes) to return <HSCodeReqd> and <HSCodeEnforced> indicators in response to identify which APO/FPO/DPO destinations will require valid Harmonization Code and Content/Item descriptions due to international shipping regulatory mandates. Per international shipping regulatory mandates, shipments to European Union (EU) countries are required to contain a valid Harmonization Code and Content/Item description. Harmonization Code (i.e., HS Tariff Number) must be based on the Harmonized Commodity Description and Coding System developed by the World Customs Organization. To learn more about providing acceptable item descriptions, view the chart below or read the EU’s guidance on acceptable terms at Guidance on Acceptable and Unacceptable Terms for the Description of Goods. |
|
Default=N Enumerations= · Y · N |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RateV4Request |
需要 |
|
(alias) |
|
Request: RateV4 <RateV4Request USERID="XXXXXXXXX" PASSWORD=""> <Revision>2</Revision> <Package ID="0"> <Service>优先</Service> <ZipOrigination>22201</ZipOrigination> <ZipDestination>26301</ZipDestination> <Pounds>8</Pounds> <Ounces>2</Ounces> <Container></Container> <Width></Width> <Length></Length> <Height></Height> <Girth></Girth> </Package> </RateV4Request> Request: RateV4 Military – APO Example: <RateV4Request USERID="XXXXXXXXX" PASSWORD=""> <Revision>2</Revision> <Package ID="1"> <Service>Priority Mail</Service> <ZipOrigination>18702</ZipOrigination> <ZipDestination>09067</ZipDestination> <Pounds>2</Pounds> <Ounces>0</Ounces> <Container></Container> <ReturnHSCodeReqd>Y</ReturnHSCodeReqd> </Package> </RateV4Request> Request: RateV4 Parcel Select DE Example: <RateV4Request USERID="XXXXXXXXX" PASSWORD=""> <Revision>2</Revision> <Package ID="1ST"> <Service>PARCEL SELECT DE</Service> <ZipOrigination>73108</ZipOrigination> <ZipDestination>75232</ZipDestination> <Pounds>10</Pounds> <Ounces>0</Ounces> <Container>VARIABLE</Container> <SpecialServices> <SpecialService/> </SpecialServices> <SortationLevel>None</SortationLevel> <DestinationEntryFacilityType>DNDC</DestinationEntryFacilityType> </Package> </RateV4Request> Request: RateV4 Connect Local Example: <RateV4Request USERID="XXXXXXXXX" PASSWORD=""> <Revision>2</Revision> <Package ID="1"> <Service>CONNECT LOCAL</Service> <ZipOrigination>18708</ZipOrigination> <ZipDestination>89701</ZipDestination> <Pounds>0</Pounds> <Ounces>12</Ounces> <Container>统一邮资包装盒</Container> <AmountToCollect/> <SpecialServices> <SpecialService></SpecialService> </SpecialServices> <SortationLevel></SortationLevel> <DestinationEntryFacilityType>DDU</DestinationEntryFacilityType> </Package> </RateV4Request> Request: RateV4 – Non Standard Fee Example <RateV4Request USERID="XXXXXXXXX" PASSWORD=""> <Revision>2</Revision> <Package ID="1"> <Service>所有</Service> <FirstClassMailType /> <ZipOrigination>18702</ZipOrigination> <ZipDestination>16901</ZipDestination> <Pounds>1</Pounds> <Ounces>2</Ounces> <Container>Variable</Container> <Width>20</Width> <Length>31</Length> <Height>20</Height> <Girth></Girth> <Machinable>错误</Machinable> <ReturnLocations>False</ReturnLocations> <ReturnServiceInfo>False</ReturnServiceInfo> <ShipDate>01/01/2023</ShipDate> <ReturnFees>true</ReturnFees> </Package> </RateV4Request> Request: RateV4 – <Service DelOpt> Example <RateV4Request USERID="XXXXXXXXX" PASSWORD=""> <Revision>2</Revision> <Package ID="1"> <Service DelOpt="ParcelLocker">all</Service> <ZipOrigination>20770</ZipOrigination> <ZipDestination>54324</ZipDestination> <Pounds>0</Pounds> <Ounces>1</Ounces> <Container></Container> <Size>Regular</Size> <SortBy>package</SortBy> <Machinable>正确</Machinable> <ShipDate>04/22/2023</ShipDate> </Package> </RateV4Request> |
Occurs |
描述 |
类型 |
Validation |
|
RateV4Response |
需要 |
|
(Group) |
|
RateV4Response / Package |
Required repeating up to 25 times |
|
(Group) |
|
RateV4Response / Package / ZipOrigination |
需要 |
Origination ZIP Code from request |
String |
whiteSpace=collapse |
RateV4Response / Package / ZipDestination |
需要 |
Destination ZIP Code from request |
String |
whiteSpace=collapse |
RateV4Response / Package / Pounds |
需要 |
Package Weight (Pounds) from request |
Integer |
maxInclusive=70 |
RateV4Response / Package / Ounces |
需要 |
Package Weight (Ounces) from request |
Decimal |
maxInclusive=1120.0 |
RateV4Response / Package / FirstClassMailType |
Optional |
Appears when RateV4Request [Service='FIRST CLASS']. 例如: <FirstClassMailType>LETTER</FirstClassMailType> |
String |
whiteSpace=collapse |
RateV4Response / Package / Container |
Optional |
Shipping Container (appears where applicable: RateV4Request[Service='ALL' or Service='PRIORITY EXPRESS*' or Service='PRIORITY*']) |
String |
whiteSpace=collapse |
RateV4Response / Package / Machinable |
Optional |
Machinable (appears where applicable: RateV4Request[Service='ALL']) |
String |
|
RateV4Response / Package / Zone |
Optional |
USPS defined distance codes assigned to each origin and destination ZIP Code pairing for every ZIP Code number in the nation. These distance codes, referred to as zones, are designated as “1 through 9" |
String |
|
RateV4Response / Package / Postage |
Required repeating up to unbounded times |
Postage tag contains a nested postal rate and service description. |
(Group) |
|
RateV4Response / Package / Postage / CLASSID |
需要 |
A mail class identifier for the postage returned. Not necessarily unique within a <Package/>. Refer to Appendix A for all domestic CLASSID values. |
Integer |
|
RateV4Response / Package / Postage / MailService |
需要 |
Service Type name |
String |
|
RateV4Response / Package / Postage / Rate |
需要 |
Retail Rate Published Retail Rates are available at our Postal Explorer Price List. |
Decimal |
|
RateV4Response / Package / Postage / CommercialRate |
Optional |
Commercial Rate. Published Commercial and Commercial Base Rates are available at our Postal Explorer Price List. Appears only where applicable for published Commercial and Commercial Base products and when requested via RateV4Request[e.g., Service='ONLINE' or Service='PRIORITY COMMERCIAL' or Service='CONNECT LOCAL']. |
Decimal |
|
RateV4Response / Package / Postage / CommercialPlusRate |
Optional |
Commercial Rate. Appears only where applicable for published Commercial Plus products and when requested via RateV4Request[e.g., Service='PLUS']. |
Decimal |
|
RateV4Response / Package / Postage / MaxDimensions |
Optional |
Maximum dimensions for a USPS produced product. Appears where applicable: RateV4Request[SortBy=PACKAGE] |
String |
|
RateV4Response / Package / Postage / ServiceInformation |
Optional |
Mail Service Information. Appears where applicable: RateV4Request[ReturnServiceInfo=’true’] |
String |
|
RateV4Response / Package / Postage / Zone |
Optional |
Zone code for the specific service. Appears when the service zone is different from the standard zone assigned to the origin and destination ZIP code. |
String |
|
RateV4Response / Package / Postage / (Choice) |
Optional |
This choice depends on the presence of <ShipDate>, <SpecialServices>, or <Content>. Inclusion of <ShipDate Option="HFP"> will return <CommitmentDate>, <CommitmentName>, and <CommitmentTime> in the response in a <Commitment> structure. If the Option="HFP" attribute is missing or has the EMSH enumeration instead, then the Express Mail Sunday/Holiday structure is used and returns <CommitmentDate> and <CommitmentName>. If <ShipDate>, <SpecialServices>, or <Content> are not present, then neither structure is returned. |
(Choice) |
|
RateV4Response / Package / Postage / (Choice) / (sequence) |
if used: |
This sequence consisting of CommitmentDate and Location nodes is mutually exclusive with RateV4Response / Package / Postage / Commitment. |
(Group) |
|
RateV4Response / Package / Postage / (Choice) / (sequence) / CommitmentDate |
Required once |
Expected Delivery Date: yyyy-mm-dd. Can only returned when ShipDate tag is present in the request. |
String |
|
RateV4Response / Package / Postage / (Choice) / (sequence) / CommitmentName |
Required once |
Expected Delivery returned in number of days. Ex. <CommitmentName>3-Day</CommitmentName> |
String |
|
RateV4Response / Package / Postage / (Choice) / (sequence) / Location |
Optional repeating up to 200 times |
Collection of Dropoff Locations with Cutoff times. Only returned with Express Mail variants, when "ShipDate" tag is present in the request, and the "ReturnLocations" tag is not false. 例如: <Location> |
(Group) |
|
RateV4Response / Package / Postage / (Choice) / (sequence) / Location / CutOff |
需要 |
Local cutoff time for drop-off |
String |
|
RateV4Response / Package / Postage / (Choice) / (sequence) / Location / Facility |
需要 |
Facility Name |
String |
|
RateV4Response / Package / Postage / (Choice) / (sequence) / Location / Street |
需要 |
Facility Address |
String |
|
RateV4Response / Package / Postage / (Choice) / (sequence) / Location / City |
需要 |
Facility City |
String |
|
RateV4Response / Package / Postage / (Choice) / (sequence) / Location / State |
需要 |
Facility State |
String |
|
RateV4Response / Package / Postage / (Choice) / (sequence) / Location / Zip |
需要 |
Facility Zip |
String |
|
RateV4Response / Package / Postage / (Choice) / Commitment |
if used: |
This node is mutually exclusive with RateV4Response / Package / Postage / CommitmentDate and RateV4Response / Package / Postage / Location. Inclusion of <ShipDate Option="HFP"> will return <CommitmentDate>, <CommitmentName>, and <CommitmentTime> in the response in this Hold for Pickup structure. |
(Group) |
|
RateV4Response / Package / Postage / (Choice) / Commitment / CommitmentDate |
Required once |
Expected Delivery Date: yyyy-mm-dd. Can only returned when ShipDate tag is present in the request. |
String |
|
RateV4Response / Package / Postage / (Choice) / Commitment / CommitmentName |
Required once |
Expected Delivery returned in number of days. Ex. <CommitmentName>3-Day</CommitmentName> |
String |
|
RateV4Response / Package / Postage / (Choice) / Commitment / CommitmentTime |
Optional |
Expected Pickup Time on day of delivery. Ex. <CommitmentTime>6:00 下午</CommitmentTime>. Must include <ShipDate> Option="HFP" (i.e., <ShipDate Option="HFP">MM/DD/YYYY</ ShipDate> in the request to return <CommitmentTime>. |
String |
|
RateV4Response / Package / Postage / (Choice) / Commitment / Location |
Optional repeating up to 200 times |
Collection of Dropoff Locations with Cutoff times. Only returned with Priority Mail Express Mail variants, when "ShipDate" tag is present in the request, and the "ReturnLocations" tag is not false. 例如: <Location> |
(Group) |
|
RateV4Response / Package / Postage / (Choice) / Commitment / Location / CutOff |
需要 |
Local cutoff time for drop-off |
String |
|
RateV4Response / Package / Postage / (Choice) / Commitment / Location / Facility |
需要 |
Facility Name |
String |
|
RateV4Response / Package / Postage / (Choice) / Commitment / Location / Street |
需要 |
Facility Address |
String |
|
RateV4Response / Package / Postage / (Choice) / Commitment / Location / City |
需要 |
Facility City |
String |
|
RateV4Response / Package / Postage / (Choice) / Commitment / Location / State |
需要 |
Facility State |
String |
|
RateV4Response / Package / Postage / (Choice) / Commitment / Location / Zip |
需要 |
Facility Zip |
String |
|
RateV4Response / Package / Postage / SpecialServices |
Optional |
Returned when RateV4Request[Revision='2']. Groups the Special Service elements. |
(Group) |
|
RateV4Response / Package / Postage / SpecialServices / SpecialService |
Required, repeating up to unbounded times |
Returned when RateV4Request[Revision='2']. “SpecialService” contains nested service name, availability, and pricing. |
(Group) |
|
RateV4Response / Package / Postage / SpecialServices / SpecialService / ServiceID |
需要 |
Returned when RateV4Request[Revision='2']. Special service ID |
Integer |
|
RateV4Response / Package / Postage / SpecialServices / SpecialService / ServiceName |
需要 |
Returned when RateV4Request[Revision='2']. Special service name |
String |
|
RateV4Response / Package / Postage / SpecialServices / SpecialService / Available |
需要 |
Returned when RateV4Request[Revision='2']. Availability of special service. Availability may change depending on special services passed (selected) in request. |
Boolean |
|
RateV4Response / Package / Postage / SpecialServices / SpecialService / AvailableOnline |
需要 |
Returned when RateV4Request[Revision='2']. Availability of special service for online only rates. Not all special services have online rates. |
Boolean |
|
RateV4Response / Package / Postage / SpecialServices / SpecialService / AvailableCPP |
需要 |
Returned when RateV4Request[Revision='2']. Availability of special service for Commercial Plus Price only. Not all special services have Commercial Plus Prices. |
Boolean |
|
RateV4Response / Package / Postage / SpecialServices / SpecialService / Price |
需要 |
Returned when RateV4Request[Revision='2']. Special service pricing. Pricing may change depending on special services passed (selected) in request. |
Decimal |
|
RateV4Response / Package / Postage / SpecialServices / SpecialService / PriceOnline |
需要 |
Returned when RateV4Request[Revision='2']. Special service pricing. Pricing may change depending on special services passed (selected) in request. Not all special services have online rates. |
Decimal |
|
RateV4Response / Package / Postage / SpecialServices / SpecialService / PriceCPP |
需要 |
Returned when RateV4Request[Revision='2']. Special service Commercial Plus Pricing. Commercial Plus Pricing may change depending on special services passed (selected) in request. Not all special services have Commercial Plus Pricing. |
Decimal |
|
RateV4Response / Package / Postage / SpecialServices / SpecialService / DeclaredValueRequired |
Optional |
Returned if applicable when RateV4Request[Revision='2']. Indicates if special service requires a declared package value (specified in RateV4Request[Value])to determine correct pricing. |
Boolean |
|
RateV4Response / Package / Postage / SpecialServices / SpecialService / DueSenderRequired |
Optional |
Returned if applicable when RateV4Request[Revision='2']. Indicates if special service requires a due sender amount (specified in RateV4Request[AmountToCollect]) to determine correct pricing. |
Boolean |
|
RateV4Response / Package / Postage / DimensionalWeightRate |
Optional |
Dimensional weight retail rate |
String |
|
RateV4Response / Package / Postage / DimensionalWeightCommercialRate |
Optional |
Dimensional weight commercial base rate |
String |
|
RateV4Response / Package / Postage / DimensionalWeightCommercialPlusRate |
Optional |
Dimensional weight commercial plus rate |
String |
|
RateV4Response / Package / Postage / Fees |
Optional |
Returns when <ReturnFees> = “true” Dimensional weight pricing will include length and volume fees to account for cost of processing oversized parcels |
String |
|
RateV4Response / Package / Postage / Fees / Fee |
需要 |
|
String |
|
RateV4Response / Package / Postage / Fees / Fee / FeeType |
需要 |
Indicates what type of Fee is being requested: - Non Standard Length Fee(s) - Non Standard Volume Fee(s) - Live Animal Transportation Fee(s) - Nonmachinable Fee(s) |
String |
|
RateV4Response / Package / Postage / Fees / Fee / FeeType / FeePrice |
需要 |
Fee price. See Notice 123 for fee applicability and pricing. |
String |
|
RateV4Response / Package / Postage / Fees / Fee / FeeType / FeePrice / FeeInformation |
需要 |
Fee Information indicates the fee is <Rate> |
String |
|
RateV4Response / Package / Postage / Fees / Fee / FeeType / FeePrice / FeeInformation / FeeInfo FeeInfoType =”PriceType” |
需要 |
Fee Information indicates the fee is <Rate> |
String |
|
RateV4Response / Package / Postage / Attributes |
Optional |
When <ReturnFees> = True, the new Attributes tag will return to show Oversize fees and/or Dimensional Weight fees. Any future package attributes that impact a price returned will be included in the attributes tag. |
String |
|
RateV4Response / Package / Postage / Attribute Key |
Optional |
Attribute Key:
|
String |
|
RateV4Response / Package / Postage / HSCodeReqd |
Optional |
Returns when <ReturnHSCodeReqd>=“Y” (Yes). When <HSCodeReqd>=True, indicates which APO/FPO/DPO destinations require valid Harmonization Code and Content/Item descriptions because of new international shipping regulatory mandates. Per international shipping regulatory mandates, shipments to European Union (EU) countries are required to contain a valid Harmonization Code and Content/Item description. Harmonization Code (i.e., HS Tariff Number) must be based on the Harmonized Commodity Description and Coding System developed by the World Customs Organization. To learn more about providing acceptable item descriptions, view the chart below or read the EU’s guidance on acceptable terms at Guidance on Acceptable and Unacceptable Terms for the Description of Goods. |
String |
Enumerations= · True · False |
RateV4Response / Package / Postage / HSCodeEnforced |
Optional |
Returns when <ReturnHSCodeReqd>=“Y” (Yes). When <HSCodeEnforced>=True, indicates which APO/FPO/DPO destinations enforce valid Harmonization Code and Content/Item descriptions because of new international shipping regulatory mandates. Harmonization Codes and Content descriptions will be required when generating a shipping label or else API errors will return. |
String |
Enumerations= · True · False |
RateV4Response / Package / Restriction / Restrictions |
需要 |
APO/FPO Restrictions provided if the Destination ZIP Code is an APO/FPO ZIP Code. |
String |
|
RateV4Response / Package / Error |
if used: |
Error document (indicates request could not be completed). |
|
See the Error Responses section below. |
RateV4Response |
需要 |
|
(alias) |
|
《response: RateV4: <RateV4Response> <Package ID="0"> <ZipOrigination>22201</ZipOrigination> <ZipDestination>26301</ZipDestination> <Pounds>8</Pounds> <Ounces>2</Ounces> <Container>VARIABLE</Container> <Zone>3</Zone> <Postage CLASSID="1"> <MailService>Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt;</MailService> <Rate>15.05</Rate> <SpecialServices> <SpecialService> <ServiceID>119</ServiceID> <ServiceName>Adult Signature Required</ServiceName> <Available>正确</Available> <Price>9.05</Price> </SpecialService> <SpecialService> <ServiceID>120</ServiceID> <ServiceName>Adult Signature Restricted Delivery</ServiceName> <Available>正确</Available> <Price>9.35</Price> </SpecialService> <SpecialService> <ServiceID>104</ServiceID> <ServiceName>Certificate of Mailing (Form 3817)</ServiceName> <Available>正确</Available> <Price>1.85</Price> </SpecialService> <SpecialService> <ServiceID>105</ServiceID> <ServiceName>Certified Mail&lt;sup&gt;&#174;&lt;/sup&gt;</ServiceName> <Available>正确</Available> <Price>4.15</Price> </SpecialService> <SpecialService> <ServiceID>170</ServiceID> <ServiceName>Certified Mail&lt;sup&gt;&#174;&lt;/sup&gt; Restricted Delivery</ServiceName> <Available>正确</Available> <Price>10.80</Price> </SpecialService> <SpecialService> <ServiceID>171</ServiceID> <ServiceName>Certified Mail&lt;sup&gt;&#174;&lt;/sup&gt; Adult Signature Required</ServiceName> <Available>正确</Available> <Price>10.80</Price> </SpecialService> <SpecialService> <ServiceID>172</ServiceID> <ServiceName>Certified Mail&lt;sup&gt;&#174;&lt;/sup&gt; Adult Signature Restricted Delivery</ServiceName> <Available>正确</Available> <Price>10.80</Price> </SpecialService> <SpecialService> <ServiceID>103</ServiceID> <ServiceName>Collect on Delivery</ServiceName> <Available>正确</Available> <Price>9.60</Price> <DeclaredValueRequired>true</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>175</ServiceID> <ServiceName>Collect on Delivery Restricted Delivery</ServiceName> <Available>正确</Available> <Price>16.15</Price> <DeclaredValueRequired>true</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>125</ServiceID> <ServiceName>Insurance</ServiceName> <Available>正确</Available> <Price>0.00</Price> <DeclaredValueRequired>true</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>179</ServiceID> <ServiceName>Insurance Restricted Delivery</ServiceName> <Available>正确</Available> <Price>0.00</Price> <DeclaredValueRequired>true</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>109</ServiceID> <ServiceName>Registered Mail&lt;sup&gt;&#8482;&lt;/sup&gt;</ServiceName> <Available>正确</Available> <Price>15.25</Price> <DeclaredValueRequired>true</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>176</ServiceID> <ServiceName>Registered Mail&lt;sup&gt;&#8482;&lt;/sup&gt; Restricted Delivery</ServiceName> <Available>正确</Available> <Price>21.80</Price> <DeclaredValueRequired>true</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>181</ServiceID> <ServiceName>Scan Retention</ServiceName> <Available>正确</Available> <Price>0.99</Price> <DeclaredValueRequired>false</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>183</ServiceID> <ServiceName>USPS Label Delivery Service</ServiceName> <Available>正确</Available> <Price>1.25</Price> </SpecialService> <SpecialService> <ServiceID>108</ServiceID> <ServiceName>Signature Confirmation&lt;sup&gt;&#8482;&lt;/sup&gt;</ServiceName> <Available>正确</Available> <Price>3.80</Price> </SpecialService> <SpecialService> <ServiceID>173</ServiceID> <ServiceName>Signature Confirmation&lt;sup&gt;&#8482;&lt;/sup&gt; Restricted Delivery</ServiceName> <Available>正确</Available> <Price>10.35</Price> </SpecialService> <SpecialService> <ServiceID>156</ServiceID> <ServiceName>Signature Confirmation&lt;sup&gt;&#8482;&lt;/sup&gt; Electronic</ServiceName> <Available>正确</Available> <Price>3.25</Price> </SpecialService> <SpecialService> <ServiceID>174</ServiceID> <ServiceName>Signature Confirmation&lt;sup&gt;&#8482;&lt;/sup&gt; Electronic Restricted Delivery</ServiceName> <Available>正确</Available> <Price>9.80</Price> </SpecialService> <SpecialService> <ServiceID>106</ServiceID> <ServiceName>USPS Tracking&lt;sup&gt;&#174;&lt;/sup&gt;</ServiceName> <Available>正确</Available> <Price>0.00</Price> </SpecialService> <SpecialService> <ServiceID>155</ServiceID> <ServiceName>USPS Tracking&lt;sup&gt;&#174;&lt;/sup&gt; Electronic</ServiceName> <Available>正确</Available> <Price>0.00</Price> </SpecialService> </SpecialServices> </Postage> </Package> </RateV4Response> 《response: RateV4 Military APO Example: <RateV4Response> <Package ID="1"> <ZipOrigination>18702</ZipOrigination> <ZipDestination>09067</ZipDestination> <Pounds>2</Pounds> <Ounces>0</Ounces> <Container>VARIABLE</Container> <Zone>5</Zone> <Postage CLASSID="1"> <MailService>Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt;</MailService> <Rate>12.75</Rate> <SpecialServices> <SpecialService> <ServiceID>104</ServiceID> <ServiceName>Certificate of Mailing (Form 3817)</ServiceName> <Available>正确</Available> <Price>1.75</Price> </SpecialService> <SpecialService> <ServiceID>105</ServiceID> <ServiceName>Certified Mail&lt;sup&gt;&#174;&lt;/sup&gt;</ServiceName> <Available>正确</Available> <Price>4.00</Price> </SpecialService> <SpecialService> <ServiceID>170</ServiceID> <ServiceName>Certified Mail&lt;sup&gt;&#174;&lt;/sup&gt; Restricted Delivery</ServiceName> <Available>正确</Available> <Price>10.35</Price> </SpecialService> <SpecialService> <ServiceID>125</ServiceID> <ServiceName>Insurance</ServiceName> <Available>正确</Available> <Price>0.00</Price> <DeclaredValueRequired>true</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>179</ServiceID> <ServiceName>Insurance Restricted Delivery</ServiceName> <Available>正确</Available> <Price>0.00</Price> <DeclaredValueRequired>true</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>109</ServiceID> <ServiceName>Registered Mail&lt;sup&gt;&#8482;&lt;/sup&gt;</ServiceName> <Available>正确</Available> <Price>14.65</Price> <DeclaredValueRequired>true</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>176</ServiceID> <ServiceName>Registered Mail&lt;sup&gt;&#8482;&lt;/sup&gt; Restricted Delivery</ServiceName> <Available>正确</Available> <Price>20.90</Price> <DeclaredValueRequired>true</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>181</ServiceID> <ServiceName>Scan Retention</ServiceName> <Available>正确</Available> <Price>0.99</Price> <DeclaredValueRequired>false</DeclaredValueRequired> <DueSenderRequired>false</DueSenderRequired> </SpecialService> <SpecialService> <ServiceID>106</ServiceID> <ServiceName>USPS Tracking&lt;sup&gt;&#174;&lt;/sup&gt;</ServiceName> <Available>正确</Available> <Price>0.00</Price> </SpecialService> <SpecialService> <ServiceID>155</ServiceID> <ServiceName>USPS Tracking&lt;sup&gt;&#174;&lt;/sup&gt; Electronic</ServiceName> <Available>正确</Available> <Price>0.00</Price> </SpecialService> </SpecialServices> <HSCodeReqd>True</HSCodeReqd> </Postage> <Restriction> <Restrictions>B. Other than for PMEMS and the exceptions listed below, a customs declaration PS Form 2976 or PS Form 2976-A is required for all items weighing 16 ounces or more, and for all items (regardless of weight) containing potentially dutiable mail contents (e.g., merchandise or goods) addressed to or from this ZIP Code. Other than the exceptions listed below, all PMEMS mailpieces (regardless of mail contents or weight) addressed to or from this ZIP Code must bear a properly completed PS Form 2976-B. The surface area of the address side of the mailpiece must be large enough to contain the applicable customs declaration. The following exceptions apply to known mailers, who for this purpose are defined as follows:B. Business mailers who enter volume mailings through business mail entry units or other bulk mail acceptance locations, pay postage through advance deposit accounts, use permit imprints for postage payment, and submit completed postage statements at the time of entry that certify that the mailpieces contain no dangerous materials that are prohibited by postal regulations. Such business mailers are exempt from providing customs documentation on non-dutiable letters and printed matter.B. All federal, state, and local government agencies whose mailings are regarded as "Official Mail." Such agencies are exempt from providing customs documentation, except for any items addressed to an MPO or DPO to which restriction "B2" applies. C. Cigarettes and other tobacco products, including tobacco leaves, chewing and pipe tobacco, snuff, and cigars are prohibited, including those that are authorized in Publication 52 under PACT. C2. E-cigarettes and related products (e.g., nicotine liquids, e-liquids, parts, or supplies) are prohibited. D. Coffee is prohibited. E. Medicines (prescription, over-the-counter, vitamins, and supplements) are prohibited when mailed to individuals for human or animal use. This prohibition does not apply when medicines are sent as Official Mail only between specifically designated agencies such as pharmaceutical distributors, hospitals, clinics, and pharmacies. U. Mail addressed to Retirees (Box R) is limited to 16 ounces and up to a 90-day supply of TRICARE medications. This restriction does not apply to mail endorsed "Free Matter for the Blind or Handicapped." F3. Replica weapons and inert explosive devices (such as grenades) and weapons parts are prohibited. H. Meats, including preserved meats, bones, skin, hair, feathers, horns or hoofs of hoofed animals, and wool samples whether hermetically sealed or not, are prohibited. M. Fruits, vegetables, live animals, and live plants are prohibited. R. All alcoholic beverages, including those mailable under Publication 52, Part 421, are prohibited. S. Synthetic cannabinoids used to stimulate the central nervous system commonly known as "synthetic marijuana," "K2," or "Spice" are prohibited. F. Firearms of any type are prohibited, except firearms mailed to or by official U.S. government agencies. This restriction does not apply to firearms mailed from this MPO ZIP Code, provided ATF and USPS regulations are met. Antique firearms do not require an ATF form. </Restrictions> </Restriction> </Package> </RateV4Response> 《Response: RateV4 – Non Standard Fee Example <RateV4Response> <Package ID="1"> <ZipOrigination>18702</ZipOrigination> <ZipDestination>16901</ZipDestination> <Pounds>1</Pounds> <Ounces>2</Ounces> <Machinable>错误</Machinable> <Zone>2</Zone> <Postage CLASSID="4058"> <MailService>USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; HAZMAT</MailService> <Rate>113.55</Rate> <Fees> <Fee> <FeeType>Nonstandard Length fee > 30 in.</FeeType> <FeePrice>7.00</FeePrice> <FeeInformation> <FeeInfo FeeInfoType="PriceType">Rate</FeeInfo> </FeeInformation> </Fee> <Fee> <FeeType>Nonstandard Volume fee > 2 cu. ft.</FeeType> <FeePrice>15.00</FeePrice> <FeeInformation> <FeeInfo FeeInfoType="PriceType">Rate</FeeInfo> </FeeInformation> </Fee> </Fees> <Attributes> <Attribute Key="Oversized">正确</Attribute> </Attributes> </Postage> <Postage CLASSID="1058"> <MailService>USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt;</MailService> <Rate>113.55</Rate> <Fees> <Fee> <FeeType>Nonstandard Length fee > 30 in.</FeeType> <FeePrice>7.00</FeePrice> <FeeInformation> <FeeInfo FeeInfoType="PriceType">Rate</FeeInfo> </FeeInformation> </Fee> <Fee> <FeeType>Nonstandard Volume fee > 2 cu. ft.</FeeType> <FeePrice>15.00</FeePrice> <FeeInformation> <FeeInfo FeeInfoType="PriceType">Rate</FeeInfo> </FeeInformation> </Fee> </Fees> <Attributes> <Attribute Key="Oversized">正确</Attribute> </Attributes> </Postage> <Postage CLASSID="2058"> <MailService>USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Hold For Pickup</MailService> <Rate>113.55</Rate> <Fees> <Fee> <FeeType>Nonstandard Length fee > 30 in.</FeeType> <FeePrice>7.00</FeePrice> <FeeInformation> <FeeInfo FeeInfoType="PriceType">Rate</FeeInfo> </FeeInformation> </Fee> <Fee> <FeeType>Nonstandard Volume fee > 2 cu. ft.</FeeType> <FeePrice>15.00</FeePrice> <FeeInformation> <FeeInfo FeeInfoType="PriceType">Rate</FeeInfo> </FeeInformation> </Fee> </Fees> <Attributes> <Attribute Key="Oversized">正确</Attribute> </Attributes> </Postage> <Postage CLASSID="6058"> <MailService>USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Parcel Locker</MailService> <Rate>113.55</Rate> <Fees> <Fee> <FeeType>Nonstandard Length fee > 30 in.</FeeType> <FeePrice>7.00</FeePrice> <FeeInformation> <FeeInfo FeeInfoType="PriceType">Rate</FeeInfo> </FeeInformation> </Fee> <Fee> <FeeType>Nonstandard Volume fee > 2 cu. ft.</FeeType> <FeePrice>15.00</FeePrice> <FeeInformation> <FeeInfo FeeInfoType="PriceType">Rate</FeeInfo> </FeeInformation> </Fee> </Fees> <Attributes> <Attribute Key="Oversized">正确</Attribute> </Attributes> </Postage> </Package> </RateV4Response> RateV4 Response - <Service DelOpt = Parcel Locker> Example <RateV4Response> <Package ID="1"> <ZipOrigination>20770</ZipOrigination> <ZipDestination>54324</ZipDestination> <Pounds>0</Pounds> <Ounces>1</Ounces> <Machinable>正确</Machinable> <Zone>5</Zone> <Postage CLASSID="6058"> <MailService>USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Parcel Locker</MailService> <Rate>5.05</Rate> </Postage> <Postage CLASSID="6001"> <MailService>Priority Mail Express 2-Day&lt;sup&gt;&#174;&lt;/sup&gt; Parcel Locker</MailService> <Rate>35.50</Rate> <CommitmentDate>2023-08-04</CommitmentDate> <CommitmentName>2-Day</CommitmentName> </Postage> <Postage CLASSID="6010"> <MailService>Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Parcel Locker</MailService> <Rate>10.65</Rate> <CommitmentDate>2023-08-05</CommitmentDate> <CommitmentName>2-Day</CommitmentName> </Postage> <Postage CLASSID="6096"> <MailService>USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Cubic Parcel Locker</MailService> <Rate>0.00</Rate> <CommercialRate>6.88</CommercialRate> </Postage> <Postage CLASSID="6012"> <MailService>Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Large Flat Rate Box Parcel Locker</MailService> <Rate>22.80</Rate> <MaxDimensions>USPS-Produced Box: 12-1/4"(L) X 12"(W) X 6"(H)</MaxDimensions> <CommitmentDate>2023-08-05</CommitmentDate> <CommitmentName>2-Day</CommitmentName> </Postage> <Postage CLASSID="6013"> <MailService>Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Medium Flat Rate Box Parcel Locker</MailService> <Rate>17.10</Rate> <MaxDimensions>USPS-Produced Box: 13-5/8" x 11-7/8" x 3-3/8" or 11" x 8-1/2" x 5-1/2"</MaxDimensions> <CommitmentDate>2023-08-05</CommitmentDate> <CommitmentName>2-Day</CommitmentName> </Postage> <Postage CLASSID="6014"> <MailService>Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Small Flat Rate Box Parcel Locker</MailService> <Rate>10.20</Rate> <MaxDimensions>USPS-Produced Box: 8-5/8" x 5-3/8" x 1-5/8"</MaxDimensions> <CommitmentDate>2023-08-05</CommitmentDate> <CommitmentName>2-Day</CommitmentName> </Postage> <Postage CLASSID="6076"> <MailService>Media Mail Parcel Parcel Locker</MailService> <Rate>3.92</Rate> </Postage> <Postage CLASSID="6075"> <MailService>Library Mail Parcel Parcel Locker</MailService> <Rate>3.72</Rate> </Postage> </Package> </RateV4Response> |
Error conditions are handled at the main XML document level and Package node 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].
Errors that are further down in the hierarchy also follow the above format. An <Error> element may be returned at the top (response) level if there is a problem with the syntax of the request, or if a system error occurs. But if there is a problem with a specific Package within the request, an <Error> element will be returned within the <Package> element that pertains to the specific package ID. Since the RateV4 API allows you to submit multiple packages within a single request document, the response may contain a mix of domestic rate information and errors. For requests containing multiple package IDs, you need to check if there is an <Error> within a given <Package> element, as well as checking for an error at the top level for example:
<RateV4Response> <Package ID="0"> <ZipOrigination>07747</ZipOrigination> <ZipDestination>90210</ZipDestination> <Pounds>11</Pounds> <Ounces>4</Ounces> <Container></Container> <Zone>8</Zone> <Postage CLASSID="3"> <MailService>Priority Mail Express&lt;sup&gt;&#8482;&lt;/sup&gt;</MailService> <Rate>92.85</Rate> </Postage> </Package> <Package ID="1"> <Error> <Number>-2147219498</Number> <Source>DomesticRatesV4;RateEngineV4.ProcessRequest</Source> <Description>Please enter a valid ZIP Code for the sender. </Description> <HelpFile></HelpFile> <HelpContext>1000440</HelpContext> </Error> </Package> </RateV4Response> |
The IntlRateV2 API lets customers calculate the rate for international packages and envelopes given the weight and dimensions of the item. The IntlRateV2 API limits the data requested to twenty-five (25) packages per transaction. For specifications such as package dimensions, delivery information, etc, please refer to the International Mail Manual (IMM) at http://pe.usps.com/.
Scheme |
Host |
小道 |
API |
XML |
https:// |
secure.shippingapis.com |
/ShippingAPI.dll? |
API=IntlRateV2 |
&XML=(see below) |
Tag Name |
Occurs |
描述 |
类型 |
Validation |
||||||||||||||||||
IntlRateV2Request |
需要 |
API=IntlRateV2 This API returns the current international USPS postage corresponding to the parameters given. |
(Group) |
|
||||||||||||||||||
IntlRateV2Request / USERID |
需要 |
This attribute specifies your Web Tools user ID. See the Developer's Guide for information on obtaining your USERID. 例如:USERID="XXXXXXX" |
NMTOKEN |
|
||||||||||||||||||
IntlRateV2Request / PASSWORD |
Optional |
This attribute specifies your Web Tools password. See the Developer's Guide for information on your Password. 例如:PASSWORD="XXXXXXX" |
NMTOKEN |
|
||||||||||||||||||
IntlRateV2Request / Revision |
Optional |
Set this value to “2” to return all currently documented response fields. 例如: <Revision>2</Revsion> |
String |
|
||||||||||||||||||
IntlRateV2Request / Package |
Required repeating up to 25 times |
Opening Package tag. |
(Group) |
|
||||||||||||||||||
IntlRateV2Request / Package / ID |
需要 |
No restriction on number or type of characters provided valid XML syntax and unique to request. <Package ID="0">...</Package> |
NMTOKEN |
|
||||||||||||||||||
IntlRateV2Request / Package / Pounds |
需要 |
Value must be numeric. Package weight generally cannot exceed 70 pounds. Maximum Decimal places are 8. Refer to the International Mail Manual (IMM) for weight requirements per country and mail service. The IMM can be found at the Postal Explorer web site. <Pounds>2</Pounds> <Pounds>2.12345678</Pounds> |
Integer |
minInclusive=0 |
||||||||||||||||||
IntlRateV2Request / Package / Ounces |
需要 |
Value must be numeric. Package weight generally cannot exceed 70 pounds. Maximum Decimal places are 8. Refer to the International Mail Manual (IMM) for weight requirements per country and mail service. The IMM can be found at the Postal Explorer web site. 例如: <Ounces>4</Ounces> <Ounces>4.12345678</Ounces> |
Decimal |
minInclusive=0.0 |
||||||||||||||||||
IntlRateV2Request / Package / Machinable |
Optional |
Indicates whether or not the item is machinable. A surcharge is applied to a First-Class Mail International item if it has one or more non-machinable characteristics. See International Mail Manual (IMM) Section 241.217 for more information. 例如: <Machinable>正确</Machinable> |
Boolean |
default=true |
||||||||||||||||||
IntlRateV2Request / Package / MailType |
需要 |
Package type being shipped. 例如: <MailType>Package</MailType> 注意: Airmail M-Bag prices will return for retail pricing when available including when <MailType>=“ALL.”Reference https://pe.usps.com/text/imm/immc2_026.htm for M-Bag pricing details. 注意: When <MailType>= “ALL” is indicated in XML request and a <TrackingRetentionPeriod> value is not specified, the lowest tracking retention period values (i.e., “0.5” (6 months) for ServiceID=“181” and “3” (3 years) for ServiceID=“182”) will be used to return available USPS Tracking Plus extra service options for supported mail services. |
String |
Default = NONE Enumerations= · ALL · PACKAGE · POSTCARDS · ENVELOPE · LETTER · LARGEENVELOPE · FLATRATE · AIRMAIL MBAG |
||||||||||||||||||
IntlRateV2Request / Package / ValueOfContents |
需要 |
If specified, used to compute Insurance fee (if insurance is available for service and destination). 例如: <ValueOfContents>103.00</ValueOfContents> |
String |
|
||||||||||||||||||
IntlRateV2Request / Package / Country |
需要 |
Entries must be from the USPS list of valid countries from the International Country Listings. To access the International Country Listings, go to the Index of Countries and Localities. 例如: <Country>Albania</Country> |
String |
|
||||||||||||||||||
IntlRateV2Request / Package / Container |
Optional |
Used to specify a container. When package is a roll, integrators should pass <Container>= “ROLL” in XML request. If package is not a roll, integrators should not populate – label response will assume package is not a roll. 注意:When <Container>= “ROLL”, errors will return if dimensions provided in XML request do not meet IMM 251.22 requirements. https://pe.usps.com/text/imm/immc2_021.htm. |
String |
Enumerations= · VARIABLE · RECTANGULAR · ROLL |
||||||||||||||||||
IntlRateV2Request / Package / Size |
Deprecated |
注意: This tag has been deprecated <Size> tag and any values within the <Size> tag will not result in an error response and will not impact rates that are returned. |
String |
|
||||||||||||||||||
IntlRateV2Request / Package / Width |
Optional |
Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference IMM https://pe.usps.com/text/imm/welcome.htm |
Integer |
minExclusive=0 |
||||||||||||||||||
IntlRateV2Request / Package / Length |
Optional |
Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference IMM https://pe.usps.com/text/imm/welcome.htm |
Integer |
minExclusive=0 |
||||||||||||||||||
IntlRateV2Request / Package / Height |
Optional |
Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference IMM https://pe.usps.com/text/imm/welcome.htm |
Integer |
minExclusive=0 |
||||||||||||||||||
IntlRateV2Request / Package / Girth |
Optional |
Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing or dimension validation reference IMM https://pe.usps.com/text/imm/welcome.htm |
Integer |
minExclusive=0 |
||||||||||||||||||
IntlRateV2Request / Package / OriginZip |
Optional |
Available when Revision= “2”. Origin ZIP Code is required to determine Priority Mail International price to Canadian destinations. The Origin ZIP Code must be valid. 例如:<OriginZip>20770</OriginZip> |
String |
length=5 |
||||||||||||||||||
IntlRateV2Request / Package / CommercialFlag |
Optional |
Returns commercial base postage. For example: <CommercialFlag>Y<CommercialFlag> |
String |
Enumerations= · Y · N |
||||||||||||||||||
IntlRateV2Request / Package / CommercialPlusFlag |
Optional |
Returns commercial plus postage. For example: <CommercialPlusFlag>Y<CommercialPlusFlag> |
String |
Enumerations= · Y · N |
||||||||||||||||||
IntlRateV2Request / Package / ExtraServices |
Optional |
Available when IntlRateV2Request[Revision='2']. Groups the ExtraService elements. |
(Group) |
|
||||||||||||||||||
IntlRateV2Request / Package / ExtraServices / ExtraService |
Required, repeating up to 6 times |
Available when IntlRateV2Request[Revision='2'].Defines extra services in order to determine price and availability of additional services. An initial rate call without the ExtraService tag specified is recommended to determine base availability of extra services for each mail service. The extra service definitions are as follows:
|
Integer |
Enumerations= · 103 · 108 · 105 · 100 · 109 · 181 · 182 |
||||||||||||||||||
IntlRateV2Request/Package/ AcceptanceDateTime |
Optional |
Available when IntlRateV2Request[Revision='2']. Date and Time the package is accepted by USPS. The AcceptanceDateTime tag along with the DestinationPostalCode and OriginZip is used to calculate the GuaranteeAvailability and also GuaranteeAvailability response tag for PMEI services in Kahala countries. ISO 8601 formatted date. YYYY-MM-DDThh:mm:ss+/-hh:mm For example, 2014-01-22T14:30:51-06:00 |
DateTime |
|
||||||||||||||||||
IntlRateV2Request/Package/ DestinationPostalCode |
Optional |
Available when IntlRateV2Request[Revision='2']. Destination Postal Code The AcceptanceDateTime tag along with the DestinationPostalCode and OriginZip is used to calculate the GuaranteeAvailability and also GuaranteeAvailability response tag for PMEI services in Kahala countries. |
String |
|
||||||||||||||||||
IntlRateV2Request / Package / Content |
Optional |
Used to describe the contents of the package. |
(Group) |
|
||||||||||||||||||
IntlRateV2Request / Package / Content / ContentType |
Required if Content supplied. |
Contains the enumerated description of the items in the package. “NonnegotiableDocument” and “Documents” both signify mailable non-negotiable documents and are insured automatically for up to $100, though Insurance will not be returned as an extra service. Additional Insurance cannot be purchased. Any non-document ContentType values are insured automatically for up to $200 and Insurance will be returned as an explicit extra service in the response. Additional Insurance can be purchased for values $200 and greater. |
String |
Enumerations= · CrematedRemains · NonnegotiableDocum · Pharmaceuticals · MedicalSupplies · Documents |
||||||||||||||||||
IntlRateV2Request / Package / Content / ContentDescription |
Optional |
For future use |
String |
|
||||||||||||||||||
IntlRateV2Request / Package / TrackingRetentionPeriod |
Optional |
Used to determine period of Retention for tracking data. 注意: When <ExtraService>= “181” or “182” provided in XML request, a valid <TrackingRetentionPeriod> (see table below) is required otherwise a new error will return to indicate the specified ServiceID and Tracking Retention period combination is invalid.
|
String |
minOccurs=0 maxOccurs=1 Enumerations= · 0.5 · 1 · 3 · 5 · 7 |
||||||||||||||||||
IntlRateV2Request / Package / ReturnHSCodeReqd |
Optional |
When this tag is set to “Y” for Yes then <HSCodeReqd> and <HSCodeEnforced> will return, which is an indicator for which destinations will require valid Harmonization Code and Content/Item descriptions because of new international shipping regulatory mandates. Per international shipping regulatory mandates, shipments to European Union (EU) countries are required to contain a valid Harmonization Code and Content/Item description. Harmonization Code (i.e., HS Tariff Number) must be based on the Harmonized Commodity Description and Coding System developed by the World Customs Organization. To learn more about providing acceptable item descriptions, view the chart below or read the EU’s guidance on acceptable terms at Guidance on Acceptable and Unacceptable Terms for the Description of Goods. |
|
Default= N Enumerations= · Y (Yes) · N (No) |
||||||||||||||||||
IntlRateV2Request |
Required once |
|
(alias) |
|
Request: IntlRateV2: IntlRateV2Request USERID="XXXXXXXXX" PASSWORD=""> <Revision>2</Revision> <Package ID="1ST"> <Pounds>15.12345678</Pounds> <Ounces>0</Ounces> <Machinable>正确</Machinable> <MailType>Package</MailType> <ValueOfContents>200</ValueOfContents> <Country>《United Kingdom</Country> <Container>VARIABLE</Container> <Width>10</Width> <Length>15</Length> <Height>10</Height> <Girth>0</Girth> <OriginZip>18701</OriginZip> <CommercialFlag>N</CommercialFlag> <AcceptanceDateTime>2023-07-15T13:15:00-06:00</AcceptanceDateTime> <DestinationPostalCode>2046</DestinationPostalCode> <ReturnHSCodeReqd>Y</ReturnHSCodeReqd> </Package> <Package ID="2ND"> <Pounds>2</Pounds> <Ounces>0</Ounces> <MailType>All</MailType> <ValueOfContents>95.75</ValueOfContents> <Country>Kazakhstan</Country> <Container>长方形</Container> <Width>5</Width> <Length>10</Length> <Height>3</Height> <Girth>0</Girth> <OriginZip></OriginZip> <CommercialFlag>N</CommercialFlag> <ReturnHSCodeReqd>N</ReturnHSCodeReqd> </Package> </IntlRateV2Request> |
Tag Name |
Occurs |
描述 |
类型 |
Validation |
IntlRateV2Response |
需要 |
Opening document tag. |
(Group) |
|
IntlRateV2Response / Package |
Required repeating up to 25 times |
Corresponds to each "Package" node in the request. Each "Package" node will contain either an "Error" node or the rate results. |
(Group) |
|
IntlRateV2Response / Package / ID |
需要 |
Package Identification Number (matches IntlRateV2Request/Package/ID) |
NMTOKEN |
|
IntlRateV2Response / Package / Prohibitions |
需要 |
Prohibitions |
String |
|
IntlRateV2Response / Package / Restrictions |
需要 |
限制 |
String |
|
IntlRateV2Response / Package / Observations |
需要 |
Observations |
String |
|
IntlRateV2Response / Package / CustomsForms |
需要 |
海关表单 |
String |
|
IntlRateV2Response / Package / ExpressMail |
需要 |
特快专递 |
String |
|
IntlRateV2Response / Package / AreasServed |
需要 |
Areas Served |
String |
|
IntlRateV2Response / Package / AdditionalRestrictions |
需要 |
Additional restrictions on items being shipped to destination country. |
String |
|
IntlRateV2Response / Package / Content |
Optional |
Echoes the Content from the request. If the Content request is not populated on the request, this tag will not be returned. |
(Group) |
|
IntlRateV2Response / Package / Content / ContentType |
Optional |
Echoes the ContentType from the request. If the Content request is not populated on the request, this tag will not be returned. |
String |
|
IntlRateV2Response / Package / Content / ContentDescription |
Optional |
Echoes the ContentDescription from the request. If the Content request is not populated on the request, this tag will not be returned. |
String |
|
IntlRateV2Response / Package / Service |
Required repeating up to unbounded times |
"Service" tag contains a nested rate and service name. |
(Group) |
|
IntlRateV2Response / Package / Service / ID |
需要 |
An Integer reflective of the <SvcDescription/>. Refer to Appendix B for all international Service ID values. |
Integer |
minInclusive=0 |
IntlRateV2Response / Package / Service / Pounds |
需要 |
Weight of package (pounds) |
Integer |
|
IntlRateV2Response / Package / Service / Ounces |
需要 |
Weight of package (ounces) |
Decimal |
|
IntlRateV2Response / Package / Service / Machinable |
Optional |
If specified in request this is echoed back if relevant to computed postage. |
String |
|
IntlRateV2Response / Package / Service / MailType |
需要 |
If specified in request this is echoed back if relevant to computed postage. |
String |
|
IntlRateV2Response / Package / Service / Container |
需要 |
If specified in request this is echoed back if relevant to computed postage. |
String |
|
IntlRateV2Response / Package / Service / Width |
Optional |
Value must be numeric. Units are inches. |
Integer |
|
IntlRateV2Response / Package / Service / Length |
Optional |
Value must be numeric. Units are inches. |
Integer |
|
IntlRateV2Response / Package / Service / Height |
Optional |
Value must be numeric. Units are inches. |
Integer |
|
IntlRateV2Response / Package / Service / Girth |
Optional |
Value must be numeric. Units are inches. |
Integer |
|
IntlRateV2Response / Package / Service / Country |
需要 |
Destination Country |
String |
|
IntlRateV2Response / Package / Service / Postage |
需要 |
Postage Rate Charged |
Decimal |
|
IntlRateV2Response / Package / Service / CommercialPostage |
Optional |
Commercial Base Rate. Returned if specified in request. |
Decimal |
|
IntlRateV2Response / Package / Service / CommercialPlusPostage |
Optional |
Commercial Plus Rate. Returned if specified in request. |
Decimal |
|
IntlRateV2Response / Package / Service / ExtraServices |
需要 |
Groups the Extra Service elements. |
(Group) |
|
IntlRateV2Response / Package / Service / ExtraServices / ExtraService |
Optional, repeating up to unbounded times |
“ExtraService” contains nested service name, availability, and pricing. When IntlRateV2Request[Revision<'2'], the only service returned is Insurance. |
(Group) |
|
IntlRateV2Response / Package / Service / ExtraServices / ExtraService / ServiceID |
需要 |
Extra service ID |
Integer |
|
IntlRateV2Response / Package / Service / ExtraServices / ExtraService / ServiceName |
需要 |
Extra service name |
String |
|
IntlRateV2Response / Package / Service / ExtraServices / ExtraService / Available |
需要 |
Availability of extra service. Availability may change depending on extra services passed (selected) in request. |
Boolean |
|
IntlRateV2Response / Package / Service / ExtraServices / ExtraService / OnlineAvailable |
Optional |
Availability of online pricing for extra service. Availability may change depending on extra services passed (selected) in request. Returns when IntlRateV2Request[Revision='2'] and IntlRateV2Request[CommercialPrice=’Y']. |
Boolean |
|
IntlRateV2Response / Package / Service / ExtraServices / ExtraService / Price |
需要 |
Extra service pricing. Pricing may change depending on extra services passed in request. When IntlRateV2Request[Revision<'2'], the insurance fee is fully calculated. |
Decimal |
|
IntlRateV2Response / Package / Service / ExtraServices / ExtraService OnlinePrice |
Optional |
Online extra service pricing. Pricing may change depending on extra services passed in request. Returns when IntlRateV2Request[Revision='2'] and IntlRateV2Request[CommercialPrice=’Y']. |
Decimal |
|
IntlRateV2Response / Package / Service / ExtraServices / ExtraService DeclaredValueRequired |
Optional |
Indicates if package value is required to calculate extra service rate. Returns when IntlRateV2Request[Revision='2']. |
Boolean |
|
IntlRateV2Response / Package / Service / ValueOfContents |
Optional |
This echoes back the value provided in the request. This value is used to calculate the insurance fee (ServiceID=1 under Extra Services) or the Insurance Comment explaining why Insurance Fee is not given. |
Decimal |
pattern=\d+\.\d\d |
IntlRateV2Response / Package / Service / InsComment |
Optional |
Returned when IntlRateV2Request[Revision<'2'] only. Explains why no insurance fee is returned, one of three reasons: SERVICE means insurance is not available for this service; DESTINATION means that insurance is not available to the given country via this service; INSURED VALUE means insurance is available for the country and service, but not for the given value. |
String |
Enumerations= · INSURED VALUE · SERVICE · DESTINATION |
IntlRateV2Response / Package / Service / ParcelIndemnityCoverage |
Optional |
Deprecated. Tag will no longer be returned. Automatic indemnity coverage has been replaced by the baked-in Insurance amounts of $200 or $100. |
Decimal |
pattern=\d+\.\d\d |
IntlRateV2Response / Package / Service / SvcCommitments |
需要 |
Service Commitments |
String |
|
IntlRateV2Response / Package / Service / SvcDescription |
需要 |
Service Description |
String |
|
IntlRateV2Response / Package / Service / MaxDimensions |
需要 |
Maximum Dimensions of Package Allowed |
String |
|
IntlRateV2Response / Package / Service / MaxWeight |
需要 |
Maximum Weight of Package Allowed |
Integer |
|
IntlRateV2Response / Package / Service / GuaranteeAvailability |
Optional once |
If the Revision tag >= 2 in the request, the service type is one of the following: Priority Express Mail International, PMEI Flat Rate Envelope, PMEI Legal Flat Rate Envelope, and PMEI Padded Flat Rate Envelope, and the country is a Kahala country, the GuaranteeAvailability tag will display the estimated scheduled delivery date. If not, the tag will contain the estimated scheduled delivery days. The AcceptanceDateTime tag along with the DestinationPostalCode and OriginZip is used to calculate the GuaranteeAvailability and also GuaranteeAvailability response tag for PMEI services in Kahala countries. If an estimated scheduled delivery date is available, the format will be MM/DD/YYYY e.g., 01/29/2014. If an estimated scheduled delivery date is not available, the format will be a String. e.g., 3 - 5 business days to many major markets |
String |
|
IntlRateV2Response / Package / HSCodeReqd |
Optional |
Returns when <ReturnHSCodeReqd> = “Y” When <HSCodeReqd>=True, indicates which destinations require valid Harmonization Code and Content/Item descriptions because of new international shipping regulatory mandates. Per international shipping regulatory mandates, shipments to European Union (EU) countries are required to contain a valid Harmonization Code and Content/Item description. Harmonization Code (i.e., HS Tariff Number) must be based on the Harmonized Commodity Description and Coding System developed by the World Customs Organization. To learn more about providing acceptable item descriptions, view the chart below or read the EU’s guidance on acceptable terms at Guidance on Acceptable and Unacceptable Terms for the Description of Goods. |
String |
Enumerations= · True · False |
IntlRateV2Response / Package / HSCodeEnforced |
Optional |
Returns when <ReturnHSCodeReqd>=“Y” (Yes). When <HSCodeEnforced>=True, indicates which destinations enforce valid Harmonization Code and Content/Item descriptions because of new international shipping regulatory mandates. Harmonization Codes and Content descriptions will be required when generating a shipping label or else API errors will return. |
String |
Enumerations= · True · False |
IntlRateV2Response |
需要 |
|
(alias) |
|
《response: IntlRateV2: <IntlRateV2Response> <Package ID="1ST"> <Prohibitions>Aerosols. Ammunition, except lead pellets. Animals, live (including reptiles). Arms and parts of arms, or any component classified as munitions of war; imitations and antiques; paint-ball or toy guns; taser guns; air rifles, air pistols, components of firearms, and all other items similar to or resembling the foregoing. Articles, goods infringing British trademarks or copyright laws. Asbestos items of any kind. Christmas crackers (holiday popper). Clinical and medical waste (e.g., contaminated dressings, bandages, and needles). Coins; platinum, gold, or silver (manufactured or not); precious stones; jewels; and other valuable articles. Counterfeit currency, bank notes, and postage stamps. Dies and equipment for making imitations, etc., of any current postage stamp for denoting any rate of postage. Fish, live. Frozen food. Frozen water (including bags of ice). Goods made in foreign prisons, except those imported for a noncommercial purpose or of a kind not manufactured in the United Kingdom. Human remains (including ashes) and dead animals (including preserved animal parts and skins). Indecent and obscene prints, paintings, books, cards, lithographs, and other engravings, films, video tapes, or any other indecent or obscene articles. Lead acid batteries (e.g., car batteries) and sealed lead acid batteries. Lottery tickets and related advertisements for illegal lotteries. Medicines classified as flammable or toxic. Radioactive materials and samples that are classified as radioactive using Table 2-12 of the latest edition of the International Civil Aviation organization's Technical Instructions - e.g., fissile material (uranium 235, etc.), radioactive waste material, thorium, or uranium ores and luminous dials from aircraft. Soil. Soiled clothes and rags. Stun gun, electric. Switchblade knives (also known as flick knives) and gravity knives. Waste, dirt, filth, or refuse, including household waste or rubbish.</Prohibitions> <Restrictions>A consignment of live bees must contain only queen bees and their attendant workers; colonies are not permitted. Each consignment must be accompanied by an import license issued by the Dept. of Agriculture (DEFRA) and a health certificate issued by the country of origin. Caterpillars, cockroaches, crickets, destroyers of noxious pests, earthworms, fish fry and eggs, flies of the family Drosophilidae, leeches, lugworms, maggots, mealworms, pupae and chrysalides, rag worms, silkworms, spiders, and stick insects are admissible only for biomedical research (see license requirement for bees). Medicines and drugs when sent for scientific purposes must be sent by a practitioner, registered dental practitioner, veterinary surgeon, registered nurse, or recognized laboratory or institution. Plants and parts of plants require an import permit issued by the appropriate Agricultural Department in the United Kingdom. Vaccines may be sent only by, or at the specific request of, a qualified medical practitioner, registered dental practitioner, veterinary surgeon, registered nurse, or recognized laboratory or institution.</Restrictions> <Observations>1. The following is a list of the names of the counties and city names in Northern Ireland. The County names are in capital letters. The geographic identifiers should be used in addressing mail to Northern Ireland: ANTRIM: Antrim Ballymena Belfast Carrickfergus Larne Lisburn Portrush Toomebridge Whitehead ARMAGH: Armagh Lurgan Portsdown DOWN: Banbridge Bangor Downpatrick Kilkeel Newcastle Newry Newtownards LONDONDERRY: Coleraine Kilrea Limavady Londonderry Magherafelt Portstewart TYRONE: Cookstown Dugannon Moy Omagh Strabane FERMANAGH: Enniskillen 2. Many types of merchandise, unless sent as unsolicited gifts, require import licenses that the addressees must obtain from the British Board of Trade. Before mailing commercial shipments, senders should be assured that the addressees can obtain licenses if needed. 3. All goods sent to the UK are liable to customs duty and Value Added Tax on importation whether or not the package is marked as a "gift." Packages are admitted free of customs charges, however, if they meet the following conditions: (a) Gift packages of small value provided they do not contain any tobacco goods, spirits or wine; (b) Gift packages containing only well-worn clothing (excluding garments of high value), limited quantities of foodstuffs (other than caviar), soap or consumable medical supplies. 4. Postal packages without a customs declaration that contain goods liable to customs duty or control may be seized by the customs authorities. 5. Firearms that are intended for sporting purposes are mailable to United Kingdom, provided the prospective addressee has obtained the required import license. 6. United Kingdom limits the weight of M-bags to 20 kg. (44 lbs.). 7. Parcelforce Worldwide charges a single-import customs clearance fee of 12 GBP for all low-value parcels subject to customs charges that it delivers, i.e. parcels whose declared value is over 15 GBP (for merchandise) or 39 GBP (for gifts), but no more than 873 GBP. High-value goods over 873 GBP are charged a flat fee of 25 GBP. 8. Effective 2021 年 01 月 01 日, for all goods sent to the UK not exceeding £135 in value, the UK will not accept for importation an item that has not had the value-added tax (VAT) collected at the time of sale, before importation. For international postal items containing goods exceeding £135 in value, the UK will continue to collect the VAT at the UK border at the time of import. Online marketplaces that facilitate the sale of goods will be responsible for collecting and accounting for the VAT. For goods sent from overseas and sold directly to UK consumers, the overseas seller will be required to register and account for the VAT to HM Revenue and Customs. These changes will not apply to consignments containing excise goods or to noncommercial transactions between private individuals (known as Consumer-to-Consumer or C2C). Further guidance is available at gov.uk/eori and at gov.uk/vat-registration.</Observations> <CustomsForms>First-Class Mail International items and Priority Mail International Flat Rate Envelopes and Small Flat Rate Boxes: PS Form 2976 (see 123.61) Priority Mail International parcels: PS Form 2976-A inside 2976-E (envelope)</CustomsForms> <ExpressMail>Country Code: GB Reciprocal Service Name: Datapost Required Customs Form/Endorsement 1. Business correspondence, commercial papers, and documents. PS Form 2976-B placed inside PS Form 2976-E (plastic envelope). Endorse item clearly next to mailing label as BUSINESS PAPERS.
2. Merchandise samples without commercial value. PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
3. Merchandise and all articles subject to customs duty. PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
说明: 1. Coins; banknotes; currency notes, including paper money; securities of any kind payable to bearer; traveler's checks; platinum, gold, and silver; precious stones; jewelry; watches; and other valuable articles are prohibited in Priority Mail Express International shipments to United Kingdom of Great Britain and Northern Ireland. 2. Priority Mail Express International With Guarantee service - which offers a date-certain, postage-refund guarantee - is available to United Kingdom of Great Britain and Northern Ireland. Areas Served: All points in England, Scotland, Wales, Northern Ireland, Guernsey, Jersey, Alderney, Sark, and the Isle of Man.</ExpressMail> <AreasServed>Please reference Express Mail for Areas Served.</AreasServed> <AdditionalRestrictions>No Additional Restrictions Data found.</AdditionalRestrictions> <HSCodeReqd>False</HSCodeReqd> <Service ID="1"> <Pounds>15.12345678</Pounds> <Ounces>0</Ounces> <Machinable>正确</Machinable> <MailType>Package</MailType> <Width>10</Width> <Length>15</Length> <Height>10</Height> <Girth>0</Girth> <Country>英国(大不列颠及北爱尔兰联合王国)</Country> <Postage>149.15</Postage> <ExtraServices> <ExtraService> <ServiceID>107</ServiceID> <ServiceName>Insurance</ServiceName> <Available>正确</Available> <Price>0.00</Price> <DeclaredValueRequired>True</DeclaredValueRequired> </ExtraService> <ExtraService> <ServiceID>181</ServiceID> <ServiceName>Scan Retention</ServiceName> <Available>正确</Available> <Price>0.99</Price> </ExtraService> <ExtraService> <ServiceID>182</ServiceID> <ServiceName>Scan + Signature Retention</ServiceName> <Available>正确</Available> <Price>3.75</Price> </ExtraService> </ExtraServices> <ValueOfContents>200.00</ValueOfContents> <SvcCommitments>3 - 5 business days to many major markets</SvcCommitments> <SvcDescription>Priority Mail Express International&lt;sup&gt;&#174;&lt;/sup&gt;</SvcDescription> <MaxDimensions>Max. length 36", max. length plus girth 79"</MaxDimensions> <MaxWeight>66</MaxWeight> <GuaranteeAvailability>3 - 5 business days to many major markets</GuaranteeAvailability> </Service> <Service ID="2"> <Pounds>15.12345678</Pounds> <Ounces>0</Ounces> <Machinable>正确</Machinable> <MailType>Package</MailType> <Width>10</Width> <Length>15</Length> <Height>10</Height> <Girth>0</Girth> <Country>英国(大不列颠及北爱尔兰联合王国)</Country> <Postage>133.20</Postage> <ExtraServices> <ExtraService> <ServiceID>181</ServiceID> <ServiceName>Scan Retention</ServiceName> <Available>正确</Available> <Price>0.99</Price> </ExtraService> <ExtraService> <ServiceID>182</ServiceID> <ServiceName>Scan + Signature Retention</ServiceName> <Available>正确</Available> <Price>3.75</Price> </ExtraService> </ExtraServices> <ValueOfContents>200.00</ValueOfContents> <InsComment>SERVICE</InsComment> <SvcCommitments>6 - 10 business days to many major markets</SvcCommitments> <SvcDescription>Priority Mail International&lt;sup&gt;&#174;&lt;/sup&gt;</SvcDescription> <MaxDimensions>Max. length 60", max. length plus girth combined 108"</MaxDimensions> <MaxWeight>66</MaxWeight> </Service> </Package> <Package ID="2ND"> <Prohibitions>Coins, banknotes, credit notes or any securities payable to bearer, checks, precious metals (whether manufactured or not), precious stones, natural diamonds, jewels and other valuable articles, and foreign currency are prohibited. Kazakhstan will accept no liability for loss of or damage to such items. Cultural artifacts Deer horns, hooves, and antlers. Explosives and explosive or inflammable substances, pyrotechnic articles (fireworks, etc.). Firearms and bladed weapons or articles of similar construction for civilian service, ammunition, special dual purpose (civilian and military) technical devices, and parts and accessories thereof. Foreign currency. Human organs and/or substances, and blood and blood parts. Implements for fishing aquatic biological resources. Live animals except bees, leeches, and silkworms. Military weapons. Narcotics, psychotropic substances, and precursors, including in drug form. Natural precious stones, waste there of, powder from precious stones, pearls, yellow amber. Nuclear materials and equipment; radioactive materials, fuels and corrosive materials. Originals and copies of military service records, identity cards, and passports. Perishable foodstuffs. Perishable infectious biological substances. Perishable noninfectious biological substances. Plants of any kind and in any form, including seeds. Plant protection products subject to the provisions of Annexes A and B to the Stockholm Convention on Persistent Organic Pollutants of 2001 年 05 月 22 日. Poisons, toxic substances of animal origin. Precious metals, alloys, minerals, concentrates, rubble and waste from precious metals. Printed matter, plastic materials, stock footage, photographic material, audio and video material containing propaganda against the political regime and liable to threaten the integrity and security of the State or aimed at undermining its authority, materials that promote war, cruelty, violence and pornography, and materials that promote social, racial, national, religious, genetic or caste superiority. Rare animal and vegetable products and endangered animals and plants. Rare metals, raw materials, alloys, combinations and products. Special technical publications on the covert reception of intelligence. Sturgeon and salmon caviar. Substances harmful to the ozone layer. Tobacco products and smoking mixtures of all kinds.</Prohibitions> <Restrictions>A certificate must accompany funeral urns containing ashes of the deceased from the licensed crematory or licensed mortuary stating that the ashes are those of the person named in the death certificate. Animals and products of animal origin are subject to authorization from the veterinary control institutions of Kazakhstan. Articles subject to customs duty may not be sent in ordinary or registered First-Class Mail International items, including the Priority Mail International Flat Rate Envelope and Small Flat Rate Box. Radio-electronic and high-frequency equipment requires authorization by the country's Ministry of Transport and Communications. Recording media (diskettes, video, and audio) require that information be supplied on the type of computer and operating system used for recording. Works of art, antiques, and other valuable objects of art, history, science, or culture require authorization by the country's Ministry of Public Health, Education and Culture.</Restrictions> <Observations>1. For postal items destined to a private individual within a given calendar month, the total duty-free value limit and weight import limit are as follows:
· From 2022 年 03 月 31 日, until 2022 年 09 月 30 日: 1,000 EUR and 31 kg (68 pounds), respectively. Customs duties apply as follows: the greater fee of either 15 percent of the amount exceeding 1,000 EUR or at least 2 EUR per kg of the weight exceeding 31 kg (68 pounds).
· Starting 2022 年 10 月 01 日: 200 EUR and 31 kg (68 pounds), respectively. Customs duties will apply as follows: the greater fee of either 15 percent of the amount exceeding 200 EUR or at least 2 EUR per kg of the weight exceeding 31 kg (68 pounds). 2. On all Registered Mail service items sent to Kazakhstan, display the addressee's first and last name and patronymic (if any) in the address field and the addressee's national identity number (if possible) in the "importer's reference" or "comments" field of the customs form. 3. Kazakhstan requires one copy of a commercial invoice for each Priority Mail Express International package containing merchandise and/or any article subject to customs duty 4. Kazpost Joint Stock Company (the designated postal operator of Kazakhstan) recommends that the mailer include on each item addressed to Kazakhstan the unique 7-character postcode assigned to each group of buildings within 22 localities of Kazakhstan. The postcode consists of a combination of letters and numbers (e.g., R00H5A9). Postcodes are available at https://post.kz/postcode (only in Russian).</Observations> <CustomsForms>First-Class Mail International items and Priority Mail International Flat Rate Envelopes and Small Flat Rate Boxes: PS Form 2976 (see 123.61) Priority Mail International parcels: PS Form 2976-B inside 2976-E (envelope)</CustomsForms> <ExpressMail>Country Code: KZ Reciprocal Service Name: EMS Required Customs Form/Endorsement 1. Correspondence, business papers, and documents. PS Form 2976-B placed inside PS Form 2976-E (plastic envelope). Endorse item clearly next to mailing label as BUSINESS PAPERS.
2. Merchandise samples without commercial value. PS Form 2976-B placed inside PS Form 2976-E (plastic envelope).
3. Merchandise and all articles subject to customs duty. PS Form 2976-B placed inside PS Form 2976-E (plastic envelope). Include the commercial invoice.
注意: 1. Addressees are required to obtain import licenses/permits to receive most goods. 2. Coins; banknotes; currency notes, including paper money; securities of any kind payable to bearer; traveler's checks; platinum, gold, and silver; precious stones; jewelry; watches; and other valuable articles are prohibited in Priority Mail Express International shipments to Kazakhstan. Areas Served: 所有</ExpressMail> <AreasServed>Please reference Express Mail for Areas Served.</AreasServed> <AdditionalRestrictions>No Additional Restrictions Data found.</AdditionalRestrictions> <HSCodeReqd>False</HSCodeReqd> <Service ID="1"> <Pounds>2</Pounds> <Ounces>0</Ounces> <MailType>All</MailType> <Width>5</Width> <Length>10</Length> <Height>3</Height> <Girth>0</Girth> <Country>Kazakhstan</Country> <Postage>81.10</Postage> <ExtraServices> <ExtraService> <ServiceID>107</ServiceID> <ServiceName>Insurance</ServiceName> <Available>正确</Available> <Price>0.00</Price> <DeclaredValueRequired>True</DeclaredValueRequired> </ExtraService> <ExtraService> <ServiceID>181</ServiceID> <ServiceName>Scan Retention</ServiceName> <Available>正确</Available> <Price>0.99</Price> </ExtraService> <ExtraService> <ServiceID>182</ServiceID> <ServiceName>Scan + Signature Retention</ServiceName> <Available>正确</Available> <Price>3.75</Price> </ExtraService> </ExtraServices> <ValueOfContents>95.75</ValueOfContents> <SvcCommitments>3 - 5 business days to many major markets</SvcCommitments> <SvcDescription>Priority Mail Express International&lt;sup&gt;&#174;&lt;/sup&gt;</SvcDescription> <MaxDimensions>Max. length 36", max. length plus girth 79"</MaxDimensions> <MaxWeight>66</MaxWeight> </Service> <Service ID="2"> <Pounds>2</Pounds> <Ounces>0</Ounces> <MailType>All</MailType> <Width>5</Width> <Length>10</Length> <Height>3</Height> <Girth>0</Girth> <Country>Kazakhstan</Country> <Postage>64.00</Postage> <ExtraServices> <ExtraService> <ServiceID>108</ServiceID> <ServiceName>Insurance</ServiceName> <Available>正确</Available> <Price>0.00</Price> <DeclaredValueRequired>True</DeclaredValueRequired> </ExtraService> <ExtraService> <ServiceID>105</ServiceID> <ServiceName>Return Receipt</ServiceName> <Available>正确</Available> <Price>5.65</Price> </ExtraService> <ExtraService> <ServiceID>181</ServiceID> <ServiceName>Scan Retention</ServiceName> <Available>正确</Available> <Price>0.99</Price> </ExtraService> <ExtraService> <ServiceID>182</ServiceID> <ServiceName>Scan + Signature Retention</ServiceName> <Available>正确</Available> <Price>3.75</Price> </ExtraService> </ExtraServices> <ValueOfContents>95.75</ValueOfContents> <SvcCommitments>6 - 10 business days to many major markets</SvcCommitments> <SvcDescription>Priority Mail International&lt;sup&gt;&#174;&lt;/sup&gt;</SvcDescription> <MaxDimensions>Max. length 42", max. length plus girth combined 79"</MaxDimensions> <MaxWeight>44</MaxWeight> </Service> <Service ID="11"> <Pounds>2</Pounds> <Ounces>0</Ounces> <MailType>All</MailType> <Width>5</Width> <Length>10</Length> <Height>3</Height> <Girth>0</Girth> <Country>Kazakhstan</Country> <Postage>132.05</Postage> <ExtraServices> <ExtraService> <ServiceID>108</ServiceID> <ServiceName>Insurance</ServiceName> <Available>正确</Available> <Price>0.00</Price> <DeclaredValueRequired>True</DeclaredValueRequired> </ExtraService> <ExtraService> <ServiceID>105</ServiceID> <ServiceName>Return Receipt</ServiceName> <Available>正确</Available> <Price>5.65</Price> </ExtraService> <ExtraService> <ServiceID>181</ServiceID> <ServiceName>Scan Retention</ServiceName> <Available>正确</Available> <Price>0.99</Price> </ExtraService> <ExtraService> <ServiceID>182</ServiceID> <ServiceName>Scan + Signature Retention</ServiceName> <Available>正确</Available> <Price>3.75</Price> </ExtraService> </ExtraServices> <ValueOfContents>95.75</ValueOfContents> <SvcCommitments>6 - 10 business days to many major markets</SvcCommitments> <SvcDescription>Priority Mail International&lt;sup&gt;&#174;&lt;/sup&gt; Large Flat Rate Box</SvcDescription> <MaxDimensions>USPS-Produced Box: 23-11/16" x 11-3/4" x 3" or 12" x 12" x 5-1/2"<br>Maximum weight 20 pounds.</MaxDimensions> <MaxWeight>20</MaxWeight> </Service> <Service ID="9"> <Pounds>2</Pounds> <Ounces>0</Ounces> <MailType>All</MailType> <Width>5</Width> <Length>10</Length> <Height>3</Height> <Girth>0</Girth> <Country>Kazakhstan</Country> <Postage>102.55</Postage> <ExtraServices> <ExtraService> <ServiceID>108</ServiceID> <ServiceName>Insurance</ServiceName> <Available>正确</Available> <Price>0.00</Price> <DeclaredValueRequired>True</DeclaredValueRequired> </ExtraService> <ExtraService> <ServiceID>105</ServiceID> <ServiceName>Return Receipt</ServiceName> <Available>正确</Available> <Price>5.65</Price> </ExtraService> <ExtraService> <ServiceID>181</ServiceID> <ServiceName>Scan Retention</ServiceName> <Available>正确</Available> <Price>0.99</Price> </ExtraService> <ExtraService> <ServiceID>182</ServiceID> <ServiceName>Scan + Signature Retention</ServiceName> <Available>正确</Available> <Price>3.75</Price> </ExtraService> </ExtraServices> <ValueOfContents>95.75</ValueOfContents> <SvcCommitments>6 - 10 business days to many major markets</SvcCommitments> <SvcDescription>Priority Mail International&lt;sup&gt;&#174;&lt;/sup&gt; Medium Flat Rate Box</SvcDescription> <MaxDimensions>USPS-Produced Box: 13-5/8" x 11-7/8" x 3-3/8" or 11" x 8-1/2" x 5-1/2"<br>Maximum weight 20 pounds.</MaxDimensions> <MaxWeight>20</MaxWeight> </Service> <Service ID="15"> <Pounds>2</Pounds> <Ounces>0</Ounces> <MailType>All</MailType> <Width>5</Width> <Length>10</Length> <Height>3</Height> <Girth>0</Girth> <Country>Kazakhstan</Country> <Postage>34.50</Postage> <ExtraServices> <ExtraService> <ServiceID>100</ServiceID> <ServiceName>Certificate of Mailing</ServiceName> <Available>正确</Available> <Price>1.95</Price> </ExtraService> <ExtraService> <ServiceID>103</ServiceID> <ServiceName>Registered Mail</ServiceName> <Available>正确</Available> <Price>20.25</Price> </ExtraService> <ExtraService> <ServiceID>105</ServiceID> <ServiceName>Return Receipt</ServiceName> <Available>正确</Available> <Price>5.65</Price> </ExtraService> <ExtraService> <ServiceID>181</ServiceID> <ServiceName>Scan Retention</ServiceName> <Available>正确</Available> <Price>0.99</Price> </ExtraService> <ExtraService> <ServiceID>182</ServiceID> <ServiceName>Scan + Signature Retention</ServiceName> <Available>正确</Available> <Price>3.75</Price> </ExtraService> </ExtraServices> <ValueOfContents>95.75</ValueOfContents> <InsComment>SERVICE</InsComment> <SvcCommitments>Varies by destination</SvcCommitments> <SvcDescription>First-Class Package International Service&lt;sup&gt;&#8482;&lt;/sup&gt;</SvcDescription> <MaxDimensions>Other than rolls: Min. length 6", Min. height 4", Max. length 24", max length, height and depth (thickness) combined 36"<br>Rolls: Min. Length 4", "Max. length 36". Max length and twice the diameter combined 42"</MaxDimensions> <MaxWeight>4</MaxWeight> </Service> <Service ID="28"> <Pounds>2</Pounds> <Ounces>0</Ounces> <MailType>All</MailType> <Width>5</Width> <Length>10</Length> <Height>3</Height> <Girth>0</Girth> <Country>Kazakhstan</Country> <Postage>87.89</Postage> <ExtraServices> <ExtraService> <ServiceID>100</ServiceID> <ServiceName>Certificate of Mailing</ServiceName> <Available>正确</Available> <Price>1.95</Price> </ExtraService> </ExtraServices> <ValueOfContents>95.75</ValueOfContents> <InsComment>SERVICE</InsComment> <SvcCommitments>Varies by destination</SvcCommitments> <SvcDescription>Airmail M-Bag</SvcDescription> <MaxDimensions/> <MaxWeight>44</MaxWeight> </Service> </Package> </IntlRateV2Response> |
Error conditions are handled at the main XML document level, Package node level, and ExtraService node 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].
Errors that are further down in the hierarchy also follow the above format.
An <Error> element may be returned at the top (response) level if there is a problem with the syntax of the request, or if a system error occurs. But if there is a problem with a specific Package or ExtraService within the request, an <Error> element will be returned within the <Package> or <ExtraService> element that pertains to the specific package ID. Since the IntlRateV2 API allows you to submit multiple packages within a single request document, the response may contain a mix of international rate information and errors. For requests containing multiple package IDs, you need to check if there is an <Error> within a given <Package> or <ExtraService> element, as well as checking for an error at the top level for example:
<IntlRateV2Response> <Package ID="0"> <Prohibitions>Sample</Prohibitions> <Restrictions>Sample</Restrictions> <Observations>Sample</Observations> <CustomsForms>Sample</CustomsForms> <ExpressMail>Sample</ExpressMail> <AreasServed>Sample</AreasServed> <AdditionalRestrictions>Sample</AdditionalRestrictions> <Service ID="21"> <Pounds>0</Pounds> <Ounces>2</Ounces> <MailType>Postcard</MailType> <Container></Container> <Width>5</Width> <Length>10</Length> <Height>3</Height> <Girth>0</Girth> <Country>ALBANIA</Country> <Postage>1.15</Postage> <ExtraServices></ExtraServices> <ValueOfContents>95.75</ValueOfContents> <InsComment>SERVICE</InsComment> <SvcCommitments>Varies by destination</SvcCommitments> <SvcDescription>First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; International Postcard</SvcDescription> <MaxDimensions>Maximum size 6" length x 4-1/4" height</MaxDimensions> <MaxWeight>0.21875</MaxWeight> </Service> </Package> <Package ID="2"> <Error> <Number>-2147218040</Number> <Source>IntlPostage;clsIntlPostage.CalcAllPostageDimensionsXML;IntlRateV2.ProcessRequest</Source> <Description>Invalid International Mail Type</Description> <HelpFile></HelpFile> <HelpContext>1000440</HelpContext> </Error> </Package> </IntlRateV2Response> |
CLASSID |
邮件服务 |
0 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Stamped Letter |
0 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Large Envelope |
0 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Postcards |
0 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Postcards 5 Digit |
0 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Postcards AADC |
0 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Postcards Mixed AADC |
0 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Postcards Presort |
1 |
Priority Mail<sup>®</sup> |
2 |
Priority Mail Express 2-Day<sup>®</sup> Hold For Pickup |
3 |
Priority Mail Express 2-Day<sup>®</sup> |
5 |
装订的印刷材料包裹 |
5 |
Bound Printed Matter Parcels DDU |
5 |
Bound Printed Matter Parcels DNDC |
5 |
Bound Printed Matter Parcels DSCF |
6 |
Media Mail Parcel |
7 |
Library Mail Parcel |
13 |
Priority Mail Express 2-Day<sup>®</sup> Flat Rate Envelope |
15 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Large Postcards 5 Digit |
15 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Large Postcards AADC |
15 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Large Postcards Mixed AADC |
15 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Large Postcards Presort |
16 |
Priority Mail Flat Rate<sup>®</sup> Envelope |
17 |
Priority Mail<sup>®</sup> Medium Flat Rate Box |
20 |
装订的印刷材料扁平邮件 |
20 |
Bound Printed Matter Flats DDU |
20 |
Bound Printed Matter Flats DNDC |
20 |
Bound Printed Matter Flats DSCF |
22 |
Priority Mail<sup>®</sup> Large Flat Rate Box |
23 |
Priority Mail Express; Sunday/Holiday Delivery |
25 |
Priority Mail Express; Sunday/Holiday Delivery Flat Rate Envelope |
27 |
Priority Mail Express 2-Day<sup>®</sup> Flat Rate Envelope Hold For Pickup |
28 |
Priority Mail<sup>®</sup> Small Flat Rate Box |
29 |
Priority Mail<sup>®</sup> Padded Flat Rate Envelope |
30 |
Priority Mail Express 2-Day<sup>®</sup> Legal Flat Rate Envelope |
31 |
Priority Mail Express 2-Day<sup>®</sup> Legal Flat Rate Envelope Hold For Pickup |
32 |
Priority Mail Express; Sunday/Holiday Delivery Legal Flat Rate Envelope |
33 |
Priority Mail<sup>®</sup> Hold For Pickup |
34 |
Priority Mail<sup>®</sup> Large Flat Rate Box Hold For Pickup |
35 |
Priority Mail<sup>®</sup> Medium Flat Rate Box Hold For Pickup |
36 |
Priority Mail<sup>®</sup> Small Flat Rate Box Hold For Pickup |
37 |
Priority Mail Flat Rate<sup>®</sup> Envelope Hold For Pickup |
38 |
Priority Mail<sup>®</sup> Gift Card Flat Rate Envelope |
39 |
Priority Mail<sup>®</sup> Gift Card Flat Rate Envelope Hold For Pickup |
40 |
Priority Mail<sup>®</sup> Window Flat Rate Envelope |
41 |
Priority Mail<sup>®</sup> Window Flat Rate Envelope Hold For Pickup |
42 |
Priority Mail<sup>®</sup> Small Flat Rate Envelope |
43 |
Priority Mail<sup>®</sup> Small Flat Rate Envelope Hold For Pickup |
44 |
Priority Mail<sup>®</sup> Legal Flat Rate Envelope |
45 |
Priority Mail<sup>®</sup> Legal Flat Rate Envelope Hold For Pickup |
46 |
Priority Mail<sup>®</sup> Padded Flat Rate Envelope Hold For Pickup |
62 |
Priority Mail Express 2-Day<sup>®</sup> Padded Flat Rate Envelope |
63 |
Priority Mail Express 2-Day<sup>®</sup> Padded Flat Rate Envelope Hold For Pickup |
64 |
Priority Mail Express; Sunday/Holiday Delivery Padded Flat Rate Envelope |
78 |
First-Class Mail&lt;sup&gt;&#174;&lt;/sup&gt; Metered Letter |
84 |
Priority Mail<sup>®</sup> Cubic |
88 |
USPS Connect Local DDU |
89 |
USPS Connect Local Flat Rate Bag – Small DDU |
90 |
USPS Connect Local Flat Rate Bag – Large DDU |
91 |
USPS Connect Local Flat Rate Box DDU |
179 |
Parcel Select Destination Entry DDU |
179 |
Parcel Select Destination Entry DHUB |
179 |
Parcel Select Destination Entry DNDC |
179 |
Parcel Select Destination Entry DSCF |
922 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Padded Flat Rate Envelope |
932 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Gift Card Flat Rate Envelope |
934 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Window Flat Rate Envelope |
936 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Small Flat Rate Envelope |
938 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Legal Flat Rate Envelope |
939 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Flat Rate Envelope |
962 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return |
963 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Large Flat Rate Box |
964 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Medium Flat Rate Box |
965 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Small Flat Rate Box |
966 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Large Flat Rate Box APO/FPO/DPO |
967 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Cubic |
1058 |
USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; |
1094 |
Priority Mail Express 1-Day&lt;sup&gt;&#174;&lt;/sup&gt; Flat Rate Envelope Return |
1095 |
Priority Mail Express 1-Day&lt;sup&gt;&#174;&lt;/sup&gt; Padded Flat Rate Envelope Return |
USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Cubic |
|
1097 |
Priority Mail Express 1-Day&lt;sup&gt;&#174;&lt;/sup&gt; Legal Flat Rate Envelope Return |
1098 |
USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Return |
1099 |
Priority Mail Express 1-Day&lt;sup&gt;&#174;&lt;/sup&gt; Return |
1100 |
USPS Ground Advantage&lt;sup&gt;&#174;&lt;/sup&gt; Return Cubic |
2020 |
Bound Printed Matter Flats Hold For Pickup |
2020 |
Bound Printed Matter Flats DDU Hold For Pickup |
2020 |
Bound Printed Matter Flats DNDC Hold For Pickup |
2020 |
Bound Printed Matter Flats DSCF Hold For Pickup |
2058 |
USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Hold For Pickup |
2077 |
Bound Printed Matter Parcels Hold For Pickup |
2077 |
Bound Printed Matter Parcels DDU Hold For Pickup |
2077 |
Bound Printed Matter Parcels DNDC Hold For Pickup |
2077 |
Bound Printed Matter Parcels DSCF Hold For Pickup |
2079 |
Parcel Select Destination Entry DDU Hold For Pickup |
2079 |
Parcel Select Destination Entry DHUB Hold For Pickup |
2079 |
Parcel Select Destination Entry DNDC Hold For Pickup |
2079 |
Parcel Select Destination Entry DSCF Hold For Pickup |
2096 |
USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Cubic Hold For Pickup |
4001 |
Priority Mail Express 2-Day<sup>®</sup> HAZMAT |
4010 |
Priority Mail<sup>®</sup> HAZMAT |
4012 |
Priority Mail<sup>®</sup> Large Flat Rate Box HAZMAT |
4013 |
Priority Mail<sup>®</sup> Medium Flat Rate Box HAZMAT |
4014 |
Priority Mail<sup>®</sup> Small Flat Rate Box HAZMAT |
4022 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Padded Flat Rate Envelope HAZMAT |
4032 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Gift Card Flat Rate Envelope HAZMAT |
4034 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Window Flat Rate Envelope HAZMAT |
4036 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Small Flat Rate Envelope HAZMAT |
4038 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Legal Flat Rate Envelope HAZMAT |
4039 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Flat Rate Envelope HAZMAT |
4058 |
USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; HAZMAT |
4062 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return HAZMAT |
4063 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Large Flat Rate Box HAZMAT |
4064 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Medium Flat Rate Box HAZMAT |
4065 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Small Flat Rate Box HAZMAT |
4067 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Return Cubic HAZMAT |
4084 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Cubic HAZMAT |
4079 |
Parcel Select Destination Entry DDU HAZMAT |
4079 |
Parcel Select Destination Entry DHUB HAZMAT |
4079 |
Parcel Select Destination Entry DNDC HAZMAT |
4079 |
Parcel Select Destination Entry DSCF HAZMAT |
4094 |
Priority Mail Express 1-Day&lt;sup&gt;&#174;&lt;/sup&gt; Flat Rate Envelope Return HAZMAT |
4095 |
Priority Mail Express 1-Day&lt;sup&gt;&#174;&lt;/sup&gt; Padded Flat Rate Envelope Return HAZMAT |
4096 |
USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Cubic HAZMAT |
4097 |
Priority Mail Express 1-Day&lt;sup&gt;&#174;&lt;/sup&gt; Legal Flat Rate Envelope Return HAZMAT |
4098 |
USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Return HAZMAT |
4099 |
Priority Mail Express 1-Day&lt;sup&gt;&#174;&lt;/sup&gt; Return HAZMAT |
4100 |
USPS Ground Advantage&lt;sup&gt;&#174;&lt;/sup&gt; Return Cubic HAZMAT |
6001 |
Priority Mail Express 2-Day<sup>®</sup> Parcel Locker |
6010 |
Priority Mail<sup>®</sup> Parcel Locker |
6012 |
Priority Mail<sup>®</sup> Large Flat Rate Box Parcel Locker |
6013 |
Priority Mail<sup>®</sup> Medium Flat Rate Box Parcel Locker |
6014 |
Priority Mail<sup>®</sup> Small Flat Rate Box Parcel Locker |
6020 |
Bound Printed Matter Flats Parcel Locker |
6020 |
Bound Printed Matter Flats DDU Parcel Locker |
6020 |
Bound Printed Matter Flats DNDC Parcel Locker |
6020 |
Bound Printed Matter Flats DSCF Parcel Locker |
6084 |
Priority Mail<sup>®</sup> Cubic Parcel Locker |
6058 |
USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Parcel Locker |
6076 |
Media Mail Parcel Parcel Locker |
6075 |
Library Mail Parcel Parcel Locker |
6077 |
Bound Printed Matter Parcels Parcel Locker |
6077 |
Bound Printed Matter Parcels DDU Parcel Locker |
6077 |
Bound Printed Matter Parcels DNDC Parcel Locker |
6077 |
Bound Printed Matter Parcels DSCF Parcel Locker |
6079 |
Parcel Select Destination Entry DDU Parcel Locker |
6079 |
Parcel Select Destination Entry DHUB Parcel Locker |
6079 |
Parcel Select Destination Entry DNDC Parcel Locker |
6079 |
Parcel Select Destination Entry DSCF Parcel Locker |
6084 |
Priority Mail&lt;sup&gt;&#174;&lt;/sup&gt; Cubic Parcel Locker |
6096 |
USPS Ground Advantage&lt;sup&gt;&#8482;&lt;/sup&gt; Cubic Parcel Locker |
CLASSID |
邮件服务 |
1 |
Priority Mail Express International |
2 |
Priority Mail International |
8 |
Priority Mail International; Flat Rate Envelope** |
9 |
Priority Mail International; Medium Flat Rate Box |
10 |
Priority Mail Express International; Flat Rate Envelope |
11 |
Priority Mail International; Large Flat Rate Box |
13 |
First-Class Mail; International Letter** |
14 |
First-Class Mail; International Large Envelope** |
15 |
First-Class Package International Service** |
16 |
Priority Mail International; Small Flat Rate Box** |
17 |
Priority Mail Express International; Legal Flat Rate Envelope |
18 |
Priority Mail International; Gift Card Flat Rate Envelope** |
19 |
Priority Mail International; Window Flat Rate Envelope** |
20 |
Priority Mail International; Small Flat Rate Envelope** |
航空邮件 M-BAGS |