跳到主要内容

设置云存储套餐立即生效

更新时间:2025-03-04 19:49:45

调用该接口设置购买的云存储套餐立即生效。


描述
路径/platform/vision/customer/cloudstorage/commodity/enable
版本号1.0.0
协议HTTPS
请求方法POST

请求参数:

公共请求参数见 公共请求参数

请求字段类型必选描述
iotIdString平台为设备颁发的ID,设备的唯一标识符。
orderIdString购买云存储套餐的订单ID。

返回参数:

返回字段类型描述
idString用于识别请求记录,即对应的请求ID。
codeInt接口返回码字段,请求成功时返回200;请求失败时返回详细的错误码。
messageString调用失败时,返回的出错信息
dataObject响应的结果。
orderIdString购买云存储套餐的订单ID。
specificationString云存储套餐规格。
copiesInt购买的数量。
startTimeLong云存储套餐开始时间,UTC时间戳,单位毫秒。当前在生效的套餐才有此值。
endTimeLong云存储套餐结束时间,UTC时间戳,单位毫秒。当前在生效的套餐才有此值。
priceString订单价格,单位:元。
commodityTypeInt云存储套餐类型。1(表示连续型);2(表示事件型)。

请求示例:

x-ca-key: xxxxxxxx
x-ca-timestamp: 1728634151000
x-ca-nonce: 7b25fc15b9434dd98587a077a92b7e42
x-ca-signature: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
Content-Type: application/json;charset=UTF-8

{
"id": "49a7be925e53******8ba0facf7",
"version": "1.0",
"request": {
"apiVer": "1.0.0"
},
"params": {
"iotId": "6vw0OrGyHFSW6EQA*****",
"orderId": "29e2b80475b7******d06af"
}
}

成功返回示例:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache

{
"id": "49a7be925******08ba0facf7",
"code": 200,
"message": "success",
"data": {
"orderId": "29e2b80475b7******d06af",
"specification": "continuous_7",
"copies": 1,
"startTime": 1736336086000,
"endTime": 1739000698000,
"price": "35.0",
"commodityType": 1
}
}