Banggood Affiliate Data API
Banggood Affiliate Data API
Update Note
Introduction
Get Access Token
Request Address
Request Parameters
Signature description
Return Value
Object
Return Data Example
Errors
400 (Bad Request)
401 (Unauthorized)
403 (Forbidden)
Get Coupou List
Request Address
Request Parameters
Return Value
Object
coupon object
Return Data Example
Errors
400 (Bad Request)
401 (Unauthorized)
403 (Forbidden)
Get Coupon Detail
Request Address
Request Parameters
Return Value
Object
product object
Return Data Example
Errors
400 (Bad Request)
401 (Unauthorized)
403 (Forbidden)
Get Product Category
Request Address
Request Parameters
Return Value
Object
category object
Return Data Example
Errors
400 (Bad Request)
401 (Unauthorized)
403 (Forbidden)
Get Product List
Request Address
Request Parameters
Return Value
Object
updated_at note
2020-02-20 Coupon.list API: Modify the category_id parameter as optional
Attribute Type Default Required Description
api_key string Yes
The Api Key. It is unique credential of
the affiliate. You can obtain it by contact
us.
noncestr string Yes
A random string, which is set and
passed by affiliate to enhance security,
which must be not greater than 32
characters.
The timestamp generated by affiliate
user, which is the number of seconds
elapsed from January 1, 1970 at
product object
product object
Return Data Example
Get Product Detail
Request Address
Request Parameters
Return Value
Object
Return Data Example
Common Error
400 (Bad Request)
401 (Unauthorized)
403 (Forbidden)
Update Note
Introduction
The Bangggood Affiliate data API allows affiliate user to build their own programs using affilaite
data.
Get Access Token
Request Address
GET https://affapi.banggood.com/getAccessToken
Request Parameters
Attribute Type Default Required Description
timestamp string Yes
p J y
00:00:00 to the current time and needs
to be converted into a string. This
parameter is passed after generated by
the affiliate, and its value must be
dynamically generated for each addition
request. Duplicate values may cause
claim failure.
signature string Yes
A signature. The signs parameters in the
API list as required using md5. See
below for specific signature methods.
This parameter is passed by the affiliate
according to the signature rules.
Attribute Type Description
access_token string The obtained credential.
expires_in number
The time when the credential expires, in seconds. Its value is
within 7,200 seconds.
code number Result code, 200 is successful, others are failed
msg string Error message
Signature description
- Sort the string values of api_key, api_secret, noncestr, timestamp in lexicographical order.
- Join the strings of the parameters into a string and hash the string with md5 to generate
signature.
For example. If api_key=EZrwQGmWOOjxIfBV, api_secret=yrTdFSKftSmxRmAZQbkHMnJLLfvEXlWI,
nonce_str=5K8264ILTKCH16CQ2502SI8ZNMTM67VS, timestamp= 1577169825, then
signature=md5(‘api_key=EZrwQGmWOOjxIfBV&api_secret=yrTdFSKftSmxRmAZQbkHMnJLLfvEXlW
I&noncestr=5K8264ILTKCH16CQ2502SI8ZNMTM67VS×tamp=1577169825’)=c0a217e73345b
ccebc45f2c18714a831.
Return Value
Object
JSON data package that is returned
Return Data Example
Attribute Type Default Required Description
category_id string No Identifier of category
currency string USD No
Code of the currency symbol. use for
fields relating to money.
lang string en-GB No
Code of the language symbol. Use for
fields existing multiply languages. For
example product_name.
Errors
400 (Bad Request) - Invalid HTTP Method
- Missing required Parameters
401 (Unauthorized) - API key is invalid
- API key is expired
- Signature is invalid
403 (Forbidden) - Quota exceeded
Get Coupou List
Request Address
GET https://affapi.banggood.com/coupon/list
Request Parameters
To access the API, The request need an access-token to be passed in the request header.
access-token: 7d83c1601e45168eb8f5dc8f13aacd21
You can get the access-token using the Get request to /getAccessToken . Detail to see
getAccessToken Page.
{
“code”: 200,
“result”: {
“access_token”: “7d83c1601e45168eb8f5dc8f13aacd21”,
“expires_in”: 7200
},
“msg”: “”
}
Attribute Type Description
page_total number Page total
coupon_list array of coupon coupon list
Attribute Type Description
coupon_name string Discount method of the coupon, such as 90% off
coupon_code string The coupon code
coupon_description string The coupon description
coupon_date_start string Effective datetime start from
coupon_date_end string The expiration datetime, It’s based on UTC+8 timezone
url string The coupon campaign url
Return Value
Object
JSON data package that is returned
coupon object
Return Data Example
Errors
{
“code”: 200,
“result”: {
“page_total”: 1,
“coupon_list”: [
{
“coupon_code”: “7e83e6”,
“coupon_name”: “%13 OFF”,
“coupon_description”: “”,
“coupon_residual”: 500,
“coupon_date_start”: “2020-01-06”,
“coupon_date_end”: “2020-01-31”,
“url”: “https://www.banggood.com/NITECORE-TIKITIKI-LE-300-Lumen-
USB-Rechargeable-LED-Keychain-Flashlight-p-1619198.html?
utm_campaign=BGTIKI&p=5E160673791674720180”
}
]
},
“msg”: “”
}
Attribute Type Default Required Description
coupon_code string Yes The coupon code
currency string USD No
Code of the currency symbol. use for
fields relating to money.
lang string en-GB No
Code of the language symbol. Use for
fields existing multiply languages. For
example product_name.
400 (Bad Request) - Invalid HTTP Method
- Missing required Parameters
- Parameter is invalid
401 (Unauthorized) - Access token was expired
403 (Forbidden) - Quota exceeded
- Don’t have right to access the API
Get Coupon Detail
Request Address
GET https://affapi.banggood.com/coupon/detail
Request Parameters
To access the API, The request need an access-token to be passed in the request header.
access-token: 7d83c1601e45168eb8f5dc8f13aacd21
You can get the access-token using the Get request to /getAccessToken . Detail to see
getAccessToken Page.
Return Value
Object
JSON data package that is returned
Attribute Type Description
coupon_id number The coupon ID
coupon_code string The coupon code
coupon_name string The coupon name
coupon_description string The coupon description
coupon_residual number
Remaining number of times (Minus sent count
with used)
coupon_date_start string Effective datetime start from
coupon_date_end string
The expiration datetime, It’s based on UTC+8
timezone
product_list
array of
product
Coupons can be used in products
Attribute Type Description
product_id number Identifier of product
product_url string Web page URL of the product
category_id number Identifier of product category.
product_name string Name of product.
product_price string Price for product(formatted with currency)
product_coupon_price string
Price for product after use coupon(formatted with
currency)
commission string Total lead commission (formatted with currency)
coupon_name string Discount method of the coupon, such as 90% off
small_image string The thumbnail image. It’s 50px wide and 50px tall.
list_grid_image string The thumbnail image. It’s 120px wide and 120px tall.
product object
Attribute Type Description
view_image string The thumbnail image. It’s 360px wide and 360px tall.
modify_date string Last updated time of the product
Return Data Example
Errors
400 (Bad Request) - Invalid HTTP Method
- Missing required Parameters
- Parameter is invalid
{
“code”: 200,
“result”: {
“coupon_id”: 273590,
“coupon_code”: “7e83e6”,
“coupon_name”: “SKU932513”,
“coupon_description”: “SKU932513”,
“coupon_residual”: 0,
“coupon_date_start”: “2019-12-04 00:00:00”,
“coupon_date_end”: “2020-02-16 00:00:00”,
“product_list”: [
{
“product_id”: 1094163,
“product_url”: “https://www.banggood.com/Suleve-M3CH2-M3-Carbon-
Steel-Allen-Bolt-4-20mm-Button-Head-Hex-Socket-Cap-Screw-Bolt-Metric-120pcs-p-
1094163.html?p=3r23fdvcdwfywef34”,
“category_id”: 6536,
“product_name”: “Suleve™ M3CH2 M3 Carbon Steel Allen Bolt 4-20mm
Button Head Hex Socket Cap Screw Bolt Metric 120pcs”,
“product_price”: “US$8.75”,
“product_coupon_price”: “US$8.14”,
“commission”: “US$0.96”,
“coupon_name”: “7% OFF”,
“small_image”:
“https://imgaz.staticbg.com/thumb/gallery/oaupload/banggood/images/FE/2E/8c07dd4
5-b894-400d-85eb-cb2bd3b15c33.jpg”,
“list_grid_image”:
“https://imgaz.staticbg.com/thumb/view/oaupload/banggood/images/FE/2E/8c07dd45-
b894-400d-85eb-cb2bd3b15c33.jpg”,
“view_image”:
“https://imgaz1.staticbg.com/thumb/list_grid/oaupload/banggood/images/FE/2E/8c07
dd45-b894-400d-85eb-cb2bd3b15c33.jpg”,
“modify_date”: “2018-09-06 14:55:14”
}
]
},
“msg”: “”
}
Attribute Type Default Required Description
lang string en-GB No
Code of the language symbol. Use
for fields existing multiply languages.
For example cat_name.
category_id number No Identifier of category
Attribute Type Description
category_id number Identifier of category
category_name string name of the category
children array of category children category list under category_id
401 (Unauthorized) - Access token was expired
403 (Forbidden) - Quota exceeded
- Don’t have right to access the API
Get Product Category
Request Address
GET https://affapi.banggood.com/product/category
Request Parameters
To access the API, The request need an access-token to be passed in the request header.
access-token: 7d83c1601e45168eb8f5dc8f13aacd21
You can get the access-token using the Get request to /getAccessToken . Detail to see
getAccessToken Page.
Return Value
Object
JSON data package that is returned
category object
The category object is same as above
Return Data Example
{
“code”: 200,
“result”: [
{
“category_id”: “2365”,
“category_name”: “Electronic Cigarette & Acc”,
“children”: [
{
“category_id”: “2367”,
“category_name”: “Electronic Cigarette”,
“children”: null
},
{
“category_id”: “3803”,
“category_name”: “Kits”,
“children”: [
{
“category_id”: “3806”,
“category_name”: “Mod Kits”,
“children”: null
},
{
“category_id”: “3808”,
“category_name”: “Cartomizer Kits”,
“children”: null
},
{
“category_id”: “3809”,
“category_name”: "E-cigar Kits ",
“children”: null
}
]
},
{
“category_id”: “3493”,
“category_name”: “Mods”,
“children”: [
{
“category_id”: “3804”,
“category_name”: “Box Mods”,
“children”: null
},
{
“category_id”: “3805”,
“category_name”: “VV&VM Mods”,
“children”: null
},
{
“category_id”: “3807”,
“category_name”: “Mechanical Mods”,
“children”: null
}
]
},
{
“category_id”: “2524”,
“category_name”: “Atomizers”,
“children”: [
{
“category_id”: “3810”,
“category_name”: “Bottom Vertical Coil
Clearomizers”,
“children”: null
},
{
“category_id”: “3811”,
“category_name”: “Bottom Coil Clearomizers”,
“children”: null
},
{
“category_id”: “3815”,
“category_name”: “Top Coil Clearomizers”,
“children”: null
},
{
“category_id”: “3814”,
“category_name”: “Dual Coil Clearomizers”,
“children”: null
},
{
“category_id”: “3812”,
“category_name”: “Airflow Adjustable Clearomizers”,
“children”: null
},
{
“category_id”: “3813”,
“category_name”: “Pyrex Glass Clearomizers”,
“children”: null
}
]
},
{
“category_id”: “2366”,
“category_name”: “E-liquid”,
“children”: null
},
{
“category_id”: “2525”,
“category_name”: “Batteries”,
“children”: null
},
{
“category_id”: “3802”,
“category_name”: "Coils ",
“children”: null
},
{
“category_id”: “2527”,
“category_name”: “Accessories”,
“children”: [
{
“category_id”: “3819”,
“category_name”: “chargers”,
Errors
400 (Bad Request) - Invalid HTTP Method
- Missing required Parameters
- Parameter is invalid
401 (Unauthorized) - Access token was expired
403 (Forbidden) - Quota exceeded
- Don’t have right to access the API
Get Product List
Request Address
GET https://affapi.banggood.com/product/list
“children”: null
},
{
“category_id”: “3818”,
“category_name”: "Bottles ",
“children”: null
},
{
“category_id”: “3817”,
“category_name”: "Tools ",
“children”: null
}
]
},
{
“category_id”: “3073”,
“category_name”: “Drip Tips”,
“children”: null
},
{
“category_id”: “3801”,
“category_name”: “Other E-cigarettes”,
“children”: null
}
]
}
],
“msg”: “”
}
Attribute Type Default Required Description
lang string en-GB No
Code of the language symbol. Use
for fields existing multiply languages.
For example cat_name.
category_id number No Identifier of category
currency string USD No
Code of the currency symbol. use for
fields relating to money.
Attribute Type Description
page_total number Page total
product_list array of product product list
Attribute Type Description
product_id number Identifier of product
product_url string Web page URL of the product
category_id number Identifier of product category.
product_name string Name of product.
product_price string Price for product(formatted with currency)
product_coupon_price string
Price for product after use coupon(formatted with
currency)
commission string Total lead commission (formatted with currency)
coupon_name string Discount method of the coupon, such as 90% off
Request Parameters
To access the API, The request need an access-token to be passed in the request header.
access-token: 7d83c1601e45168eb8f5dc8f13aacd21
You can get the access-token using the Get request to /getAccessToken . Detail to see
getAccessToken Page.
Return Value
Object
JSON data package that is returned
product object
product object
Attribute Type Description
coupon_code string The coupon code
small_image string The thumbnail image. It’s 50px wide and 50px tall.
list_grid_image string The thumbnail image. It’s 120px wide and 120px tall.
view_image string The thumbnail image. It’s 360px wide and 360px tall.
modify_date string Last updated time of the product
Return Data Example
{
“code”: 200,
“result”: {
“page_total”: 10,
“product_list”: [
{
“product_id”: 8255,
“product_url”: “https://www.banggood.com/Wholesale-Nail-Art-
Stainless-Steel-Cuticle-Cutter-Nippers-Clipper-p-8255.html?
p=5E160673791674720180”,
“category_id”: 1367,
“product_name”: “Nail Art Stainless Steel Cuticle Cutter Nippers
Clipper”,
“product_price”: 7.56,
“product_coupon_price”: 7.56,
“commission”: 1.51,
“coupon_name”: “”,
“coupon_code”: “”,
“small_image”:
“https://imgaz2.staticbg.com/thumb/gallery/upload/beauty/SKU005967.jpg”,
“list_grid_image”:
“https://imgaz2.staticbg.com/thumb/view/upload/beauty/SKU005967.jpg”,
“view_image”:
“https://imgaz3.staticbg.com/thumb/list_grid/upload/beauty/SKU005967.jpg”,
“modify_date”: “2018-09-18 08:58:36”
},
{
“product_id”: 9125,
“category_id”: 5333,
“product_name”: "BT-168 Universal Battery Tester AA AAA C D 9V
Button Checker ",
“product_price”: 2.94,
“product_coupon_price”: 2.94,
“commission”: 0.32,
“coupon_name”: “”,
“coupon_code”: “”,
“small_image”:
“https://imgaz3.staticbg.com/thumb/gallery/oaupload/banggood/images/BC/63/441eb8
28-79c6-4b5e-a44d-1f1bddd5c15b.jpg”,
“list_grid_image”:
“https://imgaz.staticbg.com/thumb/view/oaupload/banggood/images/BC/63/441eb828-
79c6-4b5e-a44d-1f1bddd5c15b.jpg”,
Attribute Type Default Required Description
product_id string Yes Identifier of product
currency string USD No
Code of the currency symbol. use for
fields relating to money.
lang string en-GB No
Code of the language symbol. Use for
fields existing multiply languages. For
example product_name.
Get Product Detail
Request Address
GET https://affapi.banggood.com/product/detail
Request Parameters
To access the API, The request need an access-token to be passed in the request header.
access-token: 7d83c1601e45168eb8f5dc8f13aacd21
“view_image”:
“https://imgaz.staticbg.com/thumb/list_grid/oaupload/banggood/images/BC/63/441eb
828-79c6-4b5e-a44d-1f1bddd5c15b.jpg”,
“modify_date”: “2018-09-25 06:49:57”
},
{
“product_id”: 16666,
“category_id”: 1327,
“product_name”: “500pcs Clear French Acrylic False 3D nail Tips
Nail Art”,
“product_price”: 9.32,
“product_coupon_price”: 9.32,
“commission”: 1.86,
“coupon_name”: “”,
“coupon_code”: “”,
“small_image”:
“https://imgaz1.staticbg.com/thumb/gallery/oaupload/banggood/images/42/3F/b30159
99-06a6-4688-b326-990d50caf327.jpg”,
“list_grid_image”:
“https://imgaz2.staticbg.com/thumb/view/oaupload/banggood/images/42/3F/b3015999-
06a6-4688-b326-990d50caf327.jpg”,
“view_image”:
“https://imgaz3.staticbg.com/thumb/list_grid/oaupload/banggood/images/42/3F/b301
5999-06a6-4688-b326-990d50caf327.jpg”,
“modify_date”: “2018-09-22 16:45:59”
}
…
]
}
}
Attribute Type Description
product_id number Identifier of product
product_url string Web page URL of the product
category_id number Identifier of product category.
product_name string Name of product.
product_price string Price for product(formatted with currency)
product_coupon_price string
Price for product after use coupon(formatted with
currency)
commission string Total lead commission (formatted with currency)
coupon_code string The coupon code
coupon_name string Discount method of the coupon, such as 90% off
small_image string The thumbnail image. It’s 50px wide and 50px tall.
list_grid_image string The thumbnail image. It’s 120px wide and 120px tall.
view_image string The thumbnail image. It’s 360px wide and 360px tall.
modify_date string Last updated time of the product
You can get the access-token using the Get request to /getAccessToken . Detail to see
getAccessToken Page.
Return Value
Object
JSON data package that is returned
Return Data Example
{
“code”: 200,
“result”: {
“product_id”: 1094163,
“category_id”: 6536,
“product_url”: “https://www.banggood.com/Suleve-M3CH2-M3-Carbon-Steel-
Allen-Bolt-4-20mm-Button-Head-Hex-Socket-Cap-Screw-Bolt-Metric-120pcs-p-
1094163.html?p=3r23fdvcdwfywef34”,
“product_name”: “Suleve™ M3CH2 M3 Carbon Steel Allen Bolt 4-20mm Button
Head Hex Socket Cap Screw Bolt Metric 120pcs”,
“product_price”: “₱468.99”,
“product_coupon_price”: “₱415.39”,
“commission”: “₱51.46”,
“coupon_name”: “$1 OFF”,
Common Error
400 (Bad Request) - Invalid HTTP Method
- Missing required Parameters
- Parameter is invalid
401 (Unauthorized) - Access token was expired
403 (Forbidden) - Quota exceeded
- Don’t have right to access the API