5.2.2 Modify Shipments (RESTful)
Modify Shipment
Step 1: Sample source code to refresh token (AccessToken)
Method: POST
Sandbox/Testing URL: https://sandbox-apiv2.unixus.com.my/Token/Refresh
Production/Live URL: https://apiv2.unixus.com.my/Token/Refresh
Headers:
- Content-Type: application/json
{
"RefreshToken" : "88888888"
}
Step 2: Sample source code for modify shipment. Please note that a new HAWB will be generated and the old HAWB will be deleted.
Method: POST
Sandbox/Testing URL: https://sandbox-apiv2.unixus.com.my/shipment/v2/Modify
Production/Live URL: https://apiv2.unixus.com.my/shipment/v2/Modify
Headers:
- Content-Type: application/json
- Authorization: Bearer $REPLACE_WITH_ACCESSTOKEN_FROM_STEP_1
{
"Shipments": [
{
"Shipper": {
"Name": "DEMO ACCOUNT",
"ContactPerson": "Ms Angie",
"Address1": "No.4",
"Address2": "Jalan SS13/6C",
"Address3": "",
"Postcode": "47500",
"City": "Subang Jaya",
"State": "Selangor",
"CountryCode": "MY",
"Phone1": "+60388008830"
},
"Consignee": {
"ContactPerson": "James Brown",
"Address1": "Test Address 1",
"Address2": "Test Address 2",
"Postcode": "70000",
"City": "JOHOR BAHRU",
"State": "SELANGOR",
"CountryCode": "MY",
"Phone1": "012-3668899"
},
"Items": [
{
"Description": "Shoes, TShirt",
"Quantity": 2,
"UnitValue": 50,
"HSCode": "64035990",
"SKU": "ABC123",
"Url": "http://www.mywebsite.com"
}
],
"Packages": [
{
"PackageReference": "Shoes001",
"Length": 30,
"Width": 10,
"Height": 10,
"ActualWeight": 1.5
},
{
"PackageReference": "TShirt002",
"Length": 30,
"Width": 30,
"Height": 10,
"ActualWeight": 1.1
}
],
"HawbNo": "458040010619601",
"PackageType": "SPX",
"WeightType": "KG",
"ShipmentDate": "2018-12-18T16:40:53+08:00",
"TOSMode": "MY-E-LWE",
"ReferenceNo": "ORDERREF00001",
"CurrencyCode": "MYR",
"CODValue": 0,
"CODCurrency": ""
"InsuranceValue": 10.0,
"InsuranceCurrency": "MYR"
}
]
}
Remarks:
- Use 1 for Update in ActionType, a new Hawb. will be generate.
- Use 5 for UpdateByHawb in ActionType, the Hawb will remain the same.