# 5 交易

# 1 订单

# 1.1 创建订单(POST)(已过期)

# 该接口已过期,请使用createOrderV2

下单接口,根据发货地和目的地下单,如果发货地和目的地不一样,则需要分别下单

# URL

https://developers.cjdropshipping.com/api2.0/v1/shopping/order/createOrder

# CURL

curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/shopping/order/createOrder' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
                --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",
                    "email": "",
                    "products": [
                        {
                            "vid": "92511400-C758-4474-93CA-66D442F5F787",
                            "quantity": 1
                        }
                    ]
                }'
参数名称 参数意义 参数类型 是否必传 长度 备注
orderNumber 订单编号 String Y 40 The ID of the order, used for API purposes. This is different from the orderNumber property, which is a unique identifier for the order that's used by the shop owner and customer
shippingCountryCode 交易国家简码 string 200
shippingCountry 交易国家 string 200
shippingProvince 交易省 string 200
shippingCity 交易城市 string 200
shippingAddress 交易地址 string 200
shippingCustomerName 交易接收人 string 200
shippingZip 交易邮编 string 200
shippingPhone 交易电话 string 200 收货人,电话号码一定要准确
remark 订单备注 string 500
logisticName 物流名称 string 200
fromCountryCode 发货地 string 200 发货仓库
email 邮箱 String 50
houseNumber 门牌号 string 20
products list 200
vid 变体 id string 200
quantity 变体 数量 string 200

# 返回

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": "210711100018655344",
    "requestId": "9eddf3f5-bd3d-4fae-a4f2-028cbb90db97"
}
返回字段 字段意思 字段类型 长度 备注
code 错误码 int 20 返回错误码标准表
result 是否正常返回 boolean 1
message 返回信息 string 200
data 接口数据返回(订单号)
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 用于日志查询错误

# 1.2 创建订单 V2(POST)

  • 创建订单,
  • 如果要使用余额支付,payType传2, 会将创建成功的订单进行后续操作:添加购物车、确认订单、余额支付,
  • 如果不要使用余额支付,payType传3
  • header中新增platformToken参数, 获取platformToken的方式与CJ Access Token的方式相同, 如果不是被要求,该值可以为空. (2025-01-08 更新)

# URL

https://developers.cjdropshipping.com/api2.0/v1/shopping/order/createOrderV2

# CURL

curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/shopping/order/createOrderV2' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
                --header 'platformToken: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
                --header 'Content-Type: application/json' \
                --data-raw '{
                    "orderNumber": "1234",
                    "shippingZip": "123",
                    "shippingCountry": "123",
                    "shippingCountryCode": "US",
                    "shippingProvince": "123",
                    "shippingCity": "132",
                    "shippingCounty": "",
                    "shippingPhone": "111",
                    "shippingCustomerName": "123213",
                    "shippingAddress": "123213",
                    "shippingAddress2": "123213",
                    "taxId": "123",
                    "remark": "note",
                    "email": "",
                    "consigneeID": "",
                    "payType": "",
                    "shopAmount": "",
                    "logisticName": "PostNL",
                    "fromCountryCode": "CN",
                    "houseNumber": "123",
                    "platform": "shopify",
                    "iossType": "",
                    "iossNumber": ""
                    "products": [
                        {
                            "vid": "92511400-C758-4474-93CA-66D442F5F787",
                            "quantity": 1
                        }
                    ]
                }'
