3.2 Modify Shipments
Description
This section will show you how to modify the shipment you have created. Please note that a new HAWB will be generated.
Url : https://apiv2.unixus.com.my/shipment/v2/Modify
Method : POST
Content-Type: application/json
Accept-Language: en
Authorization: Bearer {access_token}
Request
Data Structure
ModifyShipments
Field | Type | Mandatory | Remarks |
---|---|---|---|
Shipments | ModifyShipmentsDetails[] | Yes | Refer to ModifyShipmentsDetails |
ModifyShipmentsDetails
Field | Type | Mandatory | Remarks |
---|---|---|---|
Shipper | PersonInfo | Yes | Refer to PersonInfo |
Consignee | PersonInfo | Yes | Refer to PersonInfo |
Items | ItemInfo[] | Yes | Refer to ItemInfo |
Packages | PackageInfo[] | Yes | Refer to Packages |
ShipmentDate | DateTime | Yes | Example: 2018-07-01T00:00:00+08:00 |
HawbNo | String | Yes | |
TOSMode | String | Yes | Refer to TOS Mode |
ReferenceNo | String | No | |
ReferenceSource | String | No | |
PackageType | Enum | Yes | Refer to PackageType |
WeightType | Enum | Yes | Refer to WeightType |
CurrencyCode | String | Yes | |
Remarks | String | No |
PersonInfo
Field | Type | Mandatory | Description |
---|---|---|---|
Name | String | No | |
ContactPerson | String | Yes | |
IdentityNo | String | No | |
Address1 | String | Yes | |
Address2 | String | No | |
Address3 | String | No | |
Postcode | String | Yes | |
City | String | Yes | |
State | String | Yes | |
CountryCode | String | Yes | |
StationCode | String | No | |
Phone1 | String | Yes | |
Phone2 | String | No | |
MobilePhone | String | No | |
Fax | String | No | |
String | No | ||
Url | String | No |
ItemInfo
Field | Type | Mandatory | Description |
---|---|---|---|
Description | String | Yes | |
Quantity | Integer | Yes | |
UnitValue | Numeric | Yes | |
HSCode | String | No | |
SKU | String | No | |
Url | String | No |
PackageInfo
Field | Type | Mandatory | Description |
---|---|---|---|
PackageReference | String | Yes | |
Length | Numeric | Yes | Length in CM |
Width | Numeric | Yes | Width in CM |
Height | Numeric | Yes | Height in CM |
ActualWeight | Numeric | Yes | Actual weight in KG |
TOS Mode
TOS stand for Type of Service. The value of TOS Mode in Shipment Info is based on the consignee country code. The following code is the example of how you assign the TOSMode value. If you facing the error of invalid TOS, please contact our customer support.
public string GetTOSMode(string consigneeCountry) {
switch (consigneeCountry) {
case "MY":
return "MY-E-EXPRESS";
case "TH":
return "TH-E-EXPRESS";
case "HK":
return "HK-E-EXPRESS";
case "SG":
return "SG-E-EXPRESS";
case "ID":
return "ID-E-EXPRESS";
case "CN":
return "CN-E-EXPRESS";
default:
// error
}
}
PackageType and WeightType
// If in doubt, choose SPX
public enum PackageType {
DOX,
SPX,
SPX_L,
SPX_P,
SPX_S
}
public enum WeightType {
KG,
LBS
}
Sample:
{
"Shipments": [
{
"Shipper": {
"Name": "Unixus",
"ContactPerson": "IT Dept.",
"Address1": "46-02 JALAN TUN ABDUL RAZAK,",
"Address2": "SUSUR 1,",
"Address3": "",
"Postcode": "80000",
"City": "JOHOR BAHRU",
"State": "JOHOR",
"CountryCode": "MY",
"Phone1": "607-2222668",
"Phone2": "",
"MobilePhone": "",
"Fax": "",
"Email": "[email protected]",
"Url": ""
},
"Consignee": {
"Name": "LWE (AU) Ltd.",
"ContactPerson": "Mr. Ng",
"Address1": "Test Address 1",
"Address2": "Test Address 2",
"Address3": "",
"PostCode": "70000",
"City": "JOHOR BAHRU",
"State": "JOHOR",
"CountryCode": "MY",
"StationCode": "",
"Phone1": "60-7-2222668",
"Phone2": "",
"MobilePhone": "",
"Fax": "",
"Email": "[email protected]",
"Url": "http://www.lwe.com.hk"
},
"Items": [
{
"Description": "LADIES SHOES",
"Quantity": 3,
"UnitValue": 15,
"HSCode": "HSCode",
"SKU": "SKU",
"Url": "url"
}
],
"Packages": [
{
"PackageReference": "PKG01",
"Length": 10.5,
"Width": 20.2,
"Height": 30.1,
"ActualWeight": 10.7
}
],
"HawbNo": "458040010409730",
"PackageType": "SPX",
"WeightType": "kg",
"ShipmentDate": "2018-07-01T00:00:00+08:00",
"ReferenceNo": "123456",
"ReferenceAgent": "",
"TOSMode": "MY-E-EXPRESS",
"CurrencyCode": "MYR",
"Remarks": "Fragile shipment, please be careful."
}
]
}
Response
Sample
{
"Summary": {
"Total": 1,
"Success": 1,
"Failed": 0
},
"ShipmentsResponse": [
{
"IsSuccess": true,
"ShipmentDetails": {
"Shipper": {
"Name": "Unixus",
"ContactPerson": "IT Dept.",
"Address1": "46-02 JALAN TUN ABDUL RAZAK,",
"Address2": "SUSUR 1,",
"Postcode": "80000",
"City": "JOHOR BAHRU",
"State": "JOHOR",
"CountryCode": "MY",
"Phone1": "607-2222668",
"Email": "[email protected]"
},
"Consignee": {
"Name": "LWE (AU) Ltd.",
"ContactPerson": "Mr. Ng",
"Address1": "Test Address 1",
"Address2": "Test Address 2",
"Postcode": "70000",
"City": "JOHOR BAHRU",
"State": "JOHOR",
"CountryCode": "MY",
"Phone1": "60-7-2222668",
"Email": "[email protected]",
"Url": "http://www.lwe.com.hk"
},
"Items": [
{
"Description": "LADIES SHOES",
"Quantity": 3,
"UnitValue": 15.0,
"HSCode": "HSCode",
"SKU": "SKU",
"Url": "url"
}
],
"Packages": [
{
"PackageReference": "PKG01",
"Length": 10.5,
"Width": 20.2,
"Height": 30.1,
"ActualWeight": 10.7
}
],
"ShipmentsReference": [
{
"CarrierName": "POS-LAJU",
"ReferenceNo": "458040010409752"
}
],
"HawbNo": "458040010409752",
"ReferenceNo": "123456",
"TOSMode": "MY-E-EXPRESS",
"CurrencyCode": "MYR",
"PackageType": "SPX",
"WeightType": "KG",
"ShipmentDate": "2018-07-01T00:00:00+08:00",
"Remark": "Fragile shipment, please be careful."
}
}
]
}