Create a Container Label

HTTP Request

POST /v1/container-manifest

Summary

This operation prints a label for the shipment of containerized parcels destined for a Pitney Bowes warehouse facility from the client location.

Things to Consider

  1. The operation returns a Pitney Bowes container ID and the container label.

  2. The container label is returned as a Base64-encoded PDF. You must convert the Base64 to the application/pdf MIME type.

  3. Pitney Bowes requires that shippers print 2 copies of a container label and affix each on a different side of the container. This helps increase scan speeds at Pitney Bowes facilities.

  4. Each container arriving at a Pitney Bowes facility is scanned for receipt, and a tracking event is generated against each of scan.

  5. If a shipper needs to make changes to a container label after printing it, the shipper can make the changes in the original request, enter a new value for the X-PB-TransactionId request header, and then reissue the request. The API will return a new label with a new container ID (pbContainerId). The original label can be discarded.

    For example, if a shipper needs to change the tracking numbers in the parcelTrackingNumbers array or a parameter value in the parameters array, the shipper can make the changes and reissue the request with a new X-PB-TransactionId value to get a container label with the updated information.

  6. Coming Soon: Merchants will be able to generate container labels through the Merchant Portal.

Request URIs

Sandbox URI: https://api-sandbox.pitneybowes.com/shippingservices/v1/container-manifest
Production URI: https://api.pitneybowes.com/shippingservices/v1/container-manifest

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.
X-PB-TransactionId

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

Important: You must ensure this is a unique id.

Request Elements

Name Data Type Description
carrier String

Required. The carrier. Possible value:

  • Newgistics (PB Standard)
containerType String

The type of container used to transport the parcels. Possible values:

  • Carton
  • Pallet
parcelTrackingNumbers Array[String] Required. The parcels included in the container, identified by their tracking numbers.
documents Array[Object] Required. Defines the container label.
    fileFormat String

The file format for the printable label. The label is returned as a Base64-encoded string that converts to this format. Possible value:

  • PDF

To convert the Base64-encoded string to PDF, use a tool that converts Base64 to the application/pdf MIME type.

    size String

The label size. Possible values:

  • DOC_4X4
  • DOC_6X4

Note: Clients are required to print 2 copies of labels and affix them on different sides of each container. This helps to increase scan speeds at Pitney Bowes facilities.

    resolution String

The label’s dots per inch (DPI). By default, the resolution is 203 DPI. Possible values:

  • DPI_203 (Default)
  • DPI_300
parameters Array[Object] Required. Defines reference fields and shipment options. Each object in the array specifies a different parameter and value. For available parameters, See Parameters.
    name String The parameter.
    value String The parameter’s value.

Parameters

The parameters array in the Create a Container Label request can take the parameters described here.

Name Description
CARRIER_GATEWAY_FACILITY_ID

Required.The Pitney Bowes facility at which the container will enter the PB network. Enter the facility’s 3-letter name.

For a list of facilities, see PB Facilities below on this page.

CARRIER_FACILITY_ID

Required.The Pitney Bowes facility at which the container will be processed. Enter the facility’s 3-letter name.

For a list of facilities, see PB Facilities below on this page.

CLIENT_ID

Required. The carrier-specific client or merchant ID.

If testing in the Sandbox environment, set this to NGST2.

SHIP_DATE Required. The date the container will be shipped, specified in the following format: YYYY-MM-DD
ESTIMATED_ARRIVAL_DATE The estimated date the container will arrive, specified in the following format: YYYY-MM-DD
CLIENT_CONTAINER_ID The client’s container ID or container number.
CURRENT_CONTAINER

The current container number. If you use this parameter, you should also use the TOTAL_CONTAINER_COUNT parameter. The label displays the parameters as follows:

Container   <CURRENT_CONTAINER>   of   <TOTAL_CONTAINER_COUNT>

For example:

Container 8 of 10

TOTAL_CONTAINER_COUNT

The total number of containers in the shipment.

If you use this parameter, you should also use the CURRENT_CONTAINER parameter. The label displays the two parameters on the same line with the word “of” in between.

SHIPMENT_REFERENCE_NUMBER The container’s shipment number or BOL number.

Parameters as they Appear on the Container Label

The parameters as they appear on the container label:

Parameters displayed on the container label

PB Facilities

When specifying a PB facility use the 3-letter name:

Facility Name
Facility Code (ID)
Facility Address
IND 1585 1415 Collins Rd, Greenwood, IN 46143
DFW 1361 1250 Mustang Drive, Grapevine, TX 76051
PHL 1532 305 Butterfly Commons, York, PA 17402
RNO 1328 38 Isidor Ct Suite 130, Sparks, NV 89441
ATL 0224 3630 Royal South Pkwy Atlanta, #210, GA 30349
CVG 0921 1200 Worldwide Blvd, Hebron, KY 41019
ORD 1094 882 Carol Ct. Carol Stream, IL 60188
SFO 1548 125 Valley Drive, Brisbane, CA 94005
SEA 1571 19005 64th Avenue South Ste 175, Kent, WA 98032
SLC 1712 2449 S 6755 W, Ste E, West Valley City, UT 84128
ONT 1787 11260 Cedar Ave, Bloomington, CA 92316
COM 1304 6017 Randolph St., Commerce, CA 90040


Response Elements

Name Data Type Description
data Object The label and label ID.
    pbContainerId String The unique Pitney Bowes identifier for the label.
    labelData String The label. The label is returned as a Base64-encoded string that can be decoded as a PDF. To decode the string to PDF, you must use a tool that converts Base64 to the application/pdf MIME type.

Sample Request

curl -X POST .../v1/container-manifest \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: abc12345678" \
-d '
{
    "carrier": "Newgistics",
    "containerType": "Carton",
    "parcelTrackingNumbers": [
        "9205500000000000000000",
        "9206600000000000000000",
        ...,
        ...
    ],
    "documents": [ {
        "fileFormat": "PDF",
        "size": "DOC_4X4",
        "resolution": "DPI_203"
    } ],
    "parameters": [ {
        "name": "CARRIER_FACILITY_ID",
        "value": "1585"
    },{
        "name": "CARRIER_GATEWAY_FACILITY_ID",
        "value": "1585"
    },{
        "name": "CLIENT_ID",
        "value": "NGST2"
    },{
        "name": "SHIP_DATE",
        "value": "2020-07-15"
    },{
         "name": "ESTIMATED_ARRIVAL_DATE",
         "value": "2020-07-17"
    },{
        "name": "CLIENT_CONTAINER_ID",
        "value": "AB12345678"
    },{
        "name": "CURRENT_CONTAINER",
        "value": "8"
    },{
        "name": "TOTAL_CONTAINER_COUNT",
        "value": "10"
    },{
        "name": "SHIPMENT_REFERENCE_NUMBER",
        "value": "CD12345678"
    } ]
}'

Sample Response

{
    "data": {
        "pbContainerId": "5e9030d0ca7d01031c6967a0",
        "labelData": "^XA^FWR^FO20,20^GB770,1185,5^FS^LRY^FO650 ... "
    }
}

Sample Container Label

Sample Container Label

Error Codes

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