- 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
订购流量套餐/ Order data plan
Cube UAT
Cube UAT
POST
/package/orderPackage
// Order a data plan for a single device/ SIM card in your enterprise.
请求参数
Header 参数
Accept-Language
string
可选
默认值:
zh-CN
Content-Type
string
可选
默认值:
application/json
Body 参数application/json
access_code
string
必需
device_id
string
必需
// SIM card ICCID.
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 status : 1- unpaid ;2-paid
pay_type
string
可选
// mode 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",
"device_id": "89852022018041800192",
"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": "1",
"pay_type": "2",
"test_flow": "0",
"test_flow_flag": "0",
"timestamp": "1643253530",
"version": "2.0",
"sign": "zOoyHBVtE/pOeA7nOuzCLvAg8d8="
}
示例代码
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/orderPackage' \
--header 'Accept-Language: zh-CN' \
--header 'Content-Type: application/json' \
--data-raw '{
"access_code": "P000270",
"device_id": "89852022018041800192",
"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": "1",
"pay_type": "2",
"test_flow": "0",
"test_flow_flag": "0",
"timestamp": "1643253530",
"version": "2.0",
"sign":"zOoyHBVtE/pOeA7nOuzCLvAg8d8="
}'
返回响应
🟢200Success
application/json
Body
code
string
必需
data
object
必需
sign
null
必需
order_id
string
必需
// Plan order ID.
order_start_date
null
必需
// Plan active time, YYYYMMDD, UTC 8
order_expire_date
null
必需
// Data plan estimated expiration time, YYYYMMDD , UTC 8
message
string
必需
success
boolean
必需
示例
{
"code": "0000",
"data": {
"sign": null,
"order_id": "ORDER_47452122261749760",
"order_start_date": null,
"order_expire_date": null
},
"message": "成功",
"success": true
}
修改于 2022-12-12 03:21:14