Create a Priority Mail Open and Distribute (PMOD) Label

HTTP Request

POST /v1/shipments

Summary

This operation purchases and prints a label for USPS®-approved Priority Mail Open and Distribute (PMOD) container.

PMOD uses Priority Mail to send containers containing lower classes of mail to USPS-authorized destination centers for processing, expediting the transport of the lower-class mailings. To use PMOD, shippers prepare their mailings and place them in approved USPS Priority Mail containers (sacks, trays, or tubs). They then affix PMOD labels to the containers and ship them to USPS-authorized centers, which open the containers and process the individual mailings according to their mail classes. The postage price is based on the weight of the contents (excluding the tare weight of the external container) and on regular Priority Mail distance-based prices.

PMOD works with both the individual and bulk payment models, which are described in Merchant Enrollment Models.

For more information on PMOD, contact Client Support at ClientSupportTechServices@pb.com.

Considerations

  1. When issuing the API call, you must set the following:

    Field

    Value

    rates.carrier

    USPS

    rates.serviceId

    PMOD

    rates.parcelType

    Set to one of the following PMOD parcel types:

    • EMMTB — Extended Managed Mail Tray Box

    • FTB — Full Tray Box

    • FTTB — Flat Tub Tray

    • HTB — Half Tray Box

    • SACK — Sack

    rates.specialServices.specialServiceId

    PMOD_OPTIONS

    rates.specialServices.inputParameters

    Add a separate object for each PMOD option listed in the PMOD Options table below.

    fromAddress

    Set this to the merchant’s address. The following fields are required: addressLines, postalCode, and countryCode.

    toAddress

    Set this to the destination facility. The shipper is responsible for providing the destination facility address information. The addressing data should be derived from the Drop Entry files located at the USPS FAST web site: http://fast.usps.com.

    If the DESTINATION_ENTRY_FACILITY PMOD option is set to DDU, include the entire destination address: name, addressLines, cityTown, stateProvince, postalCode, and countryCode.

    If the option is set to NDC, ADC, ASF or SCF, the address need only include the cityTown, stateProvince, postalCode, and countryCode.

    Note: In some cases the ZIP code on a PMOD label does not correspond to the city and state referenced. For example, the Washington DC Network Distribution Center (NDC) is addressed as NDC WASHINGTON DC 20799. The 20799 ZIP code, however, is the Maryland ZIP code where the NDC is located.

  2. The maximum weight allowed for each container is 70 pounds.

  3. Stealth postage is not allowed with PMOD. You cannot hide postage. If you set the HIDE_TOTAL_CARRIER_CHARGE option to true, it will be ignored.

  4. PMOD labels are supported for domestic shipments only.

    Note: You cannot print PMOD labels for international destinations.

  5. The ADD_TO_MANIFEST shipment option is always considered true for PMOD labels. If you set the option to false, the PB Shipping APIs ignore the setting and still consider the option to be true.

  6. After you create the PMOD label, you must add the label to PS Form 3152. See Create a Manifest for PMOD Shipments.

Request URLs

Sandbox: https://shipping-api-sandbox.pitneybowes.com/shippingservices/v1/shipments
Production: https://shipping-api.pitneybowes.com/shippingservices/v1/shipments

Query Parameter

Name

Description

includeDeliveryCommitment

If set to true, returns estimated transit time. Transit times is returned as number of days.

Valid values:

  • true

  • false

See also:

Request Headers

Name


Description

Authorization

Required. OAuth token generated using the Generate an OAuth Token API.

Content-Type

Required. The media type of the request entity. Set this to application/json.

Accept-Language

Language and country code. Default: en-US

X-PB-TransactionId

Required. A unique identifier for the transaction, up to 25 characters.

Important: You must ensure this is a unique id.

X-PB-Shipper-Rate-Plan

Shipper rate plan, if applicable. For more information, see this FAQ.

X-PB-Integrator-CarrierId

Negotiated services rate, if applicable.

X-PB-UnifiedErrorStructure

Recommended. Set this to true to use the standard error object if an error occurs.

Request / Response Elements

The API call sends and receives a Shipment Object. The following table describes all possible fields in a Shipment Object.

Important

Some fields in a Shipment Object do not apply to this operation and are marked accordingly.

Name

Data Type

Description

fromAddress

Address Object

Required. Origin address.

If you want a different address to appear on the label from the one listed here, see How do I print a return address that is different from the origin address?

toAddress

Address Object

Required. Destination address.

FedEx, UPS: If you are shipping with FedEx or UPS to Puerto Rico or an international destination, and if the importer is different from the final recipient, this is the address of the importer. Enter the recipient’s address in the soldToAddress object. If importer’s address is the same as the final recipient, the toAddress and soldToAddress must match.

altReturnAddress

Address Object

PB Expedited, CBDS Only. Applies as follows:

  • PB Expedited: If you are sending an international shipment and if you have set the NON_DELIVERY_OPTION shipment option to redirect, then enter the address that a returned parcel should go to.

  • CBDS: For a Create Shipment request, this is the address used to return a parcel from the CBDS Consolidation Center. If omitted, the fromAddress is used. The altReturnAddress is not returned in the response.

