Перейти до вмісту

Get customer information

Цей контент ще не доступний вашою мовою.

getCustomerInfo returns every attribute of a customer: the same fields that createCustomer accepts, plus its current balance. The customer must be a direct sub-customer of the authenticated customer; to read your own settings, use My Preferences in the panel.

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

Name Type Required Description
i_customer int one of ID of the customer
name string one of Name of the customer. Send either i_customer or name, not both
Name Type Description
result string OK
customer struct The customer’s attributes, named as the parameters of createCustomer, plus i_customer, balance and credit_limit

Password fields such as web_password and api_password are not returned. Dates come back as strings in UTC. overcommit_limit and commission_size are percentages, for example 15.0.

request
call("getCustomerInfo", {"name": "Acme Telecom"})
response
{
"result": "OK",
"customer": {
"i_customer": 3,
"name": "Acme Telecom",
"web_login": "acme-web",
"i_tariff": 12,
"balance": -150.0,
"credit_limit": 500.0,
"email": "billing@acme.example",
# … the other createCustomer fields
},
}
faultCode Cause
400 Neither or both of i_customer and name were sent
401, 402, 403 Unable to get customer info.: no direct sub-customer with this ID or name