API customer EN: различия между версиями
Нет описания правки |
Нет описания правки |
||
(не показано 7 промежуточных версий 2 участников) | |||
Строка 3: | Строка 3: | ||
Section '''[[API_EN|API]]''' ERP "UserSide" | Section '''[[API_EN|API]]''' ERP "UserSide" | ||
Purpose: Actions with | Purpose: Actions with customers. Most actions are relevant for [[Supported_billings|manual billing]]. | ||
Additional parameters: | Additional parameters: | ||
action - subcategory of the request ''(possible value: see below)'' | |||
== Subcategories == | == Subcategories == | ||
==== add ==== | |||
''Modified in: 3.13.25 (added is_corporate parameter)'' | |||
Description: Adding a customer | |||
Optional parameters: | |||
fio - name of the customer | |||
codeti - customer id in the billing system | |||
is_potential - flag - potential customer | |||
is_corporate - flag - legal entity | |||
billing_id - billing id | |||
==== abon_hist ==== | |||
''Modified in: 3.17dev1 (excluded usercode parameter, added customer_id parameter)'' | |||
Description: Display transactions with user (financial and other) | |||
Obligatory parameters: | |||
usercode - ''(for version 3.16 and earlier)''' customer ID | |||
customer_id - ''(for version 3.17 and later)'' customer ID | |||
==== change_balance ==== | |||
''Modified in: 3.16dev2 (removed operator_id parameter, added employee_id parameter)'' | |||
''Modified in: 3.13.22 (added operator_id parameter)'' | |||
Description: Balance change (income/expense operation) | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
amount - Amount | |||
comment - operation notes | |||
Optional parameters: | |||
employee_id - employee ID | |||
operator_id - operator ID ''(before version 3.16dev2)'' | |||
==== change_billing ==== | |||
''Modified in: 3.16.23 (added billing_user_id parameter)'' | |||
''Added in: 3.12.48'' | |||
Description: Billing modification | |||
Obligatory parameters: | |||
customer_id - customer id | |||
billing_id - billing id | |||
Optional parameters: | |||
billing_user_id - customer id in billing | |||
==== change_date_connect ==== | |||
''Added in: 3.12.80'' | |||
Description: Change the connection date | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
value - date | |||
==== delete ==== | |||
''Added in: 3.14.21'' | |||
Description: Deleting a customer | |||
Obligatory parameters: | |||
id - customer ID | |||
==== edit ==== | |||
''Modified in: 3.16dev3 (added group_id parameter)'' | |||
''Modified in: 3.13.56 (added manager_id parameter)'' | |||
''Added in: 3.12rc2'' | |||
Description: Editing a customer | |||
Obligatory parameters: | |||
id - customer ID | |||
Optional parameters: | |||
account_number - personal account number | |||
agreement_date - agreement date | |||
agreement_number - agreement number | |||
apartment_number - flat number | |||
comment - notes | |||
date_activity - date of network activity | |||
date_activity_inet - date of internet activity | |||
date_connect - date of connection | |||
email - email address | |||
entrance - entrance number | |||
flag_corporate - flag - legal entity | |||
floor - floor | |||
group_id - group id | |||
house_id - house id | |||
is_potential - flag - potential customer | |||
login - login | |||
manager_id - id of manager employee | |||
name - name of customer | |||
parent_id - id of parent customer ''(for the child customer)'' | |||
phone0 - mobile phone number | |||
phone1 - home phone number | |||
==== get_activity_counter ==== | |||
''Added in: 3.12.81'' | |||
Description: Retrieve the counter of active customers | |||
Obligatory parameters: | |||
type - counter type ''(Possible values: net, internet, personal_area)'' | |||
==== get_abon_id ==== | |||
''Modified in: 3.14.34 (added possible account value for data_typer parameter)'' | |||
Description: Retrieving of customer ID from incoming data | |||
Obligatory parameters: | |||
data_typer - type of data we are checking ''(possible values: account, billing_uid, codeti, dognumber, ip, login, mac, mail, phone)'' | |||
data_value - value | |||
Optional parameters: | |||
is_skip_old - flag - do not search among former customers | |||
==== get_customer_group ==== | |||
''Added in: 3.19beta1'' | |||
Description: Get list of customer groups | |||
Obligatory parameters: | |||
None | |||
Optional parameters: | |||
None | |||
==== get_customers_id ==== | |||
''Modified in: 3.18.10 (added is_corporate parameter)'' | |||
''Modified in: 3.16dev3 (added parameters name, limit, is_like)'' | |||
''Modified in: 3.15.26 (added is_ex parameter)'' | |||
''Modified in: 3.14.71 (added dependence_device_id parameter)'' | |||
''Modified in: 3.14.58 (added balance_from, balance_to, state_id parameters)'' | |||
''Modified in: 3.14.41 (added date_connect_from and date_connect_to parameters)'' | |||
''Modified in: 3.14.5 (added address_unit_id parameter)'' | |||
''Modified in: 3.13.48 (added tariff_id parameter)'' | |||
''Modified in: 3.13.35 (added mark_id parameter)'' | |||
''Added in: 3.12.8'' | |||
Description: Retrieve list of customer IDs by incoming conditions | |||
Obligatory parameters: | |||
None | |||
Optional parameters ''(but at least one condition must be specified)'': | |||
address_unit_id - address unit id | |||
appartment - number of the flat | |||
balance_from - balance ''(from)'' | |||
balance_to - balance ''(to)'' | |||
billing_id - billing number id | |||
date_connect_from - date of connection ''(from)'' | |||
date_connect_to - date of connection ''(to)'' | |||
dependence_device_id - id of the device the customers depend on | |||
house_id - house id | |||
is_corporate - flag - a legal entity | |||
is_ex - flag - former customers | |||
mark_id - mark id | |||
name - name/title of customer | |||
state_id - status id | |||
tariff_id - tariff id | |||
limit - maximum number of records to return in the response | |||
is_like - flag - use substring comparison where possible ''(not a full match)'' | |||
==== get_data ==== | |||
Description: Receiving customer information | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
or | |||
account_number - customer's personal account number | |||
+ | |||
billing_id - billing ID | |||
==== get_ip_port_device_commutation ==== | |||
''Added in: 3.12beta35'' | |||
Description: Obtain IP,MAC-addresses of customers with binding to switches ''(including for work with DHCP)'' | |||
==== get_last_ip ==== | |||
Description: Get the last used IP address for customers | |||
==== get_mac_history ==== | |||
''Added to: 3.16dev8'' | |||
Description: Get MAC address change history by customer | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
==== get_max_agreement_number ==== | |||
''Added in: 3.12.3'' | |||
Description: Get the maximum occupied contract number ''(numeric)'' | |||
Optional parameters: | |||
billing_id - billing id of customers among which to perform the selection | |||
==== ip_add ==== | |||
''Modified in: 3.17.36 (added mac parameter)'' | |||
''Added in: 3.12.83'' | |||
Description: Add IP address | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
value - IP | |||
Optional parameters: | |||
mac - MAC of the customer | |||
==== ip_delete ==== | |||
''Modified in: 3.19beta1 (added possible value all to the value parameter)'' | |||
''Added in: 3.12.83'' | |||
Description: Delete IP address | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
value - ip or "-1" for entries with no IP address ''(MAC address only)'' or "all" for all addresses | |||
==== ip_subnet_add ==== | |||
''Added in: 3.14.71'' | |||
Description: Adds a subnet of IP addresses for a customer | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
ip - initial ip address | |||
subnet - subnet mask/VLSM ''(for example: 24)'' | |||
==== ip_subnet_delete ==== | |||
''Added to: 3.14.71'' | |||
Description: Deletes a subnet of IP addresses from a customer | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
ip - initial ip address | |||
==== list_tarif_available ==== | |||
''Excluded in: 3.13'' | |||
Description: List of tariffs available to the customer to change tariffs | |||
Obligatory parameters: | |||
usercode - customer ID | |||
==== mark_add ==== | |||
''Added in: 3.12.82'' | |||
Description: Adds a label on a customer | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
mark_id - mark id | |||
==== mark_delete ==== | |||
''Added in: 3.12.82'' | |||
Description: Deletes a tag from a customer | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
mark_id - mark id | |||
==== msg ==== | |||
''Modified in: 3.17dev1 (usercode parameter removed, customer_id parameter added)'' | |||
''Modified in: 3.16dev3 (made usercode parameter optional)'' | |||
''Modified in: 3.16dev2 (excluded operator_id parameter, added employee_id parameter)'' | |||
''Modified in: 3.14.53 (added date_add_from, date_add_to, operator_id parameters)'' | |||
Description: Display correspondence with a customer | |||
Optional parameters ''(but must be one)'': | |||
usercode - ''(for version 3.16 and earlier)'' customer ID | |||
customer_id - ''(for version 3.17 and later)'' customer ID | |||
date_add_from - date of message (from) | |||
date_add_to - date of message (to) | |||
employee_id - id of the employee who authored the message | |||
operator_id - id of the operator who authored the message ''(before version 3.16dev2)'' | |||
==== msg_add ==== | |||
''Added in: 3.13.25'' | |||
Description: Adds a message from a customer | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
text - Message text | |||
==== pass_change ==== | |||
''Modified in: 3.17dev1 (usercode parameter removed, customer_id parameter added)'' | |||
''Modified in: 3.15.23 (pass_old parameter became optional)'' | |||
Description: Change password for logging in to the Personal Cabinet | |||
Obligatory parameters: | |||
usercode - ''(for version 3.16 and earlier)'' customer ID | |||
customer_id - ''(for version 3.17 and later)'' customer ID | |||
pass_new - new password | |||
Additional parameters: | |||
pass_old - current password | |||
==== service_add ==== | |||
''Added in: 3.18beta1'' | |||
Description: Add additional service | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
service_id - id of additional service | |||
Optional parameters: | |||
price - individual price | |||
comment - notes | |||
==== service_remove ==== | |||
''Added in: 3.18beta1'' | |||
Description: Remove additional service | |||
Obligatory parameters: | |||
customer_id - customer ID | |||
service_id - id of additional service | |||
==== set_mac_by_ip ==== | |||
''Added in: 3.12beta35'' | |||
Description: specifies the MAC address for the customer's IP address | |||
Obligatory parameters: | |||
ip - IP address of the customer (for example: 192.168.0.1) | |||
mac - MAC address of the customer (for example: 00:11:22:33:44:55) | |||
==== state_change ==== | |||
''Modified in: 3.17dev1 (removed usercode parameter, added customer_id parameter)'' | |||
''Added in: 3.12.8'' | |||
Description: change the job status of a customer | |||
Obligatory parameters: | |||
usercode - ''(for version 3.16 and earlier)'' customer ID | |||
customer_id - ''(for version 3.17 and later)'' customer ID | |||
state_id - customer status ID (0 - stop, 1 - paused, 2 - active) | |||
==== tarif_change ==== | |||
''Modified in: 3.17dev1 (excluded usercode parameter, added customer_id parameter)'' | |||
Description: change of tariff for a customer | |||
Obligatory parameters: | |||
usercode - ''(for version 3.16 and earlier)'' customer ID | |||
customer_id - ''(for version 3.17 and later)'' customer ID | |||
tarif - new tariff ID | |||
==== to_ex ==== | |||
''Modified in: 3.17dev1 (removed usercode parameter, added customer_id parameter)'' | |||
''Added in: 3.12.69'' | |||
Description: transfer a customer to the ''Former customers'' category | |||
Obligatory parameters: | |||
usercode - ''(for version 3.16 and earlier)'' customer ID | |||
customer_id - ''(for version 3.17 and later)'' customer ID | |||
==== to_normal ==== | |||
''Modified in: 3.17dev1 (removed usercode parameter, added customer_id parameter)'' | |||
''Added in: 3.12.90'' | |||
Description: switch customer to normal status (from "Former customers") | |||
Obligatory parameters: | |||
usercode - ''(for version 3.16 and earlier)'' customer ID | |||
customer_id - ''(for version 3.17 and later)'' customer ID |
Текущая версия от 21:56, 26 апреля 2024
Section API ERP "UserSide"
Purpose: Actions with customers. Most actions are relevant for manual billing.
Additional parameters: action - subcategory of the request (possible value: see below)
Subcategories
add
Modified in: 3.13.25 (added is_corporate parameter)
Description: Adding a customer Optional parameters: fio - name of the customer codeti - customer id in the billing system is_potential - flag - potential customer is_corporate - flag - legal entity billing_id - billing id
abon_hist
Modified in: 3.17dev1 (excluded usercode parameter, added customer_id parameter)
Description: Display transactions with user (financial and other) Obligatory parameters: usercode - (for version 3.16 and earlier)' customer ID customer_id - (for version 3.17 and later) customer ID
change_balance
Modified in: 3.16dev2 (removed operator_id parameter, added employee_id parameter)
Modified in: 3.13.22 (added operator_id parameter)
Description: Balance change (income/expense operation) Obligatory parameters: customer_id - customer ID amount - Amount comment - operation notes Optional parameters: employee_id - employee ID operator_id - operator ID (before version 3.16dev2)
change_billing
Modified in: 3.16.23 (added billing_user_id parameter)
Added in: 3.12.48
Description: Billing modification Obligatory parameters: customer_id - customer id billing_id - billing id Optional parameters: billing_user_id - customer id in billing
change_date_connect
Added in: 3.12.80
Description: Change the connection date Obligatory parameters: customer_id - customer ID value - date
delete
Added in: 3.14.21
Description: Deleting a customer Obligatory parameters: id - customer ID
edit
Modified in: 3.16dev3 (added group_id parameter)
Modified in: 3.13.56 (added manager_id parameter)
Added in: 3.12rc2
Description: Editing a customer Obligatory parameters: id - customer ID Optional parameters: account_number - personal account number agreement_date - agreement date agreement_number - agreement number apartment_number - flat number comment - notes date_activity - date of network activity date_activity_inet - date of internet activity date_connect - date of connection email - email address entrance - entrance number flag_corporate - flag - legal entity floor - floor group_id - group id house_id - house id is_potential - flag - potential customer login - login manager_id - id of manager employee name - name of customer parent_id - id of parent customer (for the child customer) phone0 - mobile phone number phone1 - home phone number
get_activity_counter
Added in: 3.12.81
Description: Retrieve the counter of active customers Obligatory parameters: type - counter type (Possible values: net, internet, personal_area)
get_abon_id
Modified in: 3.14.34 (added possible account value for data_typer parameter)
Description: Retrieving of customer ID from incoming data Obligatory parameters: data_typer - type of data we are checking (possible values: account, billing_uid, codeti, dognumber, ip, login, mac, mail, phone) data_value - value Optional parameters: is_skip_old - flag - do not search among former customers
get_customer_group
Added in: 3.19beta1
Description: Get list of customer groups Obligatory parameters: None Optional parameters: None
get_customers_id
Modified in: 3.18.10 (added is_corporate parameter)
Modified in: 3.16dev3 (added parameters name, limit, is_like)
Modified in: 3.15.26 (added is_ex parameter)
Modified in: 3.14.71 (added dependence_device_id parameter)
Modified in: 3.14.58 (added balance_from, balance_to, state_id parameters)
Modified in: 3.14.41 (added date_connect_from and date_connect_to parameters)
Modified in: 3.14.5 (added address_unit_id parameter)
Modified in: 3.13.48 (added tariff_id parameter)
Modified in: 3.13.35 (added mark_id parameter)
Added in: 3.12.8
Description: Retrieve list of customer IDs by incoming conditions Obligatory parameters: None Optional parameters (but at least one condition must be specified): address_unit_id - address unit id appartment - number of the flat balance_from - balance (from) balance_to - balance (to) billing_id - billing number id date_connect_from - date of connection (from) date_connect_to - date of connection (to) dependence_device_id - id of the device the customers depend on house_id - house id is_corporate - flag - a legal entity is_ex - flag - former customers mark_id - mark id name - name/title of customer state_id - status id tariff_id - tariff id limit - maximum number of records to return in the response is_like - flag - use substring comparison where possible (not a full match)
get_data
Description: Receiving customer information Obligatory parameters: customer_id - customer ID or account_number - customer's personal account number + billing_id - billing ID
get_ip_port_device_commutation
Added in: 3.12beta35
Description: Obtain IP,MAC-addresses of customers with binding to switches (including for work with DHCP)
get_last_ip
Description: Get the last used IP address for customers
get_mac_history
Added to: 3.16dev8
Description: Get MAC address change history by customer Obligatory parameters: customer_id - customer ID
get_max_agreement_number
Added in: 3.12.3
Description: Get the maximum occupied contract number (numeric) Optional parameters: billing_id - billing id of customers among which to perform the selection
ip_add
Modified in: 3.17.36 (added mac parameter)
Added in: 3.12.83
Description: Add IP address Obligatory parameters: customer_id - customer ID value - IP Optional parameters: mac - MAC of the customer
ip_delete
Modified in: 3.19beta1 (added possible value all to the value parameter)
Added in: 3.12.83
Description: Delete IP address Obligatory parameters: customer_id - customer ID value - ip or "-1" for entries with no IP address (MAC address only) or "all" for all addresses
ip_subnet_add
Added in: 3.14.71
Description: Adds a subnet of IP addresses for a customer Obligatory parameters: customer_id - customer ID ip - initial ip address subnet - subnet mask/VLSM (for example: 24)
ip_subnet_delete
Added to: 3.14.71
Description: Deletes a subnet of IP addresses from a customer Obligatory parameters: customer_id - customer ID ip - initial ip address
list_tarif_available
Excluded in: 3.13
Description: List of tariffs available to the customer to change tariffs Obligatory parameters: usercode - customer ID
mark_add
Added in: 3.12.82
Description: Adds a label on a customer Obligatory parameters: customer_id - customer ID mark_id - mark id
mark_delete
Added in: 3.12.82
Description: Deletes a tag from a customer Obligatory parameters: customer_id - customer ID mark_id - mark id
msg
Modified in: 3.17dev1 (usercode parameter removed, customer_id parameter added)
Modified in: 3.16dev3 (made usercode parameter optional)
Modified in: 3.16dev2 (excluded operator_id parameter, added employee_id parameter)
Modified in: 3.14.53 (added date_add_from, date_add_to, operator_id parameters)
Description: Display correspondence with a customer Optional parameters (but must be one): usercode - (for version 3.16 and earlier) customer ID customer_id - (for version 3.17 and later) customer ID date_add_from - date of message (from) date_add_to - date of message (to) employee_id - id of the employee who authored the message operator_id - id of the operator who authored the message (before version 3.16dev2)
msg_add
Added in: 3.13.25
Description: Adds a message from a customer Obligatory parameters: customer_id - customer ID text - Message text
pass_change
Modified in: 3.17dev1 (usercode parameter removed, customer_id parameter added)
Modified in: 3.15.23 (pass_old parameter became optional)
Description: Change password for logging in to the Personal Cabinet Obligatory parameters: usercode - (for version 3.16 and earlier) customer ID customer_id - (for version 3.17 and later) customer ID pass_new - new password Additional parameters: pass_old - current password
service_add
Added in: 3.18beta1
Description: Add additional service Obligatory parameters: customer_id - customer ID service_id - id of additional service Optional parameters: price - individual price comment - notes
service_remove
Added in: 3.18beta1
Description: Remove additional service Obligatory parameters: customer_id - customer ID service_id - id of additional service
set_mac_by_ip
Added in: 3.12beta35
Description: specifies the MAC address for the customer's IP address Obligatory parameters: ip - IP address of the customer (for example: 192.168.0.1) mac - MAC address of the customer (for example: 00:11:22:33:44:55)
state_change
Modified in: 3.17dev1 (removed usercode parameter, added customer_id parameter)
Added in: 3.12.8
Description: change the job status of a customer Obligatory parameters: usercode - (for version 3.16 and earlier) customer ID customer_id - (for version 3.17 and later) customer ID state_id - customer status ID (0 - stop, 1 - paused, 2 - active)
tarif_change
Modified in: 3.17dev1 (excluded usercode parameter, added customer_id parameter)
Description: change of tariff for a customer Obligatory parameters: usercode - (for version 3.16 and earlier) customer ID customer_id - (for version 3.17 and later) customer ID tarif - new tariff ID
to_ex
Modified in: 3.17dev1 (removed usercode parameter, added customer_id parameter)
Added in: 3.12.69
Description: transfer a customer to the Former customers category Obligatory parameters: usercode - (for version 3.16 and earlier) customer ID customer_id - (for version 3.17 and later) customer ID
to_normal
Modified in: 3.17dev1 (removed usercode parameter, added customer_id parameter)
Added in: 3.12.90
Description: switch customer to normal status (from "Former customers") Obligatory parameters: usercode - (for version 3.16 and earlier) customer ID customer_id - (for version 3.17 and later) customer ID