Create Bulk Shipments

This API "Create Bulk Shipments" operation requires the following information:

  • Recipient (Single or Multiple)
  • Carrier
  • Service
  • Parcel Type, and
  • Special Service

The API works at two levels: Shipment level and Root level. Root level is marked as Default, where multiple shipments are processed and entities are common for all shipments. While at Shipment level, entities might differ.
User can either define values for CarrierAccountID, ParcelType, ServiceID, and SpecialService respectively at the Root level for all shipments, or mention the values at Shipment level, i.e., for individual shipment(s).
If user does not provide values for the above-mentioned fields combinedly at Shipment level, then the default values for these fields provided at Root level will be considered. While, if user provides these values combinedly at Shipment Level for individual shipment(s), it will override the values defined at Root level.

Condition: The fields CarrierAccountID, ParcelType, ServiceID are treated as a combination, and values against each field must be provided if user selects Shipment level. In case any of these field(s) out of the mentioned combination is/are missing, it will return validation error.

SecuritybearerAuth
Request
header Parameters
X-PB-Developer-Partner-ID
string

The Developer-Partner-ID is assigned by PB to uniquely identify a developer's strategic business partners. If the developer is the sole business partner, this field is not required.

Request Body schema: application/json

This is the request body to create Bulk Shipment.

One of:

This ShipmentBatch contains the schema information.

name
required
string

Name of the of Batch which consists of multiple shipments (shipments in bulk) for Label printing, e.g. Bulk07.

groupName
string

Indicates the name of the group of batches, which consists of multiple Batch groups.

size
required
string

This indicates the label size of the Bulk Shipment when it gets printed,i.e., DocSize. This has two options 8' X 11' or 4' X 6'.

Enum: "DOC_8X11" "DOC_4X6"
type
required
string

Indicates the type of the Batch Shipment, e.g., Shipping Label.

Value: "SHIPPING_LABEL"
format
string

Defines the type of the shipment, which is printed, e.g., Shipping label gets printed in PDF form.

Value: "PDF"
carrierAccountId
required
string

A unique identifier associated with the Carrier account used by client users during shipment process. Default CarrierAccountID for this batch will be user's registered carrier account. User can override this value by defining it at shipment level.

serviceId
required
string

A unique identifier given to the carrier-specific service, which varies as per carrier selection. User can override this value by defining it at Shipment level.

parcelType
required
string

Parcel Type is required for creating a shipment while rating a parcel, which varies as per Carrier selection and selected services. Different carriers have different Services and associated ParcelTypes, e.g., FRPKG, LGENV, TUBE, and PKG.
User can override this value by defining it at Shipment level.

parcelID
string

A unique identifier given to the parcel or package corresponding to the selected service. This is optional field, but is used in few cases. User can override this value by defining it at Shipment level.

Array of objects (SpecialService)

It provides a carrier based special or extra service, which also varies as per selected service and parcel type. User can override this value by defining it at shipment level.

required
Array of objects
Responses
200

The Bulk Shipment has been successfully created..

400

Invalid request.

401

The request could not be authorized.

500

The request could not be completed due to an internal server error.

post/api/v1/bulkShipments
Request samples
application/json
{
  • "name": "Bulk07",
  • "groupName": "Shipping-021",
  • "size": "DOC_8X11",
  • "type": "SHIPPING_LABEL",
  • "format": "PDF",
  • "carrierAccountId": "abcd123",
  • "serviceId": "LIB",
  • "parcelType": "LP",
  • "parcelID": "PMB4",
  • "specialServices": [
    ],
  • "shipments": [
    ]
}
Response samples
application/json
{
  • "batchId": "string",
  • "groupName": "string",
  • "name": "string",
  • "status": "SUBMITTED",
  • "addressValidation": {
    },
  • "rating": {
    },
  • "labelGeneration": {
    }
}