/pb/mp/order/v2/create{
"operation": {
"method": "POST",
"path": "/pb/mp/order/v2/create"
},
"protocol": "HTTPS",
"host": "https://openapi.lingxing.com",
"rateLimit": {
"tokenBucketCapacity": 10,
"text": ""
},
"requestExample": {
"platform_code": 10009,
"store_id": "110283406273996288",
"orders": [
{
"buyer_note": "xxx",
"customer_shipping_amount": "20.00",
"customer_tax_amount": "2.00",
"order_total_amount": "20.80",
"platform_order_no": "10379511104466944",
"receiver_country_code": "CN",
"wid": "1",
"logistics_type_id": "1",
"items": [
{
"sku": "xhp004",
"quantity": 1,
"unit_price": "10.00",
"stock_deduction_type": 1
}
]
}
]
},
"responseExample": {
"code": 0,
"message": "操作成功",
"request_id": "2ecb8a09-275e-4773-9399-ebfbb17c1804.1689906739215",
"response_time": "2023-07-21 10:32:19",
"data": {
"error_details": [],
"success_details": [
{
"platform_order_no": "263407812560417017",
"global_order_no": "103336708973801472"
}
]
}
}
}| 序号 | 字段 | 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| 1 | platform_code | 平台code | integer | — | 必填 | 平台code |
| 2 | store_id | 店铺id | string | — | 必填 | 店铺id |
| 3 | orders | 订单列表 | array<object> | — | 必填 | 订单列表 |
| 3.1 | platform_order_no | 平台单号【同一店铺不支持重复】 | string | — | 必填 | 平台单号【同一店铺不支持重复】 |
| 3.2 | site_code | 站点 | string | — | 可选 | 站点 |
| 3.3 | buyer_note | 买家留言 | string | — | 可选 | 买家留言 |
| 3.4 | receiver_country_code | 国家/地区二字简码 | string | — | 必填 | 国家/地区二字简码 |
| 3.5 | customer_shipping_amount | 客付运费【币种默认为店铺币种】 | number | — | 可选 | 客付运费【币种默认为店铺币种】 |
| 3.6 | customer_tax_amount | 客付税费【币种默认为店铺币种】 | number | — | 可选 | 客付税费【币种默认为店铺币种】 |
| 3.7 | order_total_amount | 订单金额【币种默认为店铺币种】 | number | — | 可选 | 订单金额【币种默认为店铺币种】 |
| 3.8 | wid | 仓库id | string | — | 可选 | 仓库id ,【当填写了该字段,则logistics_type_id 必填】 |
| 3.9 | global_purchase_time | 订购时间(秒级时间戳) | number | — | 可选 | 订购时间(秒级时间戳) |
| 3.10 | global_payment_time | 付款时间(秒级时间戳) | number | — | 可选 | 付款时间(秒级时间戳) |
| 3.11 | remark | 客服备注 | string | — | 可选 | 客服备注 |
| 3.12 | logistics_type_id | 物流方式id | string | — | 可选 | 物流方式id, 【当填写了该字段,则wid必填】 |
| 3.13 | receiver_name | 收件人 | string | — | 必填 | 收件人 |
| 3.14 | address_type | 地址类型 | integer | — | 可选 | 地址类型 1:住宅地址” 2:“商业地址” |
| 3.15 | buyer_choose_express | 客选物流 | string | — | 可选 | 客选物流 |
| 3.16 | receiver_company_name | 公司名 | string | — | 可选 | 公司名 |
| 3.17 | city | 城市 | string | — | 必填 | 城市 |
| 3.18 | address_line1 | 地址1 | string | — | 必填 | 地址1 |
| 3.19 | amount_currency | 币种 | string | — | 可选 | 币种,默认与店铺的币种一致,ISO 4217标准码 |
| 3.20 | order_custom_fields | 订单自定义字段 | object | — | 可选 | 订单自定义字段 |
| 3.21 | items | 订单产品信息 | array<object> | — | 必填 | 订单产品信息 |
| 3.21.1 | sku | 本地SKU(SKU和MSKU必填其中一个) | string | — | 可选 | 本地SKU(SKU和MSKU必填其中一个) |
| 3.21.2 | quantity | 数量 | integer | — | 必填 | 数量 |
| 3.21.3 | unit_price | 单价【币种默认为店铺币种】 | number | — | 必填 | 单价【币种默认为店铺币种】 |
| 3.21.4 | msku | MSKU(SKU和MSKU必填其中一个) | string | — | 可选 | MSKU(SKU和MSKU必填其中一个) |
| 3.21.5 | stock_deduction_type | 库存扣减类型 1表示“空” | string | — | 可选 | 库存扣减类型 1表示“空”, 2表示“SKU+订单店铺” |
| 3.21.6 | item_custom_fields | 订单产品自定义字段 | object | — | 可选 | 订单产品自定义字段 |
| 3.22 | shipping_info | 物流信息(传则下层全必填) | object | — | 可选 | 物流信息(传则下层全必填) |
| 3.22.1 | tms_waybill_no | 物流号 | string | — | 必填 | 物流号 |
| 3.22.2 | tms_tracking_no | 追踪号 | string | — | 必填 | 追踪号 |
| 3.22.3 | file_name | 面单文件名 | string | — | 必填 | 面单文件名 |
| 3.22.4 | base64File | 面单base64 | string | — | 必填 | 面单base64 |
| 3.23 | sender_tax_type | "税号类型 | integer | — | 可选 | "税号类型: 1=>IOSS编号 2=>VAT税号 3=>CPF税号 4=>EORI号码 5=>收件人税号 7=>VOEC税号" |
| 3.24 | sender_tax_no | 税号 | string | — | 可选 | 税号 |
| 序号 | 字段 | 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| 1 | code | 状态码 | integer | 0 | 必填 | 状态码,0 成功 |
| 2 | message | 提示信息 | string | — | 必填 | 提示信息 |
| 3 | request_id | 请求链路id | string | ad9c1a8625c74f3ea0525e216374e31a1676514819613 | 必填 | 请求链路id |
| 4 | response_time | 响应时间 | string | 2023-02-16 10:33:40 | 必填 | 响应时间 |
| 5 | data | 响应数据 | array<object> | — | 必填 | 响应数据 |
| 5.1 | error_details | 错误信息 | array<object> | — | 必填 | 错误信息 |
| 5.1.1 | error_message | 失败原因 | string | — | 必填 | 失败原因 |
| 5.1.2 | platform_order_no | 平台单号 | string | — | 必填 | 平台单号 |
| 5.2 | success_details | 成功详情 | array<object> | — | 必填 | 成功详情 |
| 5.2.1 | global_order_no | 系统单号 | integer | — | 必填 | 系统单号 |
| 5.2.2 | platform_order_no | 平台单号 | string | 10379511104466944 | 必填 | 平台单号 |
领星ERP的接口:创建订单(/pb/mp/order/v2/create),由轻易云数据集成平台 API 资产管理模块整理收纳,并随领星ERP版本更新同步更新。