Skip to content

Update a customer

updateCustomer changes a customer that belongs directly to the authenticated customer, the same as saving the customer form in the panel. Send only the parameters you change.

The method supports trusted mode with i_wholesaler, the ID of the customer that owns the one you change.

The authenticated customer needs the right to edit customers (bit 2 of its customers_mgmt).

Name Type Required Description
i_customer int yes ID of the customer. It must be your direct sub-customer
ignore_accounts_matching_rule boolean no True saves a new accounts_matching_rule even when existing accounts do not match it. Default False: the call fails instead
any parameter of createCustomer no The new value, with the rules below
  • balance and max_depth cannot be changed and are ignored. Change the balance with payments.
  • i_tariff must be a tariff in the customer’s base currency.
  • web_password cannot repeat the current or a recent previous password.
  • i_routing_group also changes the sub-customers below that use the same routing group.
  • dncl_enabled applies to the customer and all its sub-customers.
  • did_pool_enabled, ivr_apps_enabled, asr_acd_enabled, debit_credit_cards_enabled and conferencing_enabled set to False turn the feature off for the customer and all its sub-customers. share_payment_processors set to False removes the payment processors the customer inherited.
Name Type Description
result string OK
request
call("updateCustomer", {
"i_customer": 3,
"credit_limit": 1000.0,
"email": "noc@acme.example",
})
response
{"result": "OK"}
faultCode faultString Cause
401 You do not have permissions to use this API call. You have no right to edit customers
401 Unable to get customer info. No customer with this i_customer belongs directly to you
401 Wrong i_tariff parameter. The tariff’s currency differs from the customer’s base currency
400 You may not re-use web_password password. The new web_password was used recently
405 There are accounts not matching accounts_matching_rule. Existing accounts do not match the new rule. Fix the rule or send ignore_accounts_matching_rule

The other faults of createCustomer apply to the same parameters.