update_billing_code
To assign a new activation code to a unit or unassign an old one, use the unit/update_billing_code method.
Endpoint
svc=unit/update_billing_code¶ms={
"itemId": <long>,
"code": <text>
}
Parameters
The request must contain the following parameters:
| Parameter | Description |
|---|---|
itemId |
Unit ID. |
code |
Activation code to be assigned or unassigned. |
Example
Below is an example of the unit/update_billing_code request.
svc=unit/update_billing_code¶ms={
"itemId": 1133,
"code": "bf6364e80170cbd4a42bfa8eb446deff"
}
Response
If the request is completed successfully, the response is returned in the following format:
{
"code": <text> /* Activation code. */
}
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 6 | Failed to assign or unassign the code. The reason field contains one of the following values:
|
| 7 | Access denied. This happens in one of the following cases:
|