Parameter Definition Type Required Length Note
orderNumber 订单编号 string 50
shippingZip 目的地邮编 string 20
shippingCountryCode 目的地国家简码 string 20 参照:国家信息, 请使用二字码
shippingCountry 目的地国家 string 50
shippingProvince 目的地省 string 50
shippingCity 目的地城市 string 50
shippingCounty 目的地县 String 50
shippingPhone 收货人电话 string 20
shippingCustomerName 收货人名称 string 50
shippingAddress 收货人地址 string 200
shippingAddress2 收货人地址2 string 200
houseNumber 门牌号 String 20
email 邮箱 String 50
taxId 税号 string 20
remark 订单备注 string 500
consigneeID 收货人id string 20
payType payType=2 (余额支付),payType=3 (不使用余额支付), int 10 如果使用余额支付payType必须是2
shopAmount 订单金额 BigDecimal 20
logisticName 物流名称 string 50
fromCountryCode 发货国家 string 20 参照:国家信息, 请使用二字码
platform 平台类型(比如:shopify) String 20 如果需要开通指定的平台,需要找业务员申请开通,否则就使用默认的平台类型
iossType ioss类型 int 20 IOSS类型,选项:1=无IOSS(在没有IOSS的情况下申报订单时,收款人将被要求支付增值税和其他相关费用。),2=用我自己的IOSS申报(请确保提供的IOSS是有效的,并与欧盟的目的地国家相关联。如果目的地国家没有与正确的IOSS相关联,申报将在没有IOSS的情况下进行。),3=用CJ的IOSS进行申报(建议申报您的商店订单金额。如果您选择用CJ订单金额申报,您将对相关风险负责。CJ的IOSS不适用于价值超过150欧元的订单,收款人需要支付增值税。), 设置界面 (opens new window)
iossNumber ioss编号 String 10 如果iosType=3,则该值固定为CJ-IOSS
products list 20
vid 变体 id string 50
quantity 变体 数量 int 50
unitPrice 商品单价 int 50
podProperties POD定制信息 String 500 示例:[{"areaName":"LogoArea","links":["https://cc-west-usa.oss-us-west-1.aliyuncs.com/9f0b99e6-17ec-4dcd-8916-fc5d644be993_LOGO_NavyBlue.png"],"type":"1","layer":[ (opens new window)]}]

platform

取值
shopify
Lazada
woocommerce
tiktok
aliexpress
tiktok_us
Temu
ebay
shopee
shoplazza
mercado
allvalue
nuvemshop
square
bigcommerce
squarespace
magento
prestashop
etsy
wix

# Return

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": {
        "orderNumber": "",
        "orderId": "123434',
        "shipmentOrderId": "",
        "iossAmount": ,
        "iossTaxHandlingFee": ,
        "iossAmount": ,
        "postageAmount": ,
        "productAmount": "",
        "productOriginalAmount": "",
        "productDiscountAmount": "",
        "postageDiscountAmount": "",
        "postageOriginalAmount": "",
        "totalDiscountAmount": "",
        "actualPayment": "",
        "orderOriginalAmount": "",
        "cjPayUrl": "",
        "orderAmount": "",
        "logisticsMiss": "",
        "productInfoList": [
            {
                "lineItemId": "",
                "variantId": "",
                "isGroup": true,
                "quantity" 10,
                "subOrderProducts": [
                    {
                        "lineItemId": "",
                        "variantId": "",
                        "quantity": ""
                    }
                ]
            }
        ],
        "orderStatus": "",
        "interceptOrderReasons": [
            {
                "code": 1001,
                "message": ""
            }
        ]
    },
    "requestId": "9eddf3f5-bd3d-4fae-a4f2-028cbb90db97"
}
返回字段 字段意思 字段类型 长度 备注
code 错误码 int 20 返回错误码标准表
result 是否正常返回 boolean 1
message 返回信息 string 200
data 接口数据返回
requestId 请求Id string 48 用于日志查询错误

data information

