1. 简介
QLINK第三方平台标准接口文档
2. 环境要求及基础约定
授权: accessId(客户ID/平台应用ID)、secretKey(密钥/平台秘钥,用于验证报文信息)。
接口地址:第三方提供服务地址供IVS调用。
请求方式:
- Method: POST
- Content-Type: application/json
header参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| appKey | String | Y | qlink给ISV的appkey | |
| sign | String | Y | 签名 | |
| platformType | 平台类型 | String | Y | 平台类型,支持平台及映射见表 |
| accessToken | accessToken | String | N | accessToken |
| refreshToken | refreshToken | String | N | refreshToken |
| authorJson | 平台必填的授权信息 | List <authorInfo> |
AuthorInfo 授权具体信息
| 字段名 | 类型 | 必填 | 备注 |
|---|---|---|---|
| authorKey | 授权key | 是 | 平台key |
| authorValue | 授权Value | 是 | 平台K的值ey |
公共响应:
| 字段名 | 类型 | 必填 | 备注 |
|---|---|---|---|
| success | boolean | 是 | 业务处理是否成功 |
| message | String | 否 | 业务处理异常消息 |
签名方式:
1、将appKey和content组成json字符串{"appKey":"appKey","content":"具体业务参数"},content为空时{"appKey":"appKey"}
2、将第三方分配的客户appSecret添加到json的末尾,得到待加密字串{"appKey":"appKey","content":"具体业务参数"}appSecret
3、对待加密字串做sha1加密得到签名(org.apache.commons.codec.digest.DigestUtils.sha1Hex(待加密字串))
4、将签名赋值到公共请求的sign字段
服务请求地址(Service Endpoints)
| 环境 | 地址 |
|---|---|
| 生产环境 | qlink-global.800best.com |
| 测试环境 | qlink-global-test.800best.com |
3. 获取Token
POST /global-api/v1/platform/getToken
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| code | oauth代码,从应用回调URL获取 | String | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| redirectUri | 平台回调地址 | String | N |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| accessToken | API接口调用凭据 | String | Y | |
| accessExpiresIn | 访问令牌的过期时间(秒) | Long | Y | 3600 |
| refreshToken | 刷新令牌Token | String | Y | |
| refreshExpiresIn | refreshToken过期时间 | Long | Y | 14400 |
| onlineShopId | 线上店铺ID | String | N | |
| country | 国家ID(sg:新加坡,my:马来西亚,ph:菲律宾,th:泰国,ID:印度尼西亚,vn:越南) | String | N |
请求示例:
{
"platform": "MOMO",
"code": "AUTH_CODE_123",
"onlineShopId": "shop123",
"redirectUri": "https://your-app.com/callback"
}
返回示例:
{
"success": true,
"message": "",
"accessToken": "ACCESS_TOKEN_XXX",
"accessExpiresIn": 3600,
"refreshToken": "REFRESH_TOKEN_YYY",
"refreshExpiresIn": 14400,
"onlineShopId": "shop123",
"country": "sg"
}
4. 刷新Token
POST /global-api/v1/platform/refreshToken
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| refresh_token | 刷新令牌,用于在“Refresh_expires_in”>0时刷新令牌。 | String | Y | |
| onlineShopId | 线上店铺ID | String | N |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| accessToken | API接口调用凭据 | String | Y | |
| accessExpiresIn | 访问令牌的过期时间(秒) | Long | Y | 示例: 3600 |
| refreshToken | 刷新令牌Token | String | Y | |
| refreshExpiresIn | refreshToken过期时间 | Long | Y | 示例: 14400 |
| onlineShopId | 线上店铺ID | String | N | |
| country | 国家ID(sg:新加坡,my:马来西亚,ph:菲律宾,th:泰国,ID:印度尼西亚,vn:越南) | String | N |
请求示例:
{
"platform": "MOMO",
"refresh_token": "REFRESH_TOKEN_YYY",
"onlineShopId": "shop123"
}
返回示例:
{
"success": true,
"message": "",
"accessToken": "ACCESS_TOKEN_NEW",
"accessExpiresIn": 3600,
"refreshToken": "REFRESH_TOKEN_NEW",
"refreshExpiresIn": 14400,
"onlineShopId": "shop123",
"country": "sg"
}
5. 获取订单信息
POST /global-api/v1/platform/getOrder
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| shopId | IVS店铺Id | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| onlineOrderIdList | 线上订单ID | List <String> |
N | updateTimeStart、updateTimeEnd无值,必传 |
| updateTimeStart | 更新开始时间 | Number | N | 13位时间戳 onlineOrderIdList 无值,必传 |
| updateTimeEnd | 更新结束时间 | Number | N | 13位时间戳 onlineOrderIdList 无值,必传 |
| pageNo | 页码 | Number | N | 1: 从第一页开始 |
| PageSize | 页面大小 | Number | N | 页大小 |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| isLastPage | 最后一页标识 | Number | Y | true:最后一页/false:还有下一页 |
| currentPageNo | 当前页码 | Number | N | |
| pageCount | 总页数 | Number | N | |
| platform | 平台类型 | String | Y | |
| orderInfoList | 订单详情 | List <orderInfo> |
Y |
orderInfo(订单详情)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| shopId | IVS店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| onlineOrderId | 线上订单号 | String | Y | |
| payTime | 支付时间 | Long | N | 13位时间戳 |
| createTime | 创建时间 | Long | Y | 13位时间戳 |
| onlineOrderStatus | 线上订单状态 | String | Y | |
| erpOrderStatus | ERP订单状态 | String | Y | WAIT_PAYMENT(待付款),WAIT_AUDIT(待审核),CLOSED(关闭) |
| buyerMessage | 买家留言 | String | N | |
| sellerRemarks | 商家备注 | String | N | |
| platformShippingTime | 平台反馈的发货时间 | Long | N | 13位时间戳 |
| lastShipTime | 最晚发货时间 | Long | N | 13位时间戳 |
| platformDeliveryTime | 交货时间 | Long | N | 13位时间戳 |
| shippingServiceSelected | 平台指定的承运商 | String | N | |
| carrier | 承运商 | String | N | |
| carrierName | 承运商名称 | String | N | |
| trackingNumber | 运单号 | String | N | |
| currency | 币种 | String | Y | 币种单位 |
| paymentMethod | 支付方式 | String | Y | COD(cod订单) :PAY_ONLINE(线上订单) |
| codPayAmount | cod货到付款金额 | String | N | |
| freight | 运费 | String | Y | |
| totalAmount | 总支付金额 | String | Y | |
| sellerDiscount | 订单卖家优惠 | String | N | |
| platformRebate | 订单平台补贴 | String | N | |
| totalDiscount | 订单总优惠 | String | N | |
| buyerPaidShippingFee | 买家支付运费 | String | N | |
| platformReturnToSeller | 订单平台退还商家,类似买家使用某种币抵扣了金额,平台后续把这部分钱退给商家 | String | N | |
| orderTags | 订单标记 | orderTag | Y | |
| buyerInfo | 买家信息 | buyerInfo | Y | |
| onlineOrderInfo | 线上报文信息 | onlineOrderInfo | Y | |
| orderSkuList | 线上订单明细 | List <orderSku> |
Y |
orderTag(订单标记)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineShipped | 平台已发货 | Number | N | 1:平台已发货, 0: 平台未发货 |
| platformFulfillment | 平台发货订单 | Number | N | 1:平台发货订单, 0: 非平台发货订单 |
| preSale | 预售 | Number | N | 1: 预售订单, 0: 非预售订单 |
buyerInfo(买家信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| buyerName | 买家姓名 | String | Y | |
| receiverName | 收件人姓名 | String | Y | |
| country | 国家 | String | Y | |
| province | 省份 | String | Y | |
| city | 城市 | String | Y | |
| district | 区 | String | Y | |
| postCode | 邮编 | String | Y | |
| address | 详细地址 | String | Y | |
| phone | 收件人手机号码 | String | Y | |
| 邮件 | String | N |
onlineOrderInfo(线上报文信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineOrderId | 线上订单号 | String | N | |
| lastModifyTime | 最后更新时间 | Long | Y | 若平台无更新时间则传当前时间戳 |
| orderJson | 线上订单原始报文 | JSONString | Y |
orderSku(线上订单明细)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineTransactionId | 订单明细ID | String | Y | 订单商品明细的唯一标识 |
| onlineSkuTitle | 线上商品标题 | String | Y | |
| onlineSkuCode | 线上商品编码 | String | Y | 和线上商品的onlineSkuCode对应 |
| onlineItemId | 线上商品ID | String | Y | |
| currency | 币种 | String | Y | 币种单位 |
| onlineSkuQuantity | 线上商品数量 | Number | Y | |
| itemPrice | 商品价格 | String | Y | |
| totalTax | 商品总税金 | String | Y | |
| shippingPrice | 商品运费 | String | Y | |
| originalPrice | 商品原始单价 | String | Y | |
| paymentPrice | 商品实付单价 | String | Y | |
| payAmount | 买家支付总金额 | String | Y | |
| itemTax | 商品税金 | String | Y | |
| shippingTax | 运费税金 | String | Y | |
| discountPrice | 折扣单价 | String | Y | |
| totalDiscountedPrice | 折扣支付金额 | String | Y | |
| discountFromPlatform | 商品的平台折扣金额(单件) | String | Y | |
| discountFromSeller | 商品的商家折扣金额(单件) | String | Y | |
| promotionDiscount | 商品商家优惠(多件)。正常等于商家折扣+商家优惠券 | String | Y | |
| totalDiscount | 商品总优惠(多件) | String | Y |
请求示例:{
{
"accessId": "787878787",
"content": "{\"onlineOrderIdList\":[\"111\"],\"pageNo\":1,\"pageSize\":100,\"platform\":\"MOMO\",\"shopId\":108874}",
"sign": "856e36c54c62b6c501df7a9801e84a9adff80e06",
"method": "getOrder"
}
返回示例:
{
"success": true,
"message": "",
"isLastPage": true,
"currentPageNo": 1,
"pageCount": 5,
"extraPlatform": "examplePlatform",
"orderInfoList": [
{
"shopId": 108874,
"onlineShopId": "shop123",
"onlineOrderId": "order1234567",
"payTime": 1735641983000,
"createTime": 1735641983000,
"onlineOrderStatus": "cancel",
"erpOrderStatus": "CLOSED",
"buyerMessage": "Please ship fast",
"sellerRemarks": "Special discount applied",
"platformShippingTime": 1735641983000,
"platformDeliveryTime": 1735641983000,
"lastShipTime": 1735641983000,
"shippingServiceSelected": "Express",
"carrier": "Carrier123",
"carrierName": "Example Carrier",
"trackingNumber": "track123",
"platformWarehouseId": "warehouse123",
"platformWarehouse": "Main Warehouse",
"currency": "USD",
"paymentMethod": "PAY_ONLINE",
"codPayAmount": 100,
"freight": 10,
"totalAmount": 110,
"sellerDiscount": 5,
"platformRebate": 2,
"totalDiscount": 7,
"buyerPaidShippingFee": 8,
"platformReturnToSeller": 3,
"orderTags": {
"onlineShipped": 1,
"platformFulfillment": 0,
"preSale": 0
},
"buyerInfo": {
"buyerName": "John Doe",
"receiverName": "Jane Doe",
"country": "USA",
"province": "California",
"city": "Los Angeles",
"district": "Downtown",
"postCode": "90001",
"address": "123 Main St",
"phone": "123-456-7890",
"email": "john.doe@example.com"
},
"onlineOrderInfo": {
"onlineOrderId": "order123",
"lastModifyTime": 1735641983006,
"orderJson": "{\"key\":\"value\"}"
},
"orderSkuList": [
{
"onlineTransactionId": "trans123",
"onlineSkuTitle": "Product Title",
"onlineSkuCode": "sku123",
"onlineItemId": "item123",
"currency": "USD",
"onlineSkuQuantity": 2,
"itemPrice": 50,
"totalTax": 5,
"shippingPrice": 2,
"originalPrice": 60,
"paymentPrice": 55,
"payAmount": 110,
"itemTax": 3,
"shippingTax": 1,
"discountPrice": 5,
"totalDiscountedPrice": 50,
"discountFromPlatform": 2,
"discountFromSeller": 3
}
]
}
]
}
6. 推送订单信息(外部服务推送至IVSERP)
POST /global-api/v1/platform/pushOrder
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| shopId | IVS店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| onlineOrderId | 线上订单号 | String | Y | |
| payTime | 支付时间 | Long | N | 13位时间戳 |
| createTime | 创建时间 | Long | Y | 13位时间戳 |
| onlineOrderStatus | 线上订单状态 | String | Y | |
| erpOrderStatus | ERP订单状态 | String | Y | WAIT_PAYMENT(待付款),WAIT_AUDIT(待审核),CLOSED(关闭) |
| buyerMessage | 买家留言 | String | N | |
| sellerRemarks | 商家备注 | String | N | |
| platformShippingTime | 平台反馈的发货时间 | Long | N | 13位时间戳 |
| lastShipTime | 最晚发货时间 | Long | N | 13位时间戳 |
| platformDeliveryTime | 交货时间 | Long | N | 13位时间戳 |
| shippingServiceSelected | 平台指定的承运商 | String | N | |
| carrier | 承运商 | String | N | |
| carrierName | 承运商名称 | String | N | |
| trackingNumber | 运单号 | String | N | |
| currency | 币种 | String | Y | 币种单位 |
| paymentMethod | 支付方式 | String | Y | COD(cod订单) :PAY_ONLINE(线上订单) |
| codPayAmount | cod货到付款金额 | String | N | |
| platformWarehouseId | 平台仓库编码 | String | N | |
| platformWarehouse | 平台仓库名称 | String | N | |
| freight | 运费 | String | Y | |
| totalAmount | 总支付金额 | String | Y | |
| sellerDiscount | 订单卖家优惠 | String | N | 无值,默认传0 |
| platformRebate | 订单平台补贴 | String | N | 无值,默认传0 |
| totalDiscount | 订单总优惠 | String | N | 无值,默认传0 |
| buyerPaidShippingFee | 买家支付运费 | String | N | 无值,默认传0 |
| platformReturnToSeller | 订单平台退还商家,类似买家使用某种币抵扣了金额,平台后续把这部分钱退给商家 | String | N | |
| orderTags | 订单标记 | orderTag | Y | |
| buyerInfo | 买家信息 | buyerInfo | Y | |
| onlineOrderInfo | 线上报文信息 | onlineOrderInfo | Y | |
| orderSkuList | 线上订单明细 | List <orderSku> |
Y |
orderTag(订单标记)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineShipped | 平台已发货 | Number | N | 1:平台已发货, 0: 平台未发货 |
| platformFulfillment | 平台发货订单 | Number | N | 1:平台发货订单, 0: 非平台发货订单 |
| preSale | 预售 | Number | N | 1: 预售订单, 0: 非预售订单 |
buyerInfo(买家信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| buyerName | 买家姓名 | String | Y | |
| receiverName | 收件人姓名 | String | Y | |
| country | 国家 | String | Y | |
| province | 省份 | String | Y | |
| city | 城市 | String | Y | |
| district | 区 | String | Y | |
| postCode | 邮编 | String | Y | |
| address | 详细地址 | String | Y | |
| phone | 收件人手机号码 | String | Y | |
| 邮件 | String | Y |
onlineOrderInfo(线上报文信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineOrderId | 线上订单号 | String | N | |
| lastModifyTime | 最后更新时间 | Long | Y | 若平台无更新时间则传当前时间戳 |
| orderJson | 线上订单原始报文 | JSONString | Y |
orderSku(线上订单明细)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineTransactionId | 订单明细ID | String | Y | |
| onlineSkuTitle | 线上商品标题 | String | Y | |
| onlineSkuCode | 线上商品编码 | String | Y | |
| onlineItemId | 线上商品ID | String | Y | |
| currency | 币种 | String | Y | 币种单位 |
| onlineSkuQuantity | 线上商品数量 | Number | Y | 无值,默认传0 |
| itemPrice | 商品价格 | String | Y | 无值,默认传0 |
| totalTax | 商品总税金 | String | Y | 无值,默认传0 |
| shippingPrice | 商品运费 | String | Y | 无值,默认传0 |
| originalPrice | 商品原始单价 | String | Y | 无值,默认传0 |
| paymentPrice | 商品实付单价 | String | Y | 无值,默认传0 |
| payAmount | 买家支付总金额 | String | Y | 无值,默认传0 |
| itemTax | 商品税金 | String | Y | 无值,默认传0 |
| shippingTax | 运费税金 | String | Y | 无值,默认传0 |
| discountPrice | 折扣单价 | String | Y | 无值,默认传0 |
| totalDiscountedPrice | 折扣支付金额 | String | Y | 无值,默认传0 |
| discountFromPlatform | 商品的平台折扣金额(单件) | String | Y | 无值,默认传0 |
| discountFromSeller | 商品的商家折扣金额(单件) | String | Y | 无值,默认传0 |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineShopId | 线上店铺ID | String | N | |
| onlineOrderId | 线上订单号 | String | Y | |
| shopId | IVS店铺ID | Number | Y |
请求示例:
{
"platform": "MOMO",
"shopId": 108874,
"onlineShopId": "shop123",
"onlineOrderId": "order1234567",
"payTime": 1735641983000,
"createTime": 1735641983000,
"onlineOrderStatus": "cancel",
"erpOrderStatus": "CLOSED",
"buyerMessage": "Please ship fast",
"sellerRemarks": "Special discount applied",
"platformShippingTime": 1735641983000,
"platformDeliveryTime": 1735641983000,
"lastShipTime": 1735641983000,
"shippingServiceSelected": "Express",
"carrier": "Carrier123",
"carrierName": "Example Carrier",
"trackingNumber": "track123",
"platformWarehouseId": "warehouse123",
"platformWarehouse": "Main Warehouse",
"currency": "USD",
"paymentMethod": "PAY_ONLINE",
"codPayAmount": 100,
"freight": 10,
"totalAmount": 110,
"sellerDiscount": 5,
"platformRebate": 2,
"totalDiscount": 7,
"buyerPaidShippingFee": 8,
"platformReturnToSeller": 3,
"orderTags": {
"onlineShipped": 1,
"platformFulfillment": 0,
"preSale": 0
},
"buyerInfo": {
"buyerName": "John Doe",
"receiverName": "Jane Doe",
"country": "USA",
"province": "California",
"city": "Los Angeles",
"district": "Downtown",
"postCode": "90001",
"address": "123 Main St",
"phone": "123-456-7890",
"email": "john.doe@example.com"
},
"onlineOrderInfo": {
"onlineOrderId": "order123",
"lastModifyTime": 1735641983006,
"orderJson": "{\"key\":\"value\"}"
},
"orderSkuList": [
{
"onlineTransactionId": "trans123",
"onlineSkuTitle": "Product Title",
"onlineSkuCode": "sku123",
"onlineItemId": "item123",
"currency": "USD",
"onlineSkuQuantity": 2,
"itemPrice": 50,
"totalTax": 5,
"shippingPrice": 2,
"originalPrice": 60,
"paymentPrice": 55,
"payAmount": 110,
"itemTax": 3,
"shippingTax": 1,
"discountPrice": 5,
"totalDiscountedPrice": 50,
"discountFromPlatform": 2,
"discountFromSeller": 3
}
]
}
返回示例:
{
"result": {
"shopId": 108874,
"onlineShopId": "shop123",
"onlineOrderId": "order1234567"
},
"state": "success"
}
7. 获取订单线上状态信息
POST /global-api/v1/platform/getOrderOnlineStatus
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| finishStatusList | 线上订单完成状态 | List <OnlineStatus> |
Y | |
| cancelStatusList | 线上订单关闭状态 | List <OnlineStatus> |
Y |
OnlineStatus:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineStatus | 线上状态 | String | Y | |
| onlineStatusCn | 线上状态中文名 | String | Y | |
| onlineStatusEn | 线上状态英文名 | String | Y |
请求示例:
{
"platform": "MOMO"
}
返回示例:
{
"success": true,
"message": "",
"finishStatusList": [
{
"onlineStatus": "COMPLETED",
"onlineStatusCn": "已完成",
"onlineStatusEn": "Completed"
}
],
"cancelStatusList": [
{
"onlineStatus": "CANCELLED",
"onlineStatusCn": "已取消",
"onlineStatusEn": "Cancelled"
}
]
}
8. 反馈平台发货(RTS)
POST /global-api/v1/platform/readyToShip
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| shopId | IVS店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| onlineOrderId | 线上订单号 | String | Y | |
| trackingNumber | 运单号 | String | Y | |
| platformLogisticsCode | 平台支持的物流编码 | String | Y | |
| onlineOrderItemList | 包裹商品明细 | List <onlineOrderItem> |
N |
onlineOrderItem(包裹商品明细)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineOrderItemId | 线上订单明细ID | String | Y | |
| quantity | 商品数量 | Number | Y |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineShopId | 线上店铺ID | String | N | |
| onlineOrderId | 线上订单号 | String | Y |
请求示例:
{
"platform": "MOMO",
"shopId": 108874,
"onlineShopId": "shop123",
"onlineOrderId": "order1234567",
"trackingNumber": "track123",
"platformLogisticsCode": "LOGI001",
"onlineOrderItemList": [
{
"onlineOrderItemId": "detail001",
"quantity": 2
}
]
}
返回示例:
{
"success": true,
"message": "",
"onlineShopId": "shop123",
"onlineOrderId": "order1234567"
}
9. 获取商品信息
POST /global-api/v1/platform/getProduct
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| shopId | IVS店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| onlineItemId | 线上商品ID | List <String> |
N | |
| onlineSkuId | 线上SkuId | List <String> |
N | |
| updateTimeStart | 更新开始时间 | Number | N | 13位时间戳 onlineItemId 或 onlineSkuId 无值, 必传 |
| updateTimeEnd | 更新结束时间 | Number | N | 13位时间戳 onlineItemId 或 onlineSkuId 无值, 必传 |
| pageNo | 页码 | Number | N | |
| pageSize | 页数据大小 | Number | N |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| isLastPage | 最后一页标识 | Boolean | Y | true:最后一页/false:还有下一页 |
| currentPageNo | 当前页 | Number | N | |
| pageCount | 总页数 | Number | N | |
| platform | 平台类型 | String | Y | |
| shopId | IVS店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| itemInfoList | 商品详情信息 | List <itemInfo> |
Y |
itemInfo(商品详情信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineItemId | 线上商品SpuID | String | Y | |
| onlineSku | 线上商品ID | String | Y | |
| onlineSkuId | 线上商品SkuID | String | N | |
| extraSkuId | 线上商品扩展ID | String | N | |
| onlineSkuCode | 线上商品唯一编码 | String | Y | |
| imageUrl | 线上商品图片 | String | Y | |
| onlineSkuStatus | 线上商品状态 | String | Y | |
| onlineSkuTitle | 线上商品标题 | String | Y | |
| onlineSkuName | 线上商品名称 | String | N | |
| onlineSkuStock | 线上商品库存 | Number | N | |
| specification | 规格 | JSONString | N | "{"颜色":"红色","尺寸":"S"}" |
| weight | 重量 | Number | N | |
| weightUnit | 重量单位 | String | N | |
| length | 长 | Number | N | |
| width | 宽 | Number | N | |
| height | 高 | Number | N | |
| dimensionUnit | 长度单位 | String | N | |
| price | 售价 | Number | N | |
| warehouseStockList | 多仓库存信息 | List <warehouseStock> |
N |
warehouseStock(多仓库存信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platformWarehouseId | 平台仓库编码 | String | Y | |
| availableStock | 仓库可售库存 | Number | Y |
请求示例:
{
"platform": "MOMO",
"shopId": 108874,
"onlineShopId": "shop123",
"onlineItemId": ["2222"],
"pageNo": 1,
"pageSize": 100
}
返回示例:
{
"success": true,
"message": "",
"isLastPage": true,
"currentPageNo": 1,
"pageCount": 5,
"extraPlatform": "examplePlatform",
"shopId": 1234567890,
"onlineShopId": "shop123",
"itemInfoList": [
{
"onlineItemId": "item123dfdf",
"onlineSkuId": "sku123dfdf",
"extraSkuId": "extrasku12dfdf3",
"onlineSkuCode": "sku123cvcv",
"imageUrl": "https://example.com/image.jpg",
"onlineSkuStatus": "ACTIVE",
"onlineSkuTitle": "Product Title",
"onlineSkuName": "Product Name",
"onlineSKuStock": 100,
"weight": 0.5,
"weightUnit": "kg",
"color": "Red",
"size": "M",
"length": 30,
"width": 20,
"height": 10,
"dimensionUnit": "cm",
"price": 29.99,
"warehouseStockList": [
{
"platformWarehouseId": "warehouse123",
"availableStock": 50
},
{
"platformWarehouseId": "warehouse456",
"availableStock": 30
}
]
},
{
"onlineItemId": "item456",
"onlineSkuId": "sku456",
"extraSkuId": "extrasku456",
"onlineSkuCode": "code456",
"imageUrl": "https://example.com/image2.jpg",
"onlineSkuStatus": "INACTIVE",
"onlineSkuTitle": "Another Product Title",
"onlineSkuName": "Another Product Name",
"onlineSKuStock": 200,
"weight": 1,
"weightUnit": "kg",
"color": "Blue",
"size": "L",
"length": 40,
"width": 30,
"height": 20,
"dimensionUnit": "cm",
"price": 49.99,
"warehouseStockList": [
{
"platformWarehouseId": "warehouse789",
"availableStock": 100
}
]
}
]
}
10. 获取商品状态
POST /global-api/v1/platform/getProductStatus
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| statusList | 商品状态 | List <OnlineStatus> |
Y | 商品状态 |
OnlineStatus:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineStatus | 线上状态 | String | Y | |
| onlineStatusCn | 线上状态中文名 | String | Y | |
| onlineStatusEn | 线上状态英文名 | String | Y |
请求示例:
{
"platform": "MOMO"
}
返回示例:
{
"success": true,
"message": "",
"statusList": [
{
"onlineStatus": "ACTIVE",
"onlineStatusCn": "上架",
"onlineStatusEn": "Active"
},
{
"onlineStatus": "INACTIVE",
"onlineStatusCn": "下架",
"onlineStatusEn": "Inactive"
}
]
}
11. 更新商品库存
POST /global-api/v1/platform/updateInventory
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| shopId | IVS店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| onlineItemId | 线上商品ID | String | Y | |
| extraSkuId | 线上商品名称 | String | N | |
| onlineSkuId | 线上skuId | String | N | |
| onlineSkuName | 线上sku名称 | String | N | |
| onlineStock | 商品库存 | Number | Y | |
| sellerStockList | 平台仓库存信息 | List <SellerStock> |
N |
SellerStock(平台库存信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platformWarehouseId | 平台仓库编码 | String | N | |
| availableStock | 仓库可售库存 | Number | Y |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| failureList | 失败信息 | List <Failure> |
N |
Failure(失败信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineItemId | 线上商品ID | String | Y | |
| onlineSkuId | 线上商品skuId | StringY | Y | |
| platformWarehouseId | 平台仓库编码 | String | Y | |
| failedReason | 失败原因 | String | Y |
请求示例:
{
"platform": "MOMO",
"shopId": 108874,
"onlineShopId": "shop123",
"onlineItemId": "item123",
"onlineSkuId": "sku123",
"onlineStock": 100,
"sellerStockList": [
{
"platformWarehouseId": "warehouse123",
"availableStock": 80
}
]
}
返回示例:
{
"success": true,
"message": "",
"failureList": [
{
"onlineItemId": "123",
"onlineSkuId": "item123",
"platformWarehouseId": "warehouse123",
"failedReason": "库存不足"
}
]
}
12. 平台物流
12.1. 初始化物流信息
POST /global-api/v1/platform/initLogistics
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| shopId | IVS店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| shopId | IVS店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| logisticsList | List <LogisticsInfo> |
String | Y |
LogisticsInfo 线上物流信息
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| logisticsCode | 线上物流编码 | String | Y | |
| logisticsName | 线上物流名称 | String | Y |
请求示例:
{
"platform": "MOMO",
"shopId": 108874,
"onlineShopId": "1111"
}
返回示例:
{
"success": true,
"message": "",
"onlineShopId": "1111",
"shopId": 1234,
"logisticsInfoList": [
{ "logisticsCode": "物流code1", "logisticsName": "物流name1" },
{ "logisticsCode": "物流code2", "logisticsName": "物流name2" }
]
}
12.2. 获取运单号
POST /global-api/v1/platform/getTrackNumber
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| shopId | IVS店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| onlineOrderId | 线上订单号 | String | Y | |
| logisticsCode | 物流编码 | String | Y | |
| logisticsName | 物流名称 | String | Y | |
| onlineItemInfoList | 线上商品信息 | List <onlineItemInfo> |
N |
onlineItemInfo(线上商品信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| packNumber | 包裹号 | String | N | |
| onlineItemId | 线上商品ID | String | Y | |
| onlineSkuId | 线上商品SkuId | String | N | |
| quantity | 商品数量 | Number | Y | |
| onlineTransactionId | 线上商品唯一标识ID | String | N |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineOrderId | 线上订单号 | String | Y | |
| trackNumber | 运单号 | String | Y | |
| shippingCarrier | 承运商 | String | N | |
| labelDataList | 面单数据信息 | List <labelData> |
N |
labelData(面单数据信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| labelDataType | 面单类型 | String | Y | 面单类型,支持以下类型: 1、PDF 2、 URL 说明: PDF为 Base64 |
| labelData | 面单数据 | String | Y |
请求示例:
{
"platform": "MOMO",
"shopId": 108874,
"onlineShopId": "1111",
"onlineOrderId": "order12345",
"logisticsCode": "物流code1",
"logisticsName": "物流name1",
"onlineItemInfoList": [
{
"packNumber": "P001",
"onlineItemId": "item123",
"onlineSkuId": "sku123",
"quantity": 2
}
]
}
返回示例:
{
"success": true,
"message": "",
"onlineShopId": "1111",
"trackNumber": "123123123",
"shippingCarrier": "123123",
"labelDataList": [
{
"labelDataType": "URL",
"labelData": "1111111"
}
]
}
12.3. 取消运单号
POST /global-api/v1/platform/cancelLogisticsOrder
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| shopId | IVS店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| onlineOrderId | 线上订单号 | String | Y | |
| trackNumber | 运单号 | String | Y | |
| cancelReason | 关闭原因 | String | N | |
| onlineItemInfoList | 线上商品信息 | List <onlineItemInfo> |
N |
onlineItemInfo(线上商品信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| packNumber | 包裹号 | String | N | |
| onlineItemId | 线上商品ID | String | Y | |
| onlineSkuId | 线上商品SkuId | String | N | |
| quantity | 商品数量 | Number | Y | |
| onlineTransactionId | 线上商品唯一标识ID | String | N |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| shopId | IVS店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| onlineOrderId | 线上订单号 | String | Y |
请求示例:
{
"platform": "MOMO",
"shopId": 108874,
"onlineShopId": "1111",
"onlineOrderId": "order12345",
"trackNumber": "123123123",
"cancelReason": "customer_cancel"
}
返回示例:
{
"success": true,
"message": "",
"shopId": 108874,
"onlineShopId": "1111",
"onlineOrderId": "order12345"
}
12.4. 获取面单
POST /global-api/v1/platform/getLabelData
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| onlineShopId | 线上店铺ID | String | Y | |
| onlineOrderId | 线上订单号 | String | Y | |
| logisticsCode | 物流编码 | String | N | |
| logisticsName | 物流名称 | String | N | |
| onlineItemInfoList | 线上商品信息 | List <onlineItemInfo> |
N |
onlineItemInfo(线上商品信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| packNumber | 包裹号 | String | N | |
| onlineItemId | 线上商品ID | String | Y | |
| onlineSkuId | 线上商品SkuId | String | N | |
| quantity | 商品数量 | Number | Y | |
| onlineTransactionId | 线上商品唯一标识ID | String | N |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineOrderId | 线上订单号 | String | Y | |
| labelDataList | 面单数据信息 | List <labelData> |
Y |
labelData(面单数据信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| labelDataType | 面单类型 | String | Y | 面单类型,支持以下类型: 1、PDF 2、 URL 说明: PDF为 Base64 |
| labelData | 面单数据 | String | Y | |
| trackiNumber | 运单号 | String | N | |
| shippingCarrier | 承运商 | String | N |
请求示例:
{
"platform": "MOMO",
"onlineShopId": "shop123",
"onlineOrderId": "order12345",
"logisticsCode": "LOGI001",
"logisticsName": "物流name1"
}
返回示例:
{
"success": true,
"message": "",
"onlineOrderId": "1111",
"labelDataList": [
{
"labelDataType": "URL",
"labelData": "https://seller.pgmall.my//index.php?route=common/order_details/printNinjaVanConnote&oid=1472701&h=1472701&ipr_token=7075e26c696f676f6c6431323f343e36123",
"trackiNumber": "123123123",
"shippingCarrier": "NINJAVAN"
}
]
}
12.5. 物流节点信息获取
POST /global-api/v1/platform/getTrackingInfo
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| onlineOrderId | 线上订单编号 | String | N | |
| packageNumber | 包裹号 | String | N |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| onlineShopId | 线上店铺ID | String | N | |
| logisticsStatus | 物流状态 | String | Y | 例:CREATED、AVAILABLE_FOR_PICKUP、IN_TRANSIT、OUT_FOR_DELIVERY、DELIVERED、NOT_FOUND、CANCEL |
| eventList | 物流详情信息 | List <LogisticsEvent> |
Y |
LogisticsEvent(物流详情信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| event | 物流详情描述 | String | Y | 例:"Your package is out for delivery." |
| eventDate | 物流变更时间 | Long | Y | 13位时间戳 |
请求示例:
{
"platform": "MOMO",
"onlineShopId": "shop123",
"onlineOrderId": "order12345",
"packageNumber": "PKG123"
}
返回示例:
{
"success": true,
"message": "",
"onlineShopId": "shop123",
"logisticsStatus": "IN_TRANSIT",
"eventList": [
{
"event": "Your package is out for delivery.",
"eventDate": 1735641983000
}
]
}
13. 获取平台仓库
POST /global-api/v1/platform/getPlatformWarehouse
接口参数:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platform | 平台类型 | String | Y | |
| shopId | ERP店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N |
返回信息:
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| shopId | ERP店铺ID | Number | Y | |
| onlineShopId | 线上店铺ID | String | N | |
| platformWarehouseList | 平台仓库信息 | List <platformWarehouse> |
Y |
platformWarehouse(平台仓库信息)
| 字段名 | 字段描述 | 类型 | 必填 | 备注 |
|---|---|---|---|---|
| platformWarehouseCode | 平台仓库编码 | String | Y | |
| platformWarehouseName | 平台仓库名称 | String | Y |
请求示例:
{
"platform": "MOMO",
"shopId": 108874,
"onlineShopId": "sdsd"
}
返回示例:
{
"success": true,
"messgae": "",
"shopId": 1111,
"onlineShopId": "sdsd",
"platformWarehouseList": [
{
"platformWarehouseCode": "12112",
"platformWarehouseName": "wwweww"
},
{
"platformWarehouseCode": "32323",
"platformWarehouseName": "sfaf"
}
]
}