CRM-2 Contacts API

From Opentaps Wiki
Revision as of 08:30, 3 April 2013 by Jwickers (talk | contribs) (New page: Contacts API is used to create and retreive contacts. The API calls follow the general RESTful pattern of CRM-2 API. The base URL is <tt>http://crm-2-url/crm2/contact</tt> , only POS...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Contacts API is used to create and retreive contacts.

The API calls follow the general RESTful pattern of CRM-2 API.

The base URL is http://crm-2-url/crm2/contact , only POST is currently supported, which is used to create or update a contact.


The following parameters are supported:

  • firstName
  • lastName
  • companyName
  • emailsNumber (used to iterate the following parameter where N is an index number)
    • emailN (the email address)
    • emailPurposeN (can be one of : PRIMARY, OTHER, ORDER, BILLING_AR, PAYMENT_AR, SHIPMENT)
  • attribute_XXX (can define additional attributes where XXX is the attribute name)


Only the attributes given as attribute_XXX are used to find an existing contact for update, if they are not given and / or a contact matching those is not found the operation will create a new contact.

The operation returns a JSON response with the contact ID of the created or updated record, eg:

 { "contact": { "contactId": XXX } }