API EN: различия между версиями

Материал из WiKi - UserSide
(Add missing chapter API category to English API index)
(Normalize English API category page links)
Строка 39: Строка 39:


== Categories ==
== Categories ==
* [[API address_EN|address]] - Addresses
* [[API_address_EN|address]] - Addresses
* [[API attach_EN|attach]] - Attachments
* [[API_attach_EN|attach]] - Attachments
* [[API additional_data_EN|additional_data]] - Additional fields/data for objects
* [[API_additional_data_EN|additional_data]] - Additional fields/data for objects
* [[API advertising_EN|advertising]] - Advertising campaigns
* [[API_advertising_EN|advertising]] - Advertising campaigns
* [[API billing_EN|billing]] - Billing
* [[API_billing_EN|billing]] - Billing
* [[API cable_route_EN|cable_route]] - Cable routes and channels
* [[API_cable_route_EN|cable_route]] - Cable routes and channels
* [[API call_EN|call]] - Calls
* [[API_call_EN|call]] - Calls
* [[API_chapter_EN|chapter]] - Custom sections/pages/links
* [[API_chapter_EN|chapter]] - Custom sections/pages/links
* [[API commutation_EN|commutation]] - Commutation of objects
* [[API_commutation_EN|commutation]] - Commutation of objects
* [[API cross_EN|cross]] - ODF/Crosses
* [[API_cross_EN|cross]] - ODF/Crosses
* [[API customer_EN|customer]] - Users. Most actions are relevant for [[Supported_billings|manual billing]]
* [[API_customer_EN|customer]] - Users. Most actions are relevant for [[Supported_billings|manual billing]]
* [[API cwdm_EN|cwdm]] - CWDM
* [[API_cwdm_EN|cwdm]] - CWDM
* [[API device_EN|device]] - Equipment
* [[API_device_EN|device]] - Equipment
* [[API employee_EN|employee]] - Employees ''(since 3.16dev2)'''
* [[API_employee_EN|employee]] - Employees ''(since 3.16dev2)'''
* [[API_fiber_EN|fiber]] - Cable lines
* [[API_fiber_EN|fiber]] - Cable lines
* [[API gps_EN|gps]] - GPS trackers
* [[API_gps_EN|gps]] - GPS trackers
* [[API inventory_EN|inventory]] - Warehouse
* [[API_inventory_EN|inventory]] - Warehouse
* [[API key_EN|key]] - Keys
* [[API_key_EN|key]] - Keys
* [[API map_EN|map]] - Coverage maps
* [[API_map_EN|map]] - Coverage maps
* [[API module_EN|module]] - External requests from modules
* [[API_module_EN|module]] - External requests from modules
* [[API newin_EN|newin]] - Connection request ''( before 3.18)'''  
* [[API_newin_EN|newin]] - Connection request ''( before 3.18)'''  
* [[API node_EN|node]] - Communication facilities ''(communication nodes, fiber optical junction boxes, poles, manholes)'''
* [[API_node_EN|node]] - Communication facilities ''(communication nodes, fiber optical junction boxes, poles, manholes)'''
* [[API notepad_EN|notepad]] - Notepad
* [[API_notepad_EN|notepad]] - Notepad
* [[API operator_EN|operator]] - system operators ''( before 3.16dev2)'''  
* [[API_operator_EN|operator]] - system operators ''( before 3.16dev2)'''  
* [[API owner_EN|owner]] - Object Owners
* [[API_owner_EN|owner]] - Object Owners
* [[API redirect_EN|redirect]] - Redirects to an object card based on some attribute
* [[API_redirect_EN|redirect]] - Redirects to an object card based on some attribute
* [[API service_EN|service]] - Additional services
* [[API_service_EN|service]] - Additional services
* [[API setting_EN|setting]] - Setting
* [[API_setting_EN|setting]] - Setting
* [[API sms_EN|sms]] - SMS messages
* [[API_sms_EN|sms]] - SMS messages
* [[API splitter_EN|splitter]] - dividers/splitters
* [[API_splitter_EN|splitter]] - dividers/splitters
* [[API staff_EN|staff]] - Staff ''(up to 3.16dev2)'''
* [[API_staff_EN|staff]] - Staff ''(up to 3.16dev2)'''
* [[API system_EN|system]] - System information and operations
* [[API_system_EN|system]] - System information and operations
* [[API tariff_EN|tariff]] - Tariffs
* [[API_tariff_EN|tariff]] - Tariffs
* [[API task_EN|task]] - Tasks
* [[API_task_EN|task]] - Tasks
* [[API trader_EN|trader]] - Vendors
* [[API_trader_EN|trader]] - Vendors
* [[API vehicle_EN|vehicle]] - Vehicles
* [[API_vehicle_EN|vehicle]] - Vehicles
* [[API vlan_EN|vlan]] - Vlan
* [[API_vlan_EN|vlan]] - Vlan

Версия от 19:37, 9 мая 2026

en | ru

This section describes the possibilities of using the inbuilt API in ERP "UserSide", which allows you to use the integrated functionality in your own projects.

The API does not cover all functionality at the moment and is gradually being developed, so this page will have frequent changes and additions.

Operating principle

The /api.php file is responsible for interaction.

Both GET and POST requests can be used.

Incoming Parameters:
Mandatory:
 key - API key
 cat - category of the request
Optional:
 skip_internal_api - flag - do not include internal system triggers (reasonable to use when your API method is a reaction to some trigger and it ends up looping itself during normal operation)
Other additional parameters, depending on the category (see below in the relevant categories). 
For example:
 customer_id - user id of the customer
 is_potential - flag. It can take the value 1 or 0. Most flags have the prefix is.

Example request:
api.php?key=apikey&cat=abon&action=msg&usercode=1
Returned data:
 If the query involves some action or information return, information will be returned in JSON format:
  array(
   [Result] => OK / ERROR
   [ErrorText] => In case of an error, the error text
  )
It is also reasonable to check the HTTP code of the response. In case of errors/incorrect requests - HTTP code will be different from 200

Basic setting

Configure the API Key.

Categories