Retrieve a Contact

Retrieves a contact object from your ChartMogul account.

Example

curl -X GET "https://api.chartmogul.com/v1/contacts/con_653af916-dea0-11ed-845b-3be1ac0039ac" \
     -u YOUR_API_KEY: \
ChartMogul::Contact.retrieve('con_653af916-dea0-11ed-845b-3be1ac0039ac')
ChartMogul.Contact.retrieve(config, "con_653af916-dea0-11ed-845b-3be1ac0039ac");
<?php

ChartMogul\Contact::retrieve("con_653af916-dea0-11ed-845b-3be1ac0039ac");
?>
api.RetrieveContact("con_653af916-dea0-11ed-845b-3be1ac0039ac")
chartmogul.Contact.retrieve(config, uuid="con_653af916-dea0-11ed-845b-3be1ac0039ac")

Result Format

{
  "uuid": "con_653af916-dea0-11ed-845b-3be1ac0039ac",
  "customer_uuid": "cus_52eb54c2-dea0-11ed-ac96-ef735d89fca0",
  "customer_external_id": "customer_001",
  "data_source_uuid": "ds_35542640-d9f1-11ed-9c30-7727168c74a5",
  "position": 9,
  "first_name": "Adam",
  "last_name": "Smith",
  "title": "CEO",
  "email": "[email protected]",
  "phone": "+1234567890",
  "linked_in": "https://linkedin.com/example",
  "twitter": "https://twitter.com/example",
  "notes": "Heading\nBody\nFooter",
  "custom": {
    "Facebook": "https://www.facebook.com/adam.smith",
    "date_of_birth": "1985-01-22"
  }
}
#<ChartMogul::Contact:0x0000000128fada38
  @custom={
    :Facebook=>'https://www.facebook.com/adam.smith',
    :date_of_birth=>'1985-01-22'
  },
  @customer_external_id="customer_001",
  @customer_uuid="cus_52eb54c2-dea0-11ed-ac96-ef735d89fca0",
  @data_source_uuid="ds_35542640-d9f1-11ed-9c30-7727168c74a5",
  @email="[email protected]",
  @first_name='Adam',
  @last_name='Smith',
  @linked_in='https://linkedin.com/example',
  @notes='Heading\nBody\nFooter',
  @phone='+1234567890',
  @position=9,
  @title='CEO',
  @twitter='https://twitter.com/example',
  @uuid="con_653af916-dea0-11ed-845b-3be1ac0039ac">
{
  "uuid": "con_653af916-dea0-11ed-845b-3be1ac0039ac",
  "customer_uuid": "cus_52eb54c2-dea0-11ed-ac96-ef735d89fca0",
  "customer_external_id": "customer_001",
  "data_source_uuid": "ds_35542640-d9f1-11ed-9c30-7727168c74a5",
  "position": 9,
  "first_name": "Adam",
  "last_name": "Smith",
  "title": "CEO",
  "email": "[email protected]",
  "phone": "+1234567890",
  "linked_in": "https://linkedin.com/example",
  "twitter": "https://twitter.com/example",
  "notes": "Heading\nBody\nFooter",
  "custom": {
    "Facebook": "https://www.facebook.com/adam.smith",
    "date_of_birth": "1985-01-22"
  }
}
class ChartMogul\Contact (15) {
  protected $uuid =>
  string(40) "con_653af916-dea0-11ed-845b-3be1ac0039ac"
  protected $customer_uuid =>
  string(40) "cus_52eb54c2-dea0-11ed-ac96-ef735d89fca0"
  protected $data_source_uuid =>
  string(39) "ds_35542640-d9f1-11ed-9c30-7727168c74a5"
  protected $customer_external_id =>
  string(12) "customer_001"
  protected $first_name =>
  string(4) "Adam"
  protected $last_name =>
  string(5) "Smith"
  protected $position =>
  int(1)
  protected $email =>
  string(16) "[email protected]"
  protected $title =>
  string(3) "CEO"
  protected $notes =>
  string(19) "Heading\nBody\nFooter"
  protected $phone =>
  string(11) "+1234567890"
  protected $linked_in =>
  string(28) "https://linkedin.com/example"
  protected $twitter =>
  string(27) "https://twitter.com/example"
  protected $custom =>
  array(2) {
    "Facebook" =>
    string(35) "https://www.facebook.com/adam.smith"
    "date_of_birth" =>
    string(10) "1985-01-22"
  }
}
(*chartmogul.Contact)(0x14000268000)({
  UUID: (string) (len=40) "con_653af916-dea0-11ed-845b-3be1ac0039ac",
  CustomerExternalID: (string) (len=12) "customer_001",
  CustomerUUID: (string) (len=40) "cus_52eb54c2-dea0-11ed-ac96-ef735d89fca0",
  DataSourceUUID: (string) (len=39) "ds_35542640-d9f1-11ed-9c30-7727168c74a5",
  FirstName: (string) (len=4) "Adam",
  LastName: (string) (len=5) "Smith",
  LinkedIn: (string) (len=29) "https://linkedin.com/example",
  Notes: (string) (len=19) "Heading\nBody\nFooter",
  Phone: (string) (len=11) "+1234567890",
  Position: (uint32) 1,
  Title: (string) (len=3) "CEO",
  Twitter: (string) (len=27) "https://twitter.com/example",
  Custom: (map[string]interface {}) (len=2) {
    (string) (len=8) "Facebook": (string) (len=35) "https://www.facebook.com/adam.smith",
    (string) (len=13) "date_of_birth": (string) (len=10) "1985-01-22"
  }
})
<Contact{
    custom={'Facebook': 'https://www.facebook.com/adam.smith','date_of_birth': '1985-01-22'},
    customer_external_id='external_001',
    customer_uuid='cus_52eb54c2-dea0-11ed-ac96-ef735d89fca0',
    data_source_uuid='ds_35542640-d9f1-11ed-9c30-7727168c74a5',
    email='[email protected]',
    first_name='Adam',
    last_name='Smith',
    linked_in='https://linkedin.com/example',
    notes='Heading\nBody\nFooter',
    phone='+1234567890',
    position=9,
    title='CEO',
    twitter='https://twitter.com/example'
    uuid='cus_52eb54c2-dea0-11ed-ac96-ef735d89fca0'}>

In the response, the JSON object contains the following data:

  • uuid: The UUID of the contact.
  • customer_uuid: The UUID of the customer to which this contact belongs.
  • customer_external_id: The external id of the customer to which this contact belongs.
  • data_source_uuid: The UUID of the data source of the customer to which this contact belongs. A user can have multiple data sources, and the contact should only be associated to one of them.
  • position: Position of the contact in the customer’s page.
  • first_name: The first name of the contact.
  • last_name: The last name of the contact.
  • title: The job title of the contact, e.g. "CEO".
  • email: The email address of the contact.
  • phone: The phone number of the contact.
  • linked_in: The URL of the contact's LinkedIn profile.
  • twitter: The URL of the contact's Twitter profile.
  • notes: Additional notes or comments about the contact.
  • custom: A dictionary of custom attributes for the contact. If no custom attributes is set to a contact, this will be an empty object.
Language
Authorization
Basic
base64
: