This API "Create Bulk Shipments" operation requires the following information:
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.
This is the request body to create Bulk Shipment.
This ShipmentBatch contains the schema information.
The Bulk Shipment has been successfully created..
Invalid request.
The request could not be authorized.
The request could not be completed due to an internal server error.
{- "name": "Bulk07",
- "groupName": "Shipping-021",
- "size": "DOC_8X11",
- "type": "SHIPPING_LABEL",
- "format": "PDF",
- "carrierAccountId": "abcd123",
- "serviceId": "LIB",
- "parcelType": "LP",
- "parcelID": "PMB4",
- "specialServices": [
- {
- "inputParameters": [
- {
- "name": "INPUT_VALUE",
- "value": "100"
}
], - "specialserviceId": "Ins"
}
], - "shipments": [
- {
- "externalId": "string",
- "fromAddress": {
- "name": "Anupama",
- "addressLine1": "27 Watervw Dr",
- "addressLine2": "Street-257",
- "addressLine3": "Near XZ Tower",
- "cityTown": "Stamford",
- "stateProvince": "CT",
- "postalCode": 6905,
- "inductionPostalCode": "06905",
- "countryCode": "US",
- "company": "PB",
- "phone": "203-555-1213",
- "email": "anupama.k@gmail.com",
- "residential": true
}, - "toAddress": {
- "name": "John Smith",
- "addressLine1": "98 Watervw Dr",
- "addressLine2": "Street-975",
- "addressLine3": "Near ABC Tower",
- "cityTown": "Shelton",
- "stateProvince": "CT",
- "postalCode": 6905,
- "countryCode": "US",
- "company": "PB",
- "phone": "203-555-1213",
- "email": "anupama.kr@gmail.com",
- "residential": true
}, - "parcel": {
- "length": 2,
- "width": 1,
- "height": 1,
- "dimUnit": "IN",
- "weightUnit": "OZ",
- "weight": 2
}, - "carrierAccountId": "asas2223",
- "parcelType": "PKG",
- "serviceId": "PM",
- "dateOfShipment": "2023-04-03",
- "specialServices": [
- {
- "inputParameters": [
- {
- "name": "INPUT_VALUE",
- "value": "100"
}
], - "specialserviceId": "Ins"
}
], - "shipmentOptions": {
- "addToManifest": true,
- "printCustomMessage": "Print Message 1",
- "receiptOption": "RECEIPT_WITH_INSTRUCTIONS",
- "printDepartment": "department",
- "printInvoiceNumber": "invoicenumber",
- "printPONumber": "ponumber",
- "minimalAddressValidation": true
}, - "metadata": [
- {
- "name": "PB-PUN-CostAccount",
- "value": "CostAccount-00PBPUN"
}
]
}
]
}
{- "batchId": "string",
- "groupName": "string",
- "name": "string",
- "status": "SUBMITTED",
- "addressValidation": {
- "success": 20,
- "failed": 10,
- "pending": 10
}, - "rating": {
- "success": 20,
- "failed": 10,
- "pending": 10
}, - "labelGeneration": {
- "success": 20,
- "failed": 10,
- "pending": 10
}
}