parcel

Parcel Object

Required. Contains physical characteristics of the parcel.

rates

Array[Rates Object]

Required. Specifies the carrier, service, parcel, and other information. In a response, this field also contains the service charges.

Important: In a request, the rates array can contain only one rates object.

documents

Array[Documents Object]

Conditional. Defines the label, manifest, or other shipping document created by the API call. In a response, this array provides the URL or Base64 string for a document and in some cases can contain multiple objects.

This field is required, except in the following cases:

  • This field does not apply to Rate Parcel requests.

  • This field does not apply to the Create CBDS Shipment request if the merchant prints the first-label prior to invoking the API.

shipmentOptions

Array[Object]

Required. Each object in this array defines a shipment option. Specify each option as a name-value pair in the array.

The SHIPPER_ID option is required. For additional requirements for a carrier, see the Considerations section on the carrier’s Create Shipment page.

        name

String

The name of the shipment option.

        value

String

The value of the shipment option.

customs

Object

Conditional. For shipments that use customs forms, this object contains the customs information. This field is required for the following carriers in the following situations:

  • PB Expedited: Required for shipments to international destinations. Conditional for shipments to APO/FPO/DPO, U.S. Territories, and FAS, as explained in this FAQ.

  • CBDS: Required for all shipments.

  • FedEx: Required for shipments to international destinations and Puerto Rico.

  • UPS: Required for shipments to international destinations and Puerto Rico.

        customsInfo

Customs Info Object

Customs clearance information used to fill out a commercial invoice. In the Customs Info Object, make sure to include the fields marked Required.

        customsItems

Array[Customs Items Object]

Information about each commodity in the shipment, used for customs clearance. In the Customs Items Object, make sure to include the fields marked Required.

The maximum number of objects in this array is 30.

domesticShipmentDetails

Domestic Shipment Details Object

CBDS Only. Required if the merchant prints the first-mile label prior to invoking the Create CBDS Shipment API. This object contains information about the first-mile leg of the shipment.

soldToAddress

Address Object

FedEx, UPS Only. The final recipient of a the shipment. Required for a shipment from the U.S. to Puerto Rico or to an international destination. Otherwise optional.

This address must match the toAddress.countryCode, with the exception of shipments to Canada and to U.S. satellite countries.

If the final recipient’s address is the same as the importer’s address, the entries in the soldToAddress object must match the entries in the toAddress object.

shipmentType

String

Return Labels Only. Set this to RETURN. Required for Rate Expedited Returns, Create Expedited Returns, and Create Standard Returns. Note: You cannot rate Standard Returns.

references

Array[Object]

Conditional. The merchant’s reference fields. Each object in the array includes a name-value pair that defines a reference field. The array applies to the following carriers:

        name

String

The name of the reference field.

        value

String

The value for the reference field.

hazmatDetails

Hazmat Details Object

PB Standard Only. If shipping hazardous materials with PB Standard, use this object. See Hazmat Details Object.

shipmentId

String

RESPONSE ONLY. Unique identifier for the shipment, generated by the system in response to shipment purchase.

parcelTrackingNumber

String

RESPONSE ONLY. Tracking number assigned to the shipment by the system.

PMOD Options

The rates.specialServices.inputParameters array must contain a separate object for each of the following options. For an example, see the Sample Request after this table.

Name

Description

ORIGIN_ENTRY_FACILITY

Required. The type of facility where the shipment begins, i.e., the type of facility that will pick up the packages or receive your drop off of the packages. To determine which type of facility to use, visit the USPS FAST web site at http://fast.usps.com.

Possible values:

  • ADC: Area Distribution Center

  • ASF: Auxiliary Service Center

  • DDU: Destination Delivery Unit

  • NDC: Network Distribution Center

  • SCF: Sectional Center Facility

Note: Do not use the facility for the fromAddress. Use the merchant’s address.

DESTINATION_ENTRY_FACILITY

Required. The type of facility the shipment is delivered to, i.e., where USPS opens the container and processes the individual mailings according to their mail classes. To determine which type of facility to use, visit the USPS FAST web site at http://fast.usps.com.

Possible values:

  • ADC: Area Distribution Center

  • ASF: Auxiliary Service Center

  • DDU: Destination Delivery Unit

  • NDC: Network Distribution Center

  • SCF: Sectional Center Facility

Note: The destination facility’s address is entered in the toAddress field. For more information, see the Considerations section on this page.

ENCLOSED_MAIL_CLASS

Required. Possible values:

  • FCM: First-Class Mail

  • FCPS: First-Class Package Service

  • LIB: Library Mail

  • MEDIA: Media Mail

  • MIX: Only very specific combinations are allowed. The shipper is responsible for following USPS rules. Pitney Bowes does not provide validation.

  • MKTMAIL: Marketing Mail

  • PER: Periodicals

  • PM: Priority Mail

  • PRCLSEL: Parcel Select

  • PSLW: Parcel Select Lightweight

  • STDPOST: Retail Ground (formerly Standard Post)

