# 商品模块
# 1 商品
# 1.1 类目(GET)
获取cj商品类目
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/getCategory
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/product/getCategory' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
# Return
success
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"categoryFirstName": "Computer & Office",
"categoryFirstList": [
{
"categorySecondName": "Office Electronics",
"categorySecondList": [
{
"categoryId": "2252588B-72E3-4397-8C92-7D9967161084",
"categoryName": "Office & School Supplies"
},
]...
}
]
}
],
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
categoryFirstName | 一级目录名称 | string | 200 | |
categoryFirstList | list | string | 200 | |
categorySecondName | 二级目录名称 | string | 200 | |
categorySecondList | list | string | 200 | |
categoryId | 三级类目id | string | 200 | |
categoryName | 三级类目名称 | string | 200 |
error
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
code | 错误码 | int | 20 | 返回错误码标准表 |
result | 是否正常返回 | boolean | 1 | |
message | 返回信息 | string | 200 | |
data | Object | 业务数据 | ||
requestId | 请求Id | string | 48 | 用于日志查询错误 |
# 1.2 商品列表(GET)
获取所有 CJ 线上有效商品,支持,条件查询。
注:最大每页返回 100条数据
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/list
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/product/list' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
---|---|---|---|---|---|
pageNum | 页数 | int | 否 | 20 | 默认 1 |
pageSize | 每页返回多少条 | int | 否 | 20 | 默认 20 |
categoryId | 种类ID | string | 否 | 200 | 查询条件 |
pid | 商品 id | string | 否 | 200 | |
productSku | 商品SKU | string | 否 | 200 | |
productType | 商品类型 | string | 否 | 15 | ORDINARY_PRODUCT=普通商品 SUPPLIER_PRODUCT=供应商商品 |
productName | 商品名称 | string | 否 | 100 | |
productNameEn | 商品名称英文 | string | 否 | 100 | |
createTimeFrom | 开始创建时间 | Date | 否 | 格式: yyyy-MM-dd hh:mm:ss | |
createTimeTo | 结束创建时间 | Date | 否 | 格式: yyyy-MM-dd hh:mm:ss | |
minPrice | 最低价格 | number | 否 | 格式: 1.0 | |
maxPrice | 最高价格 | number | 否 | 格式: 2.0 | |
countryCode | 商品所在发货国家 | string | 否 | 格式: CN |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"pageNum": 1,
"pageSize": 20,
"total": 1,
"list": [
{
"pid": "04A22450-67F0-4617-A132-E7AE7F8963B0",
"productName": "[\"猫耳朵卫衣\",\"定制卫衣\",\"个性化定制\"]",
"productNameEn": "Personalized Belly-baring Cat Ear Hoody Coat",
"productSku": "CJNSSYWY01847",
"bigImage": "https://cc-west-usa.oss-us-west-1.aliyuncs.com/20210129/2167381084610.png",
"productWeight": 0,
"productType": null,
"productUnit": "unit(s)",
"sellPrice": 11.85,
"categoryId": "5E656DFB-9BAE-44DD-A755-40AFA2E0E686",
"categoryName": "Women's Clothing / Tops & Sets / Hoodies & Sweatshirts",
"sourceFrom": 0,
"remark": "",
"createTime": null
}
]
},
"requestId": "f95cd31d-3907-47ce-ac1a-dfdee4315960"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
pageNum | 当前页数 | int | 20 | |
pageSize | 每页返回多少条 | int | 20 | |
total | 总条数 | int | 20 | |
list | List | |||
pid | 商品 Id | string | 200 | |
productName | 商品名称 | string | 20 | |
productNameEn | 商品名称(英文) | string | 200 | |
productSku | 商品SKU | string | 200 | |
bigImage | 商品图像 | string | 200 | |
productWeight | 商品重量 | int | 200 | 单位: g |
productType | 商品类型 | byte | 200 | |
productUnit | 商品单位 | string | 48 | |
isVideo | 是否包含商品视频 | string | 200 | |
saleStatus | 商品上架状态 | int | 20 | |
listedNum | 商品刊登数量 | int | 200 | |
supplierName | 供应商名称 | string | 200 | |
supplierId | 供应商id | string | 200 | |
categoryId | 种类id | string | 200 | |
categoryName | 种类名称 | string | 200 | |
sourceFrom | 来源 | byte | ||
remark | 备注 | string | 200 | |
addMarkStatus | 是否包邮 | int | 1 | |
createTime | 创建时间 | string | 200 |
商品类型 productType
商品类型 | 类型意义 | 备注 |
---|---|---|
ORDINARY_PRODUCT | 普通商品 | |
SERVICE_PRODUCT | 服务商品 | |
PACKAGING_PRODUCT | 包装商品 | |
SUPPLIER_PRODUCT | 供应商商品 | |
SUPPLIER_SHIPPED_PRODUCT | 供应商自发货商品 |
商品状态 productStatus
商品状态值 | 类型意义 |
---|---|
3 | 审核通过 |
5 | 下架 |
0 | 已删除 |
1 | 待提交 |
6 | 待审核 |
2 | 待上架 |
4 | 审核失败 |
error
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
code | 错误码 | int | 20 | 返回错误码标准表 |
result | 是否正常返回 | boolean | 1 | |
message | 返回信息 | string | 200 | |
data | Object | 业务数据 | ||
requestId | 请求Id | string | 48 | 用于日志查询错误 |
# 1.3 商品详情(GET)
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/query
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/product/query?pid=000B9312-456A-4D31-94BD-B083E2A198E8' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
---|---|---|---|---|---|
pid | 商品 id | string | 二选一 | 200 | 查询条件 |
productSku | 商品 SKU | string | 二选一 | 200 | 查询条件 |
variantSku | 变体 SKU | string | 二选一 | 200 | 查询条件 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"pid": "000B9312-456A-4D31-94BD-B083E2A198E8",
"productName": "[\"攀爬车 拖斗车 \",\"攀爬车 \",\"拖斗车 \"]",
"productNameEn": "Small trailer model",
"productSku": "CJJJJTJT05843",
"bigImage": "https://cc-west-usa.oss-us-west-1.aliyuncs.com/2054/1672872416690.jpg",
"productWeight": "1500.0",
"productUnit": "unit(s)",
"productType": "ORDINARY_PRODUCT",
"categoryId": "87CF251F-8D11-4DE0-A154-9694D9858EB3",
"categoryName": "Home & Garden, Furniture / Home Storage / Home Office Storage",
"entryCode": "8712008900",
"entryName": "模型",
"entryNameEn": "model",
"materialName": "[\"\",\"金属\"]",
"materialNameEn": "[\"\",\"metal\"]",
"materialKey": "[\"METAL\"]",
"packingWeight": "1580.0",
"packingName": "[\"\",\"塑料袋\"]",
"packingNameEn": "[\"\",\"plastic_bag\"]",
"packingKey": "[\"PLASTIC_BAG\"]",
"productKey": "[\"颜色\"]",
"productKeyEn": "Color",
"sellPrice": 58.09,
"productVideo": "",
"status": 1,
"productSugSellPrice": 58.09,
"variatListQuantity": 10,
"supplierName": "",
"supplierId": ""
"sourceFrom": 1,
"description": "....",
"variants": [
{
"vid": "D4057F56-3F09-4541-8461-9D76D014846D",
"pid": "000B9312-456A-4D31-94BD-B083E2A198E8",
"variantName": null,
"variantNameEn": "Small trailer model Black",
"variantSku": "CJJJJTJT05843-Black",
"image": ""
"variantUnit": null,
"variantProperty": null,
"variantKey": "Black",
"variantLength": 300,
"variantWidth": 200,
"variantHeight": 100,
"variantVolume": 6000000,
"variantWeight": 1580.00,
"variantSellPrice": 58.09,
"variantSugSellPrice": 58.09,
"createTime": "2019-12-31T11:14:12.000+00:00"
}...
],
"createrTime": "2019-12-24T01:06:37+08:00"
},
"requestId": "13631757-39b5-496f-bcd0-5fa192d6fa24"
}
product
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
pid | 商品 Id | string | 200 | |
productName | 商品名称 | string | 20 | |
productNameEn | 商品名称(英文) | string | 200 | |
productSku | 商品SKU | string | 200 | |
productImage | 商品图像 | string | 200 | |
productWeight | 商品重量 | int | 200 | 单位: g |
productType | 商品类型 | byte | 200 | |
productUnit | 商品单位 | string | 48 | |
categoryId | 种类id | string | 200 | |
categoryName | 种类名称 | string | 200 | |
entryCode | 海关代码 | string | 200 | |
entryName | 海关名称 | string | 200 | |
entryNameEn | 海关名称(英文) | string | 200 | |
materialName | 材料名称 | string | 200 | |
materialNameEn | 材料名称(英文) | string | 200 | |
materialKey | 材料属性 | string | 200 | |
packingWeight | 包装重量 | int | 200 | 单位: g,前端展示使用 |
packingName | 包装名称 | string | 200 | |
packingNameEn | 包装名称(英文) | string | 200 | |
packingKey | 包装属性 | string | 200 | |
productKey | 商品属性 | string | 200 | |
productKeyEn | 商品属性(英文) | string | 200 | |
productVideo | 商品视频 | string | 200 | |
status | 商品上架状态 | String | 20 | |
suggestSellPrice | 建议零售价 | String | 200 | unit: $ (USD) |
listedNum | 刊登数量 | int | 200 | |
supplierName | 供应商名称 | string | 200 | |
supplierId | 供应商id | string | 200 | |
sourceFrom | 来源 | byte | ||
description | 详情 | string | 2000 | |
addMarkStatus | 是否包邮 | boolean | 1 | |
createTime | 创建时间 | string | 200 |
variant
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
vid | 变体Id | string | 200 | |
pid | 商品名称 | string | 20 | |
variantName | 变体名称 | string | 200 | |
variantNameEn | 变体名称(英文) | string | 200 | |
variantSku | 变体SKU | string | 200 | |
variantImage | 变体图片 | string | 200 | |
variantStandard | 变体规格 | string | 200 | |
variantUnit | 变体单位 | string | 200 | |
variantProperty | 种类类型 | string | 200 | |
variantKey | 种类关键字 | string | 200 | |
variantLength | 变体长度 | int | 200 | 单位: cm |
variantWidth | 变体宽度 | int | 200 | 单位: cm |
variantHeight | 变体高度 | int | 200 | 单位: cm |
variantVolume | 变体体积 | int | 200 | 单位: cm3 |
variantWeight | 变体重量 | double | 200 | 单位: g |
variantSellPrice | 变体售价 | double | 200 | unit: $ (USD) |
variantSugSellPrice | 变体建议零售价 | double | 200 | unit: $ (USD) |
createTime | 创建时间 | string | 200 |
商品类型
商品类型 | 类型意义 | 备注 |
---|---|---|
ORDINARY_PRODUCT | 普通商品 | |
SERVICE_PRODUCT | 服务商品 | |
PACKAGING_PRODUCT | 包装商品 | |
SUPPLIER_PRODUCT | 供应商商品 | |
SUPPLIER_SHIPPED_PRODUCT | 供应商自发货商品 |
商品状态
商品状态值 | 类型意义 |
---|---|
0 | 已删除 |
1 | 待提交 |
2 | 待上架 |
3 | 审核通过 |
4 | 审核失败 |
5 | 下架 |
6 | 待审核 |
error
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
code | 错误码 | int | 20 | 返回错误码标准表 |
result | 是否正常返回 | boolean | 1 | |
message | 返回信息 | string | 200 | |
data | 接口数据返回 | |||
requestId | 请求Id | string | 48 | 用于日志查询错误 |
# 2 变体
# 2.1 查询所有变体(GET)
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/variant/query
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/product/variant/query?pid=00006BC5-E1F5-4C65-BE2B-3FE0956DA21C' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
---|---|---|---|---|---|
pid | 商品 id | string | 二选一 | 200 | 查询条件 |
productSku | 商品 SKU | string | 二选一 | 200 | 查询条件 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"vid": "1D72A20A-D113-4FAB-B4BA-6FE1A6A14A3A",
"pid": "77501FB4-7146-452E-9889-CDF41697E5CF",
"variantName": null,
"variantNameEn": "Wwerwieurieowursdklfjskldjfklsdjfksljfklsdjfkldsjfksdjfksljfksdlfsfdfgf XS",
"variantSku": "CJJSBGBG01517-XS",
"variantImage": "",
"variantStandard": "long=5,width=5,height=5",
"variantUnit": null,
"variantProperty": null,
"variantKey": "[\"XS\"]",
"variantLength": 5,
"variantWidth": 5,
"variantHeight": 5,
"variantVolume": 27,
"variantWeight": 3.00,
"variantSellPrice": 3.00,
"variantSugSellPrice": 3.00,
"createTime": null
}
],
"requestId": "00765963-35d0-4a6a-b5cf-aa6731793b10"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
vid | 商品 Id | string | 200 | |
pid | 商品名称 | string | 20 | |
variantName | 变体名称 | string | 200 | |
variantNameEn | 变体名称(英文) | string | 200 | |
variantSku | 变体SKU | string | 200 | |
variantImage | 变体图片 | string | 200 | |
variantStandard | 变体规格 | string | 200 | |
variantUnit | 变体单位 | string | 200 | |
variantProperty | 种类类型 | string | 200 | |
variantKey | 种类关键字 | string | 200 | |
variantLength | 变体长度 | int | 200 | 单位: cm |
variantWidth | 变体宽度 | int | 200 | 单位: cm |
variantHeight | 变体高度 | int | 200 | 单位: cm |
variantVolume | 变体体积 | int | 200 | 单位: cm3 |
variantWeight | 变体重量 | double | 200 | 单位: g |
variantSellPrice | 变体售价 | double | 200 | unit: $ (USD) |
variantSugSellPrice | 变体建议零售价 | double | 200 | unit: $ (USD) |
createTime | 创建时间 | string | 200 |
error
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
code | 错误码 | int | 20 | 返回错误码标准表 |
result | 是否正常返回 | boolean | 1 | |
message | 返回信息 | string | 200 | |
data | 接口数据返回 | |||
requestId | 请求Id | string | 48 | 用于日志查询错误 |
# 2.2 变体ID查询(GET)
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/variant/queryByVid
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/product/variant/queryByVid?vid=1371342252697325568' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
---|---|---|---|---|---|
vid | 变体 id | string | 是 | 200 | 查询条件 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"vid": "1371342252697325568",
"pid": "00006BC5-E1F5-4C65-BE2B-3FE0956DA21C",
"variantName": null,
"variantNameEn": "a-Baby pacifier chain test1 Grey",
"variantSku": "CJJSBGDY00002-Grey",
"variantImage": "",
"variantUnit": null,
"variantProperty": "[]",
"variantKey": "Grey",
"variantLength": 3,
"variantWidth": 3,
"variantHeight": 3,
"variantVolume": 27,
"variantWeight": 3.00,
"variantSellPrice": 3.00,
"createTime": "2021-03-15T14:07:26.000+00:00"
},
"requestId": "9b86a5e2-40c3-492c-92b2-4634fa4c4a21"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
vid | 商品 Id | string | 200 | |
pid | 商品名称 | string | 20 | |
variantName | 变体名称 | string | 200 | |
variantNameEn | 变体名称(英文) | string | 200 | |
variantSku | 变体SKU | string | 200 | |
variantImage | 变体图片 | string | 200 | |
variantStandard | 变体规格 | string | 200 | |
variantUnit | 变体单位 | string | 200 | |
variantProperty | 种类类型 | string | 200 | |
variantKey | 种类关键字 | string | 200 | |
variantLength | 变体长度 | int | 200 | 单位: cm |
variantWidth | 变体宽度 | int | 200 | 单位: cm |
variantHeight | 变体高度 | int | 200 | 单位: cm |
variantVolume | 变体体积 | int | 200 | 单位: cm3 |
variantWeight | 变体重量 | double | 200 | 单位: g |
variantSellPrice | 变体售价 | double | 200 | unit: $ (USD) |
variantSugSellPrice | 变体建议售价 | double | 200 | unit: $ (USD) |
createTime | 创建时间 | string | 200 |
error
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
code | 错误码 | int | 20 | 返回错误码标准表 |
result | 是否正常返回 | boolean | 1 | |
message | 返回信息 | string | 200 | |
data | 接口数据返回 | |||
requestId | 请求Id | string | 48 | 用于日志查询错误 |
# 3 库存
# 3.1 查询库存(GET)
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/stock/queryByVid?vid=7874B45D-E971-4DC8-8F59-40530B0F6B77
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/product/stock/queryByVid?vid=7874B45D-E971-4DC8-8F59-40530B0F6B77' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
---|---|---|---|---|---|
vid | 变体 id | string | 是 | 200 | 查询条件 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"vid": "7874B45D-E971-4DC8-8F59-40530B0F6B77",
"areaId": "1",
"areaEn": "China Warehouse",
"countryCode": "CN",
"storageNum": 10877
}...
],
"requestId": "bcde45ac-da31-4fc7-a05e-e3b23a1e6694"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
vid | 变体 Id | string | 200 | |
areaId | 面积 Id | bigint | 20 | |
areaEn | 仓库名称 | string | 200 | |
countryCode | 国家(英文) | string | 200 | |
storageNum | 库存数量 | string | 200 |
error
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
code | 错误码 | int | 20 | 返回错误码标准表 |
result | 是否正常返回 | boolean | 1 | |
message | 返回信息 | string | 200 | |
data | 接口数据返回 | |||
requestId | 请求Id | string | 48 | 用于日志查询错误 |
# 4 评论
# 4.1 查询商品评论(GET)
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/comments
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/product/comments?pid=7874B45D-E971-4DC8-8F59-40530B0F6B77' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
---|---|---|---|---|---|
pid | 商品 id | string | 是 | 200 | |
score | 评分 | int | 否 | 20 | |
pageNum | 页码 | int | 否 | 20 | 默认1 |
pageSize | 每页纪录数 | int | 否 | 20 | 默认20 |
# 返回
success
{
"success": true,
"code": 0,
"message": null,
"data": {
"pageNum": "1",
"pageSize": "1",
"total": "285",
"list": [
{
"commentId": 1536993287524069376,
"pid": "1534092419615174656",
"comment": "excelente estado, llegó en una semana, cumple con lo descrito.\nBuena calidad de audio.",
"commentDate": "2022-06-13T00:00:00+08:00",
"commentUser": "F***o",
"score": "5",
"commentUrls": [
"https://cc-west-usa.oss-us-west-1.aliyuncs.com/comment/additional/0001/image/2022-06-15/1126211e-ca15-45ed-95f2-880567ebba37.jpg",
"https://cc-west-usa.oss-us-west-1.aliyuncs.com/comment/additional/0001/image/2022-06-15/291ab894-068f-4f4e-b01f-57df72902f58.jpg"
],
"countryCode": "MX",
"flagIconUrl": "https://cc-west-usa.oss-us-west-1.aliyuncs.com/national-flags/phone/US.png"
}
],
"requestId": "bcde45ac-da31-4fc7-a05e-e3b23a1e6694"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
commentId | 商品评论ID | int | 20 | |
pid | 商品ID | string | 20 | |
comment | 商品评论 | string | 200 | |
commentDate | 商品评论时间 | String | 50 | |
commentUser | 商品评论人 | string | 30 | |
score | 商品评论分数 | int | 2 | 长度需要确认一下 |
commentUrls | 商品评论URL | array | ||
countryCode | 商品评论国家 | string | 10 | |
flagIconUrl | 用户国家国旗图标 | string | 200 |
error
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
code | 错误码 | int | 20 | 返回错误码标准表 |
result | 是否正常返回 | boolean | 1 | |
message | 返回信息 | string | 200 | |
data | Object | 接口数据返回 | ||
requestId | 请求Id | string | 48 | 用于日志查询错误 |
# 3 搜品
# 3.1 创建搜品(POST)
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/sourcing/create
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/product/sourcing/create' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
--header 'Content-Type: application/json' \
--data-raw '{
"thirdProductId": "",
"thirdVariantId": "",
"thirdProductSku": "",
"productName": "",
"productImage": "",
"productUrl": "",
"remark": "",
"price": ""
}'
参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
---|---|---|---|---|---|
thirdProductId | 商品 id | string | 否 | 200 | |
thirdVariantId | 变体 id | string | 否 | 200 | |
thirdProductSku | 商品 sku | string | 否 | 200 | |
productName | 商品名称 | string | 是 | 200 | |
productImage | 商品图片 | string | 是 | ||
productUrl | 商品链接 | string | 否 | 200 | |
remark | 备注 | string | 否 | 200 | |
price | 价格 | double | 否 | 200 | unit: $ (USD) |
# 返回
success
{
"success": true,
"code": 0,
"message": null,
"data": {
"cjSourcingId": "285",
"result":"success",
}
"requestId": "bcde45ac-da31-4fc7-a05e-e3b23a1e6694"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
cjSourcingId | 搜品任务ID | string | 50 | |
result | 搜品结果 | String | 20 | success/fail |
error
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
code | 错误码 | int | 20 | 返回错误码标准表 |
result | 是否正常返回 | boolean | 1 | |
message | 返回信息 | string | 200 | |
data | Object | 接口数据返回 | ||
requestId | 请求Id | string | 48 | 用于日志查询错误 |
# 3.2 搜品搜索(POST)
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/sourcing/query
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/product/sourcing/query' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
--header 'Content-Type: application/json' \
--data-raw '{
"sourceIds": []
}'
参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
---|---|---|---|---|---|
sourceIds | 搜品id集合 | array | 是 | 200 |
# 返回
success
{
"success": true,
"code": 0,
"message": null,
"data": {
"sourceId": "285",
"sourceNumber":"223333",
"productId": "3324343434",
"variantId":"4545456",
"shopId": "285",
"shopName":"aaaaaaa",
"sourceStatus": "5",
"sourceStatusStr":"搜品失败",
"cjProductId": "285",
"cjVariantSku":"CJ287690900",
}
"requestId": "bcde45ac-da31-4fc7-a05e-e3b23a1e6694"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
sourceId | 搜品id | string | 50 | |
sourceNumber | 搜品短码 | String | 50 | |
productId | 商品id | String | 50 | |
variantId | 变体id | String | 50 | |
shopId | 店铺id | String | 50 | |
shopName | 店铺名称 | String | 50 | |
sourceStatus | 搜品状态 | String | 10 | |
sourceStatusStr | 搜品状态 中文 | String | 200 | |
cjProductId | cj商品id | String | 50 | |
cjVariantSku | cj变体sku | String | 50 |
error
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
---|---|---|---|---|
code | 错误码 | int | 20 | 返回错误码标准表 |
result | 是否正常返回 | boolean | 1 | |
message | 返回信息 | string | 200 | |
data | Object | 接口数据返回 | ||
requestId | 请求Id | string | 48 | 用于日志查询错误 |