Project

General

Profile

Actions

Contact - ctc

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

the log method detailed above.

Get Contact List- ctclist

The method ctclist enables a logged user to retrieve all the shared contacts entered by the members.

By sending an HTTP request http://devserver/api/api/ctc/list?

Parameters:

No parameters necessary for this method

The method returns the list of contacts Icontacts.

Response:

{
 {
  "cn":"ctclist",
  "feed":[
    {
      "contactId":"144_531",/*Contact unique identifier*/
      "accountId":"130",/*Account Id representing the author of the contact*/
      "birthDate":"1986-12-01T23:00:00.000Z",/*Birthdate in UTC format*/
      "pictureURIs":[],/*Picture of the contact if any, mabe null*/
      "firstName":"Boby Joe",/*First name of the contact*/
      "displayName":"Gv vffg",/*Display name of the contact*/
      "devices":[*/List of devices*/
  "devices":[
      {
        "deviceType":"MOBILE",*/device with a mobile Type*/
        "value":"014026232",
        "deviceId":"144_534_634" 
      },{
        "deviceType":"EMAIL",*/Email Type entry*/
        "value":"email@fr.r",
        "deviceId":"144_534_635" 
      },{
        "deviceType":"PHONE",*/Fix Phone entry*/
        "value":"0140263244",
        "deviceId":"144_534_636" 
      },{
        "deviceType":"MOBILE",
        "value":"0687824772",
        "deviceId":"144_534_637" 
      }
    ]
      ],
      "addresses":[/*Related Addresses to the contact Please see CTC CreateAPI for more information*/
        {
          "geocodedAddress":{
            "latitudeE6":"48856614",
            "attribute3ZipCode":"61944",
            "attribute2Town":"Paris",
            "attribute0Country":"France",
            "attribute4Line":"",
            "radius":"7986",
            "formattedAddress":"Paris, France",
            "longitudeE6":"2352221",
            "accuracy":"5",
            "attribute1State":"Île-de-France" 
          },
          "placeType":"HOME",
          "addressId":"144_531_90" 
        }
      ]
    }
  ]
}

Error:
Error Code Type Value Description
FizContactAlreadyExistsException ex 200 Contact already exists
FizMediaQuotaExceededException ex 601 Media Quota exceedded
FizAccountNotFoundInSessionException un 501 Session is invalid
FizApiInvalidParameterException un 502 invalid token
FizApiModelDoesNotExistException un 503 Object does not exists
FizApiModelRightException un 504 Right exception to use this method

Get Contact - ctcget

The method ctcget enables a logged user to retrieve a contact information with a certain id.

By sending an HTTP request http://devserver/api/api/ctc/get?contactId=144_501

Parameters:
Name Type Description
contactId String Contact Id of the contact queried

The method returns the contact details IContacts.

Response:

{
  "cn":"ctcget",
  "feed":{
    "contactId":"3084_514",
    "accountId":"3067",
    "birthDate":"1970-01-10T23:00:00.000Z",
    "pictureURIs":[],
    "firstName":"MQA_11",
    "displayName":"MQA_11",
    "devices":[
      {
        "deviceType":"EMAIL",
        "value":"Family_11@mgsei.com",
        "deviceId":"3084_514_604" 
      },{
        "deviceType":"MOBILE",
        "value":"13500000011",
        "deviceId":"3084_514_605" 
      }
    ],
    "addresses":[]
  }
}

Error:
Error Code Type Value Description
FizMediaQuotaExceededException ex 601 Media Quota exceedded
FizAccountNotFoundInSessionException un 501 Session is invalid
FizApiInvalidParameterException un 502 invalid token
FizApiModelDoesNotExistException un 503 Object does not exists
FizApiModelRightException un 504 Right exception to use this method

Create Contact - ctccreate

The method ctccreate enables a logged user to create a contact.

By sending an HTTP request http://devserver/api/api/ctc/create

Parameters:
Name Type Description
firstName String Firstname of the contact (Firstname shall be not null if Lastname is null)
lastName String Lastname of the contact (Lastname shall be not null if Firstname is null)
function String Function defines the type of contact such as baby-sitter or cousin
Gender String Gender of the contact (masculine or feminine)
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
Picture Binary Binary file picture or URL information
devices String Generic device of the contact (maybe email or mobile phone number). Format will be detected by the server and automatically labeled)
mobiles String Mobile device (note that Work and Home type will be added soon to this API)
phone String phone device (note that Work and Home type will be added soon to this API)
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 )
adressesType String address type used to provide the type of location entered and the associated Icon (UNKNOWN,HOME,SPORT,SCHOOL,MUSIC,PARK,WORK,SHOPPING)

The method returns the contact details IContacts.

Response:

