Darwynn Driver System API Documentation
Table of Contents
Version History
Version | Date | Details |
---|---|---|
v1.0 | 2022/09/02 | Added new APIs:
|
v2.0 | 2022/09/05 | "WMS Order Synchronization" is changed to "OMS Order Synchronization" |
v3.0 | 2022/10/09 | The delivery longitude and latitude in the OMS Order Synchronization API is changed to optional |
v4.0 | 2022/11/01 | New mandatory parameters added to the OMS Order Synchronization API: warehouse_postcode, warehouse_address, warehouse_address2 |
v5.0 | 2022/11/28 | Added an API to determine whether the package is within the delivery range of the delivery station |
v6.0 | 2022/12/01 | Added request parameters to the Waybill Generation API: warehouse_postcode, warehouse_address, warehouse_address2 Add return parameters: station |
v7.0 | 2022/12/06 | Deleted some request parameters of the Waybill Generation API: warehouse_postcode, warehouse_address, warehouse_address2 |
v8.0 | 2023/01/05 | Added an optional parameter to the Order Synchronization API : package_price |
v8.1 | 2023/07/05 | Added new APIs:
|
v8.2 | 2023/07/08 | Added new request parameters to the OMS Order Synchronization API: package_type, appoint_time |
Getting Started
Environment Information
Environment | Domain Name |
---|---|
Production Environment | |
Test Environment |
Common Response Fields
Field | Data Type/Format | Required? | Description |
---|---|---|---|
status | Int | Y | API status code |
msg | String | Y | Description |
data | Json|Array | Y | Operational data, the main payload |
Signature Generation
Example:
Request Parameters
“qr_code”:”T1999999999″,
“device_id”:”001″,
“create_time”:”1647826159″
Generate signature steps
- Arrange the non-empty parameters in lexicographical order to get a String
- String = “create_time=1647826159&device_id=001&qr_code=T1999999999”
- Add key after String (you can obtain it by consulting us, and it is available in the test: 89b9d22bef4d94ce070f35c9e78ea172) to get TempSign
- TempSign = “create_time=1647826159&device_id=001&qr_code=T1999999999&key=89b9d22bef4d94ce070f35c9e78ea172”
- md5 encryption, get md5Sign
- md5Sign= “1e6d22b5c2441d6590dfbc41c79e0d3b”
- Convert all characters to uppercase to get sign
- sign = “1E6D22B5C2441D6590DFBC41C79E0D3B”
Waybill Generation
Generate a waybill number
- URL:
/v20/public/index.php/dds/api.DarwynnOrder/createLogisticsOrderId
- Method:POST
- Authentication Requires:Y
Request Parameters
Parameter | Data Type | Required? | Description | Example |
---|---|---|---|---|
user_name | String | Y | Order recipient's full name | John Doe |
user_phone | String | Y | Order recipient's phone number | 13095554512 |
user_email | String | Y | Order recipient's email | |
postcode | String | Y | Order recipient's postal code | |
user_address | String | Y | Order recipient's address 1 (street address) | |
user_address2 | String | Y | Order recipient's address 2 (unit, suite, or apartment number) | |
package_length | Float | Y | Package length (Unit: m) | |
package_width | Float | Y | Package width (Unit: m) | |
package_height | Float | Y | Package height (Unit: m) | |
package_weight | Float | Y | Package weight (Unit: kg) | |
sign | String | Y | The API signature (refer to Signature Generation) | ec99d29ddaead365fcedd330bed34863 |
Response Fields
Field | Data Type/Format | Description | Example |
---|---|---|---|
logistics_orderid | String | The waybill number/ID | DD20220902M1X1HO6B |
station | Array | The most suited/closest delivery station |
Station Fields
Field | Data Type/Format | Description | Example |
---|---|---|---|
station_id | Int | Delivery station ID | 1 |
station_name | String | Delivery station name | Anhui Hefei Shushan District Distribution Station |
Response Example
{
"status": 1000,
"msg": "success",
"data": {
"logistics_orderid": "DD20220902M1X1HO6B"
},
"refresh_ticket": ""
}
OMS Order Synchronization
Synchronize order information from the order management system
- URL:
/v20/public/index.php/dds/api.DarwynnOrder/importOrder
- Method:POST
- Authentication Requires:Y
Request Parameters
Parameter | Data Type | Required? | Description | Example |
---|---|---|---|---|
oms_orderid | String | Y | The OMS (Order Management System) order number | OCPS02301110000051 |
order_type | String | Y | Order Type: B2B (business to business) or B2C (business to customer) | B2B |
electronic_commerce | String | Y | Order E-commerce Platform: Amazon, eBay, Shopify, etc. | Amazon |
third_orderid | String | Y | Order ID on the previously stated E-commerce Platform | 201 |
deliver_platform | String | Y | Carrier: Canada Post, UPS, DayRoss, etc. | UPS |
logistics_orderid | String | Y | The waybill number | |
user_name | String | Y | Order recipient's full name | John Doe |
user_phone | String | Y | Order recipient's phone number | 13095554512 |
user_email | String | Y | Order recipient's email | |
postcode | String | Y | Order recipient's postal code | |
user_address | String | Y | Order recipient's address 1 (street address) | |
user_address2 | String | Y | Order recipient's address 2 (unit, suite, or apartment number) | |
user_long | String | N | Order recipient's longitude | |
user_lat | String | N | Order recipient's latitude | |
warehouse_postcode | String | Y | The warehouse's postal code | |
warehouse_address | String | Y | The warehouse's address 1 (street address) | |
warehouse_address2 | String | Y | The warehouse's address 2 (unit, suite, or apartment number) | |
package_price | String | N | Package price (Unit: yuan) | |
package_type | Int | N | Package type:
| 0 |
appoint_time | String | N | Delivery time (Format: YYYY-MM-DD HH:MM:SS) | 2023-07-08 09:00:00 |
sign | String | Y | The API signature (refer to Signature Generation) | ec99d29ddaead365fcedd330bed34863 |
Response Example
{
"status": 1000,
"msg": "success",
"data": [],
"refresh_ticket": ""
}
Waybill Cancellation
Waybill Cancellation
Cancel the waybill
- URL:
/v20/public/index.php/dds/api.DarwynnOrder/delOrder
- Method:POST
- Authentication Requires:Y
Request Parameters
Parameter | Data Type | Required? | Description | Example |
---|---|---|---|---|
logistics_orderid | String | Y | The waybill number Multiple waybills are separated by commas | DD20220811M1XY39M4,DD20220902M1X1HO6B |
sign | String | Y | The API signature (refer to Signature Generation) | ec99d29ddaead365fcedd330bed34863 |
Response Example
{
"status": 1000,
"msg": "success",
"data": [],
"refresh_ticket": ""
}
Waybill Delivery
Start the waybill’s delivery process
- URL:
/v20/public/index.php/dds/api.DarwynnOrder/delivery
- Method:POST
- Authentication Requires:Y
Request Parameters
Parameter | Data Type | Required? | Description | Example |
---|---|---|---|---|
logistics_orderid | String | Y | The waybill number Multiple waybills are separated by commas | DD20220811M1XY39M4,DD20220902M1X1HO6 |
sign | String | Y | The API signature (refer to Signature Generation) | ec99d29ddaead365fcedd330bed34863 |
Response Example
{
"status": 1000,
"msg": "success",
"data": [],
"refresh_ticket": ""
}
Within Delivery Range
Determine whether the package destination is within the delivery range of a delivery station
- URL:
/v20/public/index.php/dds/api.DarwynnOrder/checkParcelDeliveryStation
- Method:POST
- Authentication Requires:Y
Request Parameters
Parameter | Data Type | Required? | Description | Example |
---|---|---|---|---|
user_address | String | Y | Order recipient's address 1 (street address) | |
user_address2 | String | Y | Order recipient's address 2 (unit, suite, or apartment number) | |
postcode | String | Y | Order recipient's postal code | |
sign | String | Y | The API signature (refer to Signature Generation) | ec99d29ddaead365fcedd330bed34863 |
Response Example
{
"status": 1000,
"msg": "success",
"data": {
"has_station": true
// true means it's within the delivery range of the station, false means it's not within the delivery range
},
"refresh_ticket": ""
}
Shipping Information (XML)
Get the shipping information in XML format
- URL:
/v20/public/index.php/dds/api.DarwynnOrder/getOrderInfo
- Method:POST
- Authentication Requires:Y
Request Parameters
Parameter | Data Type | Required? | Description | Example |
---|---|---|---|---|
logistics_orderid | String | Y | The waybill number | DD20220902M1X1HO6B |
sign | String | Y | The API signature (refer to Signature Generation) | ec99d29ddaead365fcedd330bed34863 |
Response Fields
Field | Data Type | Description | Example |
---|---|---|---|
user_name | String | Order recipient's full name | John Doe |
postcode | String | Order recipient's postal code | |
user_address | String | Order recipient's address 1 (street address) | |
user_address2 | String | Order recipient's address 2 (unit, suite, or apartment number) | |
warehouse_postcode | String | The warehouse's postal code | |
warehouse_address | String | The warehouse's address 1 (street address) | |
warehouse_address2 | String | The warehouse's address 2 (unit, suite, or apartment number) | |
package_weight | Float | Package weight (Unit: kg) | |
oms_orderid | String | The OMS (Order Management System) order number | OCPS02301110000051 |
print_time | String | Current Timestamp |
Response Example
1000
success
李四
A0A333
aaa
bbb
1
1
20
DD20230505A0A891N6
1.00
22092302075066657021
2023-07-04 21:43:24
Upload Order Label
Add the order label image onto DDS
- URL:
/v20/public/index.php/dds/api.DarwynnOrder/saveOrderImg
- Method:POST
- Authentication Requires:Y
Request Parameters
Parameter | Data Type | Required? | Description | Example |
---|---|---|---|---|
base64 | String | Y | The base64 of the label image | |
logistics_orderid | String | Y | The waybill number | DD20220811M1XY39M4,DD20220902M1X1HO6B |
oms_orderid | String | Y | The OMS (Order Management System) order number | OCPS02301110000051 |
sign | String | Y | The API signature (refer to Signature Generation) | ec99d29ddaead365fcedd330bed34863 |
Response Example
{
"status": 1000,
"msg": "success",
"data": {
"url": "http://o2o-dev-1305348519.cos.ap-nanjing.myqcloud.com/upload/darwynn_order/40a6a2ecb6b9fc946d79b87146171481.gif"
},
"refresh_ticket": ""
}