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

Материал из WiKi - UserSide
(Align EN API terminology with project localization)
(Add Ukrainian API docs and trilingual API links)
 
(не показаны 3 промежуточные версии этого же участника)
Строка 1: Строка 1:
[[API|ru]] | '''en'''
'''en''' | [[API_UK|uk]] | [[API|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.  
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.  
Строка 48: Строка 48:
* [[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]] - Cross connects/ODF
* [[API_cross_EN|cross]] - Distribution frames
* [[API_customer_EN|customer]] - Customers. Most actions are relevant for [[Supported_billings|manual billing]]
* [[API_customer_EN|customer]] - Customers. Most actions are relevant for [[Supported_billings|manual billing]]
* [[API_cwdm_EN|cwdm]] - CWDM
* [[API_cwdm_EN|cwdm]] - CWDM
Строка 60: Строка 60:
* [[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]] - Infrastructure facilities ''(communication nodes, fiber optic splice closures, poles, manholes)''
* [[API_node_EN|node]] - Infrastructure facilities ''(communication nodes, splice closures, 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)''
Строка 68: Строка 68:
* [[API_setting_EN|setting]] - Settings
* [[API_setting_EN|setting]] - Settings
* [[API_sms_EN|sms]] - SMS messages
* [[API_sms_EN|sms]] - SMS messages
* [[API_splitter_EN|splitter]] - Splitters/compactors
* [[API_splitter_EN|splitter]] - 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

Текущая версия от 08:26, 10 мая 2026

en | uk | 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