# 9 店铺
# 1 店铺列表
# 1.1 查询店铺列表(GET)
查询当前账号下已绑定/已创建的店铺列表。
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/getShops
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shop/getShops' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
# 请求参数
无入参
# 返回参数
success
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"id": "1424608189734850560",
"createDate": "2024-01-01 12:00:00",
"name": "MyShop",
"status": 1,
"type": "shopify",
"updateDate": "2024-06-01 12:00:00",
"individuationNum": "001",
"fulfillmentStatus": "auto",
"marketplace": "us",
"aliasName": "Alias",
"syncInventory": 1,
"syncInventoryRate": 100,
"isCb": 0,
"trackUrlTemplate": "https://example.com/track/{number}",
"emailNotification": 1,
"email": "user@example.com",
"countryCode": "US",
"storeCountry": "United States",
"platformLogoUrl": "https://example.com/logo.png",
"currencyCode": "USD",
"businessType": 1,
"deliveryProfileOpen": 1,
"haveDeliveryProfileScopes": 1,
"deliveryProfileSpecifiedShop": 1,
"deliveryProfileNewShop": 0
}
],
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
| 字段 | 字段定义 | 类型 | 长度 | 备注 |
|---|---|---|---|---|
| id | 店铺 ID | string | 50 | |
| createDate | 创建时间 | string | 30 | 示例:2023-09-19 03:27:07 |
| name | 店铺名称 | string | 200 | |
| status | 店铺状态 | int | 5 | 店铺状态:0=删除,1=启用, 2=停用, 3=授权失败, 4=自动失效, 5=转移中 |
| type | 店铺类型/平台 | string | 50 | 参考 平台列表 |
| updateDate | 更新时间 | string | 30 | |
| individuationNum | 个性化编号 | string | 50 | |
| fulfillmentStatus | 履约状态 | string | 50 | |
| marketplace | 市场 | string | 50 | |
| aliasName | 店铺别名 | string | 200 | |
| syncInventory | 是否同步库存 | int | 1 | 1/0 |
| syncInventoryRate | 库存同步比例 | int | 5 | 单位 % |
| isCb | 是否跨境店 | int | 1 | 1/0 |
| trackUrlTemplate | 物流跟踪 URL 模板 | string | 500 | |
| emailNotification | 是否邮件通知 | int | 1 | 1/0 |
| 通知邮箱 | string | 200 | ||
| countryCode | 国家代码 | string | 20 | |
| storeCountry | 国家 | string | 100 | |
| platformLogoUrl | 平台 Logo | string | 500 | |
| currencyCode | 币种 | string | 10 | |
| businessType | 业务类型 | int | 5 | |
| deliveryProfileOpen | 是否开启发货档案 | int | 1 | 1/0 |
| haveDeliveryProfileScopes | 是否拥有发货档案权限 | int | 1 | 1/0 |
| deliveryProfileSpecifiedShop | 发货档案-指定店铺标志 | int | 1 | 1/0 |
| deliveryProfileNewShop | 发货档案-新店铺标志 | int | 1 | 1/0 |
# 2 店铺商品
# 2.1 保存商品(POST)
保存店铺商品到CJ系统。
# URL
https://developers.cjdropshipping.com/api2.0/v1/store/product/saveProduct
# CURL
curl --location 'https://developers.cjdropshipping.com/api2.0/v1/store/product/saveProduct' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"id": "prod123",
"shopId": "1234567890",
"title": "示例商品",
"image": "https://example.com/image.jpg",
"description": "商品描述",
"priceMin": 10.00,
"priceMax": 20.00,
"priceCurrency": "USD"
}'
| 参数名 | 字段意思 | 字段类型 | 必填 | 长度 | 备注 |
|---|---|---|---|---|---|
| id | 店铺商品ID | string | Y | 64 | |
| shopId | 店铺ID | string | N | 64 | 不传则使用 API 账号绑定的默认店铺;见下方「指定归属店铺」 |
| title | 商品标题 | string | Y | 500 | |
| image | 商品图片URL | string | Y | 400 | |
| description | 商品描述 | string | N | 5000 | |
| priceMin | 价格最小值 | BigDecimal | N | 20 | 需配合priceCurrency |
| priceMax | 价格最大值 | BigDecimal | N | 20 | 需配合priceCurrency |
| priceCurrency | 价格币种 | string | N | 10 | 如 USD |
指定归属店铺(
shopId):一个 CJ 账号名下可以有多个 API 店铺,shopId用来指定这次把商品保存到 哪一个。不传=沿用旧行为,落到 API 账号绑定的默认店铺。 创建人(用户id)由 CJ 依据你的 API 凭证自动记录,无需也无法在请求中指定。 店铺ID用 1.1 查询店铺列表 获取,请传该接口返回的、属于你自己账号的店铺ID; 传入的店铺不存在时由店铺中心报错(Shop does not exist)。 ⚠️ 传错成别人的店铺ID时,本接口不会拦下——商品会按该店铺的归属账号入库,你在自己店铺里看不到它, 所以请务必用上面那个接口取ID,不要手工拼。
# 返回
成功
{
"code": 200,
"result": true,
"message": "success",
"data": true,
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
错误
{
"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 | 用于日志查询错误 |
# 2.2 批量保存变体(POST)
批量保存店铺商品变体。
# URL
https://developers.cjdropshipping.com/api2.0/v1/store/product/saveVariantBatch
# CURL
curl --location 'https://developers.cjdropshipping.com/api2.0/v1/store/product/saveVariantBatch' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"shopId": "1234567890",
"variants": [
{
"id": "var001",
"productId": "prod123",
"title": "红色 - XL",
"sku": "SKU-RED-XL",
"image": "https://example.com/red-xl.jpg",
"shopPrice": 15.00,
"shopPriceCurrency": "USD",
"weight": 250,
"weightUnit": "g"
}
]
}'
| 参数名 | 字段意思 | 字段类型 | 必填 | 长度 | 备注 |
|---|---|---|---|---|---|
| shopId | 店铺ID | string | N | 64 | 批次级,本次提交的所有变体同属该店铺;不传则使用 API 账号绑定的默认店铺 |
| variants | 变体列表 | Array | Y | - | |
| - id | 变体ID | string | Y | 64 | |
| - productId | 商品ID | string | Y | 64 | |
| - title | 变体标题 | string | Y | 500 | |
| - sku | 变体SKU | string | Y | 200 | |
| - image | 变体图片URL | string | Y | 500 | |
| - shopPrice | 变体价格 | BigDecimal | N | 20 | |
| - shopPriceCurrency | 价格币种 | string | N* | 10 | 价格存在则必填 |
| - weight | 重量 | BigDecimal | N | 20 | |
| - weightUnit | 重量单位 | string | N | 10 | 如 g, kg |
| - oldInventoryQuantity | 旧库存数量 | long | N | - |
shopId是批次级参数,不支持变体级:一次提交里的变体必须属于同一店铺(要写入不同店铺请分多次调用)。 取值与注意事项同 2.1 保存商品。 请确保变体与其所属商品(2.1)落在同一店铺,否则变体会因在该店铺下找不到商品而逐条返回saveSuccess: false。
# 返回
成功
{
"code": 200,
"result": true,
"message": "success",
"data": [
{
"id": "var001",
"productId": "prod123",
"saveSuccess": true,
"saveFailMessage": null
}
],
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| id | 变体ID | string | 64 | |
| productId | 商品ID | string | 64 | |
| saveSuccess | 保存结果 | boolean | 1 | |
| saveFailMessage | 失败原因 | string | 500 | 成功时为null |
错误
{
"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 | 用于日志查询错误 |
# 2.3 店铺商品分页查询(GET)
分页查询当前账号名下的店铺商品,支持按商品关联状态过滤。本接口不返回变体列表(如需变体请使用 2.4 店铺商品详情查询)。账号由 Access-Token 解析注入,仅返回当前账号自身的店铺商品。
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/product/queryPage
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shop/product/queryPage?pageNum=1&pageSize=10&relevanceStatusValues=0&relevanceStatusValues=1' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数名 | 字段意思 | 字段类型 | 必填 | 长度 | 备注 |
|---|---|---|---|---|---|
| pageNum | 页码 | int | N | - | 默认 1 |
| pageSize | 每页条数 | int | N | - | 默认 10,最大 10(一次最多查10个) |
| shopId | 店铺ID | string | N | 200 | |
| shopProductId | 店铺商品ID(精确) | string | N | 200 | |
| searchKey | 商品标题模糊匹配 | string | N | 200 | |
| relevanceStatusValues | 商品关联状态过滤集合 | Set<Integer> | N | - | 0-未关联 1-部分关联 2-已关联 3-下架关联;不传表示不过滤 |
# 返回
成功
{
"code": 200,
"result": true,
"message": "success",
"data": {
"pageNum": 1,
"pageSize": 10,
"total": 1,
"list": [
{
"shopId": "shop_1",
"shopName": "MyShop",
"shopType": "Shopify",
"platformProductId": "p_1",
"platformProductTitle": "Rose",
"platformProductImage": "https://example.com/p.jpg",
"platformProductPrices": "9.99-19.99",
"platformProductPricesCurrency": "USD",
"platformProductHandle": "rose",
"platformProductType": "Flowers",
"platformProductCategoryId": "cat_1",
"platformProductTags": "tag1,tag2",
"shopProductStatus": 1,
"relevanceStatus": 1,
"createDateTime": 1782700800000
}
]
},
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
| 返回字段 | 字段意思 | 字段类型 | 备注 |
|---|---|---|---|
| pageNum | 当前页码 | int | |
| pageSize | 每页条数 | int | |
| total | 总数 | int | |
| list[].shopId | 店铺ID | string | |
| list[].shopName | 店铺名称 | string | |
| list[].shopType | 店铺平台类型 | string | 如 Shopify |
| list[].platformProductId | 店铺商品ID | string | |
| list[].platformProductTitle | 商品标题 | string | |
| list[].platformProductImage | 商品主图 | string | |
| list[].platformProductPrices | 价格区间 | string | TEMU 不返回 |
| list[].platformProductPricesCurrency | 价格币种 | string | |
| list[].platformProductHandle | 商品句柄 | string | |
| list[].platformProductType | 商品类型 | string | |
| list[].platformProductCategoryId | 分类ID | string | |
| list[].platformProductTags | 标签 | string | |
| list[].shopProductStatus | 状态 | int | 1-上架 2-删除 3-下架 |
| list[].relevanceStatus | 关联状态 | int | 0-未关联 1-部分关联 2-已关联 3-下架关联 |
| list[].createDateTime | 创建时间 | long | 毫秒级时间戳 |
错误
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
# 2.4 店铺商品详情查询(GET)
按 shopId + platformProductIds 查询店铺商品详情,返回商品及其变体列表。shopId 与 platformProductIds 必传,platformProductIds 最多 10 个。账号由 Access-Token 解析注入,仅返回当前账号自身的店铺商品。
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/product/queryDetail
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shop/product/queryDetail?shopId=shop_1&platformProductIds=p_1&platformProductIds=p_2' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数名 | 字段意思 | 字段类型 | 必填 | 长度 | 备注 |
|---|---|---|---|---|---|
| shopId | 店铺ID | string | Y | 200 | |
| platformProductIds | 店铺商品ID集合(最多10个) | array | Y | - | 重复传参:platformProductIds=a&platformProductIds=b |
# 返回
成功(data 为商品详情数组,每个元素含变体集合 variants)
{
"code": 200,
"result": true,
"message": "success",
"data": [
{
"shopId": "shop_1",
"shopName": "MyShop",
"shopType": "Shopify",
"platformProductId": "p_1",
"platformProductTitle": "Rose",
"platformProductImage": "https://example.com/p.jpg",
"platformProductPrices": "9.99-19.99",
"platformProductPricesCurrency": "USD",
"platformProductHandle": "rose",
"platformProductType": "Flowers",
"platformProductCategoryId": "cat_1",
"platformProductTags": "tag1,tag2",
"shopProductStatus": 1,
"relevanceStatus": 1,
"createDateTime": 1782700800000,
"variants": [
{
"platformProductId": "p_1",
"platformVariantId": "v_1",
"platformVariantSku": "SKU-1",
"platformVariantTitle": "红色",
"platformVariantImage": "https://example.com/v.jpg",
"price": 9.99,
"priceUSD": 9.99,
"priceCurrency": "USD",
"grams": "250",
"weight": 250,
"weightUnit": "g",
"relevanceStatus": "2",
"inventoryItemStatus": "2",
"shopProductStatus": 1,
"createDateTime": 1782700800000
}
]
}
],
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
| 返回字段 | 字段意思 | 字段类型 | 备注 |
|---|---|---|---|
| data[].shopId | 店铺ID | string | |
| data[].shopName | 店铺名称 | string | |
| data[].shopType | 店铺平台类型 | string | 如 Shopify |
| data[].platformProductId | 店铺商品ID | string | |
| data[].platformProductTitle | 商品标题 | string | |
| data[].platformProductImage | 商品主图 | string | |
| data[].platformProductPrices | 价格区间 | string | TEMU 不返回 |
| data[].platformProductPricesCurrency | 价格币种 | string | |
| data[].platformProductHandle | 商品句柄 | string | |
| data[].platformProductType | 商品类型 | string | |
| data[].platformProductCategoryId | 分类ID | string | |
| data[].platformProductTags | 标签 | string | |
| data[].shopProductStatus | 状态 | int | 1-上架 2-删除 3-下架 |
| data[].relevanceStatus | 关联状态 | int | 0-未关联 1-部分关联 2-已关联 3-下架关联 |
| data[].createDateTime | 创建时间 | long | 毫秒级时间戳 |
| data[].variants | 变体集合 | array | 商品下的变体列表 |
| data[].variants[].platformProductId | 所属商品ID | string | |
| data[].variants[].platformVariantId | 变体ID | string | |
| data[].variants[].platformVariantSku | 变体SKU | string | |
| data[].variants[].platformVariantTitle | 变体标题 | string | |
| data[].variants[].platformVariantImage | 变体图片 | string | |
| data[].variants[].price | 价格 | BigDecimal | TEMU 不返回 |
| data[].variants[].priceUSD | 价格(美元) | BigDecimal | TEMU 不返回 |
| data[].variants[].priceCurrency | 价格币种 | string | |
| data[].variants[].grams | 重量(克) | string | |
| data[].variants[].weight | 重量 | BigDecimal | |
| data[].variants[].weightUnit | 重量单位 | string | |
| data[].variants[].relevanceStatus | 变体关联状态 | string | 0-未知 1-未关联 2-已关联 |
| data[].variants[].inventoryItemStatus | 履行服务状态 | string | 0-未使用 1-使用履行不管库存 2-使用履行及库存 3-仅用库存 |
| data[].variants[].shopProductStatus | 状态 | int | 1-上架 2-删除 3-下架 |
| data[].variants[].createDateTime | 创建时间 | long | 毫秒级时间戳 |
错误
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
# 2.5 拉取店铺商品(POST)
把店铺在销售平台上的商品拉到 CJ——与 My CJ 店铺商品页的 Specific Sync 相同。拉到后才能与 CJ 商品关联(3.2 创建商品关联)。拉取在后台执行:本接口只受理请求,进度用 2.6 查询拉取进度 查。限流:按账号等级的 QPS(每秒 1–6 次,见 访问频率限制)。
拉取会改动 CJ 侧数据(与 My CJ 按钮相同):
- CJ 侧的商品、变体信息用平台数据覆盖;
- 平台上已不存在的变体:未关联的从 CJ 删除,已关联的标记为「店铺已删除」;
- 店铺授权已失效时,店铺会被标记为授权过期,拉取被拒绝。
同一店铺同时只能有一个拉取。 拉取进行中再次发起会被拒绝,结束后再发起。
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/product/pull
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/shop/product/pull' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"shopId": "1723456789012345678",
"startTime": "2026-10-01 00:00:00",
"endTime": "2026-10-31 23:59:59"
}'
| 参数 | 含义 | 类型 | 必填 | 长度 | 说明 |
|---|---|---|---|---|---|
| shopId | 店铺 ID | string | 是 | 50 | 取自 1.1 查询店铺列表 的 id,必须是你自己的店铺 |
| productId | 平台商品 ID | string | 否 | 100 | 只拉这一个商品;不传=整店拉取(或按下面的时间范围拉) |
| startTime | 商品在平台的创建时间起点 | string | 否 | - | yyyy-MM-dd HH:mm:ss,与 My CJ 上 Specific Sync 的时间筛选口径相同。须与 endTime 一起传,且不晚于 endTime |
| endTime | 商品在平台的创建时间终点 | string | 否 | - | 同上 |
| siteCode | 站点 | string | 否 | 50 | 仅 eBay、Lazada 店铺生效,其他平台忽略。取该店铺 3.2 查询可刊登站点返回的 countryCode(eBay 为 US、UK、Germany、Australia 等站点值,不是 ISO 国家码)。不传=拉店铺注册站点 |
eBay:整店拉取每次只拉一个站点(默认注册站点,或传 siteCode)。它占用 CJ 全体用户共用的 eBay 搜索额度,当天额度用完后,整店拉取会失败,北京时间 15:00(UTC 07:00)恢复。按 productId 拉取不受影响,也不看 siteCode。商品数达到 1,000 的站点在整店拉取时会被跳过,这类商品请按 productId 拉。
# 返回
成功
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"shopId": "1723456789012345678",
"accepted": true,
"siteCode": null
},
"requestId": "2c4e6a8b-0d1f-4e3a-8c5b-7d9e1f3a5b7c"
}
| 字段 | 含义 | 类型 | 说明 |
|---|---|---|---|
| shopId | 店铺 ID | string | |
| accepted | 拉取已受理 | boolean | 成功时恒为 true |
| siteCode | 实际拉取的站点 | string | eBay 整店拉取时、以及 Lazada 传了 siteCode 时有值;其余为 null(Lazada 此时拉店铺注册站点) |
失败
| 错误码 | 含义 |
|---|---|
| 1600300 | 参数错误,如时间格式不对、startTime 晚于 endTime、siteCode 不是该店铺的站点(message 中列出可用值) |
| 其他错误码 | 店铺服务返回的码与原因,如店铺不存在或不是你的、店铺授权已失效、该店铺正在拉取中、该平台不支持拉取 |
# 2.6 查询拉取进度(GET)
返回店铺最近一次拉取的进度。本接口查到你的拉取已结束后,该结果保留 1 小时;请一直查到 status 不再是 RUNNING。在 My CJ 发起的拉取,如果 My CJ 先取走了结果,这里可能查不到(NONE)。
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/product/pullProgress
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shop/product/pullProgress?shopId=1723456789012345678' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数 | 含义 | 类型 | 必填 | 长度 | 说明 |
|---|---|---|---|---|---|
| shopId | 店铺 ID | string | 是 | 50 | 你自己的店铺 |
# 返回
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"shopId": "1723456789012345678",
"status": "FINISHED",
"total": 120,
"success": 118,
"fail": 2,
"failReason": null
},
"requestId": "2c4e6a8b-0d1f-4e3a-8c5b-7d9e1f3a5b7c"
}
| 字段 | 含义 | 类型 | 说明 |
|---|---|---|---|
| shopId | 店铺 ID | string | |
| status | 拉取状态 | string | RUNNING 进行中;FINISHED 已结束——不代表全部成功,看 success / fail;FAILED 整体失败(目前只有 Wix、Whop 店铺会报),原因见 failReason;NONE 没有进行中的拉取,1 小时内也没有结束的拉取 |
| total | 已处理的商品数 | int | 数量未知时为 null |
| success | 拉取成功的商品数 | int | |
| fail | 拉取失败的商品数 | int | |
| failReason | 整体失败的原因 | string | 仅 status 为 FAILED 时有值 |
不返回百分比:My CJ 上显示的进度百分比是估算值,不代表真实进度。
# 2.7 查询库存推送详情(POST)
查看已关联的店铺变体最近一次推送到每个店铺仓的库存——时间、数量、触发来源、结果,以及 CJ 现在应推送的库存和店铺当前库存。数据与 My CJ 关联列表的 Inventory Sync Log 相同,可用来排查某个变体的库存同步是否正常。限流:按账号等级的 QPS。
每个「变体 × 店铺仓」只保留最近一次推送,不是推送历史。支持的平台:Shopify、TikTok、TikTok US、Temu、Temu US Local、Wix、Whop,其他平台返回错误。
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/product/inventorySyncDetail
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/shop/product/inventorySyncDetail' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"shopId": "1723456789012345678",
"items": [
{"platformProductId": "8812345678901", "platformVariantIds": ["45678901234567"]}
]
}'
| 参数 | 含义 | 类型 | 必填 | 长度 | 说明 |
|---|---|---|---|---|---|
| shopId | 店铺 ID | string | 是 | - | 你自己的店铺 |
| items | 要查的店铺商品 | array | 是 | 1–5 个 | 会逐个商品到平台实时查店铺库存(每个约 3 秒),所以单次最多 5 个商品 |
| items[].platformProductId | 店铺商品 ID | string | 是 | - | 取自 3.1 查询商品关联列表 |
| items[].platformVariantIds | 店铺变体 ID | string[] | 否 | - | 不传=该商品下全部已关联变体 |
# 返回
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"shopId": "1723456789012345678",
"platformProductId": "8812345678901",
"platformVariantId": "45678901234567",
"platformVariantSku": "TSHIRT-RED-M",
"cjProductId": "2410150123456789012",
"cjVariantId": "2410150123456789013",
"cjVariantSku": "CJTX123456701AZ",
"relevanceStatus": "CONNECTED",
"canSyncInventory": true,
"publishInventory": 120,
"shopQuantity": 118,
"lastSyncQuantity": 118,
"warehouses": [
{
"shopWarehouseId": "gid://shopify/Location/123",
"shopWarehouseName": "Main warehouse",
"cjWarehouseName": "US West",
"publishInventory": 120,
"shopQuantity": 118,
"lastSyncQuantity": 118,
"lastSyncTime": 1762156800000,
"lastSyncSource": "SCHEDULED",
"lastSyncStatus": "SUCCESS",
"lastSyncFailMessage": null
}
]
}
],
"requestId": "2c4e6a8b-0d1f-4e3a-8c5b-7d9e1f3a5b7c"
}
| 字段 | 含义 | 类型 | 说明 |
|---|---|---|---|
| shopId / platformProductId / platformVariantId / platformVariantSku | 店铺变体 | string | 未关联的变体不返回 |
| cjProductId / cjVariantId / cjVariantSku | 关联的 CJ 变体 | string | |
| relevanceStatus | 关联状态 | string | CONNECTED 已关联;CONNECTED_OFF_SHELF 已关联但 CJ 商品已下架;以后可能新增取值 |
| canSyncInventory | CJ 能否为该变体同步库存 | boolean | |
| publishInventory | CJ 现在应推送的库存(各店铺仓相加) | int | |
| shopQuantity | 店铺当前库存(相加) | int | 实时到平台查;查平台失败时为 null |
| lastSyncQuantity | 最近一次推送的库存(相加) | int | |
| warehouses[].shopWarehouseId / shopWarehouseName | 店铺仓(location) | string | |
| warehouses[].cjWarehouseName | 店铺仓绑定的 CJ 仓 | string | |
| warehouses[].publishInventory / shopQuantity / lastSyncQuantity | 同上,按店铺仓 | int | |
| warehouses[].lastSyncTime | 最近一次推送时间 | long | 毫秒时间戳;没推送过为 null |
| warehouses[].lastSyncSource | 最近一次推送的触发来源 | string | SUBSCRIPTION 库存变动、SCHEDULED 定时任务、WEBHOOK 平台 webhook、MANUAL 手动设置、LISTING 刊登、OTHER |
| warehouses[].lastSyncStatus | 最近一次推送结果 | string | SUCCESS / FAILED / OTHER |
| warehouses[].lastSyncFailMessage | 推送失败原因 | string | 多为平台返回的错误信息 |
失败:返回店铺服务的错误码与原因,如店铺不存在或不是你的、平台不支持;参数错误返回 1600300。
# 3 店铺商品关联CJ商品
商品关联(Product Connection)用于将 CJ 商品/变体与店铺(平台)商品/变体绑定,绑定后下单可自动匹配 CJ 商品发货。
# 3.1 查询商品关联列表(GET)
查询当前账号下的商品关联记录,支持按店铺、店铺商品、店铺变体过滤。
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/conn/connection
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/product/conn/connection?shopId=xxx&platformProductId=yyy&page=1&pageSize=10' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
# 请求参数
| 参数名 | 字段意思 | 字段类型 | 必填 | 长度 | 备注 |
|---|---|---|---|---|---|
| shopId | 店铺Id | string | N | 40 | 不传时默认使用API类型的店铺Id,店铺列表 |
| platformProductId | 店铺商品Id | string | N | 100 | 平台侧商品Id |
| platformVariantId | 店铺变体Id | string | N | 100 | 平台侧变体Id |
| page | 当前页 | int | N | - | 默认1 |
| pageSize | 每页条数 | int | N | - | 默认10,最大100 |
# Return
success
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"total": 1,
"list": [
{
"shopId": "xxx",
"platformProductId": "yyy",
"platformVariantId": "zzz",
"cjProductId": "1424608189734850560",
"cjVariantId": "1424608152007086080",
"cjSku": "CJYD284206501AZ",
"cjShortSku": "1600012986801",
"defaultArea": 1,
"logistics": "PacketPlus",
"sourceCountryCode": "CN",
"sourceCountry": "China",
"targetCountryCode": "US",
"targetCountry": "United States"
}
]
},
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| total | 总数 | int | 20 | |
| list | 关联列表 | list | - | |
| - shopId | 店铺Id | string | 40 | |
| - platformProductId | 店铺商品Id | string | 100 | |
| - platformVariantId | 店铺变体Id | string | 100 | |
| - cjProductId | CJ商品Id | string | 50 | |
| - cjVariantId | CJ变体Id | string | 50 | |
| - cjSku | CJ变体SKU | string | 200 | 示例:CJYD284206501AZ |
| - cjShortSku | CJ短SKU | string | 200 | 示例:1600012986801 |
| - defaultArea | 默认区域 | int | 5 | |
| - logistics | 物流方式 | string | 200 | |
| - sourceCountryCode | 发货国家编号 | string | 20 | |
| - sourceCountry | 发货国家 | string | 100 | |
| - targetCountryCode | 目标国家编号 | string | 20 | |
| - targetCountry | 目标国家 | string | 100 |
# 3.2 创建商品关联(POST)
将一个 CJ 商品(及其下若干变体)与店铺商品(及其变体)建立关联关系。
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/conn/connection
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/product/conn/connection' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"shopId": "xxx",
"defaultArea": 1,
"logistics": "PacketPlus",
"cjProductId": "1424608189734850560",
"platformProductId": "yyy",
"sourceCountryCode": "CN",
"sourceCountry": "China",
"targetCountryCode": "US",
"targetCountry": "United States",
"variantList": [
{
"cjVariantId": "1424608152007086080",
"platformVariantId": "v_001"
}
]
}'
# 请求参数
| 参数名 | 字段意思 | 字段类型 | 必填 | 长度 | 备注 |
|---|---|---|---|---|---|
| shopId | 店铺Id | string | N | 50 | 不传时默认使用API类型的店铺Id,店铺列表 |
| defaultArea | 默认区域 | int | Y | 5 | |
| logistics | 物流方式 | string | Y | 200 | |
| cjProductId | CJ商品Id | string | Y | 50 | |
| platformProductId | 店铺商品Id | string | Y | 100 | |
| sourceCountryCode | 发货国家编号 | string | N | 20 | |
| sourceCountry | 发货国家 | string | N | 100 | |
| targetCountryCode | 目标国家编号 | string | N | 20 | |
| targetCountry | 目标国家 | string | N | 100 | |
| variantList | 商品变体集合 | list | Y | - | 至少一个变体 |
| - cjVariantId | CJ变体Id | string | Y | 50 | |
| - platformVariantId | 店铺变体Id | string | Y | 100 | |
| ignoreCheckInventory | 是否忽略库存校验 | int | N | 1 | 仅接受 0 或 1。不传或传 0:CJ 美仓没有可用库存的变体会被拒绝(见下方 10063)。传 1:忽略库存校验强制关联,这些变体的库存将由 CJ 美仓统一管理且可能随时变化。**生效范围:**库存校验仅对 TikTok US、TikTok US 跨境、Temu、Temu US Local 店铺生效;其余店铺类型不执行该校验,既不会返回 10063,本字段对其也不产生任何影响。 |
# Return
success
{
"code": 200,
"result": true,
"message": "Success",
"data": true,
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
存在美仓无可用库存的 CJ 变体,关联被拒绝
{
"code": 10063,
"result": false,
"message": "Connection rejected: the following CJ variant(s) have no available inventory in the CJ US warehouse: [CJLX206731702BY]. Please connect other variants, or resubmit the same request with \"ignoreCheckInventory\": 1 to connect anyway (the inventory of these variants will then be managed by CJ US warehouses and is subject to change).",
"data": false,
"requestId": "4be98337-8089-4960-8ef1-8f603058eca6"
}
注意
message 仅供阅读,措辞与排版可能随时调整且不另行通知,其中的变体标识本身也可能包含 [、] 或 ,。请勿解析 message,请按 code 分支处理。
# 3.3 解除商品关联(DELETE)
按店铺商品Id(可选变体Id)解除已建立的关联关系。
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/conn/connection
# CURL
curl --location --request DELETE 'https://developers.cjdropshipping.com/api2.0/v1/product/conn/connection?shopId=xxx&platformProductId=yyy&platformVariantId=zzz' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
# 请求参数
| 参数名 | 字段意思 | 字段类型 | 必填 | 长度 | 备注 |
|---|---|---|---|---|---|
| shopId | 店铺Id | string | N | 50 | 不传时默认使用API类型的店铺Id,店铺列表 |
| platformProductId | 店铺商品Id | string | Y | 100 | |
| platformVariantId | 店铺变体Id | string | N | 100 | 不传则解除该店铺商品下所有变体关联 |
# Return
success
{
"code": 200,
"result": true,
"message": "Success",
"data": true,
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
# 3.4 店铺商品关联日志查询(POST)
返回你的店铺商品与 CJ 商品关联 / 取消关联的历史——即 My CJ 上的关联记录。可用来查某个店铺变体是什么时候、以什么方式关联上(或断开)CJ 商品的,比如订单没匹配上商品时。每次 20 点。
按时间倒序返回。至少传一个过滤条件(没有时间范围筛选)。限流:按账号等级的 QPS(每秒 1–6 次,见 访问频率限制),超出返回 HTTP 429、错误码 1600200。
说明:
- 不是你的
shopId不会报错,只是查不到任何记录(记录始终限定在你自己的账号内)。 shopName、店铺 / CJ 商品与变体的标题和图片、platformVariantSku、cjVariantKey是查询时现取的,显示的是当前值,商品或变体已删除时为 null;operationType、operationTime、各 ID 与relevanceStatus是操作发生时记下的。- 返回空页通常表示没有匹配的记录;极少数情况下也可能是日志服务暂时不可用——如果确定应该有记录,请稍后重试。
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/conn/connectionLog/queryPage
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/product/conn/connectionLog/queryPage' \
--header 'Content-Type: application/json' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data-raw '{
"shopId": "1424608189734850560",
"platformProductId": "8123456789",
"pageNum": 1,
"pageSize": 10
}'
| 参数 | 含义 | 类型 | 必填 | 长度 | 说明 |
|---|---|---|---|---|---|
| shopId | 店铺 ID | string | 六项至少一项 | 40 | 查询店铺列表 的 id |
| platformProductId | 店铺商品 ID | string | 六项至少一项 | 100 | 店铺里的商品 ID,如 店铺商品分页查询 返回的 |
| platformVariantId | 店铺变体 ID | string | 六项至少一项 | 100 | |
| platformVariantSku | 店铺变体 SKU | string | 六项至少一项 | 200 | |
| cjProductSpu | CJ 商品 SKU(SPU) | string | 六项至少一项 | 100 | 商品详情 的 productSku。⚠ 关联类记录(manual / publish / search / auto)存的时候不带 SPU,按它只能查到解除类和 externalPush 记录;要查变体什么时候关联上的,请按 cjVariantSku 或店铺侧 ID 查 |
| cjVariantSku | CJ 变体 SKU | string | 六项至少一项 | 200 | 商品详情的 variants[].variantSku |
| pageNum | 页码 | int | 否 | 默认 1 | |
| pageSize | 每页条数 | int | 否 | 默认 10,最大 50。pageNum × pageSize 不得超过 10000 |
# 返回
成功
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"pageNum": 1,
"pageSize": 10,
"total": 1,
"list": [
{
"id": "1842000000000000301",
"operationType": "manual",
"operationTypeDesc": "Manual connection",
"operationTime": 1790850000000,
"shopId": "1424608189734850560",
"shopName": "My Store",
"platformProductId": "8123456789",
"platformProductTitle": "Cotton T-Shirt",
"platformProductImage": "https://cdn.shopify.com/s/files/xxx.jpg",
"platformVariantId": "44123456789",
"platformVariantSku": "TS-BLK-XL",
"platformVariantTitle": "Black / XL",
"platformVariantImage": "https://cdn.shopify.com/s/files/yyy.jpg",
"cjProductId": "1424608189734850561",
"cjProductSpu": "CJTS1234567",
"cjProductTitle": "Men's Cotton T-Shirt",
"cjProductImage": "https://cf.cjdropshipping.com/xxx.jpg",
"cjVariantId": "1424608189734850562",
"cjVariantSku": "CJTS1234567-Black-XL",
"cjVariantKey": "Black-XL",
"cjVariantImage": "https://cf.cjdropshipping.com/yyy.jpg",
"relevanceStatus": "connected"
}
]
},
"requestId": "9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6"
}
| 字段 | 含义 | 类型 | 说明 |
|---|---|---|---|
| id | 记录 ID | string | |
| operationType | 操作类型 | string | 见下表 |
| operationTypeDesc | 操作说明(英文) | string | |
| operationTime | 操作时间 | long | 毫秒时间戳(UTC) |
| shopId / shopName | 店铺 | string | |
| platformProductId / platformProductTitle / platformProductImage | 店铺商品 | string | |
| platformVariantId / platformVariantSku / platformVariantTitle / platformVariantImage | 店铺变体 | string | |
| cjProductId / cjProductSpu / cjProductTitle / cjProductImage | CJ 商品 | string | |
| cjVariantId / cjVariantSku / cjVariantKey / cjVariantImage | CJ 变体 | string | cjVariantId 即商品接口用的 vid |
| relevanceStatus | 本次操作时店铺变体的关联状态 | string | 关联类操作为操作后的状态,解除类操作为操作前的状态。connected 已关联 · connectedOffShelf 已关联但 CJ 商品已下架 · unconnected 未关联 · unknown 未知 |
operationType
| 取值 | 含义 |
|---|---|
| manual | 手动关联 |
| publish | 刊登到店铺时自动关联 |
| search | Sourcing Auto Connection |
| auto | 系统自动关联 |
| removeVariant | 取消变体关联 |
| removeProduct | 取消商品关联 |
| externalPush | 未带来源标识建立或恢复的关联,如对接方推送、或 CJ 自动恢复的关联 |
| other | 以后新增的类型(operationTypeDesc 为 Other),按「未知操作」处理 |
失败
{
"code": 1600300,
"result": false,
"message": "at least one of shopId, platformProductId, platformVariantId, platformVariantSku, cjProductSpu, cjVariantSku is required",
"data": null,
"requestId": "9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6"
}
| 错误码 | 含义 | 处理 |
|---|---|---|
| 1600300 | 没传任何过滤条件、字段超长、pageSize 超过 50,或 pageNum × pageSize 超过 10000 | 修正入参 |
| 1600000 | 店铺服务无法访问或返回异常 | 稍后重试;持续失败请带 requestId 联系业务员 |
| 字段 | 含义 | 类型 | 长度 | 说明 |
|---|---|---|---|---|
| code | 错误码 | int | 20 | 错误码参考 |
| result | 是否正常返回 | boolean | 1 | |
| message | 返回信息 | string | 200 | |
| data | 返回数据 | object | ||
| requestId | 请求 ID | string | 48 | 用于排查 |
# 4 包装商品关联关系
包装(packaging)关联关系能力——为 CJ 商品创建 / 查询 / 删除包装关联,并可查询变体已关联的包装明细(含剩余库存与件数阶梯,见 4.4)。调用前须先通过店铺接口获取 shopId。
相关接口在商品模块:挑选包装商品、浏览 CJ 包装商品、查询商品详情、新增 POD 定制商品这 4 个接口不涉及店铺,已归入商品模块,见 商品模块 1.8 ~ 1.11。典型用法:先在商品模块 1.8(变体维度) 查到包装变体的
SKU/vid,再回到本章 4.1 建立关联。注意 1.9 是商品维度、返回的id是 pid,不能当packVid——只有 1.8 的content[].id才是建关联要用的变体ID(1.9 的id是 pid,两者同名不同义)。
# 4.1 创建包装关联(POST)
为 CJ 商品建立包装关联关系。
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/packaging/connection/create
# CURL
curl --location 'https://developers.cjdropshipping.com/api2.0/v1/product/packaging/connection/create' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"shopId": "shop01",
"pid": "pid01",
"vid": "vid01",
"deductionType": 1,
"isUpdateConnection": 1,
"packList": [
{
"packVid": "packvid01",
"matchingType": 0,
"packingType": 1
}
]
}'
# 请求参数
| 参数名 | 字段意思 | 字段类型 | 必填 | 长度 | 备注 |
|---|---|---|---|---|---|
| shopId | 店铺ID | string | Y | 50 | 通过 店铺列表 获取 |
| pid | CJ商品ID | string | Y | 100 | |
| vid | CJ商品变体ID | string | N | 100 | |
| deductionType | 抵扣方式 | int | Y | 20 | 0: 所有商品一起抵扣, 1: 组合抵扣 |
| isUpdateConnection | 是否更新包装关系 | int | N | 20 | 0: 不更新 (暂不删除既有), 1: 更新 (先删后建)。不传则原样透传,由下游决定 |
| packList.packVid | 包装商品变体ID | string | Y | 100 | |
| packList.matchingType | 匹配类型 | int | N | 20 | 0: 按商品匹配, 1: 按订单匹配 |
| packList.packingType | 包装类型 | int | N | 20 | 1: 默认, 2: 自定义 |
# 返回
成功
{
"code": 200,
"result": true,
"message": "success",
"data": 1,
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
data:受影响条数(int)。
注意:
isUpdateConnection=1(或不传)时下游会先删既有关联再插入,重复调用会重建行(主键/创建时间变化)但不会堆积重复;重复提交安全、但不保证行ID不变。
# 4.2 查询包装关联(POST)
按变体/商品/包装SKU查询当前客户的包装关联状态。
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/packaging/connection/query
# CURL
curl --location 'https://developers.cjdropshipping.com/api2.0/v1/product/packaging/connection/query' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"vidList": ["vid01", "vid02"]
}'
# 请求参数
| 参数名 | 字段意思 | 字段类型 | 必填 | 长度 | 备注 |
|---|---|---|---|---|---|
| vidList | 变体ID集合 | List<String> | Y | 100 | 至少传1个。本接口仅支持按变体ID查询(下游只读 vidList);如需按商品ID或包装SKU查询,属其他接口能力 |
# 返回
成功
{
"code": 200,
"result": true,
"message": "success",
"data": [
{
"id": 1,
"accountId": "cust001",
"accountName": "cust",
"shopId": "shop01",
"pid": "pid01",
"vid": "vid01",
"packVid": "packvid01",
"pack": "Plastic Bag",
"packKey": "PLASTIC_BAG",
"packSku": "CJPACK001",
"packAttr": {
"name": "Gift Box",
"variantKey": "Red-XL",
"sku": "CJPACK001",
"imgUrl": "https://example.com/box.jpg",
"packKey": "PLASTIC_BAG",
"size": "10x10x5",
"weight": 0.2,
"sellPrice": "1.20"
},
"matchingType": 0,
"packingType": 1,
"customMessage": "Happy Birthday",
"customDesign": null,
"createDate": "2026-08-26 10:00:00",
"updateDate": "2026-08-26 10:00:00",
"updaterId": "cust001",
"updater": "cust",
"remark": null,
"extendParams": {
"deductionType": 1
}
}
],
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
data:包装关联列表(array)。字段含 accountId/accountName/shopId/updaterId/updater 等内部字段——如不需要请忽略,勿据此判断归属。
# 4.3 删除包装关联(POST)
按店铺+商品/变体解除已建立的包装关联。
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/packaging/connection/delete
# CURL
curl --location 'https://developers.cjdropshipping.com/api2.0/v1/product/packaging/connection/delete' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"shopId": "shop01",
"cjProductId": "pid01",
"cjVariantIds": ["vid01", "vid02"]
}'
# 请求参数
| 参数名 | 字段意思 | 字段类型 | 必填 | 长度 | 备注 |
|---|---|---|---|---|---|
| shopId | 店铺ID | string | Y | 50 | |
| cjProductId | CJ商品ID | string | N | 100 | |
| cjVariantIds | CJ变体ID集合 | Set<String> | N | 100 | 传多个一次解除 |
# 返回
成功
{
"code": 200,
"result": true,
"message": "success",
"data": 0,
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
data:固定为 0(int)。注意:下游 delPackingV2 只返回「删除操作是否成功」(success/fail),不统计实际删除条数,故无论实际删了几条、甚至删除成功,data 都是 0——请勿据此判断删除命中数,应以 result/code(是否成功)为准。
注意:删除不可撤销,请谨慎调用。
# 4.4 查询变体已关联包装列表(POST)
按店铺 + 变体查询已经关联上的包装,返回包装商品的明细(含剩余库存与按件数分档的包装数量阶梯)。
与 4.2 的区别(重要,勿混用):
- 4.2 查询包装关联 返回的是商品中心同步表里的关联记录(按变体查关联关系本身)。
- 本接口(4.4) 返回的是店铺维度的包装配置明细,除关联关系外还带
packId、店铺信息、remain(剩余库存)、qtiers(件数阶梯)等字段。需要「这个变体配了哪些包装、包装还剩多少库存」用 4.4;只需要「关联关系在不在」用 4.2。
# URL
https://developers.cjdropshipping.com/api2.0/v1/product/packaging/connection/variantConditionPackList
# CURL
curl --location 'https://developers.cjdropshipping.com/api2.0/v1/product/packaging/connection/variantConditionPackList' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"shopId": "shop01",
"vid": "vid01",
"vids": ["vid02", "vid03"]
}'
# 请求参数
| 参数名 | 字段意思 | 字段类型 | 必填 | 长度 | 备注 |
|---|---|---|---|---|---|
| shopId | 店铺ID | string | Y | 50 | 必填,不传直接返回参数错误 |
| vid | CJ变体ID | string | N | 100 | 与 vids 至少传一个,见下方注意 |
| vids | CJ变体ID集合 | List<String> | N | 100 | 与 vid 至少传一个,见下方注意 |
⚠
vid与vids必须至少传一个:两者同时为空时请求会失败(服务端异常),不会返回空列表。若只想按单个变体查,传vid即可;批量查询用vids。两者同时传时会合并查询。
# 返回
成功
{
"code": 200,
"result": true,
"message": "success",
"data": [
{
"packId": 123,
"packPid": "ppid01",
"packKey": "BOX",
"packVid": "pvid01",
"name": "Gift Box",
"variantKey": "Red-L",
"sku": "CJPACK001",
"imgUrl": "https://cc-west-usa.oss-us-west-1.aliyuncs.com/xxx.jpg",
"size": "10*5*3",
"weight": 12.5,
"sellPrice": "1.20",
"packType": 1,
"remain": 7,
"height": "3",
"long": "10",
"width": "5",
"deductionType": 0,
"shopId": "shop01",
"shopName": "MyShop",
"platform": "shopify",
"createDate": "2026-08-27 10:00:00",
"incompatiblePlatformVariantIds": [],
"qtiers": [
{ "f": 1, "t": 9999, "q": 1 }
]
}
],
"requestId": "ae543fd1-cdd7-4a61-974a-1340fea678c6"
}
# 返回字段说明
| 字段名 | 字段意思 | 字段类型 | 备注 |
|---|---|---|---|
| packId | 店铺包装记录ID | long | |
| packPid | 包装商品ID | string | |
| packKey | 包装材料 | string | |
| packVid | 包装变体ID | string | 取商品模块 1.8 返回的 content[].id(变体维度),不要传 1.9 的 id(pid) |
| name | 商品英文名 | string | |
| variantKey | 变体关键字 | string | |
| sku | 变体SKU | string | 前缀可能因站点而异,见下方注意 |
| imgUrl | 变体图片 | string | |
| size | 变体规格 | string | |
| weight | 变体重量 | decimal | |
| sellPrice | 变体价格 | string | |
| packType | 包装类型 | int | |
| remain | 剩余库存 | int | |
| height | 高 | string | |
| long | 长 | string | 注意字段名就是 long |
| width | 宽 | string | |
| deductionType | 抵扣方式 | int | 0: 所有商品一起抵扣, 1: 组合抵扣 |
| shopId | 店铺ID | string | |
| shopName | 店铺名称 | string | |
| platform | 平台类型 | string | |
| createDate | 包装创建时间 | string | |
| incompatiblePlatformVariantIds | 互斥店铺变体ID集合 | Set<String> | |
| qtiers | 按件数分档的包装数量阶梯 | List | 见下方说明 |
qtiers(件数阶梯):按订单商品件数分档,决定该档位配多少个包装。每档 f=区间从、t=区间到、q=该档包装数量。f 从 1 连续(= 上一档 t + 1),末档 t 恒为 9999(有限封顶值,不是 null 也不是无穷大)。qtiers 为空、或仅有默认单档 {f:1, t:9999, q:1} 时表示未定制阶梯。
注意:
sku字段的前缀可能与站内页面显示的不一致。该字段在下游会按站点(referer)做联盟 SKU 前缀替换,而 API 调用不携带该信息,故返回的是默认前缀。
# 5 运单号同步设置
是否、以及怎样把订单的运单号同步到店铺,与 My CJ 上的 Tracking Number Setting 一致,按店铺设置。限流:按账号等级的 QPS(每秒 1–6 次,见 访问频率限制)。
取值说明:
| 字段 | 取值 | 含义 |
|---|---|---|
| syncTiming | BEFORE_DISPATCH | 生成运单号就同步,不等出库 |
AFTER_DISPATCH | 出库后同步 | |
AFTER_DISPATCH_SCHEDULED | 出库后,在店铺订单要求的最晚发货时间前 hoursBeforeLatestDispatchTime 小时开始同步。只对部分账号开放 | |
| trackingNumberType | DEFAULT | 默认运单号 |
LOGISTICS_CHANNEL | 物流渠道运单号 | |
CUSTOM | 自定义规则,见 customRule | |
| customRule.oneTrackingNumberRule | DEFAULT / LOGISTICS_CHANNEL | 只有一个运单号(一单到底)时同步哪个号 |
| customRule.syncMethod | FIRST_LEG_THEN_LAST_MILE | 有头程和尾程两个运单号时:先同步头程,再同步尾程 |
LAST_MILE_ONLY | 只同步尾程 | |
| customRule.firstLegRule | DEFAULT / LOGISTICS_CHANNEL | 头程用哪个号。仅 FIRST_LEG_THEN_LAST_MILE |
店铺能用哪些取值取决于平台和你的账号,5.1 在 supportedSyncTimings、supportedTrackingNumberTypes 里返回。两个都为空表示该店铺的设置不能修改(平台不支持,或该平台的设置固定不可调)。
# 5.1 查询运单号同步设置(GET)
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/trackingSyncSetting
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shop/trackingSyncSetting?shopId=1723456789012345678' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数 | 含义 | 类型 | 必填 | 长度 | 说明 |
|---|---|---|---|---|---|
| shopId | 店铺 ID | string | 是 | 50 | 1.1 查询店铺列表 返回的 id,必须是你自己的、启用中的店铺 |
# 返回
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"shopId": "1723456789012345678",
"enabled": true,
"syncTiming": "AFTER_DISPATCH",
"hoursBeforeLatestDispatchTime": null,
"trackingNumberType": "CUSTOM",
"customRule": {
"oneTrackingNumberRule": "LOGISTICS_CHANNEL",
"syncMethod": "FIRST_LEG_THEN_LAST_MILE",
"firstLegRule": "DEFAULT"
},
"supportedSyncTimings": ["BEFORE_DISPATCH", "AFTER_DISPATCH"],
"supportedTrackingNumberTypes": ["DEFAULT", "LOGISTICS_CHANNEL", "CUSTOM"]
},
"requestId": "2c4e6a8b-0d1f-4e3a-8c5b-7d9e1f3a5b7c"
}
| 字段 | 含义 | 类型 | 说明 |
|---|---|---|---|
| shopId | 店铺 ID | string | |
| enabled | 是否同步运单号到店铺 | boolean | |
| syncTiming | 同步时机 | string | 见上方取值。enabled 为 false 时一般为 null |
| hoursBeforeLatestDispatchTime | 最晚发货时间前多少小时 | int | 仅 AFTER_DISPATCH_SCHEDULED |
| trackingNumberType | 同步哪个运单号 | string | 见上方取值。enabled 为 false 时一般为 null |
| customRule | 自定义规则 | object | 仅 trackingNumberType 为 CUSTOM |
| supportedSyncTimings | 该店铺可用的 syncTiming | string[] | |
| supportedTrackingNumberTypes | 该店铺可用的 trackingNumberType | string[] | 该店铺不能用自定义规则时不含 CUSTOM。由 CJ IT 配置过运单号的店铺,trackingNumberType 可能显示为 CUSTOM,但保存 CUSTOM 会被拒绝并给出原因,要修改设置请选其他类型 |
错误
| 错误码 | 含义 |
|---|---|
| 1600300 | 缺少 shopId |
| 1600000 | 系统繁忙,稍后重试 |
| 其他错误码 | 店铺服务的错误码与原文,如 10001 店铺不存在或不是你的;10003 店铺不是启用状态(如授权失败);20024 店铺已转移 |
# 5.2 修改运单号同步设置(POST)
整套保存一个店铺的设置,相当于 My CJ 上的 Sync Tracking Number 开关加 Confirm。返回保存后的设置(同 5.1;极少数情况下读取失败时 data 为 null,可用 5.1 再查)。
保存后会发生什么(与 My CJ 一致;每次保存都会再触发一次,请勿频繁保存):
BEFORE_DISPATCH:该店铺近 30 天还没同步的订单运单号,立即同步到店铺;- 改成
AFTER_DISPATCH_SCHEDULED或修改小时数:该店铺近 30 天等待同步的订单重新计算同步时间; - 从
AFTER_DISPATCH_SCHEDULED改成其他时机:在等指定时间的订单立即同步。
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/trackingSyncSetting
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/shop/trackingSyncSetting' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"shopId": "1723456789012345678",
"enabled": true,
"syncTiming": "AFTER_DISPATCH",
"trackingNumberType": "CUSTOM",
"customRule": {
"oneTrackingNumberRule": "LOGISTICS_CHANNEL",
"syncMethod": "LAST_MILE_ONLY"
}
}'
| 参数 | 含义 | 类型 | 必填 | 长度 | 说明 |
|---|---|---|---|---|---|
| shopId | 店铺 ID | string | 是 | 50 | 你自己的店铺 |
| enabled | 是否同步运单号到店铺 | boolean | 是 | - | false 关闭同步,其余字段忽略,CJ 会记住关闭前的同步时机、再打开时恢复;已经关闭时不做任何修改。对已关闭的店铺传 true 会打开同步并保存设置;设置被拒绝时保持关闭 |
| syncTiming | 同步时机 | string | enabled 为 true 时必填 | - | 5.1 返回的 supportedSyncTimings 之一 |
| hoursBeforeLatestDispatchTime | 最晚发货时间前多少小时 | int | AFTER_DISPATCH_SCHEDULED 时必填 | - | 0–48 的整数。其他时机忽略 |
| trackingNumberType | 同步哪个运单号 | string | enabled 为 true 时必填 | - | 5.1 返回的 supportedTrackingNumberTypes 之一 |
| customRule | 自定义规则 | object | CUSTOM 时必填 | - | 其他类型忽略 |
| customRule.oneTrackingNumberRule | string | 是 | - | DEFAULT 或 LOGISTICS_CHANNEL | |
| customRule.syncMethod | string | 是 | - | FIRST_LEG_THEN_LAST_MILE 或 LAST_MILE_ONLY | |
| customRule.firstLegRule | string | FIRST_LEG_THEN_LAST_MILE 时必填 | - | DEFAULT 或 LOGISTICS_CHANNEL。LAST_MILE_ONLY 时忽略 |
# 返回
同 5.1。
错误
| 错误码 | 含义 |
|---|---|
| 1600300 | 参数错误,如该店铺不能用的取值(message 里列出可用值)、缺字段、小时数超范围 |
| 1614001 | 该店铺的设置不能修改(5.1 的 supportedSyncTimings / supportedTrackingNumberTypes 为空) |
| 1600000 | 系统繁忙;用 5.1 查一下是否已保存 |
| 其他错误码 | 店铺服务的错误码与原文,如 10001 店铺不存在或不是你的;10003 店铺不是启用状态;20024 店铺已转移;400 该店铺由 CJ IT 配置过、不能选自定义规则 |
# 6 库存同步设置
CJ 怎样把库存同步到店铺、每个 CJ 仓对应店铺的哪个仓,与 My CJ 上的库存同步设置一致。限流:按账号等级的 QPS(每秒 1–6 次,见 访问频率限制)。
调用顺序:6.1 查当前设置 → 要绑仓库时用 6.2 / 6.3 / 6.4 → 6.5。
按店铺类型区分(6.1 的 settingLevel):
| settingLevel | 店铺 | 能设置什么 |
|---|---|---|
STORE_WAREHOUSE | TikTok、TikTok US(含跨境)、Temu、Temu 本本、SHEIN | 店铺的 syncMethod(SHEIN 没有),以及每个 CJ 仓对应的店铺仓 |
LOCATION | Shopify、Wix | 每个发货地点的同步方式;新增发货地点 |
STORE | Whop | 店铺唯一的同步方式 |
取值说明:
| 字段 | 取值 | 含义 |
|---|---|---|
| syncMethod | NOT_SYNC | 不同步库存 |
CJ_INVENTORY | 只同步 CJ 库存 | |
PRIVATE_INVENTORY | 只同步你的私有库存 | |
PRIVATE_THEN_CJ_INVENTORY | 先同步私有库存,私有库存用完再同步 CJ 库存 | |
SET_ZERO | 库存全部置为 0。只会在查询中出现,不能设置 | |
| syncStrategy | NOT_SYNC | 不同步库存 |
CUSTOM | 同步 inventoryTypes 里的库存类型 | |
PRIVATE_THEN_CJ_INVENTORY | 先同步私有库存,私有库存用完再同步 CJ 库存 | |
SET_ZERO | 库存全部置为 0 | |
| inventoryTypes | PRIVATE_INVENTORY / CJ_INVENTORY / DEPOSIT_INVENTORY | 仅 CUSTOM。DEPOSIT_INVENTORY(押金库存)只有 6.1 的 availableSyncStrategies 里给出时才能用 |
| warehouseType | CJ | CJ 仓 |
Y2 | 美国中转仓(US Transit Warehouse,仅 Temu) | |
SUPPLIER | 供应商仓 |
保存后立即生效:CJ 可能会把整个店铺的库存重新推送到平台;Shopify 店铺还可能在你的 Shopify 店里创建或更新 CJ 的履约服务与地点。部分平台限制修改频率(如每几分钟或几小时一次),6.1 返回 nextModifiableTime,提前保存会返回错误码 10040。
风险与责任(与 My CJ 首次设置库存同步时要同意的服务说明一致):CJ 公共库存由所有用户共享,存在超卖风险,不建议依赖;库存更新也可能延迟。因此导致订单无法履约的,相关责任(包括但不限于平台责任、违约责任)及订单纠纷由你自行承担,与 CJ 无关。使用 TikTok 官方物流上门取件时,物流商按店铺仓的地址取件,地址不准确造成的损失由你自行承担,与 CJ 无关;绑定后再修改店铺仓地址可能导致无法上门取件。调用 6.5 修改库存同步设置,即视为你已知悉并接受上述风险。
绑定仓库(STORE_WAREHOUSE):
- 只能绑定 6.1 返回的仓。供应商仓需要
supplierWarehouseAllowed为true。storeWarehouseBindingAllowed为false时(未开通平台物流的 Temu 本本店铺)只能修改syncMethod,保存时会清掉已有的仓库绑定。 - 一个店铺仓只能对应一个 CJ 仓(包括已停用的仓)。要把店铺仓换到另一个 CJ 仓,请在同一次请求里解绑旧仓(无论是否停用)并绑定新仓。
- TikTok、TikTok US、Temu,以及开通平台物流的 Temu 本本店铺至少要保留一个店铺仓绑定(否则返回错误码 410)。
- 已停用的仓(
deactivated为true):不能新绑、不能改绑,可以解绑;已有的绑定在解绑前保持不变。 - 店铺仓不可用:6.2 中
bindable为false的店铺仓不能新绑、改绑。已经绑着的,与 My CJ 一样,以下情况保存会被拒(10041),请改绑到其他店铺仓或解绑后再保存:供应商仓的绑定,店铺仓已不在平台的店铺仓列表里(TikTok 店铺仓不再营业、TikTok / TikTok US 店铺仓不是发货仓、Temu 店铺仓已停用);Temu 店铺 CJ 仓的绑定,店铺仓已停用;SHEIN 店铺 CJ 仓的绑定,店铺仓地址没有州。这些按最近一次查询店铺仓(6.2)时平台返回的状态判断,店铺仓在平台上刚恢复的,请先调 6.2 刷新。 - Temu 的美国中转仓(
Y2)只能绑定 6.2 中managementType为3(其他)的店铺仓;反过来,Temu 半托管店的其他 CJ 仓、供应商仓不能新绑这类店铺仓(与 My CJ 相同,已经绑着的不受影响),否则返回 10041。 - 账号失去供应商仓权限后,下次保存时会清掉已有的供应商仓绑定。
- TikTok US 跨境店铺:视 CJ 的配置,可能不校验店铺仓与 CJ 仓是否匹配(地址、仓库类型、状态)。
# 6.1 查询库存同步设置(GET)
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/inventorySyncSetting
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shop/inventorySyncSetting?shopId=1723456789012345678' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数 | 含义 | 类型 | 必填 | 长度 | 说明 |
|---|---|---|---|---|---|
| shopId | 店铺 ID | string | 是 | 50 | 1.1 查询店铺列表 返回的 id,必须是你自己的、启用中的店铺 |
# 返回
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"shopId": "1723456789012345678",
"settingLevel": "STORE_WAREHOUSE",
"nextModifiableTime": null,
"syncMethod": "PRIVATE_THEN_CJ_INVENTORY",
"y1SyncMethod": null,
"y2SyncMethod": null,
"warehouses": [
{
"cjWarehouseId": "201e67f6ba4644c0a36d63bf4989dd70",
"cjWarehouseName": "US Cranbury Warehouse",
"warehouseType": "CJ",
"countryCode": "US",
"site": null,
"storeWarehouseId": "6823467890123",
"storeWarehouseName": "NJ Warehouse",
"deactivated": false,
"deactivatedMessage": null,
"addressChanged": false
}
],
"storeWarehouseBindingAllowed": true,
"supplierWarehouseAllowed": false,
"locations": null,
"syncStrategy": null,
"inventoryTypes": null,
"availableSyncStrategies": null,
"availableCjWarehouses": null
},
"requestId": "2c4e6a8b-0d1f-4e3a-8c5b-7d9e1f3a5b7c"
}
| 字段 | 含义 | 类型 | 说明 |
|---|---|---|---|
| shopId | 店铺 ID | string | |
| settingLevel | 设置类型 | string | 见上表 |
| nextModifiableTime | 下次可修改的时间 | string | UTC,yyyy-MM-dd HH:mm:ss;现在就能改时为 null |
| syncMethod | 店铺的同步方式 | string | STORE_WAREHOUSE,SHEIN 没有 |
| y1SyncMethod / y2SyncMethod | 美国本土仓(Y1)、美国中转仓(Y2)各自的同步方式 | string | 仅开启了 Y1 / Y2 分开设置的 Temu 店铺;此时 syncMethod 等于 y1SyncMethod |
| warehouses | CJ 仓及其对应的店铺仓 | object[] | STORE_WAREHOUSE。只含你的账号能用的仓 |
| warehouses.cjWarehouseId | CJ 仓 ID | string | SUPPLIER 时为供应商仓 ID |
| warehouses.cjWarehouseName | CJ 仓名称 | string | |
| warehouses.warehouseType | CJ、Y2 或 SUPPLIER | string | |
| warehouses.countryCode | CJ 仓所在国家 | string | |
| warehouses.site | 站点 | string | 仅 SHEIN:站点的国家码 |
| warehouses.storeWarehouseId | 对应的店铺仓 | string | 未绑定时为 null |
| warehouses.storeWarehouseName | 对应的店铺仓名称 | string | |
| warehouses.deactivated | CJ 仓已停用 | boolean | 不能绑定,可以解绑 |
| warehouses.deactivatedMessage | 停用提示 | string | |
| warehouses.addressChanged | 供应商仓地址已变更 | boolean | |
| storeWarehouseBindingAllowed | 能否绑定店铺仓 | boolean | STORE_WAREHOUSE |
| supplierWarehouseAllowed | 能否使用供应商仓 | boolean | STORE_WAREHOUSE |
| locations | 发货地点 | object[] | LOCATION |
| locations.cjWarehouseId | CJ 仓 ID | string | 0 为 CJ 全球仓 |
| locations.cjWarehouseName | CJ 仓名称 | string | |
| locations.storeLocationId | 店铺里的地点 ID | string | |
| locations.storeLocationName | 店铺里的地点名称 | string | |
| locations.syncStrategy | 同步方式 | string | |
| locations.inventoryTypes | 库存类型 | string[] | CUSTOM 时 |
| syncStrategy / inventoryTypes | 店铺的同步方式 | string / string[] | STORE(Whop) |
| availableSyncStrategies | 该店铺可用的同步方式 | object[] | LOCATION 和 STORE。每项含 syncStrategy;CUSTOM 另含可用的 inventoryTypes |
| availableCjWarehouses | 新增发货地点可用的 CJ 仓 | object[] | LOCATION。每项含 cjWarehouseId、cjWarehouseName、countryCode、children |
# 6.2 查询店铺仓(GET)
店铺在销售平台上的仓库(会先从平台刷新一次),作为 6.5 的 storeWarehouseId。storeWarehouseBindingAllowed 为 false 时不可用。
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/inventorySyncSetting/storeWarehouses
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shop/inventorySyncSetting/storeWarehouses?shopId=1723456789012345678' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数 | 含义 | 类型 | 必填 | 长度 | 说明 |
|---|---|---|---|---|---|
| shopId | 店铺 ID | string | 是 | 50 | 你自己的店铺 |
# 返回
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"id": "6823467890123",
"name": "NJ Warehouse",
"managementType": "3",
"bindable": true
}
],
"requestId": "2c4e6a8b-0d1f-4e3a-8c5b-7d9e1f3a5b7c"
}
| 字段 | 含义 | 类型 | 说明 |
|---|---|---|---|
| id | 店铺仓 ID | string | |
| name | 店铺仓名称 | string | |
| managementType | Temu 仓库管理类型 | string | 仅 Temu。3 = 其他 |
| bindable | 能否新绑 | boolean | false:店铺仓在平台上已停用,或地址没有州(与 My CJ 下拉里置灰的相同),6.5 新绑会被拒(10041);已经绑着的见上文「绑定仓库」 |
# 6.3 查询供应商仓(GET)
可绑定的供应商仓。仅当 6.1 的 supplierWarehouseAllowed 为 true 时可用,否则返回错误。
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/inventorySyncSetting/supplierWarehouses
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shop/inventorySyncSetting/supplierWarehouses?shopId=1723456789012345678&keyword=LA' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数 | 含义 | 类型 | 必填 | 长度 | 说明 |
|---|---|---|---|---|---|
| shopId | 店铺 ID | string | 是 | 50 | 你自己的店铺 |
| keyword | 仓库名称关键词 | string | 否 | 100 |
# 返回
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"id": "1823456789",
"name": "LA Supplier Warehouse",
"countryCode": "US"
}
],
"requestId": "2c4e6a8b-0d1f-4e3a-8c5b-7d9e1f3a5b7c"
}
| 字段 | 含义 | 类型 | 说明 |
|---|---|---|---|
| id | 供应商仓 ID | string | 6.5 中作为 cjWarehouseId,warehouseType 传 SUPPLIER |
| name | 供应商仓名称 | string | |
| countryCode | 国家 | string |
# 6.4 查询仓库地址(GET)
CJ 仓或供应商仓的地址。部分平台(如 TikTok US)绑定时会校验店铺仓地址与之一致;供应商仓需要 supplierWarehouseAllowed 为 true。
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/inventorySyncSetting/cjWarehouseAddress
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shop/inventorySyncSetting/cjWarehouseAddress?shopId=1723456789012345678&cjWarehouseId=201e67f6ba4644c0a36d63bf4989dd70&warehouseType=CJ' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数 | 含义 | 类型 | 必填 | 长度 | 说明 |
|---|---|---|---|---|---|
| shopId | 店铺 ID | string | 是 | 50 | 你自己的店铺 |
| cjWarehouseId | CJ 仓 ID 或供应商仓 ID | string | 是 | 64 | 取自 6.1 或 6.3 |
| warehouseType | CJ、Y2 或 SUPPLIER | string | 是 | - |
# 返回
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"id": "201e67f6ba4644c0a36d63bf4989dd70",
"name": "Cranbury Warehouse",
"countryCode": "US",
"contactPerson": "xxxx",
"phone": "xxxx",
"address": "xxxx",
"city": "Cranbury",
"state": "New Jersey",
"zipCode": "08512",
"country": "United States"
},
"requestId": "2c4e6a8b-0d1f-4e3a-8c5b-7d9e1f3a5b7c"
}
# 6.5 修改库存同步设置(POST)
只传要改的部分,其余保持不变。返回保存后的设置(同 6.1;极少数情况下读取失败时 data 为 null,可用 6.1 再查)。
# URL
https://developers.cjdropshipping.com/api2.0/v1/shop/inventorySyncSetting
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/shop/inventorySyncSetting' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"shopId": "1723456789012345678",
"syncMethod": "PRIVATE_THEN_CJ_INVENTORY",
"warehouses": [
{ "cjWarehouseId": "d3749885b80444baadf8a55277de1c09", "warehouseType": "CJ", "unbind": true },
{ "cjWarehouseId": "201e67f6ba4644c0a36d63bf4989dd70", "warehouseType": "CJ", "storeWarehouseId": "6823467890123" }
]
}'
| 参数 | 含义 | 类型 | 必填 | 长度 | 说明 |
|---|---|---|---|---|---|
| shopId | 店铺 ID | string | 是 | 50 | 你自己的店铺 |
| syncMethod | 店铺的同步方式 | string | 否 | - | STORE_WAREHOUSE,SHEIN 没有。不能传 SET_ZERO |
| y1SyncMethod / y2SyncMethod | Y1 / Y2 的同步方式 | string | 否 | - | 仅开启了 Y1 / Y2 分开设置的 Temu 店铺。此时 syncMethod 跟随 y1SyncMethod:只传 syncMethod 等同于改 Y1;两个都传且不同时,syncMethod 是当前 Y1 的值(即查询结果原样带回)则以 y1SyncMethod 为准,否则返回 1600300 |
| warehouses | 要修改的仓库绑定 | object[] | 否 | 100 | STORE_WAREHOUSE。只列要改的 |
| warehouses.cjWarehouseId | CJ 仓 ID 或供应商仓 ID | string | 是 | 64 | |
| warehouses.warehouseType | CJ、Y2 或 SUPPLIER | string | 是 | - | |
| warehouses.storeWarehouseId | 要绑定的店铺仓 | string | 解绑 CJ / Y2 仓时不填,其余必填 | 64 | 6.2 返回的 id。SUPPLIER 解绑时为要解绑的店铺仓 |
| warehouses.unbind | 解绑 | boolean | 否 | - | true 为解绑 |
| locations | 要修改或新增的发货地点 | object[] | 否 | 100 | LOCATION。已有的地点不能删除。新增地点以 CJ 仓名称命名 |
| locations.cjWarehouseId | CJ 仓 ID | string | 是 | 64 | 已有地点的,或 availableCjWarehouses 里的(新增) |
| locations.syncStrategy | 同步方式 | string | 是 | - | |
| locations.inventoryTypes | 库存类型 | string[] | CUSTOM 时必填 | - | |
| syncStrategy / inventoryTypes | 店铺的同步方式 | string / string[] | 否 | - | STORE(Whop) |
# 返回
同 6.1。
# 错误码(6.1–6.5)
| 错误码 | 含义 |
|---|---|
| 1600300 | 参数错误,如取值名不存在、字段不适用于该店铺、storeWarehouseId 不在 6.2 里、同一个店铺仓会对应多个仓、解绑的仓本来就没绑定、没有要改的内容 |
| 10040 | 刚修改过,请在 nextModifiableTime 之后再改 |
| 10041 | 不允许,message 里逐个说明原因,如该仓你的账号不能用、仓库已停用、店铺仓已停用或地址没有州、押金库存不可用、该店铺不支持新增发货地点;欧区店(Temu 欧洲站)没有库存同步设置,6.1–6.5 都返回 10041 |
| 410 | 没有绑定任何店铺仓(TikTok、TikTok US、Temu,以及开通平台物流的 Temu 本本店铺至少要一个) |
| 60039 | 不符合 Temu / SHEIN 的规则,如店铺仓在平台上不存在 |
| 10050 | 绑定的店铺仓不能用:不是发货仓或在平台上未启用、地址与 CJ 仓不一致(见 6.4),或 Temu 美国中转仓绑定了管理类型不是「其他」的店铺仓。message 末尾附上是哪个店铺仓、哪一项不符 |
| 10001 / 10003 / 20024 | 店铺不存在或不是你的 / 店铺不是启用状态 / 店铺已转移 |
| 1600000 | 系统繁忙;用 6.1 查一下是否已保存 |
| 其他错误码 | 店铺服务的错误码与原文 |