Print Shipping Label
GET.../wms/lgfapi/v10/print/label/shipping/?label_designer_code=foo
Returns the ZPL representation of the label
POST .../wms/lgfapi/v10/print/label/shipping
Submits the label for printing
Parameters
The “parameters” section of the request body is required in addition to the “options” section outlined below. One or more parameters are used to determine the order(s) for which the operation will be applied.
Category | Name | Type | Required | GET Request | POST Request | Comments |
---|---|---|---|---|---|---|
options | label_designer_code | string | X | X | X | Label designer template to be printed |
options | printer_name | string | X | Default's to cwuser.default_label_printer. | ||
options | label_count | integer | X | Number of labels to print. Must be greater than 0. Default = 1. |
API Filters
Functions like a bulk operation for identifying one or more IBLPN(s) to be printed: id Including "in" lookup
- facility_id
- company_id
- container_nbr
- Including "in" lookup
Example Query String for GET
GET.../wms/lgfapi/v10/print/label/shipping/?label_designer_code=foo&facility_id__code=FAC1&company_id_code=COM1&container_nbr=IBLPN1
Example Request Body for POST
{
"parameters": {
"facility_id__code": "FAC1",
"company_id__code": "COM1",
"container_nbr": "IBLPN1"
},
"options": {
"label_designer_code": "label_1",
"printer_name": "PRINTER1",
"label_count": 1
}
}
Response Body Data
On success, a 200 - OK status is returned.
The standardized bulk response body is returned. This will have aggregate information for all IBLPN(s) processed as well as the counts and any details.
For a GET request, the ZPL data bill be base64 encoded in the "data" section.
{
"record_count": 2,
"success_count": 1,
"failure_count": 1,
"data": {
"IBLPN_1": "VGhpcyBpcyBaUEwgY29kZQ=="
},
"details": {
"IBLPN_2": "Some error message."
}
}
Print Parcel Carrier Labels
You can easily print carrier labels using the Print Shipping Label API. When you are working with different carriers used for shipping, you can easily print labels sent from these carriers without changing the design or format of the data sent.
- If thelabel_designer_code parameter is not sent or is blank, then the Print Shipping Label API looks at the Label Rules Engine to determine the label template. The API now allows the label_designer_code to be optional in the request.
- If no rule exists in the Label rules engine UI for Shipping Label type, then the API sends the error "Label Rule not found."
To enable printing of carrier labels in the Print Shipping Label API:
- Either, you can directly pass the label designer code of the label type ‘wsaddon’ for the API parameter label_designer_code.
- Or, do not pass the label_designer_code in the request and set the configuration in the Label Rules Engine UI, set the Print Carrier Label Only flag to Yes, for the Shipping label type.