POST Create Shipment
https://jerrytest.ewe.com.au/eweApi/ewe/api/pushShipment
You can use create shipment API to create a new shipment (Outbound Order).
NOTE:
- The field "product_id" refers to the different service types on EWE's end. Contact EWE about which value to use for the API field items > "product_id".
- Set items > "useStock" to 1 if the stock is managed and should be fulfilled by EWE.
- Fill the merchandise to be dispatched in the field items > "merchandise".
- When "useStock" is 1, you can only fill in the merchandises whose stock level is larger than 0 in EWE system.
Request
Attribute | Type | Required | Description |
---|---|---|---|
username | string | Required | Jerry username |
digest | string | Required | Digest algorithm |
shipments | array | Required | Shipments |
msgType | string | Required | pushUnCreatedShipments |
version | string | Optional | - |
Shipments
Attribute | Type | Required | Description |
---|---|---|---|
sender_reference | string | Required | Order reference number (unique) |
sender_reference2 | string | Optional | Order reference number 2 |
salesPlatform | string | Optional | Select from Amazon, eBay, Shopify or Other platforms |
ebayItemId | string | Optional | Required when salesPlatform is eBay |
ebayTransactionId | string | Optional | Required when salesPlatform is eBay |
removeShortSKU | string | Optional | Yes: "1"; No: "0" |
checkAddressOff | string | Optional | Turn on/off AUS POST address validation. Turn off: "1"; Turn on: "0" (Default) |
addrFix | string | Optional | Turn on/off AUS POST address auto correct. Turn on: "1"; Turn off: "0" (Default) |
email_tracking_enabled | string | Optional | Enable AUS POST to notify receiver by sending email. Yes: "True" |
box_no | string | Optional | Required when using LAZADA service product |
channelCoding | string | Optional | Used for LAZADA service product |
from | array | Optional | Sender information; This field will be filled out with preset sender information if it is left blank |
to | array | Required | Receiver information |
packages | list | Optional | It allows multiple cartons to be added in a shipment. Most of the carriers require this field |
for | array | Optional | Destination information. Required when edi_kind has value |
items | array | Required | The item size must be 1 |
edi_kind | integer | Optional | It can be chosen from 1-11. EDI order type: 1: Myer; 2: David Jones; 3: Amazon; 4: Woolworths; 5: THE ICONIC; 6: Woolworths2; 7: Kmart; 8: Rebel; 9: Coles; 10: Chemist Warehouse; 11: Officeworks; |
department_number | string | Optional | Store department identification. Required when edi_kind has value |
advertised_date | string | Optional | Promotion or new product related date identification |
advertised_code | string | Optional | Promotion or new product related code identification |
store_code | string | Optional | The store code of destination. Required when edi_kind is 2 |
po_number | string | Optional | EDI purchase order number. Required when edi_kind has value |
wo_number | string | Optional | Used for consignment |
allowError | list | Optional | Select from the values: 1; 2; 3. 1. receive address error; 2. receive OOS error; 3. receive SKU mismatch error |
pdf_url | string | Optional | Clients can transfer the label by filling out with URL |
From
Attribute | Type | Required | Description |
---|---|---|---|
country | string | Optional | Required for DHL shipment |
state | string | Required | The state will be validated |
suburb | string | Required | Suburb needs to match with postcode |
city | string | Optional | Required for DHL shipment |
postcode | string | Required | Suburb needs to match with postcode |
lines | array | Required | The lines of the address. Minimum one line, up to three lines. Maximum 40 characters for each line |
name | string | Required | Maximum 40 characters |
phone | string | Required | The phone number must be between 9 and 20 characters and the allowable characters are "- + 0-9" (digits, space, hyphen and plus). The phone number should not include parentheses. Examples are 0491-570-156, 02 5550 1234, +61 3 7010 4321 |
string | Optional | Should be a valid email address | |
business_name | string | Optional | Required for DHL shipment |
To
Attribute | Type | Required | Description |
---|---|---|---|
country | string | Optional | Please fill in "AU" for eParcel service; The country code must comply with ISO 3166-1 alpha-2 standard |
state | string | Required | The state will be validated |
suburb | string | Required | Suburb needs to match with postcode |
city | string | Optional | Required for DHL shipment |
postcode | string | Required | Suburb needs to match with postcode |
lines | array | Required | The lines of the address. Minimum one line, up to three lines. Maximum 40 characters for each line |
code | string | Optional | Store code. Required when edi_kind has value. Maximum 100 characters. |
name | string | Required | Maximum 50 characters Maximum 35 characters for DHL shipment |
business_name | string | Optional | Business name |
phone | string | Optional | The phone number must be between 9 and 20 characters, and maximum 15 characters for DHL shipment. The allowable characters are "- + 0-9" (digits, space, hyphen and plus). The phone number should not include parentheses. Examples are 0491-570-156, 02 5550 1234, +61 3 7010 4321 |
string | Optional | Should be a vaild email address | |
delivery_instructions | string | Optional | Required when "authority_to_leave" is True, Maximum 120 characters |
registrationNumbers | list | Optional | Required when it is to South Korean using DHL |
earliestDeliveryTime | date | Optional | Format: yyyy-MM-dd HH: mm:ss |
latestDeliveryTime | date | Optional | Format: yyyy-MM-dd HH: mm:ss |
registrationNumbers (South Korean PCC information)
Attribute | Type | Required | Description |
---|---|---|---|
number | string | Optional | Required for DHL shipment. Maximum 35 characters |
numberTypeCode | string | Optional | Required for DHL shipment. Maximum 3 characters |
numberIssuerCountryCode | string | Optional | Required for DHL shipment. Maximum 2 characters |
For
Ignore this element if it is a Non-EDI order.
For EDI orders, sometimes the parcel will be sent to the designated place of ‘To’ as a transfer station, and then distributed to the final destination specified by ‘For’. If the parcel will be sent to the final destination directly, set the same value to both ‘For’ and ‘To’.
Attribute | Type | Required | Description |
---|---|---|---|
country | string | Optional | Please fill in "AU" for eParcel service; The country code must comply with ISO 3166-1 alpha-2 standard |
state | string | Required | Required when edi_kind has value. The state will be validated |
suburb | string | Required | Required when edi_kind has value. Suburb needs to match with postcode |
postcode | string | Required | Required when edi_kind has value. Suburb needs to match with postcode |
lines | array | Required | The lines of the address. Minimum one line, up to three lines. Maximum 40 characters for each line |
code | string | Optional | Store code. Required when edi_kind has value. Maximum 100 characters. |
name | string | Required | Required when edi_kind has value. Maximum 40 characters |
phone | string | Optional | The phone number must be between 9 and 20 characters and the allowable characters are "- + 0-9" (digits, space, hyphen and plus). The phone number should not include parentheses. Examples are 0491-570-156, 02 5550 1234, +61 3 7010 4321 |
string | Optional | Should be a valid email address |
Items
Attribute | Type | Required | Description |
---|---|---|---|
item_description | string | Optional | Item description. It will appear on the label. Maximum 35 characters for DHL shipment |
product_id | array | Required | See Service Product Type |
length | double | Optional | Length, width and height in centimeters. Each should not be over 105cm, every two should not be less than 5cm, the volume should not be over 0.25m³ |
width | double | Optional | Width |
height | double | Optional | Height |
weight | double | Required | The declared weight. See Service Product Type for limited weight requirement. |
allow_partial_delivery | boolean | Optional | It will be set as user default setting if the API does not provide the field |
authority_to_leave | boolean | Optional | Whether the parcel can be left in a safe place on delivery without receiving a signature. This is optional for domestic shipments (and defaults to "true"), but must not be specified for international shipments. This field works with the "safe_drop_enabled". It will be set as user default setting if the API does not provide the field |
safe_drop_enabled | boolean | Optional | Whether your customer can request that the item be left in a safe place at the delivery address if they are not home to sign for their delivery. Your customer can request this while the item is on its way. This field is optional for domestic shipments (and defaults to "true"), but must not be specified for international deliveries. This field works with "authority_to_leave". If ‘authority_to_leave’ is set to true, the "‘safe_drop_enabled" can be ignored. It will be set as user default setting if the API does not provide the field |
useStock | integer | Optional | Fill out with "1" if this order uses stock. Please ignore this area or fill out with "0" if this order doesn't use stock |
merchandise | array | Optional | Required for using stock and ECI. Optional for not using stock. See Merchandise |
insurance | boolean | Optional | Insurance |
carrier | string | Optional | Required for WHDC; DC (Direct Courier); NHE (Hunter Express); Allied; Capital; MachShip; 3D35 (PARCEL POST); 3J35 (EXPRESS POST); |
carrierServiceCode | string | Optional | Used for defining specific carrier service for some couriers |
dcReadyDate | date | Optional | Used for WH order. Format: yyyy-MM-dd HH: mm:ss Sydney time |
servicetype | string | Optional | Used for consignments. Values: STD, EXP, VIP, RD, SD, AF |
vehicle | string | Optional | Values: CLOSED, OPEN, ANY |
heReadyDate | date | Optional | Used for Hunter Express. Format: yyyy-MM-dd |
packingInstruction | string | Optional | |
packingInstructionType | string | Optional | Speical instruction for packing process. Fill out with "1" to enable it |
hasBattery | boolean | Required | Whether the item has Battery. Required if it's shiped to NZ |
freightCost | decimal | Optional | This field is used for DHL orders only. The cost will be presented on DHL Commercial Invoice |
eoriNumber | string | Optional | This field is used for DHL orders only. The EORI (Economic Operator Registration and Identification) Number will be presented on DHL Commercial Invoice |
vatNumber | string | Optional | This field is used for DHL orders only. The VAT (Value Added Tax) Identification Number will be presented on DHL Commercial Invoice |
vatValue | decimal | Optional | This field is used for DHL orders only. The VAT (Value Added Tax) amount will be presented on DHL Commercial Invoice |
currency | string | Optional | This field is used for DHL orders only. It defines the currency on DHL Commercial Invoice. The default value is AUD if this field is left blank |
euTaxNumber | string | Optional | This field is used for adding tax numbers such as the EU IOSS tax number for AUS POST international order. Maximum 40 characters |
dhlDuty | string | Optional | Used for defining DDP, DDU or DAP for DHL orders |
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 |
net_weight | bigDecimal | Optional | Required for DHL shipment |
lotNumber | string | Optional | Lot number or batch number |
seq | integer | Optional | - |
hsCode | integer | Optional | Required for DHL shipment |
imgBase64 | string | Optional | Product image Base64. Product image should be in PNG format and the prefix data:image/png;base64, should be removed |
hasBattery | boolean | Required | Whether the item has Battery. Required if it's shipped to NZ |
Packages
Attribute | Type | Required | Description |
---|---|---|---|
weight | double | Required | KG |
length | bigDecimal | Required | CM |
width | bigDecimal | Required | CM |
height | bigDecimal | Required | CM |
quantity | integer | Required | |
typeCode | string | Optional | AUTOM, BULKS, BULKL, CTN, CTNS, CRATE, ENV, FLAT, FLATL, FLATS, CTNH, CTNL, LNGTH, LEN2, LEN3, LEN1, PLT, PCL, ROLL, PPS, SKID, TUBE, TYRE |
Service Product Type
product_id | Product Type | Return Order Number | Maximum Weight(KG) | Label Size |
---|---|---|---|---|
3D35 | PARCEL POST + SIGNATURE | Yes | 22 | 100mm×150mm |
3J35 | EXPRESS POST + SIGNATURE | Yes | 22 | 100mm×150mm |
3P85 | AUS POST Wine Line | Yes | 22 | 100mm×150mm |
eSmart | eSmart | Yes | 22 | 100mm×150mm |
PR | EPARCEL POST RETURNS | Yes | 210mm×297mm | |
XPR | EXPRESS EPARCEL POST RETURNS | Yes | 210mm×297mm | |
ECM8 | INTL EXPRESS MERCH/ECI MERCH | No | 20 | 210mm×297mm |
PTI8 | INTL STANDARD/PACK & TRACK | No | 22 | 210mm×297mm |
ECD8 | INTL EXPRESS DOCS/ECI DOCS | No | 2 | 210mm×297mm |
RPI8 | INTL ECONOMY W SOD/REGD POST | No | 2 | 210mm×297mm |
FASTWAY | FASTWAY | Yes | 25 | 100mm×150mm |
999998 | Freight Service | No | ||
999997 | LARGE LETTER | No | 0.5 | 100mm×100mm |
999996 | DOMESTIC EWE | No | 100mm×150mm | |
999990 | International EWE | |||
LAZADA | No | 0.5 | 100mm×150mm | |
eMetroWM | eMetroWM | |||
eMetro | eMetro | |||
WHDC | WH order | |||
Capital | Capital | |||
EIZfastway | MEL-FASTWAY | |||
DC | Direct Courier | |||
NHE | Hunter Express | |||
Allied | Allied Express | |||
MachShip | MachShip | |||
customize | customize | - |
Maximum description length
product_id | Product Type | Maximum Length |
---|---|---|
999996 | DOMESTIC EWE | 120 |
WHDC | WH order | 200 |
999997 | LARGE LETTER | 120 |
3D35 | PARCEL POST | 120 |
ECM8 | INTL EXPRESS | 163 |
PTI8 | INTL STANDARD | 163 |
Digest Algorithm
The digest algorithm is MD5 + base64 algorithm.
Example: digest = username + 1 + pushUnCreatedShipments + API password
String content = username + auPostShipmentsToJerryDto.getShipments().size() +
auPostShipmentsToJerryDto.getMsgType();
String digest = MD5Util.MD5Encode(content, auCustomer.getPassword());
//content = test1pushUnCreatedShipments
//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
Request example - when creating multiple cartons for AUS POST order
{
"username": "DUMMY",
"digest": "xxxxxxxxxxxxxxxxxxxx",
"msgType": "pushUnCreatedShipments",
"version": "1.0",
"shipments": [
{
"sender_reference": "test2609-09",
"allowError": [],
"from": {
"name": "Sydney ",
"business_name": "EWE",
"country": "AU",
"phone": "0296442648",
"suburb": "Moorabbin Airport",
"state": "VIC",
"lines": [
"6 Chifley Drive"
],
"postcode": "3194"
},
"to": {
"name": "TEST",
"phone": "0404280016",
"suburb": "Croydon",
"state": "NSW",
"country": "AU",
"lines": [
"6 Chifley Drive"
],
"postcode": "2132",
"delivery_instructions": "Leave at the front door"
},
"packages": [
{
"weight": 5,
"length": 10,
"width": 10,
"height": 10,
"quantity": 2
}
],
"items": [
{
"item_description": "123",
"product_id": "3D35",
"carrier": "",
"weight": 5,
"useStock": 1,
"authority_to_leave": true,
"merchandise": [
{
"sku": "16PRIN-COSA-36-37",
"quantity": "2"
}
]
}
]
}
]
}
Request example - when creating EDI order
{
"username": "DUMMY",
"digest": "xxxxxxxxxxxxx",
"msgType": "pushUnCreatedShipments",
"shipments": [
{
"sender_reference": "TEST0721001",
"sender_reference2": "B2B",
"removeShortSKU":"1",
"allowError": [
2
],
"from": {
"name": "The Department of Dummy",
"phone": "61407000000",
"suburb": "Greenacre",
"state": "NSW",
"lines": [
" 457 Waterloo Road"
],
"postcode": "2190"
},
"to": {
"name": "MELBOURNE DC",
"code": "9999",
"phone": "",
"suburb": "Moorabbin Airport",
"state": "VIC",
"lines": [
"6 Chifley Drive"
],
"postcode": "3194",
"country": "AU"
},
"for": {
"code": "9994",
"name": "MELBOURNE DC",
"phone": "",
"suburb": "Moorabbin Airport",
"state": "VIC",
"lines": [
"6 Chifley Drive"
],
"postcode": "3194"
},
"items": [
{
"item_description": "",
"product_id": "999996",
"weight": "1",
"useStock": "1",
"merchandise": [
{
"sku": "NG0000X1",
"goodsName": "T-shirt",
"goodsNameCn": "T-shirt",
"description": "garment",
"quantity": "1",
"value": 10.99,
"LotNumber": ""
},
{
"sku": "NG0000X2",
"goodsName": "Hat",
"goodsNameCn": "Hat",
"description": "garment",
"quantity": "1",
"value": 20.99,
"LotNumber": ""
}
],
"packingInstruction": "",
"packingInstructionType": "1"
}
],
"edi_kind": 4,
"department_number": "9313142081234",
"store_code": "9994",
"po_number": "4505685922"
}
]
}
Response
Attribute | Type | Required | Description |
---|---|---|---|
shipments | array | Optional | The shipment information will return if the order is created successfully |
errors | array | Required | The error message will return when the error occurs |
code | string | Required | See Return Codes |
jerryAccount | string | Sub accounts under Master Account |
Shipments
Attribute | Type | Required | Description |
---|---|---|---|
sender_references | array | Required | The order reference number will return if the order is created successfully |
product_id | string | The service product (ONLY for eMetro) | |
isSuccess | string | Required | Whether the order is created successfully |
items | array | Required | The items will return if the order is created successfully |
msg | string | Required | Prompt message |
error | list | Required | The error message will return only if the order is an invalid order. |
Items
Attribute | Type | Required | Description |
---|---|---|---|
article_id | string | Optional | Tracking number |
consignment_id | string | Optional | Consignment number |
item_description | array | Required | Item description |
pdf_url | string | Optional | Label URL |
Errors
Attribute | Type | Required | Description |
---|---|---|---|
message | string | Required | Will give a full description as to what was correct or wrong on request |
sender_reference | string | Required | Order reference number |
Return Codes
Return Codes | Description |
---|---|
-1 | Submit repeatedly |
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 |
Successful Response Example
{
"shipments": [
{
"sender_references": "TEST0721005",
"isSuccess": true,
"items": [
{
"consignment_id": "EPAC00000059544",
"item_description": "",
"pdf_url": "https://jerrytest.ewe.com.au/eweApi/ewe/aupost/v2/printSingleLabel?labelCode=jsfberyRvlkakwENpfM841jk1XZ9duSo"
}
],
"msg": "shipment sealed successfully"
}
],
"errors": [],
"code": 0
}
Response example - when creating multiple cartons for AUS POST order
{
"shipments": [
{
"sender_references": "test1010-22",
"isSuccess": true,
"items": [
{
"article_id": "ABC202148501000931501",
"consignment_id": "ABC2021485",
"pdf_url": "https://jerrytest.ewe.com.au/eweApi/ewe/aupost/v2/printSingleLabel?labelCode=a5q1gHtWv6mtRy7tTtXWnHnQii1ovVGDKuBReWgXXNI="
},
{
"article_id": "ABC202148502000931508",
"consignment_id": "ABC2021485",
"pdf_url": "https://jerrytest.ewe.com.au/eweApi/ewe/aupost/v2/printSingleLabel?labelCode=a5q1gHtWv6mtRy7tTtXWnHnQii1ovVGDKuBReWgXXNI="
}
],
"msg": "shipment sealed successfully"
}
],
"errors": [],
"code": 0
}
Response example - when "removeShortSKU" = 1
{
"shipments" [
{
"sender_references": "test102550005"",
"isSuccess": true,
"items": [
{
"consignment_id": "EPAC00000052752",
"item_description": product,
"pdf_url": "https://jerrytest.ewe.com.au/eweApi/ewe/aupost/printSingleLabel/referenceNo=EPAC00000052752",
"hasShortStock": true,
"merchandise": [
{
"id": "2391167",
"sku": "TEST01",
"goodsName": "T-shirt",
"quantity": "10",
"value": "1.0",
"description": "T-shirt"
},
{
"id": "2391168",
"sku": "TEST02",
"goodsName": "Hat",
"quantity": "1",
"value": "1.0",
"description": "Hat"
}
],
"removeShortSKU": [
{
"sku": "TEST01",
"goodsName": "T-shirt",
"quantity": "100",
"value": "1.0",
"description": "T-shirt"
},
{
"sku": "TEST02",
"goodsName": "Hat",
"quantity": "1000",
"value": "1.0",
"description": "Hat"
}
]
}
],
"msg": "shipment sealed successfully"
}
],
"errors": [],
"code": 0
}
Failed Response Example
1
{
"error": {
"message": "Wrong digest",
"extends": false
},
"code": 104
}
2
{
"errors": [
{
"message": "The weight of the item 22kg",
"sender_reference": "TEST0721006",
"extends": false
}
],
"code": 10
}