share_billing_code

You can share activation codes with users who are lower in the hierarchy. To do this, use the user/share_billing_code method.

Prerequisites

To share an activation code, the following prerequisites must be met:

  • The user with whom you want to share the code must have dealer rights.
  • The code must not be already shared with a user from another branch of the hierarchy.
  • The code must not be already assigned to any unit.

When sharing activation codes, consider the following details:

  • A code shared with a lower-level user is automatically shared with users higher in the same branch of the hierarchy.

  • You can’t share the same activation code with users from different branches of the hierarchy.

  • If dealer rights are revoked from an account, any shared activation codes are automatically unshared.

Endpoint

Copied!
svc=user/share_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 be shared.
code Activation code to be shared.

Response

If the request is completed successfully, the response is returned in the following format:

Copied!
{
  "result": "success"  
}

If the request fails, an error code is returned.

Error codes

Error Code Description
1 Invalid input parameters.
2 The Activation codes module is not enabled.
3 Invalid source user.
4 The target user doesn’t have dealer rights or the Manage access codes access right.
5 Invalid target user.
6 The code is not shared with the source user.
7 The code has already been shared.
8 The code is assigned to a unit.
9 Internal error.

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

Report a mistake

Your message was sent. Thank you!

An error occurred while submitting the form

Download PDF file
Download Word document

See also