Open and Distribute Labels

 

USPS Web Tools™

Application Programming Interface

Reference

Document Version 1.0 (05/12/2008)

 

 

 

United States Postal Service Logo

 

 

 

 



To Our Customers

In registering for use of the USPS Web Tools™ (Web Tools), you received a user ID that will allow you to begin sending calls to the server when you are ready.  Any additional information or contact with you will occur as indicated on the registration form, please return to the Web Tools documentation website for the most recent documentation for any of the Web Tools.

If you require technical support, contact the USPS Internet Customer Care Center (ICCC).  This office is manned from 7:00 AM to 11:00 PM EST daily.

E-mail address:  icustomercare@usps.com

Telephone: 1-800-344-7779 (7:00 AM to 11:00 PM EST daily)

 

 

USPS Customer Commitment

The United States Postal Service fully understands the importance of providing information and service anytime day or night to your Internet and e-commerce customers.  For that reason, the USPS is committed to providing 24 x 7 service from our Web Tools servers, 365 days a year.

 

Trademarks

Express Mail, First-Class Mail, Global Express Mail, GXG, Global Priority Mail, Parcel Post, Parcel Select, Priority Mail, Express Mail International, First Class Mail International, Priority Mail International, USPS, and ZIP + 4 are registered trademarks of the U.S. Postal Service.

Delivery Confirmation, Global Express Guaranteed, International Parcel Post, Priority Mail Global Guaranteed, Signature Confirmation, USPS Web Tools, and ZIP Code are trademarks of the U.S. Postal Service.

Microsoft and Visual Basic are registered trademarks of Microsoft Corporation.

Adobe Acrobat is a trademark of Adobe Systems Incorporated.

DUNS is a registered trademark of Dun & Bradstreet.

 

ãCopyright 2008 United States Postal Service


 

Table of Contents

1     Introduction. 5

2     Open / Distribute Priority API 5

2.1         Open / Distribute Priority Request 5

2.1.1        API Signature. 7

2.1.2        Request Diagram.. 8

2.1.3        Request Parameters. 12

2.1.4        Request Example. 16

2.2         Open / Distribute Priority Response. 18

2.2.1        Response Diagram.. 18

2.2.2        Response Parameters. 19

2.2.3        Label Diagram.. 20

2.2.4        Tagged Label Diagram.. 21

2.2.5        Response Example. 22

 


1       Introduction

Express Mail Open and Distribute and Priority Mail Open and Distribute provide alternatives for mailers who want to expedite the transportation of shipments of other classes of mail to mail processing facilities and destination delivery units (DDU). Mailers prepare the mailings according to standards for the enclosed class of mail; enclose the mail in USPS Priority Mail approved container for expedited service as either Express Mail Open and Distribute or Priority Mail Open and Distribute.  The mailings are presented at a Business Mail Entry Unit (BMEU) or authorized location by the critical entry time for USPS shipment.

For additional information about Open and Distribute, please refer to the Domestic Mail Manual (DMM®) 705.16 at http://pe.usps.com/.

This document contains a Reference Guide to the Open and Distribute Labels APIs.  See the Developer’s Guide to Web Tools APIs to learn the administrative process for gaining access to the Web Tools APIs as well as the basic mechanism for calling the APIs and processing the results.  The Developer’s Guide also contains information on testing and trouble-shooting.

2       Open / Distribute Priority API

Priority Mail Open and Distribute shipments expedite movement of any class of mail (except Express Mail) between the domestic origin and destination postal facility. The service is designed exclusively for all classes of mail commingled into an approved USPS container.  Postage is paid based on the weight of the entire contents of the Priority Mail Open and Distribute contain, excluding the tare weight of the container, and is zoned rated from the acceptance Post Office to the destination facility of the shipment.  The shipments receive Priority Mail service from the origin facility to the destination facility. Once received at the destination facility, the container address label barcode is scanned and the enclosed mail is processed appropriately to the mail class.

Mailers prepare Priority Mail Open and Distribute shipments according to standards for the enclosed class of mail and present their shipments to the business mail entry unit in enough time for acceptance, processing, and dispatch to the appropriate unit before the critical entry time.  Mailers must use the electronic format for Open and Distribute Service on address labels for Priority Mail Open and Distribute containers, in accordance with requirements in Publication 91, Confirmation Services Technical Guide.

2.1      Open / Distribute Priority Request

