Develop with test account: jiangyanfeng1986@gmail.com password: 1
URL | https://www.dshipchina.com/api2/getaproduct.php |
Request example | https://www.dshipchina.com/api2/getaproduct.php?key=db0d4c3acf6fb3a904bebdfc8e35fccf&product_id=2 |
Request parameter |
key (Required)
product_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 |
image URL is not a full url, the Full url is "https://user.dshipchina.com/sell/" + "img2/0/1/2/15308542730.jpg"(data.url)
for example, like https://user.dshipchina.com/sell/img2/0/1/2/15308542730.jpg |
URL | https://www.dshipchina.com/api2/getallproducts.php |
Request example | https://www.dshipchina.com/api2/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 |
image URL is not a full url, the Full url is "https://user.dshipchina.com/sell/" + "img2/0/1/2/15308542730.jpg"(data.url)
for example, like https://user.dshipchina.com/sell/img2/0/1/2/15308542730.jpg |
URL | https://www.dshipchina.com/api2/editproduct.php |
Request example | https://www.dshipchina.com/api2/editproduct.php?key=*&product_id=*&sku=*&product_name=*& note=*&declared_name=*&declared_value=*&price=*&description1=*&description2=*&sell=*&catalog_id=* |
Request parameter |
key (Required)
product_id (Required)
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_value (Optional, fill this field only when you need to edit it)
price (Optional, fill this field only when you need to edit it)
description1 (Optional, fill this field only when you need to edit it)
description2 (Optional, fill this field only when you need to edit it)
sell (Optional, fill this field only when you need to edit it)
option (Optional, fill this field only when you need to edit it, if you want to enable option,fill "1", if want to disable option, fill "0")
catalog_id (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/api2/createproduct.php |
Request example | https://www.dshipchina.com/api2/createproduct.php?key=*&sku=*&product_name=*& note=*&declared_name=*&declared_value=*&price=*&description1=*&description2=*&sell=*&catalog_id=* download_url[0]=*&sort[0]=*download_url[1]=*&sort[1]=*... |
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_value (Optional)
price (Optional)
description1 (Optional, description for end customer)
description2 (Optional, description for dropshipper)
sell (Optional, 0- not sell publicly , 1- sell publicly)
catalog_id (Optional )
download_url[] (Optional, Give the remote download link for dshipchina to download and save image for product )
sort[] (Optional, a number, To control the order of the images that show in product )
|
Success return example | |
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) image URL is not a full url, the Full url is "https://user.dshipchina.com/sell/" + "img2/0/1/2/15308542730.jpg"(data.url) for example, like https://user.dshipchina.com/sell/img2/0/1/2/15308542730.jpg 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/api2/addimage.php |
Request example | https://www.dshipchina.com/api2/addimage.php?key=*&product_id=*&download_url=*&sort=* |
Request parameter |
key (Required)
product_id (Required)
download_url (Optional, Give the remote download link for dshipchina to download and save image for product )
sort (Optional, a number, To control the order of the images that show in product )
|
Success return example | |
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) image URL is not a full url, the Full url is "https://user.dshipchina.com/sell/" + "img2/0/1/2/15308542730.jpg"(data.url) for example, like https://user.dshipchina.com/sell/img2/0/1/2/15308542730.jpg |
URL | https://www.dshipchina.com/api2/deleteimage.php |
Request example | https://www.dshipchina.com/api2/deleteimage.php?key=*&image_id=* |
Request parameter |
key (Required)
image_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 |
URL | https://www.dshipchina.com/api2/editimagesort.php |
Request example | https://www.dshipchina.com/api2/editimagesort.php?key=*&image_id=*&sort=* |
Request parameter |
key (Required)
image_id (Required)
sort (Required, a number 0-1000000000, To control the order of the images that show in product)
|
Success return example | {"status":"200"} |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter |
URL | https://www.dshipchina.com/api2/addproductoption.php |
Request example | https://www.dshipchina.com/api2/addproductoption.php?key=*&product_id=*&option_name[0]=*&related_product_id[0]=*&image_id[0]=*&option_name[1]=*&related_product_id[1]=*&image_id[1]=*... |
Request parameter |
key (Required)
product_id (Required)
option_name (Required)
related_product_id (Required, 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.)
image_id (optional, The ID of cover image for this product, if fill it, option will be shown as an image, if not fill it, option will be shown as a text name)
|
Success return example | |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter {"status":533} -- The related_product_id is repeated for this product {"status":534} -- The related_product_id is not exist or not in selling status |
URL | https://www.dshipchina.com/api2/editaproductoption.php |
Request example | https://www.dshipchina.com/api2/editaproductoption.php?key=*&option_id=*&option_name=*&related_product_id=*&image_id=* |
Request parameter |
key (Required)
option_id (Required)
option_name (Optional, fill only when you need to change it)
related_product_id (Optional, 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.)
image_id (optional, The ID of cover image for this product, if fill it, option will be shown as an image, if not fill it, option will be shown as a text name)
|
Success return example | {"status":"200"} |
Fail return example |
{"status":500} -- Unknown error {"status":501} -- API key is not correct {"status":505} -- Miss required parameter {"status":533} -- The related_product_id is repeated for this product {"status":534} -- The related_product_id is not exist or not in selling status |
URL | https://www.dshipchina.com/api2/deleteaproductoption.php |
Request example | https://www.dshipchina.com/api2/deleteaproductoption.php?key=*&option_id=* |
Request parameter |
key (Required)
option_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/api2/getproductflow.php |
Request example | https://www.dshipchina.com/api2/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/api3/getaproduct.php |
Request example | https://www.dshipchina.com/api3/getaproduct.php?key=db0d4c3acf6fb3a904bebdfc8e35fccf&product_id=2 |
Request parameter |
key (Required)
product_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 |
image URL is not a full url, the Full url is "https://user.dshipchina.com/sell/" + "img2/0/1/2/15308542730.jpg"(data.url)
for example, like https://user.dshipchina.com/sell/img2/0/1/2/15308542730.jpg 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/api3/getsellerproducts.php |
Request example | https://www.dshipchina.com/api3/getsellerproducts.php?key=db0d4c3acf6fb3a904bebdfc8e35fccf&seller_id=1 |
Request parameter |
key (Required)
seller_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 |
image URL is not a full url, the Full url is "https://user.dshipchina.com/sell/" + "img2/0/1/2/15308542730.jpg"(data.url)
for example, like https://user.dshipchina.com/sell/img2/0/1/2/15308542730.jpg 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/api3/getanorder.php |
Request example | https://www.dshipchina.com/api3/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/api3/getorders.php |
Request example | https://www.dshipchina.com/api3/getorders.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 |
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/api3/createorder.php |
Request example | https://www.dshipchina.com/api3/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)
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/api3/markreceived.php |
Request example | https://www.dshipchina.com/api3/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 |
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. |
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 |
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 |