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.
Parameters
Section titled “Parameters”| 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 |
Returns
Section titled “Returns”| 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.
Example
Section titled “Example”call("getCustomerInfo", {"name": "Acme Telecom"}){ "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 },}Errors
Section titled “Errors”| 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 |
Related
Section titled “Related”- Customers: the same fields in the panel
- Update customers
- List customers
- Get any customer (root):
getRootCustomerInfo, for customers at any level