Узнать адрес по индексу

Материал из post-API.ru
Перейти к: навигация, поиск

Пример 1

Пользователь ввел "индекс 656056". Интернет-магазин вызвал метод abi.php

http://post-api.ru/api/v2/abi.php?p=656056&apikey=dev&d=1&e=1]

 Array
 (
   [id] => ABI
   [api_ver] => 2.0
   [status] => ok
   [access] => active
   [access_status] => ok
   [executed_time] => 0.20981
   [source] => Array
       (
           [postalcode] => 656056
           [exclude] => 1
       )
   [content] => Array
       (
           [route] => Array
               (
                   [region] => Array
                       (
                           [formalname] => Алтайский
                           [shortname] => край
                           [offname] => Алтайский
                           [aolevel] => 1
                       )
                   [autonom] => 
                   [area] => 
                   [city] => Array
                       (
                           [formalname] => Барнаул
                           [shortname] => г.
                           [offname] => Барнаул
                           [aolevel] => 4
                       )
               )
           [streets] => Array
               (
                   [0] => Array
                       (
                           [id] => 963353
                           [formalname] => Анатолия
                           [shortname] => ул.
                           [offname] => Анатолия
                           [aolevel] => 7
                           [houses] => Array
                               (
                                   [0] => Array
                                       (
                                           [id] => 404189
                                           [housenum] => 3
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 3
                                       )
                                   [1] => Array
                                       (
                                           [id] => 164316
                                           [housenum] => 4
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 4
                                       )
                               )
                           [houseint] => Array
                               (
                                   [0] => Array
                                       (
                                           [id] => 47143
                                           [intstart] => 1
                                           [intstatus] => 3
                                           [intend] => 83
                                           [formalname] => 1-83
                                       )
                                   [1] => Array
                                       (
                                           [id] => 68653
                                           [intstart] => 2
                                           [intstatus] => 2
                                           [intend] => 68
                                           [formalname] => 2-68
                                       )
                               )
                       )
                   [1] => Array
                       (
                           [id] => 185569
                           [formalname] => Гоголя
                           [shortname] => ул.
                           [offname] => Гоголя
                           [aolevel] => 7
                           [houses] => Array
                               (
                                   [0] => Array
                                       (
                                           [id] => 615222
                                           [housenum] => 1
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 1
                                       )
                                   [1] => Array
                                       (
                                           [id] => 410329
                                           [housenum] => 1а
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 1а
                                       )
                               )
                           [houseint] => Array
                               (
                                   [0] => Array
                                       (
                                           [id] => 91618
                                           [intstart] => 1
                                           [intstatus] => 3
                                           [intend] => 47
                                           [formalname] => 1-47
                                       )
                                   [1] => Array
                                       (
                                           [id] => 41414
                                           [intstart] => 2
                                           [intstatus] => 2
                                           [intend] => 44
                                           [formalname] => 2-44
                                       )
                               )
                       )
                   [8] => Array
                       (
                           [id] => 627956
                           [formalname] => Льва Толстого
                           [shortname] => ул.
                           [offname] => Льва Толстого
                           [aolevel] => 7
                           [houses] => Array
                               (
                                   [0] => Array
                                       (
                                           [id] => 350595
                                           [housenum] => 1
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 1
                                       )
                                   [1] => Array
                                       (
                                           [id] => 550897
                                           [housenum] => 1А
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 1А
                                       )
                               )
                           [houseint] => Array
                               (
                                   [0] => Array
                                       (
                                           [id] => 12968
                                           [intstart] => 1
                                           [intstatus] => 3
                                           [intend] => 17
                                           [formalname] => 1-17
                                       )
                                   [1] => Array
                                       (
                                           [id] => 81292
                                           [intstart] => 2
                                           [intstatus] => 2
                                           [intend] => 24
                                           [formalname] => 2-24
                                       )
                               )
                       )
                   [9] => Array
                       (
                           [id] => 472068
                           [formalname] => Максима Горького
                           [shortname] => ул.
                           [offname] => Максима Горького
                           [aolevel] => 7
                           [houses] => Array
                               (
                                   [0] => Array
                                       (
                                           [id] => 575766
                                           [housenum] => 1
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 1
                                       )
                                   [1] => Array
                                       (
                                           [id] => 900960
                                           [housenum] => 2
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 2
                                       )
                                   [2] => Array
                                       (
                                           [id] => 589279
                                           [housenum] => 2А
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 2А
                                       )
                               )
                           [houseint] => Array
                               (
                                   [0] => Array
                                       (
                                           [id] => 100667
                                           [intstart] => 1
                                           [intstatus] => 1
                                           [intend] => 57
                                           [formalname] => 1-57
                                       )
                               )
                       )


...

                   [21] => Array
                       (
                           [id] => 945291
                           [formalname] => Фиалка
                           [shortname] => снт
                           [offname] => Фиалка
                           [aolevel] => 6
                       )
                   [22] => Array
                       (
                           [id] => 408678
                           [formalname] => Чернышевского
                           [shortname] => ул.
                           [offname] => Чернышевского
                           [aolevel] => 7
                           [houses] => Array
                               (
                                   [0] => Array
                                       (
                                           [id] => 444838
                                           [housenum] => 1
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 1
                                       )
                                   [1] => Array
                                       (
                                           [id] => 918149
                                           [housenum] => 2
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 2
                                       )
                                   [2] => Array
                                       (
                                           [id] => 63945
                                           [housenum] => 2А
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 2А
                                       )
                                   [3] => Array
                                       (
                                           [id] => 271138
                                           [housenum] => 3
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 3
                                       )
                                   [4] => Array
                                       (
                                           [id] => 728818
                                           [housenum] => 4
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 4
                                       )
                                   [5] => Array
                                       (
                                           [id] => 217153
                                           [housenum] => 5
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 5
                                       )
                                   [6] => Array
                                       (
                                           [id] => 473374
                                           [housenum] => 5А
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 5А
                                       )
                               )
                           [houseint] => Array
                               (
                                   [0] => Array
                                       (
                                           [id] => 73982
                                           [intstart] => 1
                                           [intstatus] => 3
                                           [intend] => 49
                                           [formalname] => 1-49
                                       )
                                   [1] => Array
                                       (
                                           [id] => 28412
                                           [intstart] => 2
                                           [intstatus] => 2
                                           [intend] => 4
                                           [formalname] => 2-4
                                       )
                                   [2] => Array
                                       (
                                           [id] => 82962
                                           [intstart] => 8
                                           [intstatus] => 2
                                           [intend] => 34
                                           [formalname] => 8-34
                                       )
                               )
                       )
                   [23] => Array
                       (
                           [id] => 17497
                           [formalname] => Чехова
                           [shortname] => ул.
                           [offname] => Чехова
                           [aolevel] => 7
                           [houses] => Array
                               (
                                   [0] => Array
                                       (
                                           [id] => 479740
                                           [housenum] => 1А
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 1А
                                       )
                                   [1] => Array
                                       (
                                           [id] => 899260
                                           [housenum] => 1Б
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 1Б
                                       )
                                   [2] => Array
                                       (
                                           [id] => 592377
                                           [housenum] => 5
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 5
                                       )
                                   [3] => Array
                                       (
                                           [id] => 734847
                                           [housenum] => 7
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 7
                                       )
                                   [4] => Array
                                       (
                                           [id] => 268934
                                           [housenum] => 9
                                           [strucnum] => 
                                           [buildnum] => 
                                           [formalname] => 9
                                       )
                               )
                       )
               )
       )
 )