Create a PB Standard Manifest (Closeout)

HTTP Request

POST /v1/manifests

Summary

This operation closes out the day for PB Standard (formerly Newgistics) parcels by electronically notifying Pitney Bowes how many parcels await. PB Standard creates manifest files for all valid labels generated since the previous closeout, unless you specify specific parcels as explained in Things to Consider below. The operation does not generate a pickup slip.

Prerequisite

The merchant must be onboarded with PB Standard. Please see the onboarding steps on the PB Standard page.

Things to Consider

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

    Field Value
    carrier NEWGISTICS (PB Standard)
    submissionDate The date the shipments are to be tendered to the carrier.
    parameters

    You must include the following Manifest Parameters:

  2. You can optionally include up to five instances of the CARRIER_FACILITY_ID_<#> parameter to close out pieces corresponding to specific facilities. Each instance specifies a PB Standard Facility ID. If this parameter is not specified, all un-manifested parcels are closed out. For more information, see Manifest Parameters.

  3. You can optionally close out specific parcels by specifying the parcel tracking numbers in the parcelTrackingNumbers array.

  4. Manifest requests for PB Standard do not support filtering by induction postal code.

  5. The manifest response does not contain a pickup slip.

  6. You cannot reprint or retry a PB Standard manifest.

Request URIs

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

Note: Do not use the above URIs for shipments created with APAC Services. Instead, use the APAC Services URIs below.

URIs for APAC Services

To manifest shipments created with APAC Services, you must use the following URIs. You can use these URIs only if the shipments were created using APAC Services.

Sandbox URI APAC: https://apac-sandbox.shippingapi.pitneybowes.com/shippingservices/v1/manifests?carrier=Newgistics
Production URI APAC: https://apac.shippingapi.pitneybowes.com/shippingservices/v1/manifests?carrier=Newgistics

Query Parameter

Name Description
carrier APAC Services Only. If your PB Standard Manifest request originates in the Asia-Pacific region and if you use the URIs for APAC Services, you must set the carrier query parameter to Newgistics.

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.

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 Manifest Object. The following table describes all possible fields in a Manifest Object.

Important

Some fields in the Manifest Object are not applicable to this request and are marked as such.

Important

See Things to Consider on this page for the required values when making this request.

Name Data Type Description
carrier String

Required. The carrier to which the manifest applies.

For some operations, this field is not present in the response.

Valid values:

  • USPS
  • NEWGISTICS. PB Standard. This value is valid only in a Create Manifest request.
  • PBPresort. This value is valid only in a Create Manifest request.
submissionDate String

Required. The time and date the shipments are to be tendered to the carrier. Enter the time and date in one of the following formats:

  • YYYY-MM-DD
  • YYYY-MM-DD HH:mm:ss
  • YYYY-MM-DD HH:mm:ss.SSS
fromAddress Address Object

Conditional. The shipment origin address.

Required for:

inductionPostalCode String

Conditional. Postal code where the shipments are tendered to the carrier.

This field does not apply to PB Standard manifests.

parcelTrackingNumbers Array[String] Identifies shipments by their tracking numbers. List one or more shipment tracking numbers, separated by commas.
parameters Array[Object]

Conditional. Each object in the array defines a different manifest parameter. This field is used only in the request and is not returned in the response.

Required for PB Standard manifests (closeouts).

        name String The name of the manifest parameter.
        value String The value of the manifest parameter.
manifestId String

RESPONSE ONLY. The unique manifest ID. This field is not returned for APAC Services.

This field is not returned for APAC Services.

manifestTrackingNumber String RESPONSE ONLY, USPS Only. The manifest tracking number.
documents Array[Documents Object]

RESPONSE ONLY. The manifest.

This field is not returned for a PB Standard manifest.

Sample Requests

See the following examples:

Close Out All Parcels Associated with the Shipper ID

Request
curl -X POST .../v1/manifests \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: <transaction-id>" \
-H "X-PB-UnifiedErrorStructure: true" \
-d '
{
    "carrier": "NEWGISTICS",
    "submissionDate": "2020-03-12",
    "parameters": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "CLIENT_ID",
        "value": "NGST"
    },{
        "name": "CARRIER_FACILITY_ID_1",
        "value": "1585"
    } ]
}
Response
{
    "carrier": "newgistics",
    "submissionDate": "2020-03-12",
    "manifestId": "NEWGISTICS03111552332799302",
    "parameters": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "CARRIER_FACILITY_ID_1",
        "value": "1585"
    },{
        "name": "CLIENT_ID",
        "value": "NGST"
    } ]
}

Close Out Parcels by Tracking Number

Request to Close Out by Tracking Number
curl -X POST .../v1/manifests \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: <transaction-id>" \
-H "X-PB-UnifiedErrorStructure: true" \
-d '
{
    "carrier": "NEWGISTICS",
    "submissionDate": "2020-05-15",
    "parameters": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "CLIENT_ID",
        "value": "NGST"
    } ],
    "parcelTrackingNumbers": [
        "4206740192612123456789000008534003",
        "4206740192612123456789000008524226",
        "4206740192612123456789000008526541"
    ]
}
Response for Close Out by Tracking Number
{
    "carrier": "newgistics",
    "manifestId": "NEWGISTICS05151589571962949",
    "parameters": [ {
        "name": "SHIPPER_ID",
        "value": "9024324564"
    },{
        "name": "CLIENT_ID",
        "value": "NGST"
    } ],
    "parcelTrackingNumbers": [
        "4206740192612123456789000008534003",
        "4206740192612123456789000008524226",
        "4206740192612123456789000008526541"
    ],
    "submissionDate": "2020-05-15"
}

Error Codes

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