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

Материал из WiKi - UserSide
(Новая страница: «en | ru»)
 
([IronBot] Sync EN API address localization from RU)
 
(не показано 13 промежуточных версий 2 участников)
Строка 1: Строка 1:
[[API_address_EN|en]] | [[API_address|ru]]
'''en''' | [[API_address_UK|uk]] | [[API address|ru]]
 
Section '''[[API_EN|API]]''' ERP "UserSide"
 
Purpose: Address management
 
Optional parameters:
action - request subcategory ''(possible value: see below)''
 
Also see: [[Address System|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 ====
''Changed in 3.21.0-beta.1 (added is_show_on_map parameter)''
 
''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
  is_show_on_map - flag - show on the map
 
=== 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->[[API_owner_EN#unbind_building|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

Текущая версия от 17:24, 13 мая 2026

en | uk | ru

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

Changed in 3.21.0-beta.1 (added is_show_on_map parameter)

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
 is_show_on_map - flag - show on the map

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