Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer token provided by OpenBorder.

Body

application/json
orderNumber
string
required

The order number to retrieve or generate a label for.

weight
number

Parcel weight. When provided, weightUnit is also required.

weightUnit
enum<string>

Unit for the weight field. Required when weight is set.

Available options:
grams,
pounds
length
number

Parcel length. When any dimension is provided, dimensionsUnit is also required.

width
number

Parcel width. When any dimension is provided, dimensionsUnit is also required.

height
number

Parcel height. When any dimension is provided, dimensionsUnit is also required.

dimensionsUnit
enum<string>

Unit for length, width, and height. Required when any dimension is set.

Available options:
cm,
in
base64
boolean

When true, the label is returned as a base64-encoded string in addition to the PDF URL.

skus
object[]

Required for partial label generation. An array of SKU objects describing the items in this parcel.

fromAddress
object

The origin address. Required when skus is provided.

toAddress
object

The destination address. Required when skus is provided.

trackReference
string

A reference string printed directly on the label. Required when skus is provided.

parcelWeight
string

Parcel weight in grams. Required when skus is provided.

brandCode
string

Your brand code as provided by OpenBorder. Required when skus is provided.

locationCode
string

An optional location code used for partial label consolidation across fulfillment centers.

zpl
boolean

When true, the response includes a URL to the label in ZPL format for thermal printers.

Response

Request processed. result is the label when one was found or generated. When the order can't be matched, result is the string Unable to generate label and isError is still false.

isError
boolean

False when the request was processed successfully.

result

The label result, or the string Unable to generate label when the order can't be matched.