Linksfield Developer
OverviewCube APIs旧版本API
OverviewCube APIs旧版本API
  1. Plan
  • CSSS APIs
    • 全局说明/Overview
    • 国际化/ Internationalization
    • 状态码/Status code
    • 签名代码示例 / Sign code Example
    • SIM
      • 批量获取拥有的设备信息/Get all SIM cards info
      • 查询单一设备实时信息/Get real-time info about one SIM card
      • 同步使用中SIM卡信息/Get the SIM Cards in use
    • Usage
      • 查询单张SIM卡流量使用情况/ Example Query the traffic usage of a single SIM card
      • 批量查询SIM卡流量接口 /Batch querying SIM card usage
      • 查询单日流量使用情况 / Example Query the daily usage
      • 批量查询指定月份的流量使用情况/ Batch querying the usage in a specified month
    • Plan
      • 同步资费套餐 / Get data plan
        POST
      • 订购流量套餐/ Order data plan
        POST
      • 批量订购套餐/ Bulk order package
        POST
      • 续订流量套餐/ Renew your data plan
        POST
      • 查询套餐订单信息 / Query the package order information
        POST
      • 开通/启用流量套餐订单 / To enable the order
        POST
      • 取消流量套餐订单/ Cancel an unenabled package order
        POST
      • 提前结束设备套餐订单/ End package orders early
        POST
      • [不推荐]停机/暂停流量套餐订单
        POST
      • [不推荐]复机/重新启动流量套餐订单
        POST
      • 【不推荐】分页批量(查询)同步设备可订购套餐
        POST
    • SMS
      • 发送短信/ send SMS
    • Customized
      • OTA日套餐下单/Order OTA Plan
      • 运营商侧剩余流量查询/Query the remaing data by MNO side
  • Notification
    • Notification全局说明
    • Notification状态码
    • 流量使用量API预警
      POST
    • 短信下行回调
      POST
    • 短信上行回调
      POST
    • 短信上行回调(区分文本二进制)
      POST
    • 订单状态变更回调(IMSI)
      POST
  • Mall APIs
    • Mall全局说明
    • Mall业务流程
    • Mall签名代码示例
    • APP调用Stripe的SDK示例说明
    • Vshop
      • 卡片登录验证
      • 获取可购套餐商品列表
      • 创建用户订单
      • 查询正在使用、未启用订单
      • 获取生效中的自动续费
      • 关闭自动续费
      • 用户下单(第三方支付)
    • Payment
      • 获取stripe单次支付权限
      • 获取Stripe订阅支付权限
      • 创建Stripe订阅/自动续费
      • 支付结果查询
    • Notification
      • 消息推送
  • eSIM QR Mall APIs
    • Introduction
    • Pre - order
    • webhook
    • 用户登录
    • My eSIM Detail
  1. Plan

订购流量套餐/ Order data plan

Cube UAT
https://api-uat.io.linksfield.net/cube/v4
Cube UAT
https://api-uat.io.linksfield.net/cube/v4
POST
/package/orderPackage
为企业下的单个设备订购一个流量套餐。
// Order a data plan for a single device/ SIM card in your enterprise.

请求参数

Header 参数
Accept-Language
string 
可选
默认,当header中无语言要求时,默认返回简体中文。当前支持zh-CN(简体中文)、en-US(英文)。/ Support : zh-CN 、 en-US
默认值:
zh-CN
Content-Type
string 
可选
默认值:
application/json
Body 参数application/json
access_code
string 
必需
device_id
string 
必需
设备标识,通常为SIM卡ICCID。
// SIM card ICCID.
global_order
string 
必需
是否为主号订购的套餐; 1-是; 0-否;
// Is it a host number package,1- yes;0-no. Usually 0
is_open
string 
必需
是否立即开通此套餐,对于支付成功,则允许立即开通; 对于未支付订单,不允许开通,所以一定要判断开通标识。 日程套餐订单不允许开通;OTA设备的副号流量套餐不允许立即开通 取值如下: 1-立即开通; 0-不开通;
// Whether to Enable immediately ; 1- enable ;0- no. OTA support SIM should be 0.
order_period
string 
必需
订购周期//order period
package_code
string 
必需
package_name
string 
必需
package_type
string 
必需
套餐产品类型,取值定义如下: 0-日程套餐; 1-日流量套餐; 2-月流量套餐; 3-季度流量套餐; 4-半年流量套餐; 5-年流量套餐;
// 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 
必需
支付结果,取值如下: 1-未支付; 2-支付成功;
// Payment status : 1- unpaid ;2-paid
pay_type
string 
可选
支付方式,取值如下: 0-ipay88 1-微信 2-支付宝
// mode of payment: 0- ipay88 ; 1- wechat pay ;2-alipay
test_flow
string 
必需
测试流量大小 当test_flow_flag为1时,此字段不能为空
// test data volume
test_flow_flag
string 
必需
是否有测试流量 1有0无,仅限首单可设置为1
// 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 
必需
套餐的订购ID; 订购成功时,即ret_code=0000时,该字段存在。
// Plan order ID.
order_start_date
null 
必需
套餐激活启用时间,格式为: YYYYMMDD; 当请求时,要求立即开通此套餐时,本字段存在;
// Plan active time, YYYYMMDD, UTC 8
order_expire_date
null 
必需
套餐预计过期时间,格式为: YYYYMMDD; 当请求时,要求立即开通此套餐时,本字段存在;
// 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
上一页
同步资费套餐 / Get data plan
下一页
批量订购套餐/ Bulk order package
Built with