The Priority Mail Open and Distribute bar coded label will enable customers to easily and conveniently view the tracking of their shipments.  The bar code label will increase package visibility.  The bar coded label with the service type code,55, will assist in improving scan performance and provide mailers accurate and consistent information on each Open and Distribute container. USPS supplied container tags of green Tag 161 going to mail processing facilities, pink Tag 190 for destination delivery units or orange Label 23 used for both processing and DDU’s, are provided for correct processing and handling of Priority Mail Open and Distribute shipments.  The five Priority Mail Open and Distribute address label barcodes are:

Drop Shipment Destination Facility

<FacilityType/>

<ToFacilityName/>

<ToFacilityAddress2/>

<ToFacilityCity/>
<ToFacilityState/>

<ToFacilityZip5/>

Destination Delivery Unit

DDU

Required

Required

Required when ZIP not provided

Required when City/State not provided

Sectional Center Facility

SCF

leave blank

leave blank

Required when AllowNonCleansedFacilityAddr=true

Required

Bulk Mail Center

BMC

leave blank

leave blank

Required when AllowNonCleansedFacilityAddr=true

Required

Area Distribution Center

ADC

leave blank

leave blank

Required when AllowNonCleansedFacilityAddr=true

Required

Auxiliary Service  Facility

ASF

leave blank

leave blank

Required when AllowNonCleansedFacilityAddr=true

Required

 

The facility address information can be obtained from Facility Access and Shipment Tracking (FAST) at https://fast.usps.com/fast/main.action .  Note that login is not required.  Using the Reports features, FAST will produce a “Drop Entry Point View” of available destinations for the Open and Distribute container based on the type and destination of the enclosed mailpieces.

For example, if the enclosed mail is being sent to ZIP codes starting with 441 via Standard mail, FAST will produce a listing similar to the one below.  The Open and Distribute container would be addressed to the appropriate facility based on the shape of the contents and proximity to the destination.

 

Content Information

Facility

ZIP/CRIDs

Discount

CIN Group

Facility

NASS

Address

City

State

ZIP

130-136, 140-168, 260-266, 439-449

BMC

Standard/Flats

PITTSBURGH BMC

15Z

300 BRUSH CREEK RD

WARRENDALE

PA

150951002

440-441

SCF

Standard/Irregular Parcels

CLEVELAND

440

2400 ORANGE AVE RM 30

CLEVELAND

OH

441019701

130-136, 140-168, 260-266, 439-449

BMC

Standard/Letters

PITTSBURGH BMC

15Z

300 BRUSH CREEK RD

WARRENDALE

PA

150951002

440-441

SCF

Standard/Machinable Parcels

CLEVELAND

440

2400 ORANGE AVE RM 30

CLEVELAND

OH

441019701

 

Contact the USPS Internet Customer Care Center (ICCC) for additional information on using FAST for Open and Distribute destinations.

 

2.1.1       API Signature

Scheme

Host

Path

API

XML

https://

secure.shippingapis.com

/ShippingAPI.dll

?API=OpenDistributePriority

&XML=(see below)

https://

secure.shippingapis.com

/ShippingAPI.dll

?API=OpenDistributePriorityCertify

&XML=(see below)

 

2.1.2       Request Diagram

XML schema layout graphic for Open Distribute Priority Request.  Following section describes the XML in more detail.  Graphic 1 of 4.

XML schema layout graphic for Open Distribute Priority Request.  Following section describes the XML in more detail.  Graphic 2 of 4.

XML schema layout graphic for Open Distribute Priority Request.  Following section describes the XML in more detail.  Graphic 3 of 4.

XML schema layout graphic for Open Distribute Priority Request.  Following section describes the XML in more detail.  Graphic 4 of 4.

2.1.3       Request Parameters

Tag Name

Occurs

Description

Type

Validation

OpenDistributePriorityRequest

required once

API=OpenDistributePriority This API produces a Priority Mail Open and Distribute label complete with barcode and receipt, with optional Permit imprint. Contact ICCC for permission to invoke this API.
Internet Customer Care Center (ICCC)
E-mail:
icustomercare@usps.com
Telephone: 1-800-344-7779 (7:00AM to 11:00PM ET) 

(group)

 

OpenDistributePriorityRequest / @USERID

required

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

NMTOKEN

 

OpenDistributePriorityRequest / @PASSWORD

optional

For backward compatibility; not validated. 

NMTOKEN

 

OpenDistributePriorityRequest / Option

optional

For future use. There is only one label option.  

empty

 

OpenDistributePriorityRequest / ImageParameters

optional

For future use. There are no image parameters; see "ImageType" tag.  

empty

 

OpenDistributePriorityRequest / PermitNumber

optional

Input Permit number provided by your local post office.  

string

whiteSpace=collapse
pattern=\d{1,15}  

OpenDistributePriorityRequest / PermitIssuingPOZip5

optional

