- CSSS APIs
- 全局说明/Overview
- 国际化/ Internationalization
- 状态码/Status code
- 签名代码示例 / Sign code Example
- SIM
- Usage
- Plan
- 同步资费套餐 / Get data planPOST
- 订购流量套餐/ Order data planPOST
- 批量订购套餐/ Bulk order packagePOST
- 续订流量套餐/ Renew your data plan POST
- 查询套餐订单信息 / Query the package order informationPOST
- 开通/启用流量套餐订单 / To enable the orderPOST
- 取消流量套餐订单/ Cancel an unenabled package orderPOST
- 提前结束设备套餐订单/ End package orders earlyPOST
- [不推荐]停机/暂停流量套餐订单POST
- [不推荐]复机/重新启动流量套餐订单POST
- 【不推荐】分页批量(查询)同步设备可订购套餐POST
- SMS
- Customized
- Notification
- Mall APIs
- eSIM QR Mall APIs
批量订购套餐/ Bulk order package
Cube UAT
https://api-uat.io.linksfield.net/cube/v4
Cube UAT
https://api-uat.io.linksfield.net/cube/v4
POST
/package/batchOrderPackages
该接口为同步接口,当某一设备不满足订购要求时,订购将无法执行。
// This policy applies to ordering the same data plan for a batch of devices in the same enterprise.
This interface is a synchronization interface. If a device does not meet the ordering requirements, the ordering cannot be executed.
请求参数
Header 参数
Accept-Language
string
可选
默认值:
zh-CN
Content-Type
string
可选
默认值:
application/json
Body 参数application/json
access_code
string
必需
deviceList
array[string]
必需
global_order
string
必需
// // Is it a host number package,1- yes;0-no. Usually 0
is_open
string
必需
// Whether to Enable immediately ; 1- enable ;0- no. OTA support SIM should be 0.
order_period
string
必需
package_code
string
必需
package_name
string
必需
package_type
string
必需
// Plan type: 0-Unlimited daily plan ; 1- daily plan ; 2- monthly plan; 3- 3 months plan ; 4- 6 months plan; 5 - yearly plan
pay_amount
string
可选
// Amount, two decimal places.
pay_rst
string
必需
// Payment result : 1- unpaid ; 2- paid.
pay_type
string
可选
// Modl of payment : 0- ipay88 ; 1-wechat pay ; 2- alipay.
test_flow
string
可选
// Test data volume.
test_flow_flag
string
必需
// Test data : 1- yes; 0-no. usually 0
timestamp
string
必需
version
string
必需
sign
string
必需
示例
{
"access_code": "P000270",
"deviceList": [
"89852022018041800192",
"89852022018041800193"
],
"global_order": "0",
"is_open": "0",
"order_period": "1",
"package_code": "DP20190726001274",
"package_name": "C_M_0_P_中国20M不限速月套餐",
"package_type": "2",
"pay_amount": "0",
"pay_rst": "2",
"pay_type": "1",
"test_flow": "0",
"test_flow_flag": "0",
"timestamp": "1643253530",
"version": "2.0",
"sign":"5+o5RzScCv2TuJ1Yb/aehTH0GLU="
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-uat.io.linksfield.net/cube/v4/package/batchOrderPackages' \
--header 'Accept-Language: zh-CN' \
--header 'Content-Type: application/json' \
--data-raw '{
"access_code": "P000270",
"deviceList": [
"89852022018041800192",
"89852022018041800193"
],
"global_order": "0",
"is_open": "0",
"order_period": "1",
"package_code": "DP20190726001274",
"package_name": "C_M_0_P_中国20M不限速月套餐",
"package_type": "2",
"pay_amount": "0",
"pay_rst": "2",
"pay_type": "1",
"test_flow": "0",
"test_flow_flag": "0",
"timestamp": "1643253530",
"version": "2.0",
"sign":"5+o5RzScCv2TuJ1Yb/aehTH0GLU="
}'
返回响应
🟢200Success
application/json
Body
code
string
必需
data
object
必需
device_order
array [object {6}]
必需
message
string
必需
success
boolean
必需
示例
{
"code": "0000",
"data": {
"device_order": [
{
"error": "0000",
"errorMsg": "success",
"order_id": "ORDER_47454030993031168",
"device_id": "89852022018041800192",
"order_start_date": null,
"order_expire_date": null
},
{
"error": "0000",
"errorMsg": "success",
"order_id": "ORDER_47453927590854656",
"device_id": "89852022018041800193",
"order_start_date": null,
"order_expire_date": null
}
]
},
"message": "成功",
"success": true
}
修改于 2022-12-12 03:21:14