List Contacts

Returns a list of all contact objects in your ChartMogul account.

Examples

curl -X GET "https://api.chartmogul.com/v1/contacts?per_page=50&cursor=aabbcc..." \
     -u YOUR_API_KEY: \
all_contacts = ChartMogul::Contacts.all(per_page: 50)

# to retrieve the next list of contacts (if any)
all_contacts.next
ChartMogul.Contact.all(config, {
   per_page: 50
   });
<?php

ChartMogul\Contact::all([ "cursor" => "aabbcc...", "per_page" => 50 ]);
?>
api.ListContacts(&cm.ListContactsParams{
  PaginationWithCursor: cm.PaginationWithCursor{PerPage: 50, Cursor: "aabbcc..."}
})
chartmogul.Contact.all(config, per_page=50)

Result Format

{
  "entries": [
    {
      "uuid": "con_653af916-dea0-11ed-845b-3be1ac0039ac",
      "customer_uuid": "cus_52eb54c2-dea0-11ed-ac96-ef735d89fca0",		
      "customer_external_id": "cus_0001",
      "data_source_uuid": "ds_35542640-d9f1-11ed-9c30-7727168c74a5",
      "position": 1,
      "first_name": "Adam",
      "last_name": "Smith",
      "title": "CEO",
      "email": "[email protected]",
      "phone": "Lead",
      "linked_in": "https://linkedin.com/example",
      "twitter": "https://twitter.com/example",
      "notes": "Heading\nBody\nFooter",
      "custom": {
        "Facebook": "https://www.facebook.com/example/",
        "date_of_birth": "1985-01-22"
      }
    },
    // ...and more
  ],
  "cursor": "aabbcc...",
  "has_more": true
}
#<ChartMogul::Contacts:0x007fe7e09ca7c8 
@entries=[
  #<ChartMogul::Contact:0x007fe7e09ca408 
  @custom={
    :Facebook=>'https://www.facebook.com/example',
    :date_of_birth=>'1985-01-22'
  },
  @customer_external_id="cus_0001",
  @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">,
  # ... 49 more entries here ...
>], 
@has_more=true,
@cursor='aabbcc...'
>
{
  "entries": [
    {
      "uuid": "con_653af916-dea0-11ed-845b-3be1ac0039ac",
      "customer_uuid": "cus_52eb54c2-dea0-11ed-ac96-ef735d89fca0",		
      "customer_external_id": "cus_0001",
      "data_source_uuid": "ds_35542640-d9f1-11ed-9c30-7727168c74a5",
      "position": 1,
      "first_name": "Adam",
      "last_name": "Smith",
      "title": "CEO",
      "email": "[email protected]",
      "phone": "Lead",
      "linked_in": "https://linkedin.com/example",
      "twitter": "https://twitter.com/example",
      "notes": "Heading\nBody\nFooter",
      "custom": {
        "Facebook": "https://www.facebook.com/example/",
        "date_of_birth": "1985-01-22"
      }
    },
    // ...and more
  ],
  "cursor": "aabbcc...",
  "has_more": true
}
class ChartMogul\Resource\CollectionWithCursor (3) {
  public $has_more =>
  bool(true)
  public $cursor =>
  string(96) "aabbcc..."
  private $elements =>
  array(10) {
    [0] =>
    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(5) "cus_0001"
      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(29) "https://linkedin.com/example"
      protected $twitter =>
      string(27) "https://twitter.com/example"
      protected $custom =>
      array(2) {
        "Facebook" =>
        string(35) "https://www.facebook.com/example"
        "date_of_birth" =>
        string(10) "1985-01-22"
      }
    },
    // ...and more
  }
}
(*chartmogul.Contacts)(0x14000206900)({
  Entries: ([]*chartmogul.Contact) (len=1 cap=4) {
    (*chartmogul.Contact)(0x14000268000)({
      UUID: (string) (len=40) "con_653af916-dea0-11ed-845b-3be1ac0039ac",
      CustomerExternalID: (string) (len=12) "cus_0001",
      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/example",
        (string) (len=13) "date_of_birth": (string) (len=10) "1985-01-22"
      }
    }),
    // ...and more
  },
  Cursor: (string) (len=7) "aabbcc...",
  HasMore: (bool) true
})
Contacts(
    entries=[<Contact{
        custom={'Facebook': 'https://www.facebook.com/example', 'date_of_birth': '1985-01-22'},
        customer_external_id='cus_0001',
        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='Title',
        twitter='https://twitter.com/example'
        uuid='cus_52eb54c2-dea0-11ed-ac96-ef735d89fca0'}>,
        # ...and more
    ]
    has_more=True,
    cursor='aabbcc...')

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

  • entries: List of contact entries.
  • cursor: The reference to the next list of contacts.
  • has_more: Determines whether there are more contacts to query after this particular request. Returns true if there are, and false if there are no more.
Language
Authorization
Basic
base64
: