This API generates Electronic Return Receipt (ERR) artifacts for a parcel, including a coversheet, ERR barcode, and ERR stamp. The response output can be configured using the type parameter to return a coversheet, barcode and stamp images, or all outputs.
The X-PB-LocationId header identifies the enterprise, division, or partner location under which a shipment is processed and billed. If this header is not provided, the system automatically uses the enterprise-level location that was created during developer account onboarding. This default location is then used for shipment processing, carrier selection, and billing.
Location Scope
- Carrier accounts and services available in a request must belong to the specified location or the default enterprise location.
- Attempting to use carriers or services that are not configured for the resolved location will result in a validation error.
Requirement Rules
- The
X-PB-LocationIdheader is optional when the shipment origin country code matches the enterprise's default address country code. - The
X-PB-LocationIdheader is required when the shipment origin country code differs from the enterprise's default address country code. - If the header is required but not provided, the API returns a validation error indicating that the location must be specified for the given shipment origin.
The file format of the coversheet. For coversheet, supported format is PDF. For barcode and stamp, supported format is GIF
The size of the coversheet. Default size is 10. This is applicable only for coversheet.
The type of the output.
- COVERSHEET: Returns coversheet output (backward compatible).
- BARCODE.STAMP: Returns separate outputs for the ERR barcode and ERR stamp.
- ALL: Returns three outputs:
- coversheet (Content Type: URL, Format: PDF)
- ERR barcode (Content Type: BASE64, Format: GIF)
- ERR stamp (Content Type: URL, Format: GIF)
A unique identifier assigned to the specific carrier account. Its value can be referred from the response of Get Carrier Accounts API.
Type of the parcel, such as Letter or Envelope.
The unique identifier given to the carrier specific service, such as First Class Mail (FCM). It can be referred from response of Get Services API.
List of special services applied.
[ { "specialServiceId": "Cert" }, { "specialServiceId": "ERR" } ]
Additional metadata that needs to be stored for this shipment can be added here.
Supported values are Cost Account Name, Cost Account Id, Cost Account Code, Account Code and Company Code.
If Cost Account metadata is provided, all three Cost Account fields are required.
[ { "name": "costAccountName", "value": "costAccountName" }, { "name": "costAccountId", "value": "costAccountId" }, { "name": "costAccountCode", "value": "Code" } ]
- Sandbox Serverhttps://api-sandbox.sendpro360.pitneybowes.com/shipping/api/v1/err/coverSheet
- Production Server (uses live data)https://api.sendpro360.pitneybowes.com/shipping/api/v1/err/coverSheet
- Sandbox Server for Canadahttps://api-ppd.shipping360.pitneybowes.com/ca/shipping/api/v1/err/coverSheet
- Production Server for Canadahttps://api.shipping360.pitneybowes.com/ca/shipping/api/v1/err/coverSheet
curl -i -X POST \
https://api-sandbox.sendpro360.pitneybowes.com/shipping/api/v1/err/coverSheet \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-PB-LocationId: string' \
-d '{
"format": "PDF",
"size": "6X9.5",
"type": "ALL",
"carrierAccountId": "JPZlE8DldKwx",
"parcelType": "LGENV",
"serviceId": "FCM",
"specialServices": [
{
"specialServiceId": "Cert"
},
{
"specialServiceId": "ERR"
}
],
"fromAddress": {
"name": "Ankush Monga",
"addressLine1": "27 Waterview Dr",
"addressLine2": "near abc street",
"addressLine3": "near xyz street",
"cityTown": "Shelton",
"stateProvince": "CT",
"postalCode": "06484-4361",
"countryCode": "US",
"phone": "203-555-1213",
"company": "PB",
"email": "testuser@gmail.com",
"inductionPostalCode": "06905",
"residential": true
},
"parcel": {
"weight": 0.1,
"weightUnit": "OZ",
"length": 1,
"height": 1,
"width": 0.1,
"dimUnit": "IN"
},
"toAddress": {
"name": "test_user",
"addressLine1": "27 Waterview Dr",
"addressLine2": "near abc street",
"addressLine3": "near xyz street",
"cityTown": "Shelton",
"stateProvince": "CT",
"postalCode": "06484-4361",
"countryCode": "US",
"phone": "203-555-1213",
"company": "PB",
"email": "testuser@gmail.com",
"residential": true
},
"shipmentOptions": {
"printCustomMessage": "thankyou",
"addToManifest": true
},
"metadata": [
{
"name": "costAccountName",
"value": "costAccountName"
},
{
"name": "costAccountId",
"value": "costAccountId"
},
{
"name": "costAccountCode",
"value": "Code"
}
],
"shippingReferences": {
"reference1": "reference1",
"reference2": "reference2",
"reference3": "reference3",
"reference4": "reference4",
"shipperReference": "Shipper123",
"transportationReference": "TransRef2025",
"shipperNotes": "Handle with care"
}
}'The ERR coversheet has been successfully created.
[ { "contentType": "URL", "contents": "https://225934331380-spa-bpod-files-prd.s3.us-east-1.amazonaws.com/trk-barcode/898643/9414809898643519783477.pdf?..................", "fileFormat": "PDF", "size": "9.5X12", "type": "COVERSHEET" }, { "contentType": "URL", "contents": "https://prv-labels-cls.gcs.pitneybowes.com/usps/456312111/outbound/stamp/2f221f00b108436586b9263c62edd9f7.gif", "fileFormat": "GIF", "type": "STAMP" }, { "contentType": "BASE64", "contents": "R0lGODlhIAOkAfAAAAAAAP///ywAAAAAIAOkAUAC/4yPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNarfcrvcLDovH5LL5jE6r1+y2mwKIy+OIOWOOl7/3/L7/......................................../8hwIAADs=", "fileFormat": "GIF", "type": "BARCODE" } ]
The tracking number associated with the parcel in a shipment.
{ "fromAddress": { "name": "Ankush Monga", "addressLine1": "27 Waterview Dr", "addressLine2": "near abc street", "addressLine3": "near xyz street", "cityTown": "Shelton", "stateProvince": "CT", "postalCode": "06484-4361", "countryCode": "US", "phone": "203-555-1213", "company": "PB", "email": "testuser@gmail.com", "inductionPostalCode": "06905", "residential": true }, "toAddress": { "name": "test_user", "addressLine1": "27 Waterview Dr", "addressLine2": "near abc street", "addressLine3": "near xyz street", "cityTown": "Shelton", "stateProvince": "CT", "postalCode": "06484-4361", "countryCode": "US", "phone": "203-555-1213", "company": "PB", "email": "testuser@gmail.com", "residential": true }, "labelLayout": [ { "contentType": "URL", "contents": "https://225934331380-spa-bpod-files-prd.s3.us-east-1.amazonaws.com/trk-barcode/898643/9414809898643519783477.pdf?..................", "fileFormat": "PDF", "size": "9.5X12", "type": "COVERSHEET" }, { "contentType": "URL", "contents": "https://prv-labels-cls.gcs.pitneybowes.com/usps/456312111/outbound/stamp/2f221f00b108436586b9263c62edd9f7.gif", "fileFormat": "GIF", "type": "STAMP" }, { "contentType": "BASE64", "contents": "R0lGODlhIAOkAfAAAAAAAP///ywAAAAAIAOkAUAC/4yPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNarfcrvcLDovH5LL5jE6r1+y2mwKIy+OIOWOOl7/3/L7/......................................../8hwIAADs=", "fileFormat": "GIF", "type": "BARCODE" } ], "parcel": { "weight": 0.1, "weightUnit": "OZ", "length": 1, "height": 1, "width": 0.1, "dimUnit": "IN" }, "shipmentOptions": { "addToManifest": true, "printCustomMessage": "thankyou" }, "shipmentId": "670d1820222f6a010ab3152c", "parcelTrackingNumber": "9414809898643517885166", "rate": { "totalCarrierCharge": 8.97 }, "correlationId": "65cc49aa8aeb46c1a77b1fc82a5ecba4" }