ENCLOSED_PARCEL_TYPE

Required. Possible values:

  • LGENV: Large Envelope

  • LTR

  • MIX

  • PKG: Package

ENCLOSED_PAYMENT_METHOD

Required. If the enclosed parcels are evidenced and paid via USPS e-VS (Electronic Verification System), set this to ELECTRONIC. Otherwise set this to NONELECTRONIC.

DESTINATION_ENTRY_FACILITY_NAME

Conditional. Required for all facilities except DDU facilities. Enter the facility name. Facility names can be found on fast.usps.com.

NASS_CODE

Conditional. Required for all facilities except DDU facilities. Enter the NASS (National Air Surface System) code for the NDC, ADC, ASF, or SCF destination facility. The code consists of three to five alpha-numeric characters and can be found on fast.usps.com.

Sample Request

curl -X POST .../v1/shipments \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: <unique_transaction_id>" \
-H "X-PB-UnifiedErrorStructure: true" \
-d '
{
    "fromAddress": { ... },
    "toAddress": { ... },
    "parcel": {
        "weight": {
            "unitOfMeasurement": "OZ",
            "weight": "80"
        }
    },
    "rates": [ {
        "carrier": "USPS",
        "serviceId": "PMOD",
        "parcelType": "SACK",
        "specialServices": [ {
            "specialServiceId": "PMOD_OPTIONS",
            "inputParameters": [ {
                "name": "ORIGIN_ENTRY_FACILITY",
                "value": "DDU"
            },{
                "name": "DESTINATION_ENTRY_FACILITY",
                "value": "DDU"
            },{
                "name": "ENCLOSED_PARCEL_TYPE",
                "value": "PKG"
            },{
                "name": "ENCLOSED_MAIL_CLASS",
                "value": "STDPOST"
            },{
                "name": "ENCLOSED_PAYMENT_METHOD",
                "value": "NONELECTRONIC"
            } ]
        } ],
        "inductionPostalCode": "06484"
    } ],
    "documents": [ {
        "type": "SHIPPING_LABEL",
        "contentType": "URL",
        "size": "DOC_8X11",
        "fileFormat": "PDF",
        "printDialogOption": "NO_PRINT_DIALOG"
    } ],
    "shipmentOptions": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "ADD_TO_MANIFEST",
        "value": "true"
    },{
        "name": "MINIMAL_ADDRESS_VALIDATION",
        "value": "false"
    } ]
}'

Sample Response

{
    "fromAddress": { ... },
    "toAddress": { ... },
    "parcel": {
        "weight": {
            "unitOfMeasurement": "OZ",
            "weight": "80"
        }
    },
    "rates": [ {
        "carrier": "USPS",
        "parcelType": "SACK",
        "inductionPostalCode": "06484",
        "specialServices": [ {
            "specialServiceId": "PMOD_OPTIONS",
            "inputParameters": [ {
                "name": "ORIGIN_ENTRY_FACILITY",
                "value": "DDU"
            },{
                "name": "DESTINATION_ENTRY_FACILITY",
                "value": "DDU"
            },{
                "name": "ENCLOSED_PARCEL_TYPE",
                "value": "PKG"
            },{
                "name": "ENCLOSED_MAIL_CLASS",
                "value": "STDPOST"
            },{
                "name": "ENCLOSED_PAYMENT_METHOD",
                "value": "NONELECTRONIC"
            } ]
        } ],
        "dimensionalWeight": {
            "unitOfMeasurement": "OZ",
            "weight": 0
        },
        "deliveryCommitment": {
            "minEstimatedNumberOfDays": "1",
            "maxEstimatedNumberOfDays": "1",
            "estimatedDeliveryDateTime": "2021-04-24",
            "guarantee": "NONE",
            "additionalDetails": "By end of Day"
        },
        "serviceId": "PMOD",
        "totalCarrierCharge": 7.81,
        "baseCharge": 7.81,
        "currencyCode": "USD",
        "destinationZone": "1"
    } ],
    "documents": [ {
        "type": "SHIPPING_LABEL",
        "size": "DOC_8X11",
        "fileFormat": "PDF",
        "contentType": "URL",
        "contents": "https://.../usps/253536747/outbound/label/8cb101763888485296df9e08f58d25e3.pdf"
    } ],
    "shipmentOptions": [ {
        "name": "HIDE_TOTAL_CARRIER_CHARGE",
        "value": "false"
    },{
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "ADD_TO_MANIFEST",
        "value": "true"
    },{
        "name": "MINIMAL_ADDRESS_VALIDATION",
        "value": "false"
    },{
        "name": "SHIPPING_LABEL_RECEIPT",
        "value": "noOptions"
    } ],
    "shipmentId": "USPS2200253403883570",
    "parcelTrackingNumber": "9412309838644503839917"
}

Sample PMOD Label

Sample PMOD Label

Error Codes

For a list of all PB Shipping APIs error codes, see Error Codes.