Difference between revisions of "CRM-2 Contacts API"

From Opentaps Wiki
Jump to navigationJump to search
(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...)
 
m (Protected "CRM-2 Contacts API": Sysop page [edit=sysop:move=sysop])
(No difference)

Revision as of 08:30, 3 April 2013

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 } }