# 接口地址
测试环境:https://open-api-test.xhsnw.com (opens new window)
# 代发出库单
# POST 代发出库单创建
POST /scmorder/OrderCreate
Body 请求参数
{
"remark": "备注",
"manageCode": "XH0655Prj1088",
"warehouseCode": "CDMX3",
"carrierCode": "UPS",
"shippingMethod": "",
"platformCode": "amazon",
"sellerOrderCode": "test629927084032",
"platformOrderCode": "platformTest123456",
"receiveAddress": {
"receiveUser": "测试用户",
"companyName": "测试公司",
"country": "MX",
"province": "Ciudad de Mexico",
"city": "Mexico City",
"postalCode": "27430",
"mobile": "+52 55 7442 7442",
"email": "",
"address1": "PTE 122 667, AZCAPOTZALCO, 02360, CDMX",
"address2": ""
},
"skuDetailList": [
{
"sku": "58682222",
"shipmentNum": "1",
"weight": "1",
"length": "1",
"width": "1",
"height": "1"
}
],
"trackingNumber": "test27084032",
"deliveryType": "",
"waybillNo": "",
"packageNo": "",
"logisticsMethod": "1",
"expressSheetUrl": "https://xh-oa.obs.cn-south-1.myhuaweicloud.com:443/184679281291937382473908.pdf",
"logisticsInfoType": 1,
"logisticsChannelCode": "1764914660121026562"
}
# 请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Token | header | string | 否 | none | |
| body | body | object | 否 | none | |
| » remark | body | string | 否 | 备注 | none |
| » manageCode | body | string | 是 | 项目编码 | none |
| » warehouseCode | body | string | 是 | 发货仓库 仓库编码 | none |
| » carrierCode | body | string | 否 | 承运商编码 | USPS、Fedex、DHL、J&T Express、Mexico Car |
| » shippingMethod | body | string | 否 | 运输方式 | ESF-LY : 陆运、T0 : T0 派送模式、T1 : T1 派送模式、T2 : T2 派送模式、Express : Express、visit : 上门取件 |
| » platformCode | body | string | 是 | 平台编码 | Mercado、Shein、TikTok、Shopee、Amazon、Falabella、Takealot、Jumia、Ozon、Wildberries、Kaspi、UzumMarket、Temu |
| » sellerOrderCode | body | string | 是 | 卖家订单号(关联单号) | none |
| » platformOrderCode | body | string | 否 | 平台订单号 | none |
| » receiveAddress | body | object | 是 | 收件信息 | none |
| »» receiveUser | body | string | 是 | 收件人 | none |
| »» companyName | body | string | 否 | 公司名称 | none |
| »» country | body | string | 是 | 国家 | none |
| »» province | body | string | 是 | 省 | none |
| »» city | body | string | 是 | 市 | none |
| »» postalCode | body | string | 是 | 邮编 | none |
| »» mobile | body | string | 是 | 手机号 | none |
| body | string | 否 | 邮箱 | none | |
| »» address1 | body | string | 是 | 收件地址 1 | none |
| »» address2 | body | string | 否 | 收件地址 2 | none |
| » skuDetailList | body | [object] | 是 | 装箱 sku 信息列表 | none |
| »» sku | body | string | 是 | 系统 sku | none |
| »» shipmentNum | body | string | 是 | 发货数量 | none |
| »» weight | body | string | 否 | 重 | none |
| »» length | body | string | 否 | 长 | none |
| »» width | body | string | 否 | 宽 | none |
| »» height | body | string | 否 | 高 | none |
| » trackingNumber | body | string | 否 | 跟踪号 | none |
| » deliveryType | body | integer | 否 | 配送类型 | #1 直发订单 #2 合仓订单 |
| » waybillNo | body | string | 否 | #源数据跟踪号字段 | none |
| » packageNo | body | string | 否 | #源数据包裹号字段 | none |
| » logisticsMethod | body | string | 是 | 物流预报方式 | 1.海外仓物流 2.线上平台物流 |
| » expressSheetUrl | body | string | 否 | 面单地址 | none |
| » logisticsInfoType | body | integer | 是 | 物流处理类型 | 1.主动上传面单跟踪号 2.通过物流渠道发起预报后获取 |
| » logisticsChannelCode | body | string | 否 | 物流渠道编码 | none |
# 详细说明
» logisticsInfoType: 1.主动上传面单跟踪号 2.通过物流渠道发起预报后获取 填 1 时需要同时传入 跟踪号、面单地址、承运商编码 填 2 时需要同时传入 物流渠道编码
返回示例
200 Response
{
"code": "string",
"data": {
"outboundOrderCode": "string",
"repetition": true
}
}
# 返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK (opens new window) | none | Inline |
# 返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | string | true | none | none | |
| » data | object | true | none | none | |
| »» outboundOrderCode | string | true | none | 出库单编码 | none |
| »» repetition | boolean | true | none | 是否重复 | bool |
# POST 代发出库单查询
POST /scmorder/OrderSearch
Body 请求参数
{
"outboundOrderCodeList": ["string"]
}
# 请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Token | header | string | 否 | none | |
| body | body | object | 否 | none | |
| » outboundOrderCodeList | body | [string] | 是 | 出库单 code 列表 | none |
返回示例
200 Response
{
"code": "string",
"data": [
{
"outboundOrderCode": "string",
"manageCode": "string",
"tenantCode": "string",
"shippingMethodCode": "string",
"trackingNumber": "string",
"warehouseCode": "string",
"regionCode": "string",
"packingStatus": "string",
"sellerCode": "string",
"sellerOrderCode": "string",
"shippingMethod": "string",
"outboundOrderStatus": "string",
"exceptionReason": "string",
"deliveryTime": "string"
}
]
}
# 返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK (opens new window) | none | Inline |
# 返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | string | true | none | none | |
| » data | [object] | true | none | none | |
| »» outboundOrderCode | string | true | none | 出库单编码 | none |
| »» manageCode | string | true | none | none | |
| »» tenantCode | string | true | none | none | |
| »» shippingMethodCode | string | true | none | none | |
| »» trackingNumber | string | true | none | none | |
| »» warehouseCode | string | true | none | 仓库编码 | none |
| »» regionCode | string | true | none | 区域仓编码 | none |
| »» packingStatus | string | true | none | 装箱状态 | 1.待装箱 2.待上传箱贴 3.待贴箱贴 4.装箱完成 |
| »» sellerCode | string | true | none | 卖家代码 | none |
| »» sellerOrderCode | string | true | none | 销售订单 id | none |
| »» shippingMethod | string | true | none | none | |
| »» outboundOrderStatus | string | true | none | 出库单状态 | 10: 草稿 20:已下单 30:待出库 110:已出库 120:作废 130:异常 |
| »» exceptionReason | string | true | none | 异常原因 | none |
| »» deliveryTime | string | true | none | 发货时间 | none |
# POST 出库单截单
POST /scmorder/OrderCancel
Body 请求参数
{
"outboundOrderCode": "ssdssd",
"cutType": 0,
"cutMsg": "调试不通"
}
# 请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Token | header | string | 否 | none | |
| body | body | object | 否 | none | |
| » cutMsg | body | string | 否 | 截单消息 | none |
| » cutType | body | integer | 是 | 截单原因 | 1:换地址 2:取消订单 3:换 sku 4:其他 |
| » outboundOrderCode | body | string | 是 | 出库单 code | none |
返回示例
200 Response
{
"code": 0,
"msg": "string",
"isSuccess": true
}
# 返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK (opens new window) | none | Inline |
# 返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | 编码 | 200 成功 500 未知错误 1000201 截单被驳回 1000202 库位分配中 |
| » msg | string | true | none | 信息 | none |
| » isSuccess | boolean | true | none | 是否成功 | none |
# 商品
# POST 创建产品
POST /scmproduct/addProduct
Body 请求参数
{
"base": {
"sku": "ABC00000001",
"customer_sku": "C00000001",
"name_en": "Vacuum cleaner",
"name_cn": "吸尘器",
"brand": "DYSON",
"unit": "个",
"material": "塑料,金属",
"main_image": "http://dummyimage.com/400x400",
"status": 1,
"cost_price": 999.99
},
"specs": {
"package_weight": 9.999,
"package_length": 9.99,
"package_width": 9.99,
"package_height": 9.99,
"special_type": "1,2",
"is_fragile": 1
},
"customs": {
"customs_code": "4000000001",
"customs_name_cn": "吸尘器",
"customs_name_en": "Vacuum cleaner",
"customs_declare_price": "999.99"
},
"images": [
{
"image_name": "400x400.png",
"image_url": "http://dummyimage.com/400x400.png",
"image_tag": 1,
"status": 1
},
{
"image_name": "400x400.jpg",
"image_url": "http://dummyimage.com/400x400.jpg",
"image_tag": 1,
"status": 2
}
],
"attachment": [
{
"file_name": "1688600001.jpg",
"file_url": "http://qjmrouid.bz/tcbbmp",
"file_size": 99.99,
"file_type": "image/jpeg"
},
{
"file_name": "1688600002.jpg",
"file_url": "http://dmasrdce.ht/dkuq",
"file_size": 99.99,
"file_type": "image/jpeg"
}
]
}
# 请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Token | header | string | 否 | none | |
| body | body | object | 否 | none | |
| » base | body | object | 是 | 基本 | none |
| »» sku | body | string | 是 or 否 | 系统 SKU | 无 sku 为新增,有 sku 为修改 |
| »» customer_sku | body | string | 是 | 卖家 SKU | none |
| »» name_en | body | string | 否 | 中文名称 | none |
| »» name_cn | body | string | 否 | 英文名称 | none |
| »» brand | body | string | 否 | 品牌 | none |
| »» unit | body | string | 否 | 单位 | none |
| »» material | body | string | 否 | 材质 | none |
| »» main_image | body | string | 否 | 主图 | none |
| »» status | body | integer | 否 | 状态 | 1 在售 2 热销 3 停售 |
| »» cost_price | body | number | 否 | 产品成本(采购)价 | none |
| » specs | body | object | 否 | 规格 | none |
| »» package_weight | body | number | 否 | 预报包装毛重 | 单位 kg |
| »» package_length | body | number | 否 | 预报包装长度 | 单位 cm |
| »» package_width | body | number | 否 | 预报包装宽度 | 单位 cm |
| »» package_height | body | number | 否 | 预报包装高度 | 单位 cm |
| »» special_type | body | string | 否 | 物流属性 | 1 普货 2 带电带磁 3 带电 4 带磁 5 弱磁 6 木制品 7 纺织品 8 仿牌 9 木制品 10 食品 11 纯电池 12 纯液体 13 带液体 14 危险品 15 少量液体 16 内置电池 17 敏感货 18 膏体 19 管制刀具 20 防疫用品 21 化妆品, 22 易燃易爆 23 仿牌侵权 多个用逗号隔开 |
| »» is_fragile | body | integer | 否 | 是否易碎 | 1 易碎,2 非易碎 |
| » customs | body | object | 否 | 报关 | none |
| »» customs_code | body | string | 否 | 海关编码 | none |
| »» customs_name_cn | body | string | 否 | 中文海关名称 | none |
| »» customs_name_en | body | string | 否 | 英文海关名称 | none |
| »» customs_declare_price | body | string | 否 | 报关价格,货值 | none |
| » images | body | [object] | 否 | 图片 | none |
| »» image_name | body | string | 否 | 图片名称 | none |
| »» image_url | body | string | 否 | 图片地址 | none |
| »» image_tag | body | integer | 否 | 图片标签 | 1 主图、2 主图白底,3 主图橱窗图等 |
| »» status | body | integer | 否 | 图片状态 | 1 正常,2 删除 |
| » attachment | body | [object] | 否 | 附件 | none |
| »» file_name | body | string | 否 | none | |
| »» file_url | body | string | 否 | none | |
| »» file_size | body | number | 否 | none | |
| »» file_type | body | string | 否 | none |
返回示例
{
"code": 500,
"msg": "卖家SKU缺失",
"data": []
}
{
"code": 200,
"msg": "成功",
"data": {
"sku": "ABC00000001"
}
}
# 返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK (opens new window) | none | Inline |
# 返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » msg | string | true | none | none | |
| » data | object | true | none | none | |
| »» sku | string | true | none | 系统 SKU | none |
# 库存
# POST 获取库存
POST /scminventory/InventorySearch
Body 请求参数
{
"warehouse_code": "string",
"sku": "string",
"size": 0,
"current": 0
}
# 请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Token | header | string | 否 | none | |
| body | body | object | 否 | none | |
| » warehouse_code | body | string | 是 | 仓库代码 | none |
| » sku | body | string | 是 | 商品编码 | none |
| » size | body | integer | 是 | 每页条数,默认 50,最大 100 | none |
| » current | body | integer | 是 | 当前页 | none |
返回示例
200 Response
{
"code": 0,
"msg": "string",
"data": {
"list": [
{
"tro_in_transit_qty": "string",
"csgo_in_transit_qty": "string",
"tr_shipped_qty": "string",
"csg_shipped_qty": "string",
"tr_to_be_shelved_qty": "string",
"csg_to_be_shelved_qty": "string",
"tr_available_qty": "string",
"csg_available_qty": "string",
"tr_to_be_shipped_qty": "string",
"csg_to_be_shipped_qty": "string",
"sku": "string",
"warehouse_code": "string",
"customer_sku": "string",
"created_at": "string"
}
],
"total": 0,
"size": 0,
"current": 0
}
}
# 返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK (opens new window) | none | Inline |
# 返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » msg | string | true | none | none | |
| » data | object | true | none | none | |
| »» list | [object] | true | none | none | |
| »»» tro_in_transit_qty | string | true | none | 中转海外在途数量 | |
| »»» csgo_in_transit_qty | string | true | none | 代发海外在途数量 | |
| »»» tr_shipped_qty | string | true | none | 中转已出库数量 | |
| »»» csg_shipped_qty | string | true | none | 代发已出库数量 | |
| »»» tr_to_be_shelved_qty | string | true | none | 中转待上架数量 | |
| »»» csg_to_be_shelved_qty | string | true | none | 代发待上架数量 | |
| »»» tr_available_qty | string | true | none | 中转可用数量 | |
| »»» csg_available_qty | string | true | none | 代发可用数量 | |
| »»» tr_to_be_shipped_qty | string | true | none | 中转待出数量 | |
| »»» csg_to_be_shipped_qty | string | true | none | 代发待出数量 | |
| »»» sku | string | true | none | 仓库 sku 编码 | |
| »»» warehouse_code | string | true | none | 仓库编码 | |
| »»» customer_sku | string | true | none | 系统 sku | |
| »»» created_at | string | true | none | 创建时间 | |
| »» total | integer | true | none | 总条数 | |
| »» size | integer | true | none | 当前页条数 | |
| »» current | integer | true | none | 当前页 |
# 库龄
# POST 获取库龄
POST /scminventory/InventoryAge
Body 请求参数
{
"warehouse_code": "string",
"sku": "string",
"putaway_at_begin": "string",
"putaway_at_end": "string",
"size": 0,
"current": 0
}
# 请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Token | header | string | 否 | none | |
| body | body | object | 否 | none | |
| » warehouse_code | body | string¦null | 是 | 仓库编码 | none |
| » sku | body | string¦null | 是 | 商品编码 | none |
| » putaway_at_begin | body | string¦null | 是 | 上架时间开始时间 | 格式:2024-01-30 |
| » putaway_at_end | body | string¦null | 是 | 上架结束时间 | 格式:2024-01-30 |
| » size | body | integer | 是 | 页数 | none |
| » current | body | integer | 是 | 页码 | none |
返回示例
200 Response
{
"code": 0,
"msg": "string",
"data": {
"list": [
{
"warehouse_code": "string",
"putaway_at": "string",
"available_qty": "string",
"customer_sku": "string",
"age_day": 0
}
],
"total": 0,
"size": 0,
"current": 0
}
}
# 返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK (opens new window) | none | Inline |
# 返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » msg | string | true | none | none | |
| » data | object | true | none | none | |
| »» list | [object] | true | none | none | |
| »»» warehouse_code | string | true | none | 仓库编码 | none |
| »»» putaway_at | string | true | none | 上架时间 | none |
| »»» available_qty | string | true | none | 可用数量 | none |
| »»» customer_sku | string | true | none | sku 编码 | none |
| »»» age_day | integer | true | none | 库龄 | none |
| »» total | integer | true | none | none | |
| »» size | integer | true | none | none | |
| »» current | integer | true | none | none |
# 仓库
# POST 获取仓库列表
POST /scmwarehouseinfo/warehouseInfo
Body 请求参数
{
"seller_code": "string",
"size": 0,
"current": 0
}
# 请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Token | header | string | 否 | none | |
| body | body | object | 否 | none | |
| » seller_code | body | string | 否 | 卖家代码 | none |
| » size | body | integer | 是 | 页数 | 默认 50 |
| » current | body | integer | 是 | 页码 | 默认 1 |
返回示例
{
"code": 200,
"msg": "",
"data": {
"list": [
{
"warehouse_code": "cs000",
"warehouse_name_zh": "测试部测试仓库",
"warehouse_name_en": "test-werahouse3",
"region_code": "MX",
"seller_code": "XH0027"
},
{
"warehouse_code": "cs123",
"warehouse_name_zh": "测试仓库",
"warehouse_name_en": "test-werahouse2",
"region_code": "MX",
"seller_code": "XH0027"
},
{
"warehouse_code": "z1212",
"warehouse_name_zh": "猪猪仓库2",
"warehouse_name_en": "zhu",
"region_code": "MX",
"seller_code": "XH0027"
},
{
"warehouse_code": "724",
"warehouse_name_zh": "724测试模拟仓库",
"warehouse_name_en": "CDMX4",
"region_code": "MX",
"seller_code": "XH0027"
},
{
"warehouse_code": "DDCK",
"warehouse_name_zh": "测试等等仓库",
"warehouse_name_en": "test deng deng",
"region_code": "MX",
"seller_code": "XH0027"
}
],
"total": 5,
"size": 50,
"current": 1
}
}
# 返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK (opens new window) | none | Inline |
# 返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » msg | string | true | none | none | |
| » data | object | true | none | none | |
| »» list | [object] | true | none | none | |
| »»» warehouse_code | string | true | none | 仓库编码 | none |
| »»» warehouse_name_zh | string | true | none | 仓库中文名称 | none |
| »»» warehouse_name_en | string | true | none | 仓库英文名称 | none |
| »»» region_code | string | true | none | 区域仓编码 | none |
| »»» seller_code | integer | true | none | 卖家代码 | none |
| »» total | integer | true | none | none | |
| »» size | integer | true | none | none | |
| »» current | integer | true | none | none |
# POST 根据仓库查询物流渠道
POST /scmshipping/shippingInfo
Body 请求参数
{
"warehouseCode": ["string"]
}
# 请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| warehouseCode | body | [string] | 是 | 仓库编码 | none |
返回示例
200 Response
{
"data": [
{
"logisticsChannelCode": "string",
"channelName": "string",
"volumeCoefficient": 0
}
],
"code": "string"
}
# 返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK (opens new window) | none | Inline |
# 返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » data | [object] | true | none | 渠道列表 | none |
| »» logisticsChannelCode | string | true | none | 物流渠道编码 | none |
| »» channelName | string | true | none | 渠道名称 | none |
| »» volumeCoefficient | integer | true | none | 体积系数 | none |
| » code | string | true | none | 返回码 | none |