Contact List Management » History » Version 2
Eric Vieillevigne, 05/12/2015 06:18 PM
| 1 | 1 | Eric Vieillevigne | {{>toc}} |
|---|---|---|---|
| 2 | |||
| 3 | h1. Contact - ctc |
||
| 4 | |||
| 5 | The Contact API is used to manage the shared contact of the family. In order to access the API, the client shall be already logged and authenticated with a valid session using |
||
| 6 | |||
| 7 | the log method detailed above. |
||
| 8 | |||
| 9 | h2. Get Contact List- _ctclist_ |
||
| 10 | |||
| 11 | The method ctclist enables a logged user to retrieve all the shared contacts entered by the members. |
||
| 12 | |||
| 13 | By sending an HTTP request http://devserver/api/api/ctc/list? |
||
| 14 | |||
| 15 | *Parameters*: |
||
| 16 | |||
| 17 | No parameters necessary for this method |
||
| 18 | |||
| 19 | |||
| 20 | The method returns the list of contacts Icontacts. |
||
| 21 | |||
| 22 | |||
| 23 | *Response*: |
||
| 24 | <pre><code class="javascript"> |
||
| 25 | { |
||
| 26 | { |
||
| 27 | "cn":"ctclist", |
||
| 28 | "feed":[ |
||
| 29 | { |
||
| 30 | "contactId":"144_531",/*Contact unique identifier*/ |
||
| 31 | "accountId":"130",/*Account Id representing the author of the contact*/ |
||
| 32 | "birthDate":"1986-12-01T23:00:00.000Z",/*Birthdate in UTC format*/ |
||
| 33 | "pictureURIs":[],/*Picture of the contact if any, mabe null*/ |
||
| 34 | "firstName":"Boby Joe",/*First name of the contact*/ |
||
| 35 | "displayName":"Gv vffg",/*Display name of the contact*/ |
||
| 36 | "devices":[*/List of devices*/ |
||
| 37 | "devices":[ |
||
| 38 | { |
||
| 39 | "deviceType":"MOBILE",*/device with a mobile Type*/ |
||
| 40 | "value":"014026232", |
||
| 41 | "deviceId":"144_534_634" |
||
| 42 | },{ |
||
| 43 | "deviceType":"EMAIL",*/Email Type entry*/ |
||
| 44 | "value":"email@fr.r", |
||
| 45 | "deviceId":"144_534_635" |
||
| 46 | },{ |
||
| 47 | "deviceType":"PHONE",*/Fix Phone entry*/ |
||
| 48 | "value":"0140263244", |
||
| 49 | "deviceId":"144_534_636" |
||
| 50 | },{ |
||
| 51 | "deviceType":"MOBILE", |
||
| 52 | "value":"0687824772", |
||
| 53 | "deviceId":"144_534_637" |
||
| 54 | } |
||
| 55 | ] |
||
| 56 | ], |
||
| 57 | "addresses":[/*Related Addresses to the contact Please see CTC CreateAPI for more information*/ |
||
| 58 | { |
||
| 59 | "geocodedAddress":{ |
||
| 60 | "latitudeE6":"48856614", |
||
| 61 | "attribute3ZipCode":"61944", |
||
| 62 | "attribute2Town":"Paris", |
||
| 63 | "attribute0Country":"France", |
||
| 64 | "attribute4Line":"", |
||
| 65 | "radius":"7986", |
||
| 66 | "formattedAddress":"Paris, France", |
||
| 67 | "longitudeE6":"2352221", |
||
| 68 | "accuracy":"5", |
||
| 69 | "attribute1State":"Île-de-France" |
||
| 70 | }, |
||
| 71 | "placeType":"HOME", |
||
| 72 | "addressId":"144_531_90" |
||
| 73 | } |
||
| 74 | ] |
||
| 75 | } |
||
| 76 | ] |
||
| 77 | } |
||
| 78 | </code></pre> |
||
| 79 | |||
| 80 | |||
| 81 | *Error*: |
||
| 82 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 83 | |FizContactAlreadyExistsException|ex|200|Contact already exists| |
||
| 84 | |FizMediaQuotaExceededException|ex|601|Media Quota exceedded| |
||
| 85 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 86 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 87 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 88 | |FizApiModelRightException|un|504|Right exception to use this method| |
||
| 89 | |||
| 90 | h2. Get Contact - _ctcget_ |
||
| 91 | |||
| 92 | The method ctcget enables a logged user to retrieve a contact information with a certain id. |
||
| 93 | |||
| 94 | By sending an HTTP request http://devserver/api/api/ctc/get?contactId=144_501 |
||
| 95 | |||
| 96 | *Parameters*: |
||
| 97 | |*Name*|*Type*|*Description*| |
||
| 98 | |contactId|String|Contact Id of the contact queried| |
||
| 99 | |||
| 100 | The method returns the contact details IContacts. |
||
| 101 | |||
| 102 | |||
| 103 | *Response*: |
||
| 104 | <pre><code class="javascript"> |
||
| 105 | { |
||
| 106 | "cn":"ctcget", |
||
| 107 | "feed":{ |
||
| 108 | "contactId":"3084_514", |
||
| 109 | "accountId":"3067", |
||
| 110 | "birthDate":"1970-01-10T23:00:00.000Z", |
||
| 111 | "pictureURIs":[], |
||
| 112 | "firstName":"MQA_11", |
||
| 113 | "displayName":"MQA_11", |
||
| 114 | "devices":[ |
||
| 115 | { |
||
| 116 | "deviceType":"EMAIL", |
||
| 117 | "value":"Family_11@mgsei.com", |
||
| 118 | "deviceId":"3084_514_604" |
||
| 119 | },{ |
||
| 120 | "deviceType":"MOBILE", |
||
| 121 | "value":"13500000011", |
||
| 122 | "deviceId":"3084_514_605" |
||
| 123 | } |
||
| 124 | ], |
||
| 125 | "addresses":[] |
||
| 126 | } |
||
| 127 | } |
||
| 128 | </code></pre> |
||
| 129 | |||
| 130 | |||
| 131 | *Error*: |
||
| 132 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 133 | |FizMediaQuotaExceededException|ex|601|Media Quota exceedded| |
||
| 134 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 135 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 136 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 137 | |FizApiModelRightException|un|504|Right exception to use this method| |
||
| 138 | |||
| 139 | |||
| 140 | h2. Create Contact - _ctccreate_ |
||
| 141 | |||
| 142 | The method ctccreate enables a logged user to create a contact. |
||
| 143 | |||
| 144 | By sending an HTTP request http://devserver/api/api/ctc/create |
||
| 145 | |||
| 146 | *Parameters*: |
||
| 147 | |*Name*|*Type*|*Description*| |
||
| 148 | |firstName|String|Firstname of the contact (Firstname shall be not null if Lastname is null)| |
||
| 149 | |lastName|String|Lastname of the contact (Lastname shall be not null if Firstname is null)| |
||
| 150 | |function|String|Function defines the type of contact such as baby-sitter or cousin| |
||
| 151 | |Gender|String|Gender of the contact (masculine or feminine)| |
||
| 152 | |Birthdate|String|Contact Birthday, string containing an ISO-8601 formatted date/time.If it contains a time zone (not recommended), it will be converted to user time zone in utc| |
||
| 153 | |Picture|Binary|Binary file picture or URL information| |
||
| 154 | |devices|String|Generic device of the contact (maybe email or mobile phone number). Format will be detected by the server and automatically labeled)| |
||
| 155 | |mobiles|String|Mobile device (note that Work and Home type will be added soon to this API)| |
||
| 156 | |phone|String|phone device (note that Work and Home type will be added soon to this API)| |
||
| 157 | |addresses|String|address input may contain number street,town,zipcode,country (Server checks the address using google API and reformat. To date the API uses the first matches used by google API. Next version will proposes the ability to enter an address with no check or asking for reformating )| |
||
| 158 | |adressesType|String|address type used to provide the type of location entered and the associated Icon (UNKNOWN,HOME,SPORT,SCHOOL,MUSIC,PARK,WORK,SHOPPING)| |
||
| 159 | |||
| 160 | The method returns the contact details IContacts. |
||
| 161 | |||
| 162 | |||
| 163 | *Response*: |
||
| 164 | <pre><code class="javascript"> |
||
| 165 | { |
||
| 166 | "cn":"ctccreate", |
||
| 167 | "feed":{ |
||
| 168 | "lastName":"smith", |
||
| 169 | "contactId":"144_537", |
||
| 170 | "accountId":"130", |
||
| 171 | "gender":"MASCULINE", |
||
| 172 | "birthDate":"2011-04-01T08:00:00.000Z", |
||
| 173 | "pictureURIs":[], |
||
| 174 | "firstName":"john", |
||
| 175 | "displayName":"john smith", |
||
| 176 | "devices":[ |
||
| 177 | { |
||
| 178 | "deviceType":"EMAIL", |
||
| 179 | "value":"test@fr.fr", |
||
| 180 | "deviceId":"144_537_642" |
||
| 181 | },{ |
||
| 182 | "deviceType":"PHONE", |
||
| 183 | "value":"010101010101", |
||
| 184 | "deviceId":"144_537_643" |
||
| 185 | },{ |
||
| 186 | "deviceType":"MOBILE", |
||
| 187 | "value":"06736546436", |
||
| 188 | "deviceId":"144_537_644" |
||
| 189 | } |
||
| 190 | ], |
||
| 191 | "addresses":[ |
||
| 192 | { |
||
| 193 | "geocodedAddress":{ |
||
| 194 | "latitudeE6":"48239816", |
||
| 195 | "attribute3ZipCode":"36925", |
||
| 196 | "attribute2Town":"York", |
||
| 197 | "attribute0Country":"United States", |
||
| 198 | "attribute4Line":"4th Ave", |
||
| 199 | "radius":"2252", |
||
| 200 | "formattedAddress":"4th Ave, Surrey, ND, USA", |
||
| 201 | "longitudeE6":"-101057796", |
||
| 202 | "accuracy":"5", |
||
| 203 | "attribute1State":"North Dakota" |
||
| 204 | }, |
||
| 205 | "placeType":"UNKNOWN", |
||
| 206 | "addressId":"144_537_93" |
||
| 207 | } |
||
| 208 | ] |
||
| 209 | } |
||
| 210 | } |
||
| 211 | </code></pre> |
||
| 212 | |||
| 213 | |||
| 214 | *Error*: |
||
| 215 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 216 | |FizContactAlreadyExistsException|ex|200|Contact already exists| |
||
| 217 | |FizMediaQuotaExceededException|ex|601|Media Quota exceedded| |
||
| 218 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 219 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 220 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 221 | |FizApiModelRightException|un|504|Right exception to use this method| |
||
| 222 | |||
| 223 | |||
| 224 | h2. Update Contact - _ctcupdate_ |
||
| 225 | |||
| 226 | The method ctcupdate enables a logged user to update a contact with a specific contactid. The method enable the user to override the information already entered for a certain |
||
| 227 | |||
| 228 | contact. |
||
| 229 | |||
| 230 | 2 | Eric Vieillevigne | By sending an HTTP request http://servername/api/ctc/update |
| 231 | 1 | Eric Vieillevigne | |
| 232 | *Parameters*: |
||
| 233 | |*Name*|*Type*|*Description*| |
||
| 234 | |contactId|String|Contact Id that will be updated| |
||
| 235 | |firstName|String|Firstname of the contact (Firstname shall be not null if Lastname is null)| |
||
| 236 | |lastName|String|Lastname of the contact (Lastname shall be not null if Firstname is null)| |
||
| 237 | |function|String|Function defines the type of contact such as baby-sitter or cousin| |
||
| 238 | |Gender|String|Gender of the contact (masculine or feminine)| |
||
| 239 | |Birthdate|String|Contact Birthday, string containing an ISO-8601 formatted date/time.If it contains a time zone (not recommended), it will be converted to user time zone in |
||
| 240 | |||
| 241 | utc| |
||
| 242 | |Picture|Binary|Binary file picture or URL information| |
||
| 243 | |devices|String|Generic device of the contact (maybe email or mobile phone number). Format will be detected by the server and automatically labeled)| |
||
| 244 | |mobiles|String|Mobile device (note that Work and Home type will be added soon to this API)| |
||
| 245 | |phone|String|phone device (note that Work and Home type will be added soon to this API)| |
||
| 246 | |addresses|String|address input may contain number street,town,zipcode,country (Server checks the address using google API and reformat. To date the API uses the first matches |
||
| 247 | |||
| 248 | used by google API. Next version will proposes the ability to enter an address with no check or asking for reformating )| |
||
| 249 | |adressesType|String|address type used to provide the type of location entered and the associated Icon (UNKNOWN,HOME,SPORT,SCHOOL,MUSIC,PARK,WORK,SHOPPING)| |
||
| 250 | |adresseids|String|adresseid to remove from to the contact| |
||
| 251 | |deviceids|String|deviceid to remove from to the contact| |
||
| 252 | |||
| 253 | The method returns the contact details IContacts. |
||
| 254 | |||
| 255 | |||
| 256 | *Response*: |
||
| 257 | <pre><code class="javascript"> |
||
| 258 | { |
||
| 259 | "cn":"ctcupdate", |
||
| 260 | "feed":{ |
||
| 261 | "lastName":"smith", |
||
| 262 | "contactId":"144_537", |
||
| 263 | "accountId":"130", |
||
| 264 | "gender":"MASCULINE", |
||
| 265 | "birthDate":"2011-04-01T08:00:00.000Z", |
||
| 266 | "pictureURIs":[], |
||
| 267 | "firstName":"john", |
||
| 268 | "displayName":"john smith", |
||
| 269 | "devices":[ |
||
| 270 | { |
||
| 271 | "deviceType":"EMAIL", |
||
| 272 | "value":"test@fr.fr", |
||
| 273 | "deviceId":"144_537_642" |
||
| 274 | },{ |
||
| 275 | "deviceType":"PHONE", |
||
| 276 | "value":"010101010101", |
||
| 277 | "deviceId":"144_537_643" |
||
| 278 | },{ |
||
| 279 | "deviceType":"MOBILE", |
||
| 280 | "value":"06736546436", |
||
| 281 | "deviceId":"144_537_644" |
||
| 282 | } |
||
| 283 | ], |
||
| 284 | "addresses":[ |
||
| 285 | { |
||
| 286 | "geocodedAddress":{ |
||
| 287 | "latitudeE6":"48239816", |
||
| 288 | "attribute3ZipCode":"36925", |
||
| 289 | "attribute2Town":"York", |
||
| 290 | "attribute0Country":"United States", |
||
| 291 | "attribute4Line":"4th Ave", |
||
| 292 | "radius":"2252", |
||
| 293 | "formattedAddress":"4th Ave, Surrey, ND, USA", |
||
| 294 | "longitudeE6":"-101057796", |
||
| 295 | "accuracy":"5", |
||
| 296 | "attribute1State":"North Dakota" |
||
| 297 | }, |
||
| 298 | "placeType":"UNKNOWN", |
||
| 299 | "addressId":"144_537_93" |
||
| 300 | } |
||
| 301 | ] |
||
| 302 | } |
||
| 303 | } |
||
| 304 | </code></pre> |
||
| 305 | |||
| 306 | |||
| 307 | *Error*: |
||
| 308 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 309 | |FizContactAlreadyExistsException|ex|200|Contact already exists| |
||
| 310 | |FizMediaQuotaExceededException|ex|601|Media Quota exceedded| |
||
| 311 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 312 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 313 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 314 | |FizApiModelRightException|un|504|Right exception to use this method| |
||
| 315 | |||
| 316 | h2. Delete Contact - _ctcdelete_ |
||
| 317 | |||
| 318 | The method ctcdelete enables a logged user to delete a contact information with a certain id or a series of Ids. |
||
| 319 | |||
| 320 | 2 | Eric Vieillevigne | By sending an HTTP request http://servername/api/ctc/delete?contactId=144_501 |
| 321 | 1 | Eric Vieillevigne | |
| 322 | *Parameters*: |
||
| 323 | |*Name*|*Type*|*Description*| |
||
| 324 | |contactId|String|Contact Id of the contact queried| |
||
| 325 | |||
| 326 | The method returns a boleean as a result. |
||
| 327 | |||
| 328 | |||
| 329 | *Response*: |
||
| 330 | <pre><code class="javascript"> |
||
| 331 | { |
||
| 332 | "cn":"ctcdelete", |
||
| 333 | "feed":"true" |
||
| 334 | } |
||
| 335 | </code></pre> |
||
| 336 | |||
| 337 | |||
| 338 | *Error*: |
||
| 339 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 340 | |FizMediaQuotaExceededException|ex|601|Media Quota exceedded| |
||
| 341 | |FizAccountNotFoundInSessionException|un|501|Session is invalid| |
||
| 342 | |FizApiInvalidParameterException|un|502|invalid token| |
||
| 343 | |FizApiModelDoesNotExistException|un|503|Object does not exists| |
||
| 344 | |FizApiModelRightException|un|504|Right exception to use this method| |