API address EN: различия между версиями
IronBot (обсуждение | вклад) (Add Ukrainian API docs and trilingual API links) |
IronBot (обсуждение | вклад) (Fix Ukrainian API localization) |
||
| Строка 1: | Строка 1: | ||
'''en''' | [[API_address_UK|uk]] | [[API address|ru]] | '''en''' | [[API_address_UK|uk]] | [[API address|ru]] | ||
Section '''[[API_EN|API]]''' ERP "UserSide" | Section '''[[API_EN|API]]''' ERP "UserSide" | ||
Purpose: | Purpose: Address management | ||
Optional parameters: | Optional parameters: | ||
| Строка 14: | Строка 14: | ||
==== add_locality_type ==== | ==== add_locality_type ==== | ||
''Added in 3.13.64'' | ''Added in 3.13.64'' | ||
Description: | Description: Add an address unit type | ||
Required parameters: | |||
name - name | name - name | ||
token - token | token - token | ||
| Строка 21: | Строка 21: | ||
==== edit_locality_type ==== | ==== edit_locality_type ==== | ||
''Added in 3.13.64'' | ''Added in 3.13.64'' | ||
Description: | Description: Edit an address unit type | ||
Required parameters: | |||
id - id | id - id | ||
Optional parameters: | Optional parameters: | ||
| Строка 42: | Строка 42: | ||
==== add_address ==== | ==== add_address ==== | ||
''Added in 3.13.64'' | ''Added in 3.13.64'' | ||
Description: | Description: Add an address unit | ||
Required parameters: | |||
locality_type_id - address unit type id | locality_type_id - address unit type id | ||
name - name | name - name | ||
| Строка 55: | Строка 55: | ||
Description: Information about address units | Description: Information about address units | ||
Required parameters ''(at least one is required)'': | |||
id - id of objects ''(can be separated by commas)'' | id - id of objects ''(can be separated by commas)'' | ||
locality_type_id - type of objects ''(can be separated by commas)'' | locality_type_id - type of objects ''(can be separated by commas)'' | ||
| Строка 66: | Строка 66: | ||
''Added in 3.13.60'' | ''Added in 3.13.60'' | ||
Description: Edit address unit | Description: Edit address unit | ||
Required parameters: | |||
id - id of the object | id - id of the object | ||
Optional parameters: | Optional parameters: | ||
| Строка 75: | Строка 75: | ||
==== add_province ==== | ==== add_province ==== | ||
Description: | Description: Add a province | ||
Required parameters: | |||
name - Name | name - Name | ||
Optional returned data: | Optional returned data: | ||
| Строка 84: | Строка 84: | ||
==== edit_province ==== | ==== edit_province ==== | ||
Description: | Description: Edit a province | ||
Required parameters: | |||
id - ID of the province | id - ID of the province | ||
Optional parameters: | Optional parameters: | ||
| Строка 91: | Строка 91: | ||
==== del_province ==== | ==== del_province ==== | ||
Description: | Description: Delete a province | ||
Required parameters: | |||
id - ID of the province | id - ID of the province | ||
==== get_province ==== | ==== get_province ==== | ||
''Changed in 3.12.17 (added incoming id parameter)'' | ''Changed in 3.12.17 (added incoming id parameter)'' | ||
Description: List of | Description: List of provinces | ||
Optional parameters: | Optional parameters: | ||
id - ID of the province (can be comma separated) | id - ID of the province (can be comma separated) | ||
| Строка 109: | Строка 109: | ||
==== add_district ==== | ==== add_district ==== | ||
''Added in 3.13.46'' | ''Added in 3.13.46'' | ||
Description: | Description: Add a district | ||
Required parameters: | |||
name - name | name - name | ||
==== edit_district ==== | ==== edit_district ==== | ||
''Added in 3.13.46'' | ''Added in 3.13.46'' | ||
Description: | Description: Edit a district | ||
Required parameters: | |||
id - id of the district | id - id of the district | ||
Optional parameters: | Optional parameters: | ||
| Строка 123: | Строка 123: | ||
==== del_district ==== | ==== del_district ==== | ||
''Added in 3.13.46'' | ''Added in 3.13.46'' | ||
Description: | Description: Delete a district | ||
Required parameters: | |||
id - id of the district | id - id of the district | ||
| Строка 136: | Строка 136: | ||
==== add_city ==== | ==== add_city ==== | ||
Description: | Description: Add a city | ||
Required parameters: | |||
name - Name of the city | name - Name of the city | ||
Optional parameters: | Optional parameters: | ||
| Строка 154: | Строка 154: | ||
''Modified 3.12.17 (added incoming id parameter)'' | ''Modified 3.12.17 (added incoming id parameter)'' | ||
Description: List of | Description: List of cities | ||
Optional parameters: | Optional parameters: | ||
id - id of the city ''(can be comma separated)'' | id - id of the city ''(can be comma separated)'' | ||
| Строка 163: | Строка 163: | ||
==== edit_city ==== | ==== edit_city ==== | ||
Description: Editing a city | Description: Editing a city | ||
Required parameters: | |||
id - ID of the city | id - ID of the city | ||
Optional parameters: | Optional parameters: | ||
| Строка 169: | Строка 169: | ||
==== del_city ==== | ==== del_city ==== | ||
Description: | Description: Delete a city | ||
Required parameters: | |||
id - ID of the city | id - ID of the city | ||
| Строка 176: | Строка 176: | ||
==== add_area ==== | ==== add_area ==== | ||
Description: | Description: Add an area in a city | ||
Required parameters: | |||
city_id - ID of the city | city_id - ID of the city | ||
name - Name | name - Name | ||
| Строка 198: | Строка 198: | ||
==== edit_area ==== | ==== edit_area ==== | ||
Description: Edit the area of the city | Description: Edit the area of the city | ||
Required parameters: | |||
id - ID of the city`s area | id - ID of the city`s area | ||
Optional parameters: | Optional parameters: | ||
| Строка 204: | Строка 204: | ||
==== del_area ==== | ==== del_area ==== | ||
Description: | Description: Remove a city area | ||
Required parameters: | |||
id - ID of the city`s area | id - ID of the city`s area | ||
| Строка 211: | Строка 211: | ||
==== add_street ==== | ==== add_street ==== | ||
Description: Add street | Description: Add a street | ||
Required parameters: | |||
city_id - ID of the city | city_id - ID of the city | ||
name - Name | name - Name | ||
| Строка 234: | Строка 234: | ||
==== edit_street ==== | ==== edit_street ==== | ||
Description: Edit street | Description: Edit a street | ||
Required parameters: | |||
id - street id | id - street id | ||
Optional parameters: | Optional parameters: | ||
| Строка 241: | Строка 241: | ||
==== del_street ==== | ==== del_street ==== | ||
Description: Delete street | Description: Delete a street | ||
Required parameters: | |||
id - street ID | id - street ID | ||
| Строка 254: | Строка 254: | ||
''Modified in 3.13.15 (added parameter apart_count, level_count, entrance_count)'' | ''Modified in 3.13.15 (added parameter apart_count, level_count, entrance_count)'' | ||
Description: | Description: Add a building | ||
Required parameters: | |||
city_id - id of city | city_id - id of city | ||
street_id - street id | street_id - street id | ||
number - building number | number - building number | ||
block - building block/ | block - building block/section ''(for version 3.12 and earlier)'' | ||
custom_name - Arbitrary ''(full)'' building name ''(for version 3.12 and below)'' | custom_name - Arbitrary ''(full)'' building name ''(for version 3.12 and below)'' | ||
Optional parameters: | Optional parameters: | ||
| Строка 265: | Строка 265: | ||
apart_count - number of households in the building | apart_count - number of households in the building | ||
comment - notes | comment - notes | ||
entrance_count - number of | entrance_count - number of entrances in the building | ||
level_count - number of floors in the building | level_count - number of floors in the building | ||
task_comment - task note for the building | task_comment - task note for the building | ||
| Строка 271: | Строка 271: | ||
==== add_house_mark ==== | ==== add_house_mark ==== | ||
Description: Add a mark | Description: Add a mark to a building | ||
Required parameters: | |||
house_id - house ID | house_id - house ID | ||
mark_id - ID of mark | mark_id - ID of mark | ||
==== del_house ==== | ==== del_house ==== | ||
Description: | Description: Delete a building | ||
Required parameters: | |||
id - ID of the house | id - ID of the house | ||
==== delete_house_mark ==== | ==== delete_house_mark ==== | ||
Description: Remove | Description: Remove a building mark | ||
Required parameters: | |||
house_id - house ID | house_id - house ID | ||
mark_id - mark ID | mark_id - mark ID | ||
| Строка 289: | Строка 289: | ||
==== edit_building_coord ==== | ==== edit_building_coord ==== | ||
''Added in 3.13.14'' | ''Added in 3.13.14'' | ||
Description: Change the | Description: Change the geographic coordinates of a building/infrastructure facility | ||
Required parameters: | |||
id - building id | id - building id | ||
coord - coordinates of the building polygon vertices | coord - coordinates of the building polygon vertices | ||
| Строка 298: | Строка 298: | ||
Description: View building structure | Description: View building structure | ||
Required parameters: | |||
id - building id | id - building id | ||
| Строка 305: | Строка 305: | ||
Description: Edit building structure | Description: Edit building structure | ||
Required parameters: | |||
id - id of the building | id - id of the building | ||
Optional parameters: | Optional parameters: | ||
| Строка 321: | Строка 321: | ||
Description: Edit building | Description: Edit building | ||
Required parameters: | |||
id - id of building ''(for version 3.12 and below)''/id of address unit ''(for version 3.13 and above)'' | id - id of building ''(for version 3.12 and below)''/id of address unit ''(for version 3.13 and above)'' | ||
or | or | ||
| Строка 328: | Строка 328: | ||
area_id - the id of the city`s area | area_id - the id of the city`s area | ||
apart_count - number of households in the building | apart_count - number of households in the building | ||
block - block/ | block - building block/section ''(for version 3.12 and earlier)'' | ||
city_id - id of the city | city_id - id of the city | ||
comment - notes | comment - notes | ||
custom_name - Arbitrary ''(full)'' building name ''(for version 3.12 and below)'' | custom_name - Arbitrary ''(full)'' building name ''(for version 3.12 and below)'' | ||
entrance_count - number of | entrance_count - number of entrances in the building | ||
is_not_connected - flag - building is not connected | is_not_connected - flag - building is not connected | ||
level_count - number of floors in the building | level_count - number of floors in the building | ||
| Строка 348: | Строка 348: | ||
''Refined in 3.13.19 (added building_id parameter)'' | ''Refined in 3.13.19 (added building_id parameter)'' | ||
Description: List of | Description: List of buildings | ||
Required parameters: | |||
None | None | ||
Optional parameters: | Optional parameters: | ||
| Строка 357: | Строка 357: | ||
area_id - ID of the city`s area ''(comma separated)'' | area_id - ID of the city`s area ''(comma separated)'' | ||
street_id - ID of the streets ''(comma separated)'' | street_id - ID of the streets ''(comma separated)'' | ||
is_disable_hidden - flag - do not display hidden | is_disable_hidden - flag - do not display hidden buildings | ||
mark_id - mark id | mark_id - mark id | ||
name - full address of the building ''(according to the template)'' | name - full address of the building ''(according to the template)'' | ||
| Строка 366: | Строка 366: | ||
''Added in 3.15.20'' | ''Added in 3.15.20'' | ||
Description: | Description: Level type directory (floors) | ||
Required parameters: | |||
None | None | ||
| Строка 374: | Строка 374: | ||
Description: Move child objects from a building to another building | Description: Move child objects from a building to another building | ||
Required parameters: | |||
src_building_id - id of the source building | src_building_id - id of the source building | ||
dst_building_id - id of the destination building | dst_building_id - id of the destination building | ||
==== owner_remove ==== | ==== owner_remove ==== | ||
Description: | Description: Remove owner from a building | ||
See API->owner->[[API_owner_EN#unbind_building|unbind_building]] | See API->owner->[[API_owner_EN#unbind_building|unbind_building]] | ||
| Строка 387: | Строка 387: | ||
''Removed in 3.13'' | ''Removed in 3.13'' | ||
Description: | Description: Add a building to the map | ||
Required parameters: | |||
house_id - house ID | house_id - house ID | ||
map_id - map ID | map_id - map ID | ||
| Строка 398: | Строка 398: | ||
''Removed in 3.13'' | ''Removed in 3.13'' | ||
Description: | Description: Remove a building from the map | ||
Required parameters: | |||
house_id - house ID | house_id - house ID | ||
map_id - map ID | map_id - map ID | ||
Версия от 11:36, 10 мая 2026
Section API ERP "UserSide"
Purpose: Address management
Optional parameters: action - request subcategory (possible value: see below)
Also see: Address System
Types of address units
add_locality_type
Added in 3.13.64
Description: Add an address unit type Required parameters: name - name token - token
edit_locality_type
Added in 3.13.64
Description: Edit an address unit type Required parameters: id - id Optional parameters: name - name token - token
get_locality_type
Added in 3.13.9
Description: Information about the types of address units Optional parameters: token - token
get_alias
Added in 3.15.7
Description: Information about aliases
Address units
add_address
Added in 3.13.64
Description: Add an address unit Required parameters: locality_type_id - address unit type id name - name Optional parameters: parent_id - id of parent address unit
get
Changed in 3.14.69 (added is_disable_hidden input parameter)
Added in 3.13.9
Description: Information about address units Required parameters (at least one is required): id - id of objects (can be separated by commas) locality_type_id - type of objects (can be separated by commas) parent_id - id of parent object (can be separated by commas) is_disable_hidden - flag - do not display hidden address units
edit_address
Modified in 3.20.4 (added parent_id parameter)
Added in 3.13.60
Description: Edit address unit Required parameters: id - id of the object Optional parameters: map_color - HTML color of the polygon on the map parent_id - parent address unit id
Province
add_province
Description: Add a province Required parameters: name - Name Optional returned data: array( [Id] => ID of added province in case of success )
edit_province
Description: Edit a province Required parameters: id - ID of the province Optional parameters: The parameter list is used similarly to the add_province method
del_province
Description: Delete a province Required parameters: id - ID of the province
get_province
Changed in 3.12.17 (added incoming id parameter)
Description: List of provinces Optional parameters: id - ID of the province (can be comma separated) Optional returned data: array( [data] => Object data )
District
add_district
Added in 3.13.46
Description: Add a district Required parameters: name - name
edit_district
Added in 3.13.46
Description: Edit a district Required parameters: id - id of the district Optional parameters: The parameter list is used similarly to the add_province method
del_district
Added in 3.13.46
Description: Delete a district Required parameters: id - id of the district
get_district
Added in 3.13.46
Description: List of districts Optional parameters: id - id of districts (can be comma separated)
City
add_city
Description: Add a city Required parameters: name - Name of the city Optional parameters: province_id - ID of the province district_id - ID of the district in the region Optional returned data: array( [Id] => ID of added city in case of success )
get_city
Modified 3.14.69 (added incoming parameter is_disable_hidden)
Modified 3.13.46 (added district_id input parameter)
Modified 3.12.17 (added incoming id parameter)
Description: List of cities Optional parameters: id - id of the city (can be comma separated) district_id - id of the district (comma separated) province_id - province id (comma separated) is_disable_hidden - flag - do not display hidden cities
edit_city
Description: Editing a city Required parameters: id - ID of the city Optional parameters: The list of parameters is used similarly to the add_city method
del_city
Description: Delete a city Required parameters: id - ID of the city
Area in the city
add_area
Description: Add an area in a city
Required parameters:
city_id - ID of the city
name - Name
Additionally returned data:
array(
[Id] => ID of added area in case of success
)
get_area
Changed in 3.14.69 (added incoming parameter is_disable_hidden)
Modified 3.12.17 (added id parameter)
Description: List of areas of the cities Optional parameters: id - ID of areas (can be comma separated) city_id - ID of cities (can be separated by commas) is_disable_hidden - flag - do not display hidden areas
edit_area
Description: Edit the area of the city Required parameters: id - ID of the city`s area Optional parameters: The list of parameters is used similarly to the add_area method
del_area
Description: Remove a city area Required parameters: id - ID of the city`s area
Street
add_street
Description: Add a street Required parameters: city_id - ID of the city name - Name Optional parameters: area_id - ID of the area of the city Optional returned data: array( [Id] => ID of added street in case of success )
get_street
Modified 3.14.69 (added is_disable_hidden input parameter)
Modified 3.12.17 (added id parameter)
Description: List of streets Optional parameters: id - ID of streets (can be comma separated) city_id - ID of city (can be comma separated) area_id - ID of the city`s area (can be comma separated) is_disable_hidden - flag - do not display hidden streets
edit_street
Description: Edit a street Required parameters: id - street id Optional parameters: The parameter list is used similarly to the add_street method
del_street
Description: Delete a street Required parameters: id - street ID
Building
add_house
Modified 3.16.19 (added type_id parameter)
Modified 3.13.57 (added comment parameter, task_comment)
Modified in 3.13.15 (added parameter apart_count, level_count, entrance_count)
Description: Add a building Required parameters: city_id - id of city street_id - street id number - building number block - building block/section (for version 3.12 and earlier) custom_name - Arbitrary (full) building name (for version 3.12 and below) Optional parameters: area_id - the id of the city`s area apart_count - number of households in the building comment - notes entrance_count - number of entrances in the building level_count - number of floors in the building task_comment - task note for the building type_id - building type id
add_house_mark
Description: Add a mark to a building Required parameters: house_id - house ID mark_id - ID of mark
del_house
Description: Delete a building Required parameters: id - ID of the house
delete_house_mark
Description: Remove a building mark Required parameters: house_id - house ID mark_id - mark ID
edit_building_coord
Added in 3.13.14
Description: Change the geographic coordinates of a building/infrastructure facility Required parameters: id - building id coord - coordinates of the building polygon vertices
get_building_structure
Added in 3.16dev3
Description: View building structure Required parameters: id - building id
edit_building_structure
Added in 3.15.20
Description: Edit building structure Required parameters: id - id of the building Optional parameters: level_list - comma separated list of level types (floors)
edit_house
Changed in 3.18beta1 (added task_interval parameter)
Changed in 3.16.20 (added type_id, is_not_connected)
Modified 3.13.57 (added comment parameter, task_comment)
Modified 3.13.15 (added parameter apart_count, level_count, entrance_count)
Description: Edit building
Required parameters:
id - id of building (for version 3.12 and below)/id of address unit (for version 3.13 and above)
or
building_id - building id (for version 3.13 and above)
Optional parameters:
area_id - the id of the city`s area
apart_count - number of households in the building
block - building block/section (for version 3.12 and earlier)
city_id - id of the city
comment - notes
custom_name - Arbitrary (full) building name (for version 3.12 and below)
entrance_count - number of entrances in the building
is_not_connected - flag - building is not connected
level_count - number of floors in the building
number - building number
street_id - street id
task_comment - work note on the building
task_interval - possible time intervals for work (for example: {"day":[[0,23],[0,23],[0,23],[0,23],[0,23],[0,23],[0,23],[0,23]]}))
type_id - building type id
get_house
Refined in: 3.16dev3 (added parameters name, limit, is_like)
Refined in: 3.13.35 (added mark_id parameters)
Refined in 3.13.19 (added building_id parameter)
Description: List of buildings Required parameters: None Optional parameters: id - building id (for version 3.12. Can be comma separated), address unit id (for version 3.13+. Can be comma separated) building_id - building id (for version 3.13+. Can be separated by commas) city_id - ID of the city (comma separated) area_id - ID of the city`s area (comma separated) street_id - ID of the streets (comma separated) is_disable_hidden - flag - do not display hidden buildings mark_id - mark id name - full address of the building (according to the template) limit - maximum number of records to return in the response is_like - flag - use substring comparison where possible (not a full match)
get_level
Added in 3.15.20
Description: Level type directory (floors) Required parameters: None
move_child_object
Added in 3.16dev8
Description: Move child objects from a building to another building Required parameters: src_building_id - id of the source building dst_building_id - id of the destination building
owner_remove
Description: Remove owner from a building See API->owner->unbind_building
(*) add_house_to_map
Added in 3.12.40
Removed in 3.13
Description: Add a building to the map Required parameters: house_id - house ID map_id - map ID coord - coordinates of vertices of the house polygon
(*) remove_house_from_map
Added in 3.12.40
Removed in 3.13
Description: Remove a building from the map Required parameters: house_id - house ID map_id - map ID
get_building_type
Added in 3.20.5
Description: Building type reference Required parameters: none