Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
nameblue

Table of Contents

...

The CRM.COM API allows you to interact with our system from your own application/system. Using the API you can interact with almost all CRM.COM Application's Resources. The API's architecture is built around REST using JSON. You can interact with the system using the available API methods using HTTP verbs such as GET and POSTJSON is returned by all API responses, including errors.

Using GET

...

methods

The HTTP GET method is used to read / retrieve a representation of a resource. GET method is not used to create, update or change of data. GET is idempotent, which means that making multiple identical requests ends up having the same result as a single request.

...

Code Block
languagexml
titleRequest
linenumberstrue
{{server}}/crmapi/rest/v2/contact_information/show?token={{token}}&contact_information_identifier=number=CI000111

Using POST

...

methods

The HTTP POST method is used to create or update the data and it is not idempotent. 

...

Code Block
languagexml
titleBody
linenumberstrue
{
  "token":"{{token}}",
  "type":"PERSON",
  "title":"Mr",
  "first_name":"Customer",
  "middle_name":"Customer",
  "last_name":"Customer",
  "category_identifier":{"name":"Contact Category"},
  "owned_by_group_identifier":{"name":"Main Group"},
  "privacy_level_identifier":{"number":"8"},
  "notes": "Family",
   "demographics":
   {
     "gender":"FEMALE",
     "id_number":"ABC123456",
     "passport_number":"ABC123456",
     "social_security_number":"ABC123456",
     "country_of_residence_identifier":{"name":"CYPRUS"},
     "id_issued_by_country_identifier":{"name":"CYPRUS"},
     "passport_issued_by_country_identifier":{"name":"GREECE"},
     "industry_identifier":{"name":"Industry"},
     "industry_sector_identifier":{"name":"FOREX"},
     "date_of_birth":{
                       "day":01,
                       "month":01,
                       "year":1980                   
                  },    
 
    "address_set": [
                     {
                       "type": "HOME",
                       "postal_code": "0001",
                       "street_name": "Address",
                       "street_number" : "01",
                       "floor":01,
                       "apartment_number":"001",
                       "area": "Area",
                       "town_city":"City",
                       "district":"District",
                       "municipality":"Municipality",
                       "country_identifier":{ "two_character_code": "CY" },
                       "po_box":"00011",
                       "po_box_postal_code":"ABC111"               
                        
             }
          ],
   "phone_set": [
                 {
                    "type": "LANDLINE",
                    "number":"123456"
                 }
               ],
  "email_set": [
                 {
                    "type": "PERSONAL",
                    "email_address": "123456@crm.com"
                  }
                ],
  "fields_set":"first_name,last_name,demographics,email_set"
}

Using Fields

...

Sets

CRM.COM API offers the possibility to select the fields to be retrieved from each API method by specifying the fields_set input parameter. This parameter provides the possibility to filter the results and retrieve only the fields that are provided on the method (separated by a comma) or retrieve all the fields if not specified. 

...

Code Block
languagexml
titleRequest
linenumberstrue
{{server}}/crmapi/rest/v2/contact_information/show?token={{token}}&contact_information_identifier=number=CI000111&fields_set=name,preferred_language,addresses_set,phones_set,emails_set

Using Pagination

There are API methods which retrieve a large number of entities such as list API methods. Some of these CRM.COM API methods provide the option to apply pagination on the results retrieved. 

...