Field Definition Type Length Note
orderId cj 订单号 string 200
orderNumber 客户订单号 string 200
shipmentOrderId 母订单号Id string 200
iossAmount ioss金额 BigDecimal (18,2) Unit: $ (USD)
iossTaxHandlingFee ioss税费 BigDecimal (18,2) Unit: $ (USD)
postageAmount 物流费用 BigDecimal (18,2) Unit: $ (USD)
productAmount 商品金额 BigDecimal (18,2) Unit: $ (USD)
productOriginalAmount 商品总金额(折前) BigDecimal (18,2) Unit: $ (USD)
productDiscountAmount 商品优惠金额 BigDecimal (18,2) Unit: $ (USD)
postageDiscountAmount 运费折扣金额 BigDecimal (18,2) Unit: $ (USD)
postageOriginalAmount 运费折扣前金额 BigDecimal (18,2) Unit: $ (USD)
totalDiscountAmount 订单优惠后的总金额 BigDecimal (18,2) Unit: $ (USD)
actualPayment 实付金额 BigDecimal (18,2) Unit: $ (USD)
orderOriginalAmount 订单原总金额 BigDecimal (18,2) Unit: $ (USD)
cjPayUrl cj支付页跳转地址 string 200
orderAmount 订单金额 BigDecimal 200
logisticsMiss 物流缺失标识 Boolean 10
orderStatus 订单中心订单状态 string 10
productInfoList 订单商品信息 list
interceptOrderReasons 订单拦截信息 list

product information

Field Definition Type Length Note
lineItemId lineItemId string 50
variantId 变体 id string 50
quantity 数量 int 20
isGroup 是否组合主商品 boolean 10
subOrderProducts 组合子商品 list 10
lineItemId lineItemId string 50
variantId 变体 id string 50
quantity 数量 int 20

Order interception information

Field Definition Type Length Note
code code int 50
message 拦截信息 string 200

error

{
   "code": 1600100,
   "result": false,
   "message": "Param error",
   "data": null,
   "requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
Field Definition Type Length Note
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 订单列表(GET)

# URL

https://developers.cjdropshipping.com/api2.0/v1/shopping/order/list?pageNum=1&pageSize=10

# CURL

curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shopping/order/list?pageNum=1&pageSize=10' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
参数名称 参数意义 参数类型 是否必传 长度 备注
pageNum 页数 int 20 默认 1
pageSize 每页返回多少条 int 20 默认 20
orderIds 订单ID List 100 查询条件
shipmentOrderId 母订单ID string 100 查询条件
status 订单状态 string 20 默认值: CANCELLED, 可选值:CREATED,IN_CART,UNPAID,UNSHIPPED,SHIPPED,DELIVERED,CANCELLED,OTHER

# 返回

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": {
        "orderId": "210823100016290555",
        "orderNum": "api_52f268d40b8d460e82c0683955e63cc9",
        "cjOrderId": null,
        "shippingCountryCode": "US",
        "shippingProvince": "Connecticut",
        "shippingCity": "ftdsr",
        "shippingPhone": "43514123",
        "shippingAddress": "rfdxf rfdesr",
        "shippingCustomerName": "Xu Old",
        "remark": null,
        "orderWeight": 20,
        "orderStatus": "CREATED",
        "orderAmount": 4.25,
        "productAmount": 0.57,
        "postageAmount": 3.68,
        "logisticName": "CJPacket Ordinary",
        "trackNumber": null,
        "createDate": "2021-08-23 11:31:45",
        "paymentDate": null,
        "productList": [
            {
                "vid": "1392053744945991680",
                "quantity": 1,
                "sellPrice": 0.57
            }
        ]
    },
    "requestId": "3adccdcb-d41b-4808-996b-c7c5c833d77d"
}
返回字段 字段意思 字段类型 长度 备注
orderId 订单ID string 200
orderNum 订单号 string 200
cjOrderId CJ订单ID string 200
shippingCountryCode 交易国家 string 200
shippingProvince 交易省份 string 200
shippingCity 交易城市 string 200
shippingAddress 交易地址 string 200
shippingCustomerName 交易接收人 string 200
shippingPhone 交易电话 string 200
remark 订单备注 string 500
logisticName 物流名称 string 200
trackNumber 追踪单号 string 200
orderWeight 订单重量 int 200
orderAmount 订单金额 BigDecimal (18,2) 单位:$(美元)
productAmount 商品金额 BigDecimal (18,2) 单位:$(美元)
postageAmount 物流金额 BigDecimal (18,2) 单位:$(美元)
orderStatus 订单状态 string 200 参考订单状态
createDate 创建时间 string 200
paymentDate 支付时间 string 200
storeCreateDate 店铺订单创建时间 DateTime 1 UTC时间, 示例: 2025-03-14 13:21:07
productList list 200
vid 变体ID string 200
quantity 数量 int 200
sellPrice 售价 BigDecimal (18,2) 单位:$(美元)

