3.5 Print Label
Description
This section will show how you can print the label by using the API. The label in byte array is encoded in base64 string, user needs to decode it back to byte array value and save the value as a file with *.pdf extension. User can pass in multiple HawbNo in order to receive several labels in one PDF file.
Url : https://apiv2.unixus.com.my/shipment/v2/Print
Method : POST
Content-Type: application/json
Accept-Language: en
Authorization: Bearer {access_token}
Request
Data Structure
PrintLabel
Field | Type | Mandatory | Remarks |
---|---|---|---|
LabelFormat | Enum | No | |
LabelSize | Enum | No | |
TrackReport | Enum | No | |
HawbNo | String[] | Yes | List of Hawb No. |
public enum LabelFormat {
PDF
},
// For now, label size can only set by admin
public enum LabelSize {
Cm_10x10,
Inch_6x4,
A4
}
public enum TrackReport {
Label,
CheckList,
CommercialInvoice,
ShipmentsSummary,
ShipmentsSummary_CSV,
ShipmentsSummary_Excel,
AUPostManifest
}
Sample:
{
"HawbNo": [
"458040010403780"
],
"LabelFormat": "PDF",
"LabelSize": "Cm_10x10",
"TrackReport": "Label"
}
Response
Sample
{
"LabelResponse": {
"IsSuccess": true,
"LabelImageString": "label"
}
}