Print Document

It contains information about a label or a document, e.g., a shipping label, a customs form, manifest report etc., that pertains to a shipment or manifest.

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 isn't required.

X-PB-LocationId
string

This is the Location ID assigned as per the Developer's and Partner's parsed locations, to which all transactions will be billed.
Partner's location will be used for billing if it is configured, however, in case Partner's location is not given, then the Developer's location will be taken. Developer's location will be the default value.
Additionally, Developers and Partners can use carriers belong to this location only.

X-PB-TransactionId
string

A unique Transaction ID provided by the partner, which is used to enable debugging and linking between the client's transaction and the system.

Request Body schema: application/json
printerAliasName
required
string

Name of the Printer connected (directly or via network) to a Computer. Max length = 30

data
required
string

Content/Identifier of document e.g., DOCUMENT_REFERECE_ID. Actual document name e.g., abc.pdf. [IN] i.e base64 string, URL, file path

Enum: "PDF" "URL"
dataType
required
string

Data Type of the document e.g., DOCUMENT_REFERENCE. [IN/OUT]

Enum: "BASE64" "URL"
documentType
required
string

The format of the document file the print takes.

Enum: "ZPL2" "ZPL" "PDF"
formName
required
string

The name of the Document Form.

Enum: "8x11" "4x6" "2x1" "ENV10" "ENV9" "A1"
orientation
string

The orientation of the document layout: Portrait or Landscape.

object
  • Contains key value map for passing references. Max references allowed is 6.
    - References are tags or information that is printed on Shipping Label based on the customer's requirement.
    - Reference Fields can have values/indication like department name, invoice no., package description, purchase order no., carrier note, cost account no., transportation no., or PO No., etc.
    - Each of the reference field can have only one indication/value.
Responses
200

The document has been printed successfully.

400

Invalid request.

401

The request could not be authorized.

500

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

post/api/v1/document/print
Request samples
application/json
{
  • "printerAliasName": "Pitney Bowes Printer",
  • "data": "<<base64string>>",
  • "dataType": "BASE64",
  • "documentType": "ZPL2",
  • "formName": "ENV10",
  • "orientation": "PORTRAIT",
  • "reference": {
    }
}
Response samples
application/json
{
  • "jobId": "accc"
}