POST Modify Shipment
https://jerrytest.ewe.com.au/eweApi/ewe/api/modifyShipment
You can use modify shipment API to modify the outbound order/shipment.
Request
Attribute | Type | Required | Description |
---|---|---|---|
username | string | Required | Jerry username |
digest | string | Required | Digest algorithm |
msgType | string | Required | Should be modifyShipment |
version | string | Optional | Could be 1.6 |
referenceNo | string | Required | The order reference number |
articleId | string | Optional | articleId (articleId or referenceNo not null |
reason | string | Required | Reason |
from | string | Required | Sender information |
to | string | Required | Receiver information |
merchandise | array | Optional | Merchandise |
From
Attribute | Type | Required | Description |
---|---|---|---|
name | string | Required | Maximum 40 characters |
lines | array | Required | The lines of the address. Minimum one line, up to three lines. Maximum 40 characters for each line |
state | string | Required | The state will be validated |
suburb | string | Required | Suburb needs to match with postcode |
postcode | string | Required | Suburb needs to match with postcode |
phone | string | Required | The phone number must be between 9 and 20 characters and the allowable characters are "() - 0-9" (digits, space, hyphen and parentheses). Examples are 0491-570-156, (02) 5550 1234, +61 (3) 7010 4321 |
string | Optional | Should be a vaild email address |
To
Attribute | Type | Required | Description |
---|---|---|---|
name | string | Required | Maximum 40 characters |
lines | array | Required | The lines of the address. Minimum one line, up to three lines. Maximum 40 characters for each line |
state | string | Required | The state will be validated |
suburb | string | Required | Suburb needs to match with postcode |
postcode | string | Required | Suburb needs to match with postcode |
phone | string | Optional | The phone number must be between 9 and 20 characters and the allowable characters are "() - 0-9" (digits, space, hyphen and parentheses). Examples are 0491-570-156, (02) 5550 1234, +61 (3) 7010 4321 |
string | Optional | Should be a vaild email address |
Merchandise
Attribute | Type | Required | Description |
---|---|---|---|
sku | string | Optional | It is used to manage merchandise. Required if the order uses stock |
goodsName | string | Optional | The name of product |
goodsNameCn | string | Optional | The name of product in Chinese |
barcode | string | Optional | UPC. Each item corresponds to a barcode |
description | string | Optional | Required for ECI. Eg: milk, red wine etc |
country_of_origin | string | Optional | Country of origin |
quantity | integer | Optional | Quantity. Required for ECI or when using stock |
value | decimal | Optional | Single item price. Required for ECI or when insurance applies |
length | decimal | Optional | Single item length(cm). Required when using Freight Service |
width | decimal | Optional | Single item width(cm). Required when using Freight Service |
height | decimal | Optional | Single item height(cm). Required when using Freight Service |
weight | decimal | Optional | Single item weight(kg). Required when using Freight Service |
Digest Algorithm
The digest algorithm is MD5 + base64 algorithm.
Example: digest = username + modifyShipmennt + API password
String content = username + auPostShipmentsToJerryDto.getMsgType();
String digest = MD5Util.MD5Encode(content, auCustomer.getPassword());
//content = testmodifyShipment
//keys = 123456
public static String MD5Encode(String content, String keys) {
String sign = "";
String charset = "UTF-8";
content = content + keys;
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(content.getBytes(charset));
sign = new String(Base64.encodeBase64(md.digest()), charset);
} catch (Exception e) {
throw new RuntimeException(e);
}
return sign;
Request Example
Content-Type application/javascript
{
"username": "DUMMY",
"digest": "xxxxxxxxxxxxx",
"msgType": "modifyShipment",
"version": "1.6",
"articleId": "ABC20000000220008833",
"referenceNo": "TEST08030001",
"from": {
"name": "Dummy Duck",
"phone": "61407000000",
"suburb": "Greenacre",
"state": "NSW",
"lines": [
" 457 Waterloo Road"
],
"postcode": "2190"
},
"to": {
"name": "MELBOURNE DC",
"phone": "0284886811",
"suburb": "Moorabbin Airport",
"state": "VIC",
"email": "123456@gmail.com",
"lines": [
"6 Chifley Drive"
],
"postcode": "3194",
},
"merchandise": [
{
"sku": "NG0000X1",
"barcode": "9999999999",
"goodsName": "T-shirt",
"goodsNameCn": "T-shirt",
"description": "garment",
"quantity": "1",
"weight": 1,
"value": 10.99,
},
{
"sku": "NG0000X2",
"barcode": "9999999998",
"goodsName": "Hat",
"goodsNameCn": "Hat",
"description": "garment",
"quantity": "1",
"weight": 1,
"value": 20.99,
}
]
}
Response
Attribute | Type | Required | Description |
---|---|---|---|
success | boolean | Required | Result |
message | array | Required | Message |
code | integer | Required | See Return Codes |
Return Codes
Return Codes | Description |
---|---|
0 | Successful |
1 | Unknown error |
2 | Service is temporarily unavailable |
3 | Unsupported open API method |
10 | Invalid parameter |
101 | Invalid API key |
104 | Incorrect signature |