Wiki source code of addresses_get.php

Last modified by YellowFox_RD on 2025/01/23 09:12

Show last authors
1 (% class="box" %)
2 (((
3 Table of Contents
4 )))
5
6 {{toc/}}
7
8 = addresses_get.php =
9
10 Returns a list of all addresses searched for.
11
12 = Description =
13
14 (% class="green mark" %)**GET**(%%)** addresses_get.php**?**company**=COMPANY_RTIKEY&**import**=IMPORT_RTIKEY&**name1**=Test&**city**=Dresden&**searchtype**=like&**searchlogic**=or&**format**=json
15
16 = Parameter =
17
18 |=Parameter|=Description|=Typ|=Note|=Mandatory
19 |company|RTI company key|string| |yes
20 |import|RTI Importschlüssel|string| |yes
21 |format|format|string|(((
22 * json (standard)
23 * csv
24 * xml
25 )))|no
26 |searchtype|should be searched with "exact" or "like"|string|(((
27 * exact (standard)
28 * like
29 )))|no
30 |searchlogic|if the parameters are to be linked with "and" or an "or"|string|(((
31 * and (standard)
32 * or
33 )))|no
34 |name1|search parameter name 1|string| |no
35 |name2|search parameter name 2|string| |no
36 |street|search parameter street|string| |no
37 |number|search parameter streetnumber|string| |no
38 |zipcode|search parameter zipcode|string| |no
39 |country|search parameter country-code|string| |no
40 |comment|search parameter comment|string| |no
41 |city|search parameter city|string| |no
42 |phone|search parameter phone|string| |no
43 |email|search parameter e-mail|string| |no
44 |posdesc|search parameter position description|string| |no
45
46 = Retrurn =
47
48 A **string** gets returned. In case of error, "(% class="error" %)**ERROR:Beschreibung**(%%)" zurückgegeben
49
50 == JSON format ==
51
52 === Column ===
53
54 |=column|=description|=
55 |name1|name 1|
56 |name2|name 2|
57 |street|streetname|
58 |number|streetnumber|
59 |zipcode|zipcode|
60 |city|cityname|
61 |country|country-code|
62 |map|map active?|0 = no, 1 = yes
63 |comment|comment|
64 |posdesc|position description text|will be displayed on map, position list
65 |lat|latitude|
66 |lon|longitude|
67 |phone|phone|
68 |email|e-mail|
69
70 === Example ===
71
72 **return in json**
73 {{code language="java"}}[{"name1":"ASDF Test-2","name2":"","street":"Hariboweg","number":"7","zipcode":"","city":"Gummib\u00e4renstadt","country":"D","map":"0","comment":"","posdesc":"","lat":null,"lon":null,"phone":"","email":""},{"name1":"IrlandTest","name2":"","street":"Main Street","number":"1","zipcode":"","city":"Dublin","country":"IRL","map":"1","comment":"","posdesc":"IrlandTest","lat":"53.3884","lon":"-6.2983","phone":"","email":""}]{{/code}}
74
75 == CSV Format ==
76
77 === Metainformationen ===
78
79 |=Separator|Semikolon ( ; )
80 |=Textlimit|Doppeltes Hochkomma ( " )
81 |=End of line|0x0D 0x0A (CarriageReturn LineFeed)
82 |=Header|Zeile 1
83 |=Encoding|UTF-8
84
85 === Column ===
86
87 |=Column|=Description|=
88 |name1|name 1|
89 |name2|name 2|
90 |street|streetname|
91 |number|streetnumber|
92 |zipcode|zipcode|
93 |city|cityname|
94 |country|country-code|
95 |map|map active?|0 = no, 1 = yes
96 |comment|comment|
97 |posdesc|position description text|will be displayed on map, position list
98 |lat|latitude|
99 |lon|longitude|
100 |phone|phone|
101 |email|e-mail|
102
103 === Example ===
104
105 **return in csv**
106 {{code language="java"}}"NAME1";"NAME2";"STREET";"NR";"ZIP";"CITY";"COUNTRY";"MAP";"COMMENT";"DESC";"LAT";"LON";"PHONE";"EMAIL"
107 "ASDF Test-2";"";"Hariboweg";"7";"";"Gummibärenstadt";"D";"0";"";"";"";"";"";""
108 "IrlandTest";"";"Main Street";"1";"";"Dublin";"IRL";"1";"";"IrlandTest";"53.3884";"-6.2983";"";""{{/code}}
109
110 == XML format ==
111
112 === Column ===
113
114 |=Column|=Description|=
115 |name1|name 1|
116 |name2|name 2|
117 |street|streetname|
118 |number|streetnumber|
119 |zipcode|zipcode|
120 |city|cityname|
121 |country|country-code|
122 |map|map active?|0 = no, 1 = yes
123 |comment|comment|
124 |posdesc|position description text|will be displayed on map, position list
125 |lat|latitude|
126 |lon|longitude|
127 |phone|phone|
128 |email|e-mail|
129
130 === Example ===
131
132 {{code language="xml"}}
133 <?xml version="1.0" encoding="UTF-8"?>
134 <addresses>
135 <address>
136 <name1>ASDF Test-2</name1>
137 <name2 />
138 <street>Hariboweg</street>
139 <number>7</number>
140 <zipcode />
141 <city>Gummibärenstadt</city>
142 <country>D</country>
143 <map>0</map>
144 <comment />
145 <posdesc />
146 <lat />
147 <lon />
148 <phone />
149 <email />
150 </address>
151 <address>
152 <name1>IrlandTest</name1>
153 <name2 />
154 <street>Main Street</street>
155 <number>1</number>
156 <zipcode />
157 <city>Dublin</city>
158 <country>IRL</country>
159 <map>1</map>
160 <comment />
161 <posdesc>IrlandTest</posdesc>
162 <lat>53.3884</lat>
163 <lon>-6.2983</lon>
164 <phone />
165 <email />
166 </address>
167 </addresses>
168 {{/code}}
169
170 = Example call =
171
172 **search with 2 different search criteria**
173 {{code language="java"}}https://map.yellowfox.de/rti/addresses_get.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY&city=Dresden&name1=Test&searchtype=like&searchlogic=or&format=csv{{/code}}
174