3.1.2 新增或修改貨物 (RESTful)
新增貨物
新增貨物範例程式
Method: POST
測試環境 URL: https://sandbox.unixus.com.my/api/EzLabel/Client/Shipments.svc/Json/ProcessShipments
生產環境 URL: https://api.unixus.com.my/EzLabel/Client/Shipments.svc/Json/ProcessShipments
Headers:
- Content-Type: application/json
{
"_shipmentsParameter" : {
"ActionType" : "0",
"ShipmentsCredentials" : {
"CultureType" : "0",
"Password" : "password",
"UserName" : "username"
},
"ShipperInfo" : {
"ShipperName" : "Unixus Solutions Sdn. Bhd.",
"ContactPerson" : "IT Department",
"Address1" : "46-02 JALAN TUN ABDUL RAZAK,",
"Address2" : "SUSUR 1,",
"Address3" : "",
"PostCode" : "80000",
"City" : "JOHOR BHARU",
"State" : "JOHOR",
"CountryCode" : "MY",
"StationCode" : "",
"Phone1" : "607-2222668",
"Phone2" : "",
"MobilePhone" : "",
"Fax" : "",
"Email" : "[email protected]",
"Url" : ""
},
"ConsigneeInfo" : {
"ConsigneeName" : "LWE (AU) Ltd.",
"ContactPerson" : "Mr. Ng",
"IdentityNo" : "0123abcd",
"Address1" : "Test Address 1",
"Address2" : "Test Address 2",
"Address3" : "",
"PostCode" : "70000",
"City" : "JOHOR BHARU",
"State" : "JOHOR",
"CountryCode" : "MY",
"StationCode" : "",
"Phone1" : "60-7-2222668",
"Phone2" : "",
"MobilePhone" : "",
"Fax" : "",
"Email" : "[email protected]",
"Url" : "http://www.lwe.com.hk"
},
"CustomerCode" : "300001",
"ProfitCentreCode" : "",
"ShipmentDate" : "/Date(1537718400000+0800)/",
"HawbNo" : "",
"ReferenceNo" : "123456",
"ReferenceAgent" : "",
"TOSMode" : "MY-E-EXPRESS",
"PackageType" : "0",
"NatureOfGoods" : "SHOES",
"NoOfPieces" : "1",
"WeightType": 0,
"CurrencyCode": "AUD",
"Remarks" : "The shipment easy to broke, please becareful.",
"WeightInfo" : [
{
"PackageReference" : "PKG01",
"PackageHeight" : "1",
"PackageLength" : "1",
"PackageWidth" : "1",
"ActualWeight" : "5"
}
],
"ItemInfo" : [
{
"ItemReference" : "LADIES SHOES",
"NoOfUnit" : "3",
"ItemValue" : "15"
}
],
"TagsInfo" : [
{
"TagCode" : "TAG1",
"TagValue" : "ANY EXTRA INFORMATION"
}
],
"Submitted_Date" : "/Date(1537718400000+0800)/"
}
}
修改貨物
修改貨物範例程式
Method: POST
測試環境 URL: https://sandbox.unixus.com.my/api/EzLabel/Client/Shipments.svc/Json/ProcessShipments
生產環境 URL: https://api.unixus.com.my/EzLabel/Client/Shipments.svc/Json/ProcessShipments
Headers:
- Content-Type: application/json
{
"_shipmentsParameter" : {
"ActionType" : "1",
"ShipmentsCredentials" : {
"CultureType" : "0",
"Password" : "password",
"UserName" : "username"
},
"ShipperInfo" : {
"ShipperName" : "Unixus Solutions Sdn. Bhd.",
"ContactPerson" : "IT Department",
"Address1" : "46-02 JALAN TUN ABDUL RAZAK,",
"Address2" : "SUSUR 1,",
"Address3" : "",
"PostCode" : "80000",
"City" : "JOHOR BHARU",
"State" : "JOHOR",
"CountryCode" : "MY",
"StationCode" : "",
"Phone1" : "607-2222668",
"Phone2" : "",
"MobilePhone" : "",
"Fax" : "",
"Email" : "[email protected]",
"Url" : ""
},
"ConsigneeInfo" : {
"ConsigneeName" : "LWE (AU) Ltd.",
"ContactPerson" : "Mr. Ng",
"IdentityNo" : "0123abcd",
"Address1" : "Test Address 1",
"Address2" : "Test Address 2",
"Address3" : "",
"PostCode" : "0845",
"City" : "BATHCELOR",
"State" : "NT",
"CountryCode" : "AU",
"StationCode" : "",
"Phone1" : "60-7-2222668",
"Phone2" : "",
"MobilePhone" : "",
"Fax" : "",
"Email" : "[email protected]",
"Url" : "http://www.lwe.com.hk"
},
"CustomerCode" : "300001",
"ProfitCentreCode" : "",
"ShipmentDate" : "/Date(1537718400000+0800)/",
"HawbNo" : "344010500000151",
"ReferenceNo" : "123456",
"ReferenceAgent" : "",
"TOSMode" : "AU-E-EXPRESS",
"PackageType" : "0",
"NatureOfGoods" : "SHOES",
"NoOfPieces" : "1",
"WeightType": 0,
"CurrencyCode": "AUD",
"Remarks" : "The shipment easy to broke, please becareful.",
"WeightInfo" : [
{
"PackageReference" : "PKG01",
"PackageHeight" : "1",
"PackageLength" : "1",
"PackageWidth" : "1",
"ActualWeight" : "5"
}
],
"ItemInfo" : [
{
"ItemReference" : "LADIES SHOES",
"NoOfUnit" : "3",
"ItemValue" : "15"
}
],
"TagsInfo" : [
{
"TagCode" : "TAG1",
"TagValue" : "ANY EXTRA INFORMATION"
}
],
"Submitted_Date" : "/Date(1537718400000+0800)/"
}
}
備註:
- ActionType 值設為1為更新並獲取新的 Hawb 號碼。
- ActionType 值設為5則是更新並保留就好 Hawb號碼。