{
  "cn":"ctccreate",
  "feed":{
    "lastName":"smith",
    "contactId":"144_537",
    "accountId":"130",
    "gender":"MASCULINE",
    "birthDate":"2011-04-01T08:00:00.000Z",
    "pictureURIs":[],
    "firstName":"john",
    "displayName":"john smith",
    "devices":[
      {
        "deviceType":"EMAIL",
        "value":"test@fr.fr",
        "deviceId":"144_537_642" 
      },{
        "deviceType":"PHONE",
        "value":"010101010101",
        "deviceId":"144_537_643" 
      },{
        "deviceType":"MOBILE",
        "value":"06736546436",
        "deviceId":"144_537_644" 
      }
    ],
    "addresses":[
      {
        "geocodedAddress":{
          "latitudeE6":"48239816",
          "attribute3ZipCode":"36925",
          "attribute2Town":"York",
          "attribute0Country":"United States",
          "attribute4Line":"4th Ave",
          "radius":"2252",
          "formattedAddress":"4th Ave, Surrey, ND, USA",
          "longitudeE6":"-101057796",
          "accuracy":"5",
          "attribute1State":"North Dakota" 
        },
        "placeType":"UNKNOWN",
        "addressId":"144_537_93" 
      }
    ]
  }
}

Error:
Error Code Type Value Description
FizContactAlreadyExistsException ex 200 Contact already exists
FizMediaQuotaExceededException ex 601 Media Quota exceedded
FizAccountNotFoundInSessionException un 501 Session is invalid
FizApiInvalidParameterException un 502 invalid token
FizApiModelDoesNotExistException un 503 Object does not exists
FizApiModelRightException un 504 Right exception to use this method

Update Contact - ctcupdate

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

contact.

By sending an HTTP request http://servername/api/ctc/update

Parameters: |*Name*|*Type*|*Description*| |contactId|String|Contact Id that will be updated| |firstName|String|Firstname of the contact (Firstname shall be not null if Lastname is null)| |lastName|String|Lastname of the contact (Lastname shall be not null if Firstname is null)| |function|String|Function defines the type of contact such as baby-sitter or cousin| |Gender|String|Gender of the contact (masculine or feminine)| |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| |Picture|Binary|Binary file picture or URL information| |devices|String|Generic device of the contact (maybe email or mobile phone number). Format will be detected by the server and automatically labeled)| |mobiles|String|Mobile device (note that Work and Home type will be added soon to this API)| |phone|String|phone device (note that Work and Home type will be added soon to this API)| |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 )|
adressesType String address type used to provide the type of location entered and the associated Icon (UNKNOWN,HOME,SPORT,SCHOOL,MUSIC,PARK,WORK,SHOPPING)
adresseids String adresseid to remove from to the contact
deviceids String deviceid to remove from to the contact

The method returns the contact details IContacts.

Response:

{
  "cn":"ctcupdate",
  "feed":{
    "lastName":"smith",
    "contactId":"144_537",
    "accountId":"130",
    "gender":"MASCULINE",
    "birthDate":"2011-04-01T08:00:00.000Z",
    "pictureURIs":[],
    "firstName":"john",
    "displayName":"john smith",
    "devices":[
      {
        "deviceType":"EMAIL",
        "value":"test@fr.fr",
        "deviceId":"144_537_642" 
      },{
        "deviceType":"PHONE",
        "value":"010101010101",
        "deviceId":"144_537_643" 
      },{
        "deviceType":"MOBILE",
        "value":"06736546436",
        "deviceId":"144_537_644" 
      }
    ],
    "addresses":[
      {
        "geocodedAddress":{
          "latitudeE6":"48239816",
          "attribute3ZipCode":"36925",
          "attribute2Town":"York",
          "attribute0Country":"United States",
          "attribute4Line":"4th Ave",
          "radius":"2252",
          "formattedAddress":"4th Ave, Surrey, ND, USA",
          "longitudeE6":"-101057796",
          "accuracy":"5",
          "attribute1State":"North Dakota" 
        },
        "placeType":"UNKNOWN",
        "addressId":"144_537_93" 
      }
    ]
  }
}

Error:
Error Code Type Value Description
FizContactAlreadyExistsException ex 200 Contact already exists
FizMediaQuotaExceededException ex 601 Media Quota exceedded
FizAccountNotFoundInSessionException un 501 Session is invalid
FizApiInvalidParameterException un 502 invalid token
FizApiModelDoesNotExistException un 503 Object does not exists
FizApiModelRightException un 504 Right exception to use this method

Delete Contact - ctcdelete

The method ctcdelete enables a logged user to delete a contact information with a certain id or a series of Ids.

By sending an HTTP request http://servername/api/ctc/delete?contactId=144_501

Parameters:
Name Type Description
contactId String Contact Id of the contact queried

The method returns a boleean as a result.

Response:

{
  "cn":"ctcdelete",
  "feed":"true" 
}

Error:
Error Code Type Value Description
FizMediaQuotaExceededException ex 601 Media Quota exceedded
FizAccountNotFoundInSessionException un 501 Session is invalid
FizApiInvalidParameterException un 502 invalid token
FizApiModelDoesNotExistException un 503 Object does not exists
FizApiModelRightException un 504 Right exception to use this method

Updated by Eric Vieillevigne over 10 years ago · 2 revisions