創建詢價
更新時間 2024-03-29 09:58:39
最近更新時間: 2024-03-29 09:58:39
分享文章
接口功能介紹
創建詢價。
接口約束
無。
URI
POST /v4/ipv6_bandwidth/query-create-price
請求參數
請求體body參數
| 參數 | 參數類型 | 是否必填 | 說明 | 示例 |
|---|---|---|---|---|
| clientToken | String | 是 | 保證請求冪等性。從您的客戶端生成一個參數值,確保不同請求間該參數值唯一。ClientToken只支持ASCII字符,且不能超過64個字符。 | 123e4567-e89b-12d3-a456-426655440000 |
| regionID | String | 是 | 創建共享帶寬的區域id。 | 81f7728662dd11ec810800155d307d5b |
| bandwidth | Integer | 是 | 共享帶寬的帶寬峰值,必須大于等于 5。 | 5 |
| cycleType | String | 是 | 訂購類型:month(包月) / year(包年) | month |
| cycleCount | Integer | 是 | 訂購時長, 當 cycleType = month, 支持續訂 1 - 11 個月; 當 cycleType = year, 支持續訂 1 - 3 年 | 1 |
| name | String | 是 | 共享帶寬名稱。同一租戶下不允許設置相同的name。 | test |
響應參數
| 參數 | 參數類型 | 說明 | 示例 |
|---|---|---|---|
| statusCode | Integer | 返回狀態碼(800為成功,900為失敗) | 800 |
| message | String | statusCode為900時的錯誤信息; statusCode為800時為success, 英文 | success |
| description | String | statusCode為900時的錯誤信息; statusCode為800時為成功, 中文 | 成功 |
| errorCode | String | statusCode為900時為業務細分錯誤碼,三段式:product.module.code; statusCode為800時為SUCCESS | SUCCESS |
| returnObj | Object | 業務數據 | 見下表 |
表 returnObj
| 參數 | 參數類型 | 示例 | 說明 |
|---|---|---|---|
| totalPrice | Float | 總價格 | 336.0 |
| discountPrice | Float | 折后價格,云主機相關產品有 | 225.3 |
| finalPrice | Float | 最終價格 | 225.3 |
| subOrderPrices | Array of Objects | 子訂單價格信息 | 見下表 |
表 subOrderPrices
| 參數 | 參數類型 | 示例 | 說明 |
|---|---|---|---|
| serviceTag | String | 服務類型 | OVMS |
| totalPrice | Float | 子訂單總價格 | 336.0 |
| finalPrice | Float | 最終價格 | 225.3 |
| orderItemPrices | Array of Object | item價格信息 | 見下表 |
表 orderItemPrices
| 參數 | 參數類型 | 示例 | 說明 |
|---|---|---|---|
| resourceType | String | 資源類型 | NETWORK |
| totalPrice | String | 總價格 | 246.0 |
| finalPrice | String | 最終價格 | 135.3 |
請求示例
POST /v4/ipv6_bandwidth/query-create-price
請求體body
{
"regionID": "81f7728662dd11ec810800155d307d5b",
"clientToken": "Xxxxx",
"cycleType": "year",
"bandwidth": 5,
"cycleCount": 1,
"name": "test"
}
響應示例
{
"statusCode": 800,
"message": "success",
"description": "",
"errorCode": "SUCCESS",
"returnObj": {
"discountPrice": 1101.6,
"totalPrice": 1836,
"finalPrice": 1101.6,
"subOrderPrices": [
{
"totalPrice": 1836,
"finalPrice": 1101.6,
"serviceTag": "OVMS",
"orderItemPrices": [
{
"resourceType": "NETWORK",
"totalPrice": 1836,
"finalPrice": 1101.6
}
]
}
]
}
}
狀態碼
| 狀態碼 | 描述 |
|---|---|
| 200 | 表示請求成功。 |
錯誤碼
請參考 錯誤碼說明。