Delete a customer
deleteCustomer deletes a customer that belongs directly to the authenticated customer, the same as Delete in the panel. The customer is blocked first, so its calls in progress are disconnected. Then the customer is deleted with its accounts and tariffs, and with all its sub-customers and their objects.
The method supports trusted mode with i_wholesaler, the ID of the customer that owns the one you delete.
The authenticated customer needs the right to delete customers (bit 4 of its customers_mgmt).
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
i_customer |
int | yes | ID of the customer. It must be your direct sub-customer |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
Example
Section titled “Example”call("deleteCustomer", {"i_customer": 3}){"result": "OK"}Errors
Section titled “Errors”| faultCode | faultString | Cause |
|---|---|---|
401 |
You do not have permissions to use this API call. |
You have no right to delete customers |
401 |
Unable to get customer info. |
No customer with this i_customer belongs directly to you |