Create a Priority Mail Open and Distribute (PMOD) Label

HTTP Request

POST /v1/shipments

Summary

This operation prints labels for USPS-approved Priority Mail Open and Distribute (PMOD) containers.

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 Accounts.

For more information on PMOD, contact the PB support team at ShippingAPISupport@pb.com.

Things to Consider

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

    Field Value
    rates.serviceId PMOD
    rates.parcelType

    Set to one of the following PMOD parcel types:

    • SACK — Sack
    • FTTB — Flat Tub Tray
    • HTB — Half Tray Box
    • FTB — Full Tray Box
    • EMMTB — Extended Managed Mail Tray Box
    rates.specialServices.specialServiceId PMOD_OPTIONS
    rates.specialServices.inputParameters Add a separate object for each PMOD option listed in the PMOD Options table below. You must add each of the PMOD options to your shipment request and give each option a value.
    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, and postalCode.

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

    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 option is always considered true for PMOD labels. If you set the option to false, the PB Complete 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 URIs

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

Query Parameter

Name Description
includeDeliveryCommitment

If set to true, returns estimated transit times in 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 USPS Only. Shipper rate plan, if applicable. For more information, see this FAQ.
X-PB-Integrator-CarrierId USPS Only. 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 table below describes all the elements in a shipment object.

Some fields do no apply to PMOD and are marked as such.

Name Data Type Description
fromAddress address object

Required. Origin address.

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

toAddress address object

Required. Destination address.

Note: If you are shipping with UPS (available only in Sandbox) 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 entries toAddress and soldToAddress must match.

altReturnAddress address object USPS Only. If you are sending an international shipment through USPS and if you have set the NON_DELIVERY_OPTION shipment option to redirect, then enter the address that a returned parcel should go to.
parcel parcel object Required. Contains physical characteristics of the parcel.
rates Array[rates object]

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

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

documents Array[documents object] Conditional: Required for Create Shipment requests; does not apply to Rate Package requests. Defines the label, manifest, or other shipment document.
shipmentOptions Array[Object] Conditional: Required for Create Shipment requests; does not apply to Rate Package requests. Each object in this array defines a shipment option. Please see the Things to Consider section on your carrier’s Create Shipment page for required options. Note that the SHIPPER_ID option is required for all shipments.
        name String The name of the shipment option. The shipmentOptions array requires this field.
        value String The value of the shipment option. The shipmentOptions array requires this field.
customs customs object

This field contains customs information.

Applies to the following:

  • For USPS, applies to shipments to these locations:
    • International
    • APO/FPO/DPO
    • Territories/Possessions
    • FAS
  • For UPS (available only in Sandbox), applies to shipments to these locations:
    • International
    • Puerto Rico
soldToAddress address object

UPS Only. (Available only in Sandbox)

This object is required for shipments from the U.S. to Puerto Rico or an international destination.

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

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

shipmentType String USPS SBR Only. If you are creating a USPS Scan-Based Return (SBR) label, include this field and set the value to RETURN.
references Array[Object]

Newgistics Only. This array maps client-generated identifiers to fields in the Newgistics package record. The information in this array does not appear on the shipping label.

The array takes up to three objects, and each object maps an identifier to a specific Newgistics field. An object’s sequence in the array determines which Newgistics field the object maps to. The first object in the array maps to the Newgistics “ReferenceNumber” field; the second to the “AddlRef1” field; and the third to the “AddlRef2” field.

Use the syntax shown below. Enter the names in the order shown. If you enter different names, the system will change them to the names below. In the value fields, enter the client-generated identifiers. The values must be strings of no more than 50 characters each. For additional information on using references, merchants can contact their Newgistics representatives.

{
    "name": "ReferenceNumber",
    "value": "<client identifier 1>"
}, {
    "name": "AddlRef1",
    "value": "<client identifier 2>"
}, {
    "name": "AddlRef2",
    "value": "<client identifier 3>"
}
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 Value — Description
ORIGIN_ENTRY_FACILITY
  • DDUDestination Delivery Unit
  • NDCNetwork Distribution Center
  • ASFAuxiliary Service Center
  • SCFSectional Center Facility
  • ADCArea Distribution Center
DESTINATION_ENTRY_FACILITY
  • DDUDestination Delivery Unit
  • NDCNetwork Distribution Center
  • ASFAuxiliary Service Center
  • SCFSectional Center Facility
  • ADCArea Distribution Center
ENCLOSED_MAIL_CLASS
  • FCMFirst-Class Mail
  • FCPSFirst-Class Package Service
  • PMPriority Mail
  • STDPOSTStandard Post
  • PRCLSELParcel Select
  • PSLWParcel Select Lightweight
  • MEDIAMedia Mail
  • LIBLibrary Mail
  • MKTMAILMarketing Mail
  • PERPeriodicals
  • MIXOnly very specific combinations are allowed. The shipper is responsible for following USPS rules. PB does not provide validation.
ENCLOSED_PARCEL_TYPE
  • LTR
  • LGENVLarge Envelope
  • PKGPackage
  • MIX
ENCLOSED_PAYMENT_METHOD
  • ELECTRONIC
  • NONELECTRONIC

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": "2019-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": "FUTURE_SHIPMENT_DATE",
        "value": "2019-04-23 16:53:04"
    }, {
        "name": "MINIMAL_ADDRESS_VALIDATION",
        "value": "false"
    }, {
        "name": "SHIPPING_LABEL_RECEIPT",
        "value": "noOptions"
    } ],
    "shipmentId": "USPS2200253403883570",
    "parcelTrackingNumber": "9412309838644503839917"
}

Error Codes

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