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

Материал из WiKi - UserSide
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
[[API_address_EN|en]] | [[API_address|ru]]
[[API_address_EN|en]] | [[API_address|ru]]


Section '''[[API_EN]]'''' ERP "UserSide"
Section '''[[API_EN|API]]'''' ERP "UserSide"


Purpose: Action with addresses
Purpose: Action with addresses


  Optional parameters:
  Optional parameters:
  action - request subcategory ''(possible value: see below)'''
  action - request subcategory ''(possible value: see below)''


Also see: [[Address System]]
Also see: [[Address System]]

Версия от 16:39, 21 июля 2023

en | ru

Section API' ERP "UserSide"

Purpose: Action with addresses

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: Adds the type of address unit
Obligatory parameters:
 name - name
 token - token

edit_locality_type

Added in 3.13.64.

Description: Editing the type of the address unit
Obligatory 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: Adds an address unit
Obligatory 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
Obligatory parameters (must be at least one):
 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

Added in 3.13.60.

Description: Edit address unit
Obligatory parameters:
 id - id of the object
Optional parameters:
 map_color - HTML colour of the polygon on the map

Province

add_province

Description: Adding of the province
Obligatory parameters:
 name - Name
Optional returned data:
 array(
   [Id] => ID of added province in case of success
  )

edit_province

Description: Editing of the province
Obligatory parameters:
 id - ID of the province
Optional parameters:
 The parameter list is used similarly to the add_province method

del_province

Description: Deletion of the province
Obligatory parameters:
 id - ID of the province

get_province

Changed in 3.12.17 (added incoming id parameter)

Description: List of the province
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: Adding a district
Obligatory parameters:
 name - name

edit_district

Added in 3.13.46.

Description: Edit_district
Obligatory 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: Deletion of a district
Obligatory 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: Adding a city
Obligatory 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 the 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
Obligatory parameters:
id - ID of the city
Optional parameters:
 The list of parameters is used similarly to the add_city method 

del_city

Description: Deletion of a city
Obligatory parameters:
 id - ID of the city

Area in the city

add_area

Description: Adding an area in a city
Obligatory 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
Obligatory 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: Removal of the city`s area
Obligatory parameters:
 id - ID of the city`s area

Street

add_street

Description: Add street
Obligatory 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 street
Obligatory parameters:
 id - street id
Optional parameters:
 The parameter list is used similarly to the add_street method

del_street

Description: Delete street
Obligatory 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: Adding a building
Obligatory parameters:
 city_id - id of city
 street_id - street id
 number - building number
 block - building block/corpus (for version 3.12 and below)
 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/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 on the house
Obligatory parameters:
 house_id - house ID
 mark_id - ID of mark

del_house

Description: Removal of the house
Obligatory parameters:
 id - ID of the house

delete_house_mark

Description: Remove house mark
Obligatory parameters:
 house_id - house ID
 mark_id - mark ID

edit_building_coord

Added in 3.13.14.

Description: Change the geographical coordinates of a building/construction
Obligatory parameters:
 id - building id
 coord - coordinates of the building polygon vertices

get_building_structure

Added in 3.16dev3.

Description: View building structure
Obligatory parameters:
 id - building id

edit_building_structure

Added in 3.15.20

Description: Edit building structure
Obligatory 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
Obligatory 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 - block/corpus of the building (for version 3.12 and below)
 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/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 houses
Obligatory 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 houses
 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: Directory of levels (floors) types
Obligatory parameters:
 None

move_child_object

Added in 3.16dev8

Description: Move child objects from a building to another building
Obligatory parameters:
 src_building_id - id of the source building
 dst_building_id - id of the destination building

owner_remove

Description: Removing owner from a building
See API->owner->unbind_building

(*) add_house_to_map

Added in 3.12.40

Removed in 3.13.

Description: Adds a house to the map
Obligatory 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: Removing a house from the map
Obligatory parameters:
 house_id - house ID
 map_id - map ID