# 6 物流
# 1 物流
# 1.1 物流试算 (POST)
下单前的物流费用试算. 需要特殊注明的是, 普通商品和供应商商品, 规则不一样, 供应商商品一般供应商指定了物流. 所以, 下单前需要 特别留意商品类型. 同时也是强烈建议还是将不同商品分开计算, 以规避很多不必要的麻烦, 比如不同物流对于重量、尺寸、大小、商品属性等等问题.
# URL
https://developers.cjdropshipping.com/api2.0/v1/logistic/freightCalculate
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/logistic/freightCalculate' \
--header 'Content-Type: application/json' \
--data-raw '{
"startCountryCode": "US",
"endCountryCode": "US",
"products": [
{
"quantity": 2,
"vid": "439FC05B-1311-4349-87FA-1E1EF942C418"
}
]
}'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| startCountryCode | 发货地 | string | 是 | 200 | |
| endCountryCode | 目的地 | string | 是 | 200 | |
| zip | 邮编 | string | 否 | 200 | |
| taxId | 税号 | string | 否 | 200 | |
| houseNumber | 门牌号 | string | 否 | 200 | |
| iossNumber | IOSS号码 | string | 否 | 200 | |
| quantity | 数量 | int | 是 | 10 | |
| vid | CJ 变体id | string | 是 | 50 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"logisticAging": "2-5",
"logisticPrice": 4.71,
"logisticPriceCn": 30.54,
"logisticName": "USPS+"
}
],
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f"
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| logisticPrice | 物流费用 | BigDecimal | (18, 2) | 单位:$(美元) |
| logisticPriceCn | 物流费用 | BigDecimal | (18, 2) | 单位:¥(人民币) |
| logisticAging | 物流时间 | string | 20 | |
| logisticName | 物流名称 | string | 20 | |
| taxesFee | 税费 | BigDecimal | (18, 2) | 单位:$(美元) |
| clearanceOperationFee | 清关手续费 | BigDecimal | (18, 2) | 单位:$(美元) |
| totalPostageFee | 总费用 | BigDecimal | (18, 2) | 单位:$(美元) |
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 | 用于日志查询错误 |
# 1.2 Freight Calculation Tip(POST)
下单前的物流费用试算. 需要特殊注明的是, 普通商品和供应商商品, 规则不一样, 供应商商品一般供应商指定了物流. 所以, 下单前需要 特别留意商品类型. 同时也是强烈建议还是将不同商品分开计算, 以规避很多不必要的麻烦, 比如不同物流对于重量、尺寸、大小、商品属性等等问题.
# URL
https://developers.cjdropshipping.com/api2.0/v1/logistic/freightCalculateTip
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/logistic/freightCalculateTip' \
--header 'Content-Type: application/json' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data-raw '{
"reqDTOS": [
{
"srcAreaCode": "CN",
"destAreaCode": "US",
"length": 0.3,
"width": 0.4,
"height": 0.5,
"volume": 0.06,
"totalGoodsAmount":123.2,
"productProp": [
"COMMON"
],
"freightTrialSkuList": [
{
"skuQuantity": 1,
"sku": "CJCF104237201AZ"
}
],
"skuList": [
"CJCF104237201AZ"
],
"platforms": [
"Shopify"
]
}
]
}'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| srcAreaCode | 发货区域code | string | 是 | 200 | |
| destAreaCode | 目的区域code | string | 是 | 200 | |
| customerCode | 客户code | string | 否 | 200 | |
| zip | 邮编 | string | 否 | 200 | |
| houseNumber | 门牌号 | string | 否 | 100 | |
| iossNumber | ioss编号 | string | 否 | 200 | |
| storageIdList | 分区仓库 | string | 否 | 100 | |
| recipientAddress | 收件地址(地址1+地址2) | string | 否 | 200 | |
| city | 城市 | string | 否 | 50 | |
| recipientName | 收件人姓名 | String | 否 | 200 | |
| skuList | sku列表 | String[] | 是 | 200 | |
| town | 县 | String | 否 | 100 | |
| phone | 电话 | String | 否 | 50 | |
| wrapWeight | 含包装重量,单位g | int | 是 | 200 | |
| volume | 体积,单位:立方厘米 | BigDecimal | 是 | 200 | |
| station | 站点 二子码 | String | 否 | 200 | |
| platforms | 平台 | String[] | 否 | 200 | CN |
| dutyNo | 税号 | String | 否 | 200 | |
| 邮箱 | String | 否 | 100 | ||
| province | 省/州 | String | 否 | 100 | |
| recipientAddress1 | 地址1 | String | 否 | 200 | |
| uid | uid 订单ID标识 | String | 否 | 200 | |
| recipientId | 收件人id | String | 否 | 200 | |
| recipientAddress2 | 收获地址2 | String | 否 | 200 | |
| amount | 销售金额 | BigDecimal | 否 | 50 | |
| productTypes | 商品类型(0:正常商品,1:服务商品,3:包装商品,4:供应商商品,5:供应商自发货商品,6:虚拟商品,7:pod个性商品) | String | 否 | 100 | |
| weight | 重量 | int | 是 | 100 | |
| productProp | 商品属性 | String[] | 否 | 100 | |
| optionName | 选项名称 | String | 否 | 200 | |
| volumeWeight | 体积重量 | BigDecimal | 否 | 100 | |
| orderType | 订单类型 0-代发单 1-直发单 2-odm定制 | String | 否 | 100 | |
| totalGoodsAmount | 总货值-单位美元 | BigDecimal | 否 | 100 | |
| freightTrialSkuList | 试算sku列表(抛货组合+折扣) | Object[] | 是 | ||
| - productCode | 商品编码 | String | 否 | 100 | |
| - sku | sku | String | 否 | 100 | |
| - productPropList | 商品属性 | String[] | 否 | 100 | |
| - productTypeList | 商品类型(0:正常商品,1:服务商品,3:包装商品,4:供应商商品,5:供应商自发货商品,6:虚拟商品,7:pod个性商品) | String | 否 | 100 | |
| - vid | 变体ID | String | 否 | 100 | |
| - skuQuantity | sku的下单数量 | int | 否 | 50 | |
| - skuWeight | sku的单个重量, 单位:克 | BigDecimal | 否 | 100 | |
| - skuVolume | sku的单个体积, 单位:立方厘米 | BigDecimal | 否 | 100 | |
| - combinationType | 是否组合商品 0-非组合商品 1-组合sku | int | 否 | 50 | |
| - parentVid | 组合主sku id | String | 否 | 50 |
# Return
success
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"arrivalTime": "12-50",
"discountFee": 4.09,
"discountFeeCNY": 25.30,
"volumeWeight": null,
"option": {
"arrivalTime": "12-50",
"cnName": "CJ航空挂号小包",
"enName": "CJPacket Postal",
"id": "1564849338719199233"
},
"ruleTips": [
{
"expression": "^[\\s\\d\\-()()+]{6,32}$",
"interceptType": "0",
"max": null,
"min": null,
"msgCode": "1001",
"msgEn": "Must be a 6-32 digit number (only numbers, symbols and spaces are supported).",
"type": "phone"
}
],
"ruleTipTypes": [
"phone"
],
"channelId": "1564543005939785730",
"error": "",
"errorEn": "",
"optionId": "1564849338719199233",
"postage": 3.55,
"postageCNY": 22.00,
"priceIncreases": "115",
"reSort": "62",
"remoteFee": 0,
"remoteFeeCNY": 0,
"tip": "",
"uid": "",
"orderId": null,
"unWeightChargeTarget": null,
"floatMaxPrice": null,
"floatMinPrice": null,
"logisticsParamRespDTO": null,
"message": "Hi, CJ will not accept any disputes when you choose the shipping method, which is not trackable when orders arrived at some countries, states, or cities.",
"wrapPostage": 4.09,
"wrapPostageCNY": 25.30,
"wrapWeight": 0,
"stopWords": [],
"channel": {
"cnName": "促佳燕文航空挂号小包特货",
"enName": "燕文航空挂号小包特货",
"id": "1564543005939785730"
},
"cjRespDTO": {
"postage": "3.55",
"postageCNY": "22.00",
"remoteFee": "0.00",
"remoteFeeCNY": "0"
},
"destArea": {
"cnName": "美国",
"countryId": "233",
"enName": "United States of America (the)",
"id": "233",
"parentId": null,
"postCode": "",
"shortCode": "US"
},
"srcArea": {
"cnName": "中国",
"countryId": "48",
"enName": "China",
"id": "48",
"parentId": null,
"postCode": "",
"shortCode": "CN"
},
"dump": false,
"zonePrice": [],
"allRuleTips": [
{
"expression": "^[\\s\\d\\-()()+]{6,32}$",
"interceptType": "0",
"max": null,
"min": null,
"msgCode": "1001",
"msgEn": "Must be a 6-32 digit number (only numbers, symbols and spaces are supported).",
"type": "phone"
}
],
"taxesFee": null,
"clearanceOperationFee": null
}
],
"requestId": "55c4708d15d44a499f061582ddbd989b",
"success": true
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| arrivalTime | 时效 | string | 200 | |
| discountFee | 折扣费用(物流费用美金) | BigDecimal | (18,2) | Unit: $ (USD) |
| discountFeeCNY | 人民币折扣费用(物流费用人民币) | BigDecimal | (18,2) | |
| volumeWeight | 抛重 | BigDecimal | (18,2) | Unit: $ (USD) |
| channelId | 渠道ID | String | 200 | |
| error | 错误信息 | String | 200 | |
| errorEn | 错误信息(En) | String | 200 | |
| optionId | 选项ID | String | 100 | |
| postage | 物流费用(不包括折扣) | BigDecimal | (18,2) | Unit: $ (USD) |
| postageCNY | 人民币物流费用(不包括折扣) | BigDecimal | (18,2) | Unit: $ (USD) |
| priceIncreases | 物流折扣 | String | 100 | |
| reSort | 排序字段 | String | 100 | |
| remoteFee | 偏远费 | BigDecimal | (18,2) | Unit: $ (USD) |
| remoteFeeCNY | 偏远费 CNY | BigDecimal | (18,2) | Unit: $ (USD) |
| tip | 提示 | string | 200 | |
| uid | uid 订单标识 | String | 200 | |
| orderId | 订单id | String | 100 | |
| unWeightChargeTarget | unWeightChargeTarget | BigDecimal | (18,2) | Unit: $ (USD) |
| floatMaxPrice | floatMaxPrice | BigDecimal | (18,2) | Unit: $ (USD) |
| floatMinPrice | floatMinPrice | BigDecimal | (18,2) | Unit: $ (USD) |
| logisticsParamRespDTO | 推荐物流相关参数 | String | 200 | |
| message | 消息通知 | String | 200 | |
| wrapPostage | 含包装物流费用 | BigDecimal | (18,2) | Unit: $ (USD) |
| wrapPostageCNY | 含包装物流费用 CNY | BigDecimal | (18,2) | Unit: $ (USD) |
| stopWords | 禁用词提示(校验未通过) | String | 200 | |
| channel | 物流渠道 | Object | ||
| cnName | 中文名 | String | 200 | |
| enName | 英文名 | String | 200 | |
| id | id | String | 200 | |
| option | 物流选项 | Object | ||
| arrivalTime | 妥投天数 | String | 100 | |
| cnName | 中文名 | String | 100 | |
| enName | 英文名 | String | 100 | |
| id | id | String | 100 | |
| taxesFee | 税费 | BigDecimal | (18,2) | Unit: $ (USD) |
| clearanceOperationFee | 清关操作费 | BigDecimal | (18,2) | Unit: $ (USD) |
| totalPostageFee | 总费用 | BigDecimal | (18, 2) | 单位:$(美元) |
| allRuleTips | 全部规则提示 | String[] |
error
{
"code": 1600100,
"result": false,
"message": "Param error",
"data": null,
"requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| code | error code | int | 20 | Reference error code |
| result | Whether or not the return is normal | boolean | 1 | |
| message | return message | string | 200 | |
| data | return data | object | interface data return | |
| requestId | requestId | string | 48 | Flag request for logging errors |
# 1.3 商家物流试算(POST)
# URL
https://developers.cjdropshipping.com/api2.0/v1/logistic/partnerFreightCalculate
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/logistic/partnerFreightCalculate' \
--header 'Content-Type: application/json' \
--data-raw '{
"orderNumber": "1234",
"shippingZip": "123",
"shippingCountryCode": "US",
"shippingCountry": "123",
"shippingProvince": "123",
"shippingCity": "132",
"shippingAddress": "123213",
"shippingCustomerName": "123",
"shippingPhone": "111",
"remark": "note",
"fromCountryCode": "CN",
"logisticName": "PostNL",
"houseNumber": "123",
"iossType": 税ioss申报方式:1-不使用IOSS申报 2-使用我的IOSS号申报 3-使用CJ的IOSS号申报
"iossNumber": ""
"products": [
{
"vid": "92511400-C758-4474-93CA-66D442F5F787",
"quantity": 1
}
]
}'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| orderNumber | 订单编号 | String | 是 | 40 | |
| shippingCountryCode | 交易国家简码 | string | 是 | 200 | |
| shippingCountry | 交易国家 | string | 是 | 200 | |
| shippingProvince | 交易省 | string | 是 | 200 | |
| shippingCity | 交易城市 | string | 是 | 200 | |
| shippingAddress | 交易地址 | string | 否 | 200 | |
| shippingCustomerName | 交易接收人 | string | 否 | 200 | |
| shippingZip | 交易邮编 | string | 是 | 200 | |
| shippingPhone | 交易电话 | string | 否 | 200 | 收货人, 电话号码一定要准确 |
| houseNumber | 门牌号 | string | 否 | 20 | |
| remark | 订单备注 | string | 否 | 500 | |
| logisticName | 物流名称 | string | 否 | 200 | |
| fromCountryCode | 发货地 | string | 是 | 200 | 发货仓库 |
| 邮箱 | string | 否 | 200 | ||
| consigneeID | 收货人id | string | 否 | 200 | |
| iossType | 税费申报方式 | int | 否 | 20 | 税ioss申报方式:1-不使用IOSS申报 2-使用我的IOSS号申报 3-使用CJ的IOSS号申报 |
| iossNumber | ioss号 | string | 否 | 20 | |
| products | list | 是 | 200 | ||
| vid | 变体 id | string | 是 | 200 | |
| quantity | 变体 数量 | string | 是 | 200 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"postageAmount": 1.69,
"logisticsModel": "YTGN",
"logisticsName": "YTO China Domestic"
"arrivalTime": "2-3",
"iossList": [
{
"iossNumber": "",
"iossType": "",
"serviceAmount": "",
"taxAmount": ""
}
]
}
],
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f"
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| postageAmount | 物流金额 | BigDecimal | (18, 2) | 单位:$(美元) |
| logisticsModel | 物流渠道 | string | 200 | |
| logisticsName | 物流名称 | string | 200 | |
| arrivalTime | 物流时效 | string | 20 | |
| isSupportIoss | 是否支持ioss | boolean | ||
| iossList | list | |||
| iossNumber | ioss号 | string | ||
| iossType | 是否默认,1-不使用IOSS申报 2-使用我的IOSS号申报 3-使用CJ的IOSS号申报 | |||
| serviceAmount | 手续费(美分) | BigDecimal | (18, 2) | 单位:$(美元) |
| taxAmount | 税费(美分) | BigDecimal | (18, 2) | 单位:$(美元) |
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 | 用于日志查询错误 |
# 1.4 CJ物流试算(POST)
下单前的物流费用试算. 需要特殊注明的是, 普通商品和供应商商品, 规则不一样, 供应商商品一般供应商指定了物流. 所以, 下单前需要 特别留意商品类型. 同时也是强烈建议还是将不同商品分开计算, 以规避很多不必要的麻烦, 比如不同物流对于重量、尺寸、大小、商品属性等等问题.
# URL
https://developers.cjdropshipping.com/api2.0/v1/logistic/freightCalculateTip
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/logistic/freightCalculateTip' \
--header 'Content-Type: application/json' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data-raw '{
"startCountryCode": "US",
"endCountryCode": "US",
"products": [
{
"quantity": 2,
"vid": "439FC05B-1311-4349-87FA-1E1EF942C418"
}
]
}'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| startCountryCode | 发货地 | string | 是 | 200 | |
| endCountryCode | 目的地 | string | 是 | 200 | |
| optionName | 选项名称 | string | 是 | 200 | |
| productProp | 商品属性 | string[] | 是 | 200 | |
| weight | 重量 | BigDecimal | 是 | 200 | |
| productTypes | 商品类型 | string[] | 是 | 200 | 0:正常商品, 1:服务商品, 3:包装商品, 4:供应商商品, 5:供应商自发货商品, 6:虚拟商品, 7:pod个性商品 |
| amount | 订单金额 | BigDecimal | 是 | 200 | |
| customerCode | 客户id | string | 是 | 200 | |
| zip | 邮编 | string | 是 | 200 | |
| recipientAddress2 | 地址2 | string | 是 | 200 | |
| houseNumber | 门牌号 | string | 是 | 200 | |
| uid | 订单id | string | 是 | 200 | |
| recipientAddress1 | 地址1 | string | 是 | 200 | |
| province | 省/州 | string | 是 | 200 | |
| 邮箱 | string | 是 | 200 | ||
| dutyNo | 税号 | string | 是 | 200 | |
| platforms | 平台 | string[] | 是 | 200 | |
| volume | 商品体积 | BigDecimal | 是 | 200 | |
| station | 站点 二字码 | string | 是 | 200 | |
| wrapWeight | 包装重量 | BigDecimal | 是 | 200 | |
| phone | 手机号 | string | 是 | 200 | |
| town | 县 | string | 是 | 200 | |
| iossNumber | ioss编号 | string | 是 | 200 | |
| skuList | sku列表 | string [] | 是 | 200 | |
| recipientName | 收件人姓名 | string | 是 | 200 | |
| city | 城市 | string | 是 | 200 | |
| recipientAddress | 收件地址(地址1+地址2) | string | 是 | 200 | |
| storageIdList | 仓库id | string[] | 是 | 200 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"logisticAging": "2-5",
"logisticPrice": 4.71,
"logisticPriceCn": 30.54,
"logisticName": "USPS+"
}
],
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f"
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| channelId | 渠道id | string | 20 | |
| discountFee | 折扣费用(物流费用美金) | string | 20 | |
| discountFeeCNY | 人民币折扣费用(物流费用人民币) | string | 20 | |
| dump | 是否抛货 | string | 20 | true-抛货 false-不抛货 |
| arrivalTime | 时效 | string | 20 | |
| error | 错误信息 | string | 200 | |
| errorEn | 错误信息 en | string | 200 | |
| floatMaxPrice | 浮动最大金额 | string | 20 | |
| floatMinPrice | 浮动最小金额 | string | 20 | |
| logisticsParamRespDTO | 推荐物流相关参数 | string | 20 | |
| message | 消息通知 | string | 200 | |
| optionId | 选项id | string | 20 | |
| postage | 物流费用(不包括折扣) | string | 20 | |
| postageCNY | 人民币物流费用(不包括折扣) | string | 20 | |
| priceIncreases | 物流折扣 | string | 20 | |
| reSort | 排序字段 | string | 20 | |
| remoteFee | 偏远费 | string | 20 | |
| remoteFeeCNY | 偏远费 | string | 20 | |
| tip | 提示 | string | 20 | |
| uid | 订单id | string | 20 | |
| unWeightChargeTarget | 未称重商品费用(0-收 1-不收 | string | 20 | |
| volumeWeight | 抛重 | string | 20 | |
| wrapPostage | 含包装物流费用 | string | 20 | |
| wrapPostageCNY | 含包装人民币物流费用 | string | 20 | |
| wrapWeight | 包装重量 | string | 20 | |
| volumeWeight | 抛重 | string | 20 | |
| volumeWeight | 抛重 | string | 20 | |
| stopWords | 禁用词提示(校验未通过) | string [] | ||
| zonePrice | object[] | 仓库价格 | ||
| discountFee | 不含包装费用 | string | 20 | |
| lastDiscountFee | 尾程不含包装费用 | string | 20 | |
| lastWrapPostage | 尾程含包装费用 | string | 20 | |
| storageId | 仓库id | string | 20 | |
| wrapPostage | 含包装费用 | string | 20 | |
| allRuleTips | object[] | 20 | 全部规则提示 | |
| expression | 表达式 | string | 20 | |
| interceptType | 拦截类型 0-强拦截 1-非强拦截 | string | 20 | |
| max | 范围最大值(姓名、地址) | string | 20 | |
| min | 范围最小值(姓名、地址) | string | 20 | |
| msgCode | 提示code | string | 20 | |
| type | 规则类型 | string | 20 | |
| allStopWords | object [] | 全部禁用词提示 | ||
| cnMsg | 中文提示 | string | 20 | |
| enMsg | 英文提示 | string | 20 | |
| type | 禁用词类型 | stringp[] | 200 | |
| words | 禁用词 | string | 20 | |
| channel | object | 物流渠道 | ||
| cnName | 中文名 | string | 20 | |
| enName | 英文名 | string | 20 | |
| id | 渠道id | string | 20 | |
| cjRespDTO | object | |||
| postage | 物流费用 | string | 20 | |
| postageCNY | 人民币物流费用 | string | 20 | |
| remoteFee | 偏远费 | string | 20 | |
| remoteFeeCNY | 人民币偏远费 | string | 20 | |
| destArea | object | 20 | ||
| cnName | 中文名称 | string | 20 | |
| countryId | 国家id | string | 20 | |
| enName | 英文名称 | string | 20 | |
| parentId | 父类id | string | 20 | |
| postCode | 邮编 | string | 20 | |
| shortCode | 简码 | string | 20 | |
| option | object | 20 | 物流选项 | |
| arrivalTime | 妥投天数 | string | 20 | |
| cnName | 中文名 | string | 20 | |
| enName | 英文名 | string | 20 | |
| id | id | string | 20 | |
| ruleTipTypes | 必填项规则 | string[] | 20 | (phone、dutyNo、email、zip、destArea3Id、houseNumber) |
| ruleTips | object[] | 20 | 规则提示(校验未通过) | |
| expression | 表达式 | string | 20 | |
| interceptType | 拦截类型 0-强拦截 1-非强拦截 | string | 20 | |
| max | 范围最大值(姓名、地址) | string | 20 | |
| min | 范围最小值(姓名、地址) | string | 20 | |
| msgCode | 提示code | string | 20 | |
| msgEn | 规则消息en | string | 20 | |
| type | 规则类型 | string | 20 | phone、dutyNo、email、zip、destArea3Id、houseNumber |
| msgEn | 规则消息en | string | 20 | |
| srcArea | object | 20 | 发件国家 | |
| cnName | 中文名称 | string | 20 | |
| countryId | 国家id | string | 20 | |
| id | id | string | 20 | |
| parentId | 父类id | string | 20 | |
| postCode | 邮编 | string | 20 | |
| shortCode | 简码 | string | 20 |
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 | 用于日志查询错误 |
# 1.5 供应商自发货物流试算(POST)
# URL
https://developers.cjdropshipping.com/api2.0/v1/logistic/getSupplierLogisticsTemplate
# CURL
curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/logistic/getSupplierLogisticsTemplate' \
--header 'Content-Type: application/json' \
--header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data-raw '{
"skuList": ""
}'
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| skuList | 商品sku | String[] | 是 | 200 | 商品sku(不是变体Sku) |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"skuList": [],
"logisticsInfoList": [
{
"id": "123",
"logisticsName": "fdd",
"postage": "",
"startCountryCode": "",
"destCountryCode": ""
}
]
}
],
"requestId": "0242ad78-eea2-481d-876a-7cf64398f07f"
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| skuList | 商品sku | String[] | ||
| logisticsInfoList | 物流信息 | Object[] | ||
| id | 模板id | string | 100 | |
| logisticsName | 模板名称 | string | 200 | |
| postage | 运费 | BigDecimal | (18,2) | 单位:$(美元) |
| startCountryCode | 发货国家编码 | string | 100 | |
| destCountryCode | 目的国家编码 | string | 100 |
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) 已过期
订单生成后, 根据追踪号, 查询订单物流. 同样也可以在 CJ 查询物流平台 (opens new window) 查询
已在2024年6月1日弃用, 请使用新接口查询物流轨迹
# URL
https://developers.cjdropshipping.com/api2.0/v1/logistic/getTrackInfo?trackNumber=CJPKL7160102171YQ
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/logistic/getTrackInfo?trackNumber=CJPKL7160102171YQ
&trackNumber=CJPKL7160102171YQ
&trackNumber=CJPKL7160102171YQ
&trackNumber=CJPKL7160102171YQ
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| trackNumber | 追踪单号 | string | 是 | 200 | 支持批量 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"trackingNumber": "CJPKL7160102171YQ",
"logisticName": "CJPacket Sensitive",
"trackingFrom": "CN",
"trackingTo": "US",
"deliveryDay": "13",
"deliveryTime": "2021-06-17 07:04:04",
"trackingStatus": "In transit",
"lastMileCarrier": "CJPacket",
"lastTrackNumber": "926112903032124"
}
],
"requestId": "3426e927-8c50-4687-9ced-623e77d55bd0"
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| trackingNumber | 追踪单号 | string | 200 | |
| trackingFrom | 起始地 | string | 20 | |
| trackingTo | 目的地 | string | 20 | |
| deliveryDay | 交付天数 | string | 200 | |
| deliveryTime | 交付时间 | string | 200 | |
| trackingStatus | 追踪单状态 | string | 200 | |
| lastMileCarrier | 最后一公里承运商 | string | 200 | |
| lastTrackNumber | 最后一公里追踪号 | 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 查询物流信息 (GET)
订单生成后, 根据追踪号, 查询订单物流. 同样也可以在 CJ 查询物流平台 (opens new window) 查询
# URL
https://developers.cjdropshipping.com/api2.0/v1/logistic/trackInfo?trackNumber=CJPKL7160102171YQ
# CURL
curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/logistic/trackInfo?trackNumber=CJPKL7160102171YQ
&trackNumber=CJPKL7160102171YQ
&trackNumber=CJPKL7160102171YQ
&trackNumber=CJPKL7160102171YQ
| 参数名称 | 参数意义 | 参数类型 | 是否必传 | 长度 | 备注 |
|---|---|---|---|---|---|
| trackNumber | 追踪单号 | string | 是 | 200 | 支持批量 |
# 返回
success
{
"code": 200,
"result": true,
"message": "Success",
"data": [
{
"trackingNumber": "CJPKL7160102171YQ",
"logisticName": "CJPacket Sensitive",
"trackingFrom": "CN",
"trackingTo": "US",
"deliveryDay": "13",
"deliveryTime": "2021-06-17 07:04:04",
"trackingStatus": "In transit",
"lastMileCarrier": "CJPacket",
"lastTrackNumber": "926112903032124"
}
],
"requestId": "3426e927-8c50-4687-9ced-623e77d55bd0"
}
| 返回字段 | 字段意思 | 字段类型 | 长度 | 备注 |
|---|---|---|---|---|
| trackingNumber | 追踪单号 | string | 200 | |
| trackingFrom | 起始地 | string | 20 | |
| trackingTo | 目的地 | string | 20 | |
| deliveryDay | 交付天数 | string | 200 | |
| deliveryTime | 交付时间 | string | 200 | |
| trackingStatus | 追踪单状态 | string | 200 | |
| lastMileCarrier | 最后一公里承运商 | string | 200 | |
| lastTrackNumber | 最后一公里追踪号 | 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 | 用于日志查询错误 |