Develop with test account: jiangyanfeng1986@gmail.com password: 1
updated: 2019-07-02. Added GET TRACKING INFO api
updated: 2020-11-26. Added inventory, declared_name_cn in product
updated: 2021-01-19. Add in feedback result "min_day", "max_day", "ship_note" to Get shipping quote 1, 2 API
updated: 2021-06-23. Added tax in shipping rule; tax=0(no need to provide Europe tax ID for this shipping option), tax=1(need to provide Europe IOSS VAT ID); tax=2(need to provide Brazil TAX ID )
URL | https://www.dshipchina.com/api1/getaproduct.php |
Request example | https://www.dshipchina.com/api1/getaproduct.php?key=db0d4c3acf6fb3a904bebdfc8e35fccf&product_id=2 |
Request parameter |
key (Required)
product_id (Required) The value can be product ID or SKU
|
Success return example | |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
Note | product_type: 1- normal product, 2-famous brand product, 3 Very famous brand product, 4-inside battery or magnetic, 5-pure battery, 6- liuid or powder |
URL | https://www.dshipchina.com/api1/getallproducts.php |
Request example | https://www.dshipchina.com/api1/getallproducts.php?key=db0d4c3acf6fb3a904bebdfc8e35fccf |
Request parameter |
key (Required)
|
Success return example | |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
Note | product_type: 1- normal product, 2-famous brand product, 3 Very famous brand product, 4-inside battery or magnetic, 5-pure battery, 6- liuid or powder |
URL | https://www.dshipchina.com/api1/editproduct.php |
Request example | https://www.dshipchina.com/api1/editproduct.php?key=*&product_id=*&sku=*&product_name=*& note=*&declared_name=*&declared_name_cn=*&declared_value=* |
Request parameter |
key (Required)
product_id (Required) The value can be product ID or SKU
sku (Optional, fill this field only when you need to edit it)
product_name (Optional, fill this field only when you need to edit it)
note (Optional, fill this field only when you need to edit it)
declared_name (Optional, fill this field only when you need to edit it)
declared_name_cn (Optional, fill this field only when you need to edit it)
declared_value (Optional, fill this field only when you need to edit it)
|
Success return example | {"status":200} |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
Note |
Use urlecode for the field if you want to make it alway safe incase meet some special character
(not urlecode the full link, only encode the content of each field) |
URL | https://www.dshipchina.com/api1/createproduct.php |
Request example | https://www.dshipchina.com/api1/createproduct.php?key=*&sku=*&product_name=*& note=*&declared_name=*&declared_name_cn=*&declared_value=*&weight=*&length=*&width=*&height=* |
Request parameter |
key (Required)
sku (Optional, please make sure SKU is unique in our system in your account)
product_name (Optional)
note (Optional)
declared_name (Optional)
declared_name_cn (Optional)
declared_value (Optional)
weight (Optional) /g, after you create product , it can be edited only by our warehouse in future
length (Optional) /cm, after you create product , it can be edited only by our warehouse in future
width (Optional) /cm, after you create product , it can be edited only by our warehouse in future
height (Optional) /cm, after you create product , it can be edited only by our warehouse in future
|
Success return example | {"status":200,"product_id":"3800"} |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":502} -- SKU is already exist {"status":505} -- Miss required parameter |
Note |
Use urlecode for the field if you want to make it alway safe incase meet some special character
(not urlecode the full link, only encode the content of each field) |
URL | https://www.dshipchina.com/api1/deleteproduct.php |
Request example | https://www.dshipchina.com/api1/deleteproduct.php?key=*&pidsku=* |
Request parameter |
key (Required)
pidsku (Required), product ID or SKU
|
Success return example | {"status":200,"pidsku":"3800"} |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
Note | Only can delete the product that inventory is 0 |
URL | https://www.dshipchina.com/api1/getanorder.php |
Request example | https://www.dshipchina.com/api1/getanorder.php?key=db0d4c3acf6fb3a904bebdfc8e35fccf&waybill_id=12954 |
Request parameter |
key (Required)
waybill_id (Required)
|
Success return example | |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
Note |
waybill_type: 1- normal product, 2-famous brand product, 3 Very famous brand product, 4-inside battery or magnetic, 5-pure battery, 6- liuid or powder |
URL | https://www.dshipchina.com/api1/getshiptrack.php |
Request example | https://www.dshipchina.com/api1/getshiptrack.php?key=*&waybill_id=* |
Request parameter |
key (Required)
waybill_id (Required)
|
Success return example | |
Fail return example |
{"status":501} -- API key is not correct {"status":505} -- Miss required parameter {"status":508} -- Cannot find order {"status":536} -- tracking info still not ready {"status":538} -- fail to connect tracking data |
Note | Only can check the tracking info for an order, cannot track any tracking number that not belong to this order |
URL | https://www.dshipchina.com/api1/getshiptrackno.php |
Request example | http://www.dshipchina.com/api1/getshiptrackno.php?key=*&waybill_id=12281 |
Request parameter |
key (Required. The API key you can get in user center)
waybill_id (Required.)
|
Note | So far, only tracking number like 3000230681625CN OR shipping way like: Hongkong-Fedex, Hongkong-DHL, Hongkong-UPS support to get local tracking number. The local tracking number depend on country, If ship to USA, it's USPS tacking number |
Success return example | |
Fail return example |
{"status":500} -- Other error
{"status":501} -- API key is not correct {"status":505} -- Miss required parameter {"status":508} -- Cannot find waybill {"status":551} -- No support to get local tracking number for this order {"status":561 - 569 } -- fail to get {"status":580} -- Still pending, try again tomorrow |
URL | https://www.dshipchina.com/api1/getorders.php |
Request example | https://www.dshipchina.com/api1/getorders.php?key=db0d4c3acf6fb3a904bebdfc8e35fccf&time1=1515421665&time2=1531060065 |
Request parameter |
key (Required)
time1 (Required, Unix timestamp, from time range time1-time2)
time2 (Required, Unix timestamp, from time range time1-time2)
|
Success return example | |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
Note |
waybill_type: 1- normal product, 2-famous brand product, 3 Very famous brand product, 4-inside battery or magnetic, 5-pure battery, 6- liuid or powder |
URL | https://www.dshipchina.com/api1/createorder.php |
Request example | https://www.dshipchina.com/api1/createorder.php?key=*&recipient=*&company=*&street=*&city=*&state=*&country_code=*&zipcode=*&phone=*&ship_id=*& note=*&product_id[0]=*&qty[0]=*&product_id[1]=*&qty[1]=*... |
Request parameter |
key (Required)
recipient (Required)
company (Optional)
street (Required)
recipient (Required)
city (Required)
state (Required)
country_code (Required, USA-> US, Australia-> AU)
zipcode (Required)
phone (Required)
ship_id (Required, Check in Appendices/shipping method)
note (Optional)
product_id[] (Required) The value can be product ID or SKU
qty[] (Required)
|
Success return example | |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":510} -- Balance is not enough {"status":520} -- Product inventory is not enough {"status":530} -- No such shipping way for this weight and country {"status":533} -- Cannot find country code {"status":505} -- Miss required parameter |
Note |
Use urlecode for the field if you want to make it alway safe incase meet some special character
(not urlecode the full link, only encode the content of each field) |
URL | https://www.dshipchina.com/api1/markreceived.php |
Request example | https://www.dshipchina.com/api1/markreceived.php?key=*&waybill_id=* |
Request parameter |
key (Required)
waybill_id (Required)
|
Success return example | {"status":"200"} |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
Products flow is a record log that record how your product qty change
URL | https://www.dshipchina.com/api1/getproductflow.php |
Request example | https://www.dshipchina.com/api1/getproductflow.php?key=*&time1=*&time2=*product_id=* |
Request parameter |
key (Required)
time1 (Required, Unix timestamp, from time range time1-time2)
time2 (Required, Unix timestamp, from time range time1-time2)
product_id (Optional, If fill this, will returned product flow for one product, If not fill , will return all products')
|
Success return example | |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
URL | https://www.dshipchina.com/api4/getbalance.php |
Request example | https://www.dshipchina.com/api4/getbalance.php?key=* |
Request parameter |
key (Required)
|
Success return example | {"status":"200","balance":"7578.80"} |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
URL | https://www.dshipchina.com/api4/getbillrecord.php |
Request example | https://www.dshipchina.com/api4/getbillrecord.php?key=*&time1=*&time2=* |
Request parameter |
key (Required)
time1 (Required, Unix timestamp, from time range time1-time2)
time2 (Required, Unix timestamp, from time range time1-time2)
|
Success return example | |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
URL | https://www.dshipchina.com/api4/getship1.php |
Request example | https://www.dshipchina.com/api4/getship1.php?key=*&weight=*&volume=*&country_code=*&waybill_type=* |
Request parameter |
key (Required)
weight (Required, g)
country_code (Required, Australia -> AU)
volume (Optional , Unix timestamp, cm3)
waybill_type (Optional, 1- normal product, 2-famous brand product, 3 Very famous brand product, 4-inside battery or magnetic, 5-pure battery, 6- liuid or powder)
|
Success return example | |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
URL | https://www.dshipchina.com/api4/getship2.php |
Request example | https://www.dshipchina.com/api4/getship2.php?key=*&country_code=*&product_id[0]=*&qty[0]=*&product_id[1]=*&qty[1]=*... |
Request parameter |
key (Required)
weight (Required, g)
country_code (Required, Australia -> AU)
product_id[] (Required)
qty[] (Required)
|
Success return example | |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
If you set this link, when we ship your order and update tracking number. We will send a http request to notice your server
if your link is https://www.example.com/noticeme
We will send a http request like this:
https://www.example.com/noticeme?waybillid=12555&tracknumber=LY410909689CN
URL | https://www.dshipchina.com/api4/editabckurl.php |
Request example | https://www.dshipchina.com/api4/editabckurl.php?key=*&url=* |
Request parameter |
key (Required)
url (Required, g)
|
Success return example | {"status":200} |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
Note |
Use urlecode for the field if you want to make it alway safe incase meet some special character
(not urlecode the full link, only encode the content of each field) |
This is all the orginal shipping rate data from our SQL database
You can save in your own database, and get any shipping cost from your own server.
We don't usually change the data, so you update it over 30 days a time should be OK.
But it's not easy to understand how to calculate
URL | https://www.dshipchina.com/api4/getshiprate.php |
Request example | https://www.dshipchina.com/api4/getshiprate.php?key=* |
Request parameter |
key (Required)
|
Success return example | |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
PHP Example code to calculate a shipping cost | |
PHP Example code to calculate a list shipping quote for all available shipping method |
product_id | ID of product in our system |
sku | This can be edited , usually use to connect product between our system and your own system |
seller_id | The owner(seller) of the product |
product_name | The title of the product |
note | Your own note for this product |
declare_value | When this product ship out of China, we will declare as this value to custom. |
declare_name | When this product ship out of China, we will declare as this name to custom. |
declare_name_cn | When this product ship out of China, we will declare as this name in Chinese to custom. |
weight | Net weight of one product , g |
length | cm |
width | cm |
height | cm |
price | The selling price, USD |
description1 | description for the end customer |
description2 | description for the dropship buyer |
catalog_id | catalog id , the catalog sheet can be checked below |
sell | 0- only use our fulfillment service, not sell publicly; 1- sell publicly |
isoption | 0- disable option ; 1- enable option |
product_type | 1- normal product, 2-famous brand product, 3 Very famous brand product, 4-inside battery or magnetic, 5-pure battery, 6- liuid or powder |
inventory | inventory in our warehouse for this product |
image | This is array, in this array, 1. sort : use to control the order of the image show; 2. url: the image url of this product. The full url= "https://user.dshipchina.com/sell/" +url |
options |
This is array, in this array,
1. option_id : ID of this option; 2. related_product_id: each option must be related to a product ID, if the customer choose this option, mean he is buying this related product ID, Each related product ID must be different, Usually the first option's related product ID is itself. 3. option_name : The text name of this option 4. image_id : If this is filled, This option will be shown as an image instead of a text name; If it's "0", mean no image for this option, |
waybill_id | ID of the order(waybill/shipment) in our system |
weight | Total weight of this order, inlcude package material , g |
volume | Total volume of this order, inlcude package material , cm3 |
time2 | The time when you submit the order |
price | Total product cost in this order |
ship_fee | Shipping cost of this order |
ship_id | The ID of shipping method, shipping method sheet can be checked below |
country_id | part of the shipping address, the ID defined in our system for country, it is a number from 1- 256. In country sheet , we will show how to change to country code |
country_code | part of the shipping address, the strandard country code. such as Australis = US |
recipient | part of the shipping address |
company | part of the shipping address |
city | part of the shipping address |
state | part of the shipping address |
street | part of the shipping address |
zipcode | part of the shipping address |
phone | part of the shipping address |
waybill_type | 1- normal product, 2-famous brand product, 3 Very famous brand product, 4-inside battery or magnetic, 5-pure battery, 6- liuid or powder |
note | Note for the order |
track_number | Tracking number, if no tracking number, it will be show as "0" or "" |
products |
It's array. it inlcude:
"product_id", "qty", "seller_id"", "price" |
flow_id | ID of this row |
worker_id | If the product changed by our worker, we will fill worker ID here. Or fill as "0" |
customer_id | If the product changed by customer, we will fill customer ID here. Or fill as "0" |
time | The time for this operation happen |
product_id | Product ID that Inverory change |
qty | How many pcs is changed |
qty_balance | How many inventory leave after this change |
flow_type | 1-Storage, 2-Ship out, 3-Returned, 4-Inventory adjust, 5-Cancel waybill, 6-Cancel storage, 7-storage adjust, 8-Sell, 9-Cancel order |
note | If flow_type in (1, 6, 7), it's a storage batch ID, if flow_type in (2, 3, 5, 8, 9) |
bill_id | ID of this row |
bill_type |
2- paypal, 14 credit card, 19-Manual Recharge, 20-Waybill Fee Adjust, 21- Pay fulfillment shipping cost...
Here is the array for all type in javascript: |
note | Note for this record |
amount | The amount that changed in this row |
balance | The remain balance after this change |
time | Time when this operation happen |