Skip to content

Create ERR Single Coversheet

Request

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.

Security
bearerAuth
Headers
X-PB-LocationIdstring

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-LocationId header is optional when the shipment origin country code matches the enterprise's default address country code.
  • The X-PB-LocationId header 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.
Bodyapplication/jsonrequired
formatstring

The file format of the coversheet. For coversheet, supported format is PDF. For barcode and stamp, supported format is GIF

Enum:"PDF""GIF"
Example:"PDF"
sizestring

The size of the coversheet. Default size is 10. This is applicable only for coversheet.

Enum:"10""6X9.5""6X9""9.5x12"
Example:"6X9.5"
typestringrequired

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)
Enum:"COVERSHEET""ALL""BARCODE.STAMP"
Example:"ALL"
carrierAccountIdstringrequired

A unique identifier assigned to the specific carrier account. Its value can be referred from the response of Get Carrier Accounts API.

Example:"JPZlE8DldKwx"
parcelTypestringrequired

Type of the parcel, such as Letter or Envelope.

Enum:"LGENV""PKG""LTR"
Example:"LGENV"
serviceIdstringrequired

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.

Example:"FCM"
specialServicesArray of objectsrequired

List of special services applied.

Example:
[ { "specialServiceId": "Cert" }, { "specialServiceId": "ERR" } ]
fromAddressobjectrequired
parcelobjectrequired
toAddressobjectrequired
shipmentOptionsobject
metadataArray of objects

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.

Example:
[ { "name": "costAccountName", "value": "costAccountName" }, { "name": "costAccountId", "value": "costAccountId" }, { "name": "costAccountCode", "value": "Code" } ]
shippingReferencesobject

Contains additional reference fields that can be passed with an ERR request (single piece or batch). While USPS only accepts a single reference, these fields are used for internal tracking, exports, and reporting.

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"
    }
  }'

Responses

The ERR coversheet has been successfully created.

Bodyapplication/json
fromAddressobject
toAddressobject
labelLayoutArray of objects
Example:
[ { "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" } ]
parcelobject
shipmentOptionsobject
shipmentIdstring

A unique identifier for a Shipment.

Example:"670d1820222f6a010ab3152c"
parcelTrackingNumberstring

The tracking number associated with the parcel in a shipment.

Example:"9414809898643517885166"
rateobject
correlationIdstring

Key assigned by the shipping system to the transaction.

Example:"65cc49aa8aeb46c1a77b1fc82a5ecba4"
Response
{ "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" }