Domain name for API request: mna.intl.tencentcloudapi.com.
Purchase a single-use License
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: OrderPerLicense. |
| Version | Yes | String | Common Params. The value used for this API: 2021-01-19. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| DeviceId | Yes | String | Device ID for purchasing a permanent License. If it is an unactivated device from the manufacturer, use HardwareId. |
| Type | Yes | Integer | Device type. 0: SDK, 1: CPE. Enter 0 when creating or activating a device as a user. Enter 1 when creating a device to be activated as a manufacturer. |
| RollBack | No | Boolean | Rollback or not (delete device) after purchase fail, default false. If the device is bound to a currently effective traffic package, rollback is not allowed. |
| AutoVoucher | No | Boolean | Whether to automatically select voucher. Default false. Selection strategy for multiple vouchers: Deduct vouchers by this priority - voucher that can offset the total amount of the Payment Order, voucher with the earliest Expiration, voucher with the maximum deductible amount, voucher with the minimum balance, cash voucher. Only one voucher can be deducted at most. |
| VoucherIds.N | No | Array of String | Designated voucher ID. This parameter is invalid when selecting voucher automatically. Only one voucher can be input. Note: If the designated voucher does not meet the order deduction conditions, proceed with normal payment without deducting the voucher. |
| Parameter Name | Type | Description |
|---|---|---|
| ResourceId | String | Resource ID of the single-use License |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: mna.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: OrderPerLicense
<Common request parameters>
{
"DeviceId": "mna-devid",
"Type": 0,
"AutoVoucher": true,
"VoucherIds": [
"v-1"
]
}
{
"Response": {
"RequestId": "1206563f-f13f-4647-aaa8-37fa86954cc4-1",
"ResourceId": "56d11777-50f7-4c60-9c89-e7076c8529a9-0"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.TransactionException | Transaction process exception |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| OperationDenied | Operation denied. |
| OperationDenied.DeviceNotFound | The device does not exist or is currently unavailable. |
| OperationDenied.InsufficientBalance | Insufficient balance |
| OperationDenied.NotAllowedToPay | No Payment Permission |
| OperationDenied.RepeatPurchase | Repeat purchase |
| OperationDenied.UnauthorizedUser | Not identity verified |
| UnauthorizedOperation | Unauthorized operation. |
| UnauthorizedOperation.NoPermission | Service permission not verified |
피드백