ZIP Code of post office that issued your permit. REQUIRED when PermitNumber is specified. Must be valid within Address Matching System. City and State for Permit imprint are obtained from this ZIP code.  

string

whiteSpace=collapse
pattern=\d{5}  

OpenDistributePriorityRequest / FromName

required once

Name of sender.  

string

minLength=1
maxLength=32
whiteSpace=collapse  

OpenDistributePriorityRequest / FromFirm

required once

Company name.  

string

minLength=0
maxLength=32
whiteSpace=collapse  

OpenDistributePriorityRequest / FromAddress1

required once

Secondary address unit designator and number (such as an apartment or suite number (APT 202, STE 100)).  

string

minLength=0
maxLength=32
whiteSpace=collapse  

OpenDistributePriorityRequest / FromAddress2

required once

Street number and name. Includes predirectional, suffix, and postdirectional for the address or rural route and box number (RR 5 BOX 10), highway contract route and box number (HC 4 BOX 45), or post office box number (PO BOX 458).  

string

minLength=1
maxLength=32
whiteSpace=collapse  

OpenDistributePriorityRequest / FromCity

required once

The city is any acceptable mailing name for the 5-digit ZIP code serving the intended recipient.  

string

minLength=1
maxLength=21
whiteSpace=collapse  

OpenDistributePriorityRequest / FromState

required once

Use only official USPS state name abbreviations.  

string

whiteSpace=collapse
pattern=\w{2}  

OpenDistributePriorityRequest / FromZip5

required once

Correct 5-digit ZIP Code.  

string

whiteSpace=collapse
pattern=\d{5}  

OpenDistributePriorityRequest / FromZip4

required once

Last four digits of a complete ZIP+4 code.  

string

minLength=0
whiteSpace=collapse
pattern=\d{4}
pattern=  

OpenDistributePriorityRequest / POZipCode

optional

When the ZIP Code of a collection point for a given package is different from the Zip Code of the person mailing the package (their return address), this tag must be used to convey this difference to the USPS. Enter the ZIP Code of the post office or collection box where the item is mailed. May be different than "FromZip5."  

string

minLength=0
whiteSpace=collapse
pattern=\d{5}
pattern=  

OpenDistributePriorityRequest / ToFacilityName

required once

Drop Shipment destination facility name. Required for OpenDistributePriorityRequest[FacilityType='DDU']. Truncated to 26 characters on label.  

string

minLength=0
maxLength=38
whiteSpace=collapse  

OpenDistributePriorityRequest / ToFacilityAddress1

required once

Drop Shipment destination facility secondary address unit designator and number. Truncated to 32 characters after address standardization for label.  

string

minLength=0
maxLength=38
whiteSpace=collapse  

OpenDistributePriorityRequest / ToFacilityAddress2

required once

Drop Shipment destination facility street number and name. OpenDistributePriorityRequest[FacilityType='DDU']. Truncated to 32 characters after address standardization for label.  

string

minLength=0
maxLength=38
whiteSpace=collapse  

OpenDistributePriorityRequest / ToFacilityCity

required once

Drop Shipment destination facility city. When OpenDistributePriorityRequest[FacilityType ='DDU'], either City and State, or ZIP code is REQUIRED. Truncated to 15 characters after address standardization for label.  

string

minLength=0
maxLength=21
whiteSpace=collapse  

OpenDistributePriorityRequest / ToFacilityState

required once

Drop Shipment destination facility state abbreviation. When OpenDistributePriorityRequest[FacilityType='DDU'], either City and State, or ZIP code is REQUIRED.  

string

minLength=0
whiteSpace=collapse
pattern=\w{2}
pattern=  

OpenDistributePriorityRequest / ToFacilityZip5

required once

Drop Shipment destination facility 5-digit ZIP code. When OpenDistributePriorityRequest[FacilityType='DDU'], either City and State, or ZIP code is REQUIRED. For all other FacilityType values, always REQUIRED and must be valid ZIP code.  

string

minLength=0
whiteSpace=collapse
pattern=\d{5}
pattern=  

OpenDistributePriorityRequest / ToFacilityZip4

required once

Drop Shipment destination facility last four digits of ZIP+4. May be REQUIRED to obtain exact address match when OpenDistributePriorityRequest[FacilityType='DDU'].  

string

minLength=0
whiteSpace=collapse
pattern=\d{4}
pattern=  

OpenDistributePriorityRequest / FacilityType

required once

Drop Shipment destination facility type. Has values: "DDU", "SCF", "BMC", "ADC", "ASF".  

string

whiteSpace=collapse
enumeration=DDU
enumeration=SCF
enumeration=BMC
enumeration=ADC
enumeration=ASF  

