FedEx Doc Tab Labels
Doc tab label stock is thermal label stock with an extra tear-off tab. FedEx can print shipment data on the tab, either a standard set of fields or fully custom content arranged in up to 12 zones.
Doc tabs are supported by the FedEx-REST carrier for SubmitShipment
requests using a thermal image_type (ZPLII/EPL2) and a doc tab
label_stock_type such as:
STOCK_4X6.75_LEADING_DOC_TABSTOCK_4X6.75_TRAILING_DOC_TABSTOCK_4X9_LEADING_DOC_TABSTOCK_4X9_TRAILING_DOC_TABSTOCK_4X8.5_TRAILING_DOC_TABSTOCK_4X10.5_TRAILING_DOC_TAB
Standard doc tab
Choosing a DOC_TAB label stock is all that is required for FedEx to print
its standard doc tab data:
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"image_type": "ZPLII",
"label_stock_type": "STOCK_4X6.75_LEADING_DOC_TAB",
...
}
}
Custom doc tab zones
The label.doc_tab parameter customizes the doc tab content. Each zone
prints a header and a value. The value is either free-form text
(literal_value) or a field FedEx fills in from the shipment request/reply
(data_field).
Zone parameters:
| Parameter | Description |
|---|---|
number | Zone position on the tab, 1-12. Defaults to the zone's position in the zones list. |
header | Printed header for the zone, e.g. PO Number. |
literal_value | Free-form text printed as-is. |
data_field | Request/reply path FedEx fills in, e.g. REQUEST/PACKAGE/weight/Value or REQUEST/SHIPMENT/ShipTimestamp. |
justification | LEFT or RIGHT. |
Example:
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"image_type": "ZPLII",
"label_stock_type": "STOCK_4X6.75_LEADING_DOC_TAB",
"label": {
"doc_tab": {
"zones": [
{
"header": "Customer",
"literal_value": "ACME Corp",
"justification": "LEFT"
},
{
"header": "Weight",
"data_field": "REQUEST/PACKAGE/weight/Value",
"justification": "RIGHT"
},
{
"header": "Date",
"data_field": "REQUEST/SHIPMENT/ShipTimestamp"
}
]
}
},
...
}
}
Doc tab type
The doc tab content type can be set explicitly with label.doc_tab.type:
STANDARD, MINIMUM, ZONE001, BARCODED, or CUSTOM. It defaults to
ZONE001 when zones are provided and STANDARD otherwise, so most
requests do not need to set it.
BARCODED prints a single zone as a barcode. The first zone is used and the
barcode symbology is set with symbology (e.g. CODE128):
"label": {
"doc_tab": {
"type": "BARCODED",
"symbology": "CODE128",
"zones": [
{
"header": "PO",
"data_field": "REQUEST/PACKAGE/customerReferences[0]/value"
}
]
}
}
Migrating from the legacy FedEx API
RocketShipIt v1 doc tab parameters map to label.doc_tab as follows:
| Legacy parameter | New parameter |
|---|---|
docTabType | type |
docTabZone[N]Label | zones[N-1].header |
docTabZone[N]DataField | zones[N-1].data_field |
docTabZone[N]FreeForm | zones[N-1].literal_value |
docTabZone[N]Justification | zones[N-1].justification |
Note that FedEx changed the data_field path syntax in their REST API.
Legacy SOAP paths do not carry over verbatim; the REST API uses paths like
REQUEST/SHIPMENT/ShipTimestamp, REQUEST/PACKAGE/weight/Value, and
REQUEST/PACKAGE/InsuredValue/Amount.
See also
- Add Reference Values to Labels for printing reference values on the label body itself
- Label Transformations for adding text or images to a returned label