订单状态

订单状态 状态
CREATED 创建订单
IN_CART 加入购物车
UNPAID 未支付
UNSHIPPED 未发货
SHIPPED 发货
DELIVERED 已完成
CANCELLED 取消

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 订单查询(GET)

a1. Maximum return of 200 data per page.

# URL

https://developers.cjdropshipping.com/api2.0/v1/shopping/order/getOrderDetail?orderId=210711100018043276

# CURL

curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shopping/order/getOrderDetail?orderId=2107111000180432766&features=f1&features=f2' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

# Request参数

参数名称 参数意义 参数类型 是否必传 长度 备注
orderId 订单 id string 200 支持id: 客户订单id, CJ订单id
features 启用的特性功能 List false 20 如果传入相关特性,会启用相关的功能,启动多个特性时, 传入多个features参数

# 特性枚举

枚举编码 说明
LOGISTICS_TIMELINESS 启用查询物流时效,传入该特性枚举后,结果中会返回 logisticsTimeliness

# 返回

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": {
        "orderId": "210823100016290555",
        "orderNum": "api_52f268d40b8d460e82c0683955e63cc9",
        "cjOrderId": null,
        "shippingCountryCode": "US",
        "shippingProvince": "Connecticut",
        "shippingCity": "ftdsr",
        "shippingPhone": "43514123",
        "shippingAddress": "rfdxf rfdesr",
        "shippingCustomerName": "Xu Old",
        "remark": null,
        "orderWeight": 20,
        "orderStatus": "CREATED",
        "orderAmount": 4.25,
        "productAmount": 0.57,
        "postageAmount": 3.68,
        "logisticName": "CJPacket Ordinary",
        "trackNumber": null,
        "createDate": "2021-08-23 11:31:45",
        "paymentDate": null,
        "isComplete":1,
        "fromCountryCode;":"CN",
        "productList": [
            {
                "vid": "1392053744945991680",
                "quantity": 1,
                "sellPrice": 0.57
            }
        ]
    },
    "requestId": "3adccdcb-d41b-4808-996b-c7c5c833d77d"
}
返回字段 字段意思 字段类型 长度 备注
orderId 订单ID string 200
orderNum 订单号 string 200
cjOrderId CJ订单ID string 200
fromCountryCode 发货国家编码 string 2
shippingCountryCode 收货人国家编码 string 200
shippingProvince 收货人省份 string 200
shippingCity 收货人城市 string 200
shippingAddress 收货人地址 string 200
shippingCustomerName 收货人名称 string 200
shippingPhone 收货人电话 string 200
remark 订单备注 string 500
logisticName 物流名称 string 200
trackNumber 追踪单号 string 200
orderWeight 订单重量 int 200
orderAmount 订单金额 BigDecimal (18,2) 单位:$(美元)
productAmount 商品金额 BigDecimal (18,2) 单位:$(美元)
postageAmount 物流金额 BigDecimal (18,2) 单位:$(美元)
orderStatus 订单状态 string 200 参考订单状态
createDate 创建时间 string 200 UTC时间
paymentDate 支付时间 string 200 UTC时间
outWarehouseTime 出库时间 DateTime 1 UTC时间, 示例: 2025-03-14 13:21:07
storeCreateDate 店铺订单创建时间 DateTime 1 UTC时间, 示例: 2025-03-14 13:21:07
isComplete 订单是否完整1:完整 0:不完整 Number 1
productList 订单中的商品 list 200
- vid 变体ID string 200
- quantity 数量 int 200
- sellPrice 售价 BigDecimal (18,2) 单位:$(美元)
logisticsTimeliness 物流时效 Object
- logisticsModes 物流公司列表 List
-- logisticsName 物流名称 string DHL Official
-- arrivalTime 妥投天数 string 3-7 Days

