unshare_billing_code

To revoke sharing of an activation code with a specific user and their subordinate, use the user/unshare_billing_code method.

Endpoint

Copied!
svc=user/unshare_billing_code&params={
    "userId": <long>,
    "code": "<text>"
}

Parameters

The request must contain the following parameters:

Parameter Description
userId ID of the user with whom the activation code should no longer be shared.
code The activation code to be unshared.

Response

The response always contains the error code and its reason. If the request is completed successfully, the following response is returned:

Copied!
{
  "error": 0,
  "reason": "NO_ERROR"
}

If the request fails, the response contains the error code and the reason from the table below, for example:

Copied!
{
  "error": 7,
  "reason": "CODE_NOT_SHARED_WITH_TARGET"
}

Error codes

Error code Reason Description
1 INVALID_PARAMS Invalid input parameters, or the activation code isn’t found.
2 NO_BILLING_BY_CODES The Activation codes module is not enabled.
3 INVALID_SOURCE_USER Invalid source user: the current user isn’t found.
4 TARGET_USER_NO_ACCESS The target user isn’t lower than the current user in the hierarchy.
5 INVALID_TARGET_USER Invalid target user: the user isn’t found.
6 CODE_NOT_SHARED_WITH_SOURCE The code is not shared with the source user.
7 CODE_NOT_SHARED_WITH_TARGET The code is not shared with the target user.
9 INTERNAL_ERROR Internal error.

If you find a mistake in the text, please select it and press Ctrl+Enter.