OpenDistributePriorityRequest / MailClassEnclosed

required once

Mail Class and Processing Category, displays on label as: Letters: Standard Mail Letters; Flats: Standard Mail Flats; Parcels: Standard Mail Parcels; Mixed: Standard Mail Mixed; Other: explanation from OpenDistributePriorityRequest/MailClassOther tag.  

string

whiteSpace=collapse
enumeration=Letters
enumeration=Flats
enumeration=Parcels
enumeration=Mixed
enumeration=Other  

OpenDistributePriorityRequest / MailClassOther

optional

Explanation, REQUIRED when OpenDistributePriorityRequest[MailClassEnclosed='Other']. Is displayed on the label as provided.  

string

minLength=0
maxLength=21
whiteSpace=collapse  

OpenDistributePriorityRequest / WeightInPounds

optional

(Estimated) weight of package in pounds. Number must be represented using at most eight characters.  

decimal

minInclusive=0
maxInclusive=70
whiteSpace=collapse  

OpenDistributePriorityRequest / WeightInOunces

optional

(Estimated) weight of package in ounces. Number must be represented using at most eight characters.  

integer

maxInclusive=1120
minInclusive=0
whiteSpace=collapse  

OpenDistributePriorityRequest / ImageType

required once

The type of label image desired.  

string

whiteSpace=collapse
enumeration=TIF
enumeration=PDF
enumeration=NONE  

OpenDistributePriorityRequest / SeparateReceiptPage

optional

Enter "true" for the shipping label and the online customer record to be printed on two separate pages or "false" for both printed on the same page.  

boolean

default=false
whiteSpace=collapse  

OpenDistributePriorityRequest / LabelDate

optional

This tag allows the end-user to post-date the label up to four days in advance. The package should not be shipped until the ship date requested.  

string

minLength=0
whiteSpace=collapse
pattern=\d{1,2}/\d{1,2}/\d\d(\d\d)?
pattern=  

OpenDistributePriorityRequest / CustomerRefNo

optional

For future use.  

empty

 

OpenDistributePriorityCertifyRequest

required once

API=OpenDistributePriorityCertify The "Certify" form of the request is used for integrator testing. It produces a label that is not suitable for mailing and must not be entered into the US Postal System. Certify requests do not require additional permissions to invoke.  

(alias)

 

 

 

2.1.4       Request Example

<OpenDistributePriorityRequest USERID="xxx">

    <PermitNumber>1</PermitNumber>

    <PermitIssuingPOZip5>21718</PermitIssuingPOZip5>

    <FromName>M. Hurd</FromName>

    <FromFirm>Hewlett-Packard</FromFirm>

    <FromAddress1>Room 150</FromAddress1>

    <FromAddress2>6600 Rockledge</FromAddress2>

    <FromCity>Bethesda</FromCity>

    <FromState>MD</FromState>

    <FromZip5>21718</FromZip5>

    <FromZip4/>

    <POZipCode>21838</POZipCode>

    <ToFacilityName>Fairfax Post Office</ToFacilityName>

    <ToFacilityAddress1/>

    <ToFacilityAddress2>10660 Page Ave</ToFacilityAddress2>

    <ToFacilityCity>Fairfax</ToFacilityCity>

    <ToFacilityState>VA</ToFacilityState>

    <ToFacilityZip5>22030</ToFacilityZip5>

    <ToFacilityZip4/>

    <FacilityType>DDU</FacilityType>

    <MailClassEnclosed>Other</MailClassEnclosed>

    <MailClassOther>Free Samples</MailClassOther>

    <WeightInPounds>22</WeightInPounds>

    <WeightInOunces>10</WeightInOunces>

    <ImageType>PDF</ImageType>

    <SeparateReceiptPage>false</SeparateReceiptPage>

    <AllowNonCleansedFacilityAddr>false</AllowNonCleansedFacilityAddr>

</OpenDistributePriorityRequest>

 

 

 

 

 

 

2.2      Open / Distribute Priority Response

2.2.1       Response Diagram

XML schema layout graphic for Open Distribute Priority Response.  Following section describes the XML in more detail.

2.2.2       Response Parameters

Tag Name

Occurs

Description

Type

Validation

OpenDistributePriorityResponse

required once

The OpenDistributePriorityResponse XML document is sent in response to a OpenDistributePriorityRequest.  

(group)

 

OpenDistributePriorityResponse / OpenDistributePriorityNumber

required once

Open and Distribute ID Number (PIC #)  

string

 

OpenDistributePriorityResponse / OpenDistributePriorityLabel

optional

Open and Distribute Shipping Label (not returned when ImageType is None in the request).  

base64Binary