订单状态

订单状态 状态
CREATED 创建订单
IN_CART 加入购物车
UNPAID 未支付
UNSHIPPED 未发货
SHIPPED 发货
DELIVERED 已完成
CANCELLED 取消

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 用于日志查询错误

# 错误码

错误码 错误信息
1600300 order not found
1600300 orderId must be not empty
1600300 The maximum number of features is 20

# 1.5 订单删除(DEL)

确认订单后则无法删除

# URL

https://developers.cjdropshipping.com/api2.0/v1/shopping/order/deleteOrder?orderId=210711100018655344

# CURL

curl --location --request DELETE 'https://developers.cjdropshipping.com/api2.0/v1/shopping/order/deleteOrder?orderId=210711100018655344' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
参数名称 参数意义 参数类型 是否必传 长度 备注
orderId 订单 id string 200 查询条件

# 返回

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": "210711100018655344",
    "requestId": "721341bf-abf8-4d8c-b400-1fbdaef79039"
}
返回字段 字段意思 字段类型 长度 备注
code 错误码 int 20 返回错误码标准表
result 是否正常返回 boolean 1
message 返回信息 string 200
data 接口数据返回(订单号)
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 用于日志查询错误

# 1.6 订单确认(PATCH)

# URL

https://developers.cjdropshipping.com/api2.0/v1/shopping/order/confirmOrder

# CURL

curl --location --request PATCH 'https://developers.cjdropshipping.com/api2.0/v1/shopping/order/confirmOrder' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
                --header 'Content-Type: application/json' \
                --data-raw '{
                    "orderId": "210711100018655344"
                }'
参数名称 参数意义 参数类型 是否必传 长度 备注
orderId 订单 id string 200 查询条件

# 返回

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": "210711100018655344",
    "requestId": "721341bf-abf8-4d8c-b400-1fbdaef79039"
}
返回字段 字段意思 字段类型 长度 备注
code 错误码 int 20 返回错误码标准表
result 是否正常返回 boolean 1
message 返回信息 string 200
data 接口数据返回(订单号)
requestId 请求Id string 48 用于日志查询错误

error

{
    "code": 1603001,
    "result": false,
    "message": "order confirm fail",
    "data": null,
    "requestId": "7dc61955-c0e8-4731-bb9b-393b4fffeaaf"
}
返回字段 字段意思 字段类型 长度 备注
code 错误码 int 20 返回错误码标准表
result 是否正常返回 boolean 1
message 返回信息 string 200
data 接口数据返回
requestId 请求Id string 48 用于日志查询错误

# 2 支付

# 2.1 余额查询(GET)

# URL

https://developers.cjdropshipping.com/api2.0/v1/shopping/pay/getBalance

# CURL

curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/shopping/pay/getBalance' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

# 返回

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": {
        "amount": 87247.32,
        "noWithdrawalAmount": 0.00,
        "freezeAmount": 0.00
    },
    "requestId": "36fc030a-a110-4318-bc83-f39f9d3e5484"
}
返回字段 字段意思 字段类型 长度 备注
amount 余额 string 200 末尾2位小数点
noWithdrawalAmount 未支付金额 BigDecimal (18,2) 单位:$(美元)
freezeAmount 冻结金额 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 用于日志查询错误

# 2.2 余额支付(POST)

# URL

https://developers.cjdropshipping.com/api2.0/v1/shopping/pay/payBalance

# CURL

curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/shopping/pay/payBalance' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
                --header 'Content-Type: application/json' \
                --data-raw '{
                    "orderId": "210711100018655344"
                }'
返回字段 字段意思 字段类型 长度 备注
orderId 订单 string 200

# 返回

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": 12,
    "requestId": "7dbe69b9-dd82-4ee3-907c-a6fca833e3ce"
}
返回字段 字段意思 字段类型 长度 备注
code 错误码 int 20 返回错误码标准表
result 是否正常返回 boolean 1
message 返回信息 string 200
data 接口数据返回(订单号)
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 用于日志查询错误