API EN: различия между версиями
IronBot (обсуждение | вклад) (Use Distribution frame term in EN API docs) |
IronBot (обсуждение | вклад) ([IronBot] Sync EN localization from RU) |
||
| (не показано 7 промежуточных версий этого же участника) | |||
| Строка 1: | Строка 1: | ||
[[API|ru]] | '''en''' | [[API_UK|uk]] | [[API|ru]] | ||
This section describes the | This section describes how to use the built-in ERP "UserSide" API in your own projects. | ||
The API does not cover all functionality | The API does not currently cover all functionality and is being expanded gradually, so this page may change frequently. | ||
== Operating principle == | == Operating principle == | ||
| Строка 11: | Строка 11: | ||
Both GET and POST requests can be used. | Both GET and POST requests can be used. | ||
'''Starting with version 3.21, all requests that write or modify data are processed only through POST.''' | |||
Input parameters: | |||
Required: | |||
key - API key | key - API key | ||
cat - category | cat - request category | ||
Optional: | Optional: | ||
skip_internal_api - flag - do not | skip_internal_api - flag - do not run internal system triggers ''(useful when an API method is called from a trigger and would otherwise trigger itself during normal operation)'' | ||
Other additional parameters, depending on the category ''(see below in the relevant categories)''. | Other additional parameters, depending on the category ''(see below in the relevant categories)''. | ||
For example: | For example: | ||
customer_id - | customer_id - customer id | ||
is_potential - flag. It can | is_potential - flag. It can be 1 or 0. Most flags use the '''is''' prefix. | ||
Example request: | Example request: | ||
| Строка 26: | Строка 28: | ||
Returned data: | Returned data: | ||
If the | If the request performs an action or returns data, the response is returned in JSON format: | ||
array( | array( | ||
[Result] => OK / ERROR | [Result] => OK / ERROR | ||
[ErrorText] => | [ErrorText] => Error text, if an error occurred | ||
) | ) | ||
Also check the HTTP response code. For errors or invalid requests, the HTTP code will differ from 200. | |||
== Basic | == Basic setup == | ||
Configure the [[UserSide_API_Key_EN|API Key]]. | Configure the [[UserSide_API_Key_EN|API Key]]. | ||
| Строка 60: | Строка 62: | ||
* [[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, | * [[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)'' | ||
* [[API_owner_EN|owner]] - Owners | * [[API_owner_EN|owner]] - Owners | ||
* [[API_redirect_EN|redirect]] - Redirects to an object card | * [[API_redirect_EN|redirect]] - Redirects to an object card by attribute | ||
* [[API_service_EN|service]] - Additional services | * [[API_service_EN|service]] - Additional services | ||
* [[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 | * [[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 | ||
Текущая версия от 14:58, 29 мая 2026
This section describes how to use the built-in ERP "UserSide" API in your own projects.
The API does not currently cover all functionality and is being expanded gradually, so this page may change frequently.
Operating principle
The /api.php file is responsible for interaction.
Both GET and POST requests can be used.
Starting with version 3.21, all requests that write or modify data are processed only through POST.
Input parameters: Required: key - API key cat - request category Optional: skip_internal_api - flag - do not run internal system triggers (useful when an API method is called from a trigger and would otherwise trigger itself during normal operation) Other additional parameters, depending on the category (see below in the relevant categories). For example: customer_id - customer id is_potential - flag. It can be 1 or 0. Most flags use the is prefix. Example request: api.php?key=apikey&cat=abon&action=msg&usercode=1
Returned data: If the request performs an action or returns data, the response is returned in JSON format: array( [Result] => OK / ERROR [ErrorText] => Error text, if an error occurred )
Also check the HTTP response code. For errors or invalid requests, the HTTP code will differ from 200.
Basic setup
Configure the API Key.
Categories
- address - Addresses
- attach - Attachments
- additional_data - Additional fields/data for objects
- advertising - Advertising campaigns
- billing - Billing
- cable_route - Cable routes and channels
- call - Calls
- chapter - Custom sections/pages/links
- commutation - Commutation of objects
- cross - Distribution frames
- customer - Customers. Most actions are relevant for manual billing
- cwdm - CWDM
- device - Equipment
- employee - Employees (since 3.16dev2)
- fiber - Cable lines
- gps - GPS trackers
- inventory - Warehouse
- key - Keys
- map - Coverage maps
- module - External requests from modules
- newin - Connection request (before 3.18)
- node - Infrastructure facilities (communication nodes, splice closures, poles, manholes)
- notepad - Notepad
- operator - System operators (before 3.16dev2)
- owner - Owners
- redirect - Redirects to an object card by attribute
- service - Additional services
- setting - Settings
- sms - SMS messages
- splitter - Splitters
- staff - Staff (up to 3.16dev2)
- system - System information and operations
- tariff - Tariffs
- task - Tasks
- trader - Vendors
- vehicle - Vehicles
- vlan - VLAN