本质是修改套餐能力,如一下场景:
已购买套餐A(事件录像保存3天)
想升级到套餐B(事件录像保存7天)
那可传参为:{"order_id":<套餐A的订单ID>,"service_id":<
B套餐ID>}
{
"order_id": 1933240,
"service_id": 1000008
}
curl --location --request POST '/v2/cloud-service/switch' \
--header 'X-Tg-App-Id;' \
--header 'Accept-Language;' \
--header 'Authorization;' \
--header 'X-Tg-Signed-Headers;' \
--header 'X-Tg-Date;' \
--header 'X-Tg-Content-Sha256;' \
--header 'X-Tg-Algorithm;' \
--header 'Content-Length;' \
--header 'Content-Type: application/json' \
--data-raw '{
"order_id": 1933240,
"service_id": 1000008
}'
{
"code": 200,
"msg": "ok",
"data": {
"id": 70,
"order_id": 70,
"device_id": "1702D8OBYWWQ",
"iccid": "89861122241045896497",
"product_id": 70,
"service_id": 70,
"ability": {
"storage": {
"recording_mode": "INCIDENT",
"recording_content": [
"IMAGE"
],
"recording_ahead": 5,
"recording_duration": 30,
"recording_image_max": 5,
"recording_image_span": 3,
"save_days": 30
},
"ai": {
"algorithm": [
"body",
"pet"
]
},
"mobile_data": {
"traffic_limit": 500,
"limit_mode": "month"
},
"smart_box": {
"supported_smart_box": [
"echo-show"
]
}
},
"level": 2,
"is_free": 0,
"contract_status": 0,
"status": 0,
"frozen_time": 1682666553,
"start_time": 1682666553,
"end_time": 1682666553
}
}