# 7 纠纷接口
注意: 纠纷接口主要用于处理订单商品的售后纠纷,包括退款和补发。所有纠纷操作都需要先通过「选择纠纷商品列表」接口获取可纠纷商品,然后通过「纠纷确认」接口获取纠纷原因和金额信息,最后通过「发起纠纷」接口创建纠纷单。
# 1 选择纠纷商品列表(GET)
# URL
https://developers.cjdropshipping.com/api2.0/v1/disputes/disputeProducts
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/disputes/disputeProducts' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| orderId | cj订单号 | string | 是 | 100 |
提示: 请先通过订单接口获取有效的
orderId,再调用此接口。
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"orderId": "2001234567890",
"orderNumber": "SHOP-12345",
"productInfoList": []
},
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f",
"success": true
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| orderId | cj订单ID | string | 200 | |
| orderNumber | 客户订单编号 | string | 200 | |
| productInfoList | 商品信息列表 | Object[] | 选择纠纷商品供应商列表 | |
| lineItemId | lineItem id | string | 100 | |
| cjProductId | cj商品id | string | 100 | |
| cjVariantId | cj变体id | string | 100 | |
| canChoose | 是否可勾选开纠纷 | boolean | true:可以开纠纷, false:不可开纠纷,可能原因:存在未完成纠纷单 | |
| price | 商品价格 | BigDecimal | (18,2) | 单位:$(美元) |
| quantity | 可开纠纷数量 | integer | 20 | |
| cjProductName | cj商品名称 | string | 200 | |
| cjImage | 商品图片 | string | 100 | |
| sku | sku | string | 100 | |
| supplierName | 供应商name | 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 纠纷确认(POST)
# URL
https://developers.cjdropshipping.com/api2.0/v1/disputes/disputeConfirmInfo
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/disputes/disputeConfirmInfo' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| orderId | cj订单号 | string | 是 | 100 | |
| productInfoList | 纠纷商品信息 | object[] | 是 | ||
| lineItemId | lineItem id | string | 是 | 100 | |
| quantity | 纠纷数量 | integer | 是 | ||
| price | 纠纷商品价格 | BigDecimal | 是 | (18,2) |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"orderId": "2001234567890",
"orderNumber": "SHOP-12345",
"expectResultOptionList": ["1", "2"],
"productInfoList": [],
"disputeReasonList": []
},
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f",
"success": true
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| orderId | cj订单ID | string | 200 | |
| orderNumber | 客户订单编号 | string | 200 | |
| expectResultOptionList | 期望类型选项列表 | string[] | 1 退款 2补发 | |
| productInfoList | 商品信息列表 | Object[] | 选择纠纷商品供应商列表 | |
| - maxProductPrice | 商品总价 | BigDecimal | (18,2) | 单位:$(美元) |
| - maxPostage | 运费 | BigDecimal | (18,2) | 单位:$(美元) |
| - maxIossTaxAmount | ioss税费金额 | BigDecimal | (18,2) | 单位:$(美元) |
| - maxIossHandTaxAmount | ioss税费手续费金额 | BigDecimal | (18,2) | 单位:$(美元) |
| - maxAmount | 申请退款金额 | BigDecimal | (18,2) | 单位:$(美元) |
| - productInfoList | 商品信息列表 | Object[] | 选择纠纷商品供应商列表 | |
| - canChoose | 是否可勾选开纠纷 | boolean | 2 | false:存在未完成纠纷单,不可开纠纷 ture:可以开 |
| price | 商品价格 | BigDecimal | (18,2) | 单位:$(美元) |
| quantity | 可开纠纷数量 | integer | 20 | |
| lineItemId | lineItem id | string | 100 | |
| cjProductId | cj商品id | string | 100 | |
| cjVariantId | cj变体id | string | 100 | |
| cjProductName | cj商品名称 | string | 200 | |
| cjImage | 商品图片 | string | 100 | |
| sku | sku | string | 100 | |
| supplierName | 供应商name | string | 200 | |
| disputeReasonList | 纠纷原因列表 | object [] | ||
| disputeReasonId | 纠纷原因id | integer | 20 | |
| reasonName | 纠纷原因-英文 | 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 发起纠纷(POST)
注意: 仅支持对通过 API 创建的订单发起纠纷。非 API 创建的订单无法通过此接口创建纠纷。
# URL
https://developers.cjdropshipping.com/api2.0/v1/disputes/create
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/disputes/create' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| businessDisputeId | 客户的业务id,每次纠纷要保证唯一 | string | 是 | 100 | 合作方的纠纷Id |
| orderId | cj订单号 | string | 是 | 100 | |
| disputeReasonId | 纠纷原因id | integer | 是 | 10 | |
| expectType | 期望类型 | integer | 是 | 20 | 1-纠纷退款,2-纠纷补发 |
| refundType | 退款类型 | integer | 是 | 20 | 1:余额 2:平台 |
| messageText | 文本信息 | string | 是 | 500 | |
| imageUrl | 图片地址 | string [] | 否 | 200 | 链接可能过期时,先用「9 上传纠纷附件」转存成 CJ 链接 |
| videoUrl | 视频地址 | string [] | 否 | 200 | 同上 |
| productInfoList | 纠纷商品信息 | object[] | |||
| price | 商品价格 | BigDecimal | 是 | (18,2) | 单位:$(美元) |
| lineItemId | lineItem id | string | 100 | ||
| quantity | 纠纷数量 | integer | 是 | 10 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": true,
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f",
"success": true
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| code | 错误码 | int | 20 | 返回错误码标准表 |
| result | 是否正常返回 | boolean | 1 | |
| message | 返回信息 | string | 200 | |
| data | 是否成功 | boolean | 发起纠纷成功返回 true | |
| requestId | 请求Id | string | 48 | 用于日志查询错误 |
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 取消纠纷(post)
# URL
https://developers.cjdropshipping.com/api2.0/v1/disputes/cancel
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/disputes/cancel' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| orderId | CJ订单号 | string | 是 | 100 | |
| disputeId | CJ纠纷号 | string | 是 | 100 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": true,
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f",
"success": true
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| code | 错误码 | int | 20 | 返回错误码标准表 |
| result | 是否正常返回 | boolean | 1 | |
| message | 返回信息 | string | 200 | |
| data | 是否取消成功 | boolean | ||
| requestId | 请求Id | string | 48 | 用于日志查询错误 |
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 | 用于日志查询错误 |
# 5 纠纷列表(GET)
# URL
https://developers.cjdropshipping.com/api2.0/v1/disputes/getDisputeList
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/disputes/getDisputeList' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| orderId | cj订单号 | string | 否 | 100 | |
| disputeId | 纠纷id | integer | 否 | 10 | |
| orderNumber | 店铺单号 | string | 否 | 100 | 1-纠纷退款,2-纠纷补发 |
| pageNum | 页码 | integer | 否 | 10 | 默认1 |
| pageSize | 每页数量 | integer | 否 | 10 | |
| startDate | 创建时间下界 | long | 否 | 20 | UTC毫秒,严格大于;与endDate成对,最多90天 |
| endDate | 创建时间上界 | long | 否 | 20 | UTC毫秒,严格小于;不小于startDate |
| updateDateFrom | 最后更新时间下界 | long | 否 | 20 | UTC毫秒,含;按 updateDate 筛选;与updateDateTo成对,最多31天 |
| updateDateTo | 最后更新时间上界 | long | 否 | 20 | UTC毫秒,不含;必须晚于updateDateFrom。传这组参数时,结果按updateDate、纠纷id升序 |
| status | V2纠纷状态 | string | 否 | 逗号分隔,如100,200;不传不筛选 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"pageNum": 1,
"pageSize": 20,
"total": 0,
"list": []
},
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f",
"success": true
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| pageNum | 当前页数 | int | 20 | |
| pageSize | 每页返回多少条 | int | 20 | |
| total | 总条数 | int | 20 | |
| list | 纠纷列表 | List | ||
| - status | 纠纷状态 | string | 20 | |
| - disputeId | 纠纷号 | string | 100 | |
| - shopId | 店铺id | string | 100 | 归档订单可能为空 |
| - shopName | 店铺名称 | string | 200 | 归档订单可能为空 |
| - disputeReason | 纠纷原因 | string | 200 | |
| - replacementAmount | 纠纷补发金额 | BigDecimal | (18,2) | 单位:$(美元) |
| - resendOrderCode | 补发单号 | string | 100 | |
| - refundMoney | 最终退款金额 | BigDecimal | (18,2) | 单位:$(美元) |
| - finallyDeal | 最终协商处理结果:1退款 2补发 3拒绝 | integer | 10 | |
| - createDate | 创建时间 | string | 50 | 毫秒时间戳 |
| - updateDate | 最后更新时间 | string | 50 | 毫秒时间戳(以字符串返回)。见下方「关于 updateDate」 |
| - productInfoList | 商品信息 | Object[] | ||
| -- cjImage | 商品图片 | string | 200 | |
| -- price | 商品价格 | BigDecimal | (18,2) | 单位:$(美元) |
| -- lineItemId | lineItem id | string | 100 | |
| -- cjProductId | 商品id | string | 100 | |
| -- cjVariantId | cj变体id | string | 100 | |
| -- cjProductName | 商品名称 | string | 200 | |
| -- supplierName | 供应商名称 | string | 200 |
error
{
"code": 1600300,
"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 | 用于日志查询错误 |
# 关于 updateDate
updateDate 取纠纷记录的最后更新时间,客户可据此感知纠纷是否有新进展(包括客服追加了回复),
无需逐条轮询详情。
不要把 updateDate 当作增量同步的唯一游标
该字段是纠纷记录行的更新时间,并非「纠纷生命周期中所有动作的最大时间」。
存在 updateDate 早于最终处理时间的数据,按「拉取 updateDate > 上次同步时间」做增量会漏单。
正确用法:以 updateDate 做变化感知,同时按创建日期区间做定期全量补拉兜底。
# 日期与状态口径
startDate/endDate 筛选创建时间,不是 updateDate;空筛选保留原行为。相邻补拉窗口建议重叠并按纠纷id去重,以免严格边界漏掉恰好等于边界的记录。
V2 状态:100=待处理、200=待审核、300=退款财务审核中、400=挂起、500=待客户确认、510=供应商退款待财务审核、520=待付款、530=支付中、540=待仲裁(预留)、600=完成、700=取消、800=取消仲裁。不能将 DISPUTE Webhook 的1–5类型码直接当作列表筛选值。
updateDate 为可空的毫秒时间戳(以字符串返回),仍只用于变化感知;本期不改变已有 DISPUTE Webhook。
# 按最后更新时间筛选
传 updateDateFrom / updateDateTo(UTC 毫秒)时,只返回 updateDate 落在 [updateDateFrom, updateDateTo) 内的纠纷,按 updateDate 升序、纠纷id 升序排列。两个值必须同时传,跨度不超过 31 天(按 UTC 毫秒计算;按本地时区取一整个月时,遇到夏令时切换的月份可能超过 31 天)。历史补拉要覆盖更长时间时,按连续的窗口分段拉:上一段的 updateDateTo 直接作为下一段的 updateDateFrom(下界含、上界不含,相邻两段不重不漏;日常增量的轮间重叠见下方提示)。可与 startDate / endDate 同时传(两组条件同时满足)。窗口不合法(只传一个、负数、上界不晚于下界、超过 31 天或上界晚于 9999-12-31T23:59:59.999Z)时返回 HTTP 400,code 为 1600300,message 为 updateDateFrom/updateDateTo must be paired UTC milliseconds, updateDateTo later than updateDateFrom, within 31 days。
用来感知变化,仍需定期全量补拉
updateDate精确到秒(恒为 1000 的整数倍),且变更提交后才可见,所以updateDateTo请取当前时间往前至少 5 分钟。上界必须早于当前时间:上界在未来时,翻页期间被更新的纠纷可能留在窗口内,把别的纠纷挤出你读过的页,而total不变。- 一轮同步固定一个窗口:
updateDateFrom/updateDateTo不变,从pageNum=1起逐页取,直到本页返回条数少于pageSize(或pageNum × pageSize≥total)为止。翻页过程中不要改动窗口。 - 翻页期间如有纠纷被更新,它会移出本窗口,之后的行前移一位,可能有一行还没读到就被跳过。若末页返回的
total与第一页不同,请按同一窗口从第 1 页重跑本轮;持续变化导致反复重跑时,可把窗口切小(如 1 小时)。 - 下一轮的窗口与上一轮重叠(例如新的
updateDateFrom取上一轮updateDateTo往前 5 分钟),并按disputeId去重、以最新一次为准。本轮中被更新的纠纷会带着新的updateDate出现在之后的窗口里。 total不变不能证明没有遗漏(例如变更晚于 5 分钟余量才可见),updateDate为空的纠纷也不会被这个筛选返回;部分处理动作不会刷新updateDate(见上文「关于 updateDate」)。因此仍要保留窗口重叠,并按创建时间定期全量补拉。
# 6 获取纠纷详情(GET)
# URL
https://developers.cjdropshipping.com/api2.0/v1/disputes/getDisputeDetail
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/disputes/getDisputeDetail' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| disputeId | 纠纷id | string | 是 | 100 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"id": "SH1623673863466725376",
"shopId": "1588478917529051136",
"shopName": "bo te_api",
"status": "Processing",
"disputeReason": "Item not received",
"replacementAmount": 0.00,
"resendOrderCode": "",
"money": 12.50,
"refundAmount": 12.50,
"finallyDeal": 1,
"createDate": 1736928600000,
"refundDetails": [
{
"type": "PRODUCT_COST",
"typeName": "商品费",
"amount": 10.00
},
{
"type": "SHIPPING_COST",
"typeName": "物流费",
"amount": 2.50
}
],
"productList": [
{
"image": "https://example.com/image.jpg",
"price": 10.00,
"productCode": "CJPROD001",
"productId": "pid001",
"productName": "Sample Product",
"standId": "vid001",
"supplierName": "Supplier A"
}
]
},
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f",
"success": true
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| id | 纠纷号 | string | 100 | |
| shopId | 店铺id | string | 100 | 归档订单可能为空 |
| shopName | 店铺名称 | string | 200 | 归档订单可能为空 |
| status | 纠纷状态 | string | 20 | |
| disputeReason | 纠纷原因 | string | 200 | |
| replacementAmount | 纠纷补发金额 | BigDecimal | (18,2) | 单位:$(美元) |
| resendOrderCode | 补发单号 | string | 100 | |
| money | 最终退款金额 | BigDecimal | (18,2) | 单位:$(美元) |
| refundAmount | 最终退款金额 | BigDecimal | (18,2) | 单位:$(美元),与money字段值相同 |
| finallyDeal | 最终协商处理结果:1退款 2补发 3拒绝 | integer | 10 | |
| createDate | 创建时间(时间戳毫秒) | long | 20 | |
| refundDetails | 最终退款明细 | Object[] | ||
| - type | 费用类型 | string | 50 | 如:PRODUCT_COST / SHIPPING_COST / IOSS_TAX / IOSS_HANDLING_FEE |
| - typeName | 费用名称 | string | 50 | 如:商品费 / 物流费 / IOSS税费 / IOSS税费手续费 |
| - amount | 金额 | BigDecimal | (18,2) | 单位:$(美元) |
| productList | 商品信息 | Object[] | ||
| - image | 商品图片 | string | 200 | |
| - price | 商品价格 | BigDecimal | (18,2) | 单位:$(美元) |
| - productCode | 商品code | string | 100 | |
| - productId | 商品id | string | 100 | |
| - productName | 商品名称 | string | 200 | |
| - standId | 商品变体id | string | 100 | |
| - supplierName | 供应商名称 | 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 | 用于日志查询错误 |
# 7 查询纠纷会话(POST)
查询一个纠纷下买卖双方的往来消息(含文字与附件),用于在自己的系统里还原完整协商过程, 不必登录 CJ 后台。
覆盖范围
本接口返回的是该 API 账号名下的全部纠纷,不限于通过 API 创建的订单—— Excel 导入单、代发单、后台手工单产生的纠纷同样可查。 判定依据是「纠纷是否属于该账号」,不是「订单从哪个渠道进来」。
# URL
https://developers.cjdropshipping.com/api2.0/v1/disputes/getDisputeMessages
# CURL
curl --location 'https://developers.cjdropshipping.com/api2.0/v1/disputes/getDisputeMessages' \
--header 'Content-Type: application/json' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data '{"disputeId":"SH2607291323371283500","pageNum":1,"pageSize":10}'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| disputeId | 纠纷id | string | 是 | 100 | |
| pageNum | 页码 | integer | 否 | 10 | 默认 1 |
| pageSize | 每页数量 | integer | 否 | 10 | 默认 10,最大 50 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"pageNum": 1,
"pageSize": 10,
"total": 2,
"list": [
{
"messageId": "1770485313446354944",
"orderId": "SD2607290935060338700",
"userType": "1",
"createDate": 1785331419000,
"message": "package not received",
"imageUrl": ["https://your-domain.com/evidence-1.jpg"],
"videoUrl": []
},
{
"messageId": "1770485313446354945",
"orderId": "SD2607290935060338700",
"userType": "2",
"createDate": 1785331431000,
"message": "The order has been refunded.",
"imageUrl": [],
"videoUrl": []
}
]
},
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f",
"success": true
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| pageNum | 当前页数 | int | 20 | |
| pageSize | 每页返回多少条 | int | 20 | |
| total | 总条数 | int | 20 | 见下方「关于分页」 |
| list | 会话列表 | List | 按时间先后排列 | |
| - messageId | 消息id | string | 100 | |
| - orderId | cj订单号 | string | 100 | |
| - userType | 发送方 | string | 10 | 1-买家(你),2-CJ 客服 |
| - createDate | 消息时间 | long | 20 | 毫秒时间戳 |
| - message | 消息正文 | string | 500 | 可能为空(仅发了附件时) |
| - imageUrl | 图片附件 | string[] | 公网可访问地址,可能为空数组 | |
| - videoUrl | 视频附件 | string[] | 公网可访问地址,可能为空数组 |
关于分页
当前版本 total 与 list 来源于两套存储,分页参数不保证精确:
list 的条数可能与 pageSize 不一致,翻页也可能返回重叠内容。
推荐用法:pageSize 直接取最大值 50,一次取完,不要翻页。
绝大多数纠纷的会话条数远小于 50。若 total 大于实际返回条数,以返回的 list 为准。
该限制将在后续版本修复。
error
{
"code": 1005,
"result": false,
"message": "Please check it carefully.",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| code | 错误码 | int | 20 | 返回错误码标准表 |
| result | 是否正常返回 | boolean | 1 | |
| message | 返回信息 | string | 200 | |
| data | 接口数据返回 | |||
| requestId | 请求Id | string | 48 | 用于日志查询错误 |
| 错误码 | 含义 |
|---|---|
| 1005 | 纠纷号不存在,或该纠纷不属于当前账号(两者返回同一错误码,请先核对纠纷号) |
| 1600300 | 参数错误(HTTP 400)。disputeId 为空时返回 disputeId must be not blank;为 undefined / null / NaN 这类占位值时返回 disputeId is invalid,请先确认取到了真实纠纷号 |
# 8 回复纠纷(POST)
向一个进行中的纠纷追加一条消息,可同时携带图片/视频证据。用于在自己的系统里完成协商, 不必登录 CJ 后台。
# URL
https://developers.cjdropshipping.com/api2.0/v1/disputes/reply
# CURL
curl --location 'https://developers.cjdropshipping.com/api2.0/v1/disputes/reply' \
--header 'Content-Type: application/json' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data '{
"disputeId": "SH2607291323371283500",
"messageText": "Here is the unboxing video.",
"imageUrl": ["https://your-domain.com/evidence-1.jpg"],
"videoUrl": []
}'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| disputeId | 纠纷id | string | 是 | 100 | |
| messageText | 消息正文 | string | 是 | 500 | 不可为空;其中的 emoji 会被自动移除 |
| imageUrl | 图片附件 | string[] | 否 | 见下方「关于附件」 | |
| videoUrl | 视频附件 | string[] | 否 | 见下方「关于附件」 |
关于附件
imageUrl / videoUrl 传公网可访问的地址,与「发起纠纷」接口的用法一致,并确保纠纷处理期间持续可访问。
你自己的链接会过期时,先调「9 上传纠纷附件」把它转存到 CJ,再填返回的链接——该链接长期有效,图片可在浏览器直接打开预览。
允许回复的纠纷状态
只有处于下列状态的纠纷可以追加回复,其余状态将返回 9063:
| 状态码 | 含义 |
|---|---|
| 100 | 纠纷待处理 |
| 200 | 纠纷待审核 |
| 300 | 退款财务审核中 |
| 400 | 挂起状态 |
| 510 | 供应商自发退款待财务审核 |
| 530 | 支付中 |
| 600 | 纠纷完成 |
「纠纷完成(600)」允许回复,但此时消息仅用于沟通,不会改变已完成的处理结果。
本接口不具备幂等性
请求超时或网络中断时不要直接重试,否则会在纠纷中插入重复消息。 请先调用「查询纠纷会话」确认上一条是否已写入,再决定是否重发。
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": true,
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f",
"success": true
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| data | 是否提交成功 | boolean | 1 | |
| requestId | 请求Id | string | 48 | 用于日志查询 |
error
{
"code": 9063,
"result": false,
"message": "The dispute is in a status that does not accept new messages.",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
| 错误码 | 含义 |
|---|---|
| 9063 | 纠纷当前状态不允许回复,参见上方状态白名单 |
| 1005 | 纠纷号不存在,或该纠纷不属于当前账号(两者返回同一错误码) |
| 1600300 | 参数错误(HTTP 400)。disputeId 为空时返回 disputeId must be not blank;为 undefined / null / NaN 这类占位值时返回 disputeId is invalid |
# 9 上传纠纷附件(POST)
把你的图片或视频转存到 CJ:你给出附件的链接,CJ 服务端立即下载并保存,返回 CJ 托管的链接,
填进「发起纠纷」「回复纠纷」的 imageUrl / videoUrl。
你自己的附件链接会过期(例如客服系统里 1 小时就失效的临时链接)时,先调本接口转存,纠纷处理期间就一直能打开。
# URL
https://developers.cjdropshipping.com/api2.0/v1/disputes/uploadFile
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/disputes/uploadFile' \
--header 'Content-Type: application/json' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data '{"fileUrl": "https://your-helpdesk.com/attachments/8f3a?sig=xxx"}'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| fileUrl | 附件的链接 | string | 是 | 2000 | 见下方「链接要求」与「文件要求」 |
每次转存一个文件,多个附件请逐个调用。
链接要求
- 必须是公网可访问的
http:///https://地址,使用默认端口(80 / 443),不能带用户名密码;内网地址、IP 形式的内网地址一律拒绝。 - 调用时链接必须仍然有效:CJ 在本次调用内同步下载,下载完成后就与原链接无关,原链接之后失效也不影响。
- 支持跳转,最多 3 次,跳转目标同样须是公网地址。
- 源站需在 20 秒内开始返回数据,整次下载不超过 120 秒;源站需返回 HTTP 200。
- 链接没有扩展名、带签名参数都可以,CJ 按文件内容识别类型。
文件要求
| 类型 | 支持格式 | 单个文件上限 | 每个账号每天上限 |
|---|---|---|---|
| 图片 | jpg / jpeg / png / webp / gif | 10MB | 50 个 |
| 视频 | mp4 / mov / webm | 10MB | 10 个 |
- 图片与视频合计每个账号每天最多 2GB。每日上限按北京时间自然日计算。
- 按文件内容识别格式,与链接里的扩展名无关;svg、html 等内容一律拒绝。
- 转存失败不计入每日上限。
- 每次调用扣 20 点(见接口消耗点数),按调用计,校验不通过的请求同样扣点。
关于返回的链接
- 链接在 CJ 域名下、公开可访问,无需登录:
- 图片在浏览器里打开即直接预览,不会变成下载;
- 视频可在浏览器中直接播放(mp4、webm 主流浏览器均支持;mov 能否播放取决于视频编码,建议优先 mp4)。
- 链接长期有效,CJ 不会自动删除,纠纷处理期间及结束后都能打开。
- 任何拿到链接的人都能访问,请不要转存含个人隐私、账号密码等敏感信息的文件。
fileType为IMAGE时填进imageUrl,为VIDEO时填进videoUrl。
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": {
"url": "https://oss.cjdropshipping.com/cj-openapi-rest/dispute/2026/09/28/xxxx/3f2a9c1e0b7d4e5f8a6b2c1d0e9f8a7b.mp4",
"fileType": "VIDEO",
"size": 10485760
},
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f",
"success": true
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| data.url | 附件链接 | string | 300 | CJ 域名下的公开链接,图片可在浏览器直接打开预览;直接填进 imageUrl 或 videoUrl |
| data.fileType | 附件类型 | string | 10 | IMAGE:填进 imageUrl;VIDEO:填进 videoUrl |
| data.size | 文件大小 | long | 单位:字节 | |
| requestId | 请求Id | string | 48 | 用于日志查询错误 |
error
{
"code": 1607024,
"result": false,
"message": "Failed to download fileUrl (HTTP 404)",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
| 错误码 | 含义 |
|---|---|
| 1600300 | fileUrl 为空或超过 2000 字符 |
| 1607023 | fileUrl 不是默认端口的公网 http/https 地址(含跳转目标) |
| 1607024 | 下载失败,message 括号内为原因:HTTP 404 等状态码(常见于原链接已过期)/ timeout / connection failed / unknown host / too many redirects |
| 1607017 | 链接指向的文件为空 |
| 1607018 | 文件格式不支持(按内容识别) |
| 1607019 | 文件超过单个文件上限(图片、视频均为 10MB) |
| 1607020 | 超出每日上限(张数、个数或 2GB 总量),北京时间次日恢复 |
| 1607021 | 当前视频转存繁忙,请稍后重试 |
| 1607022 | 保存失败,message 括号内为失败环节:storage authorization failed / storage write failed / storage confirmation failed / temp file failed。可直接重试,本次不计入每日上限 |
# 使用示例:先转存,再发起纠纷
① 转存附件,取返回的 data.url:
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/disputes/uploadFile' \
--header 'Content-Type: application/json' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data '{"fileUrl": "https://your-helpdesk.com/attachments/broken-item.jpg"}'
② 把 data.url 填进「3 发起纠纷」(或「8 回复纠纷」)的 imageUrl / videoUrl:
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/disputes/create' \
--header 'Content-Type: application/json' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data '{
"businessDisputeId": "your-dispute-001",
"orderId": "SD2609280000000000000",
"disputeReasonId": 1,
"expectType": 1,
"refundType": 1,
"messageText": "The item arrived broken.",
"imageUrl": ["<第①步返回的图片 url>"],
"videoUrl": ["<转存视频时返回的 url>"],
"productInfoList": [{"lineItemId": "xxx", "quantity": 1, "price": 9.9}]
}'