Retrieve a Customer

Retrieves a customer object from your ChartMogul account.

Examples
curl -X GET "https://api.chartmogul.com/v1/customers/cus_de305d54-75b4-431b-adb2-eb6b9e546012" \
     -u YOUR_API_KEY:
ChartMogul::Customer.retrieve('cus_de305d54-75b4-431b-adb2-eb6b9e546012')
ChartMogul.Customer.retrieve(config, 'cus_de305d54-75b4-431b-adb2-eb6b9e546012');
ChartMogul\Customer::retrieve("cus_de305d54-75b4-431b-adb2-eb6b9e546012");
api.RetrieveCustomer("cus_de305d54-75b4-431b-adb2-eb6b9e546012")
chartmogul.Customer.retrieve(config, uuid='cus_de305d54-75b4-431b-adb2-eb6b9e546012')
Result Format
{
  "id": 25647,
  "uuid": "cus_de305d54-75b4-431b-adb2-eb6b9e546012",
  "external_id": "34916129",
  "external_ids": [ "34916129" ],
  "data_source_uuid": "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
  "data_source_uuids": [ "ds_fef05d54-47b4-431b-aed2-eb6b9e545430" ],
  "name": "Example Company",
  "email": "[email protected]",
  "company": "",
  "status": "Active",
  "lead_created_at": null,
  "free_trial_started_at": null,
  "customer-since": "2023-06-09T13:16:00-04:00",
  "zip": "0185128",
  "city": "Nowhereville",
  "state": "AK",
  "country": "US",
  "address": {
    "address_zip": "0185128",
    "city": "Nowhereville",
    "state": "Alaska",
    "country": "US"
  },
  "attributes": {
    "tags": ["engage", "unit loss", "discountable"],
    "custom": {
      "CAC": 213,
      "utmCampaign": "social media 1",
      "convertedAt": "2023-09-08 00:00:00",
      "pro": false,
      "salesRep": "Gabi"
    },
    "stripe": { "uid": 7, "coupon": true },
    "clearbit": {}
  },
  "mrr": 3000,
  "arr": 36000,
  "billing-system-type": "Stripe",
  "billing-system-url": "https://dashboard.stripe.com/customers/cus_4Z2ZpyJFuQ0XMb",
  "chartmogul-url": "https://app.chartmogul.com/#/customers/25647-Example_Company",
  "currency": "USD",
  "currency-sign": "$",
	"owner": null,
  "website_url": "https://example.com"
}
#<ChartMogul::Customer:0x007faf03b02d68 
  @id=25647, 
  @uuid="cus_de305d54-75b4-431b-adb2-eb6b9e546012",
  @data_source_uuid="ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
  @data_source_uuids=["ds_fef05d54-47b4-431b-aed2-eb6b9e545430"],
  @external_id="34916129",
  @external_ids=["34916129"],
  @name="Example Company", 
  @email="[email protected]", 
	@company="",
  @status="Active",
  @lead_created_at=null,
  @free_trial_started_at=null,
  @customer_since=2023-06-09 13:16:00 -04:00:00,
  @zip="0185128",
  @city="Nowhereville",
  @state="AK",
  @country="US",
  @address={
    :address_zip=>"0185128",
    :city=>"Nowhereville",
    :state=>"Alaska", 
    :country=>"US",
  },
  @attributes={
    :tags=>["engage", "unit loss", "discountable"], 
    :custom=>{
      :CAC=>213,
      :utmCampaign=>"social media 1",
      :convertedAt=>"2023-09-08 00:00:00",
      :pro=>false,
      :salesRep=>"Gabi",
    },
    :stripe=>{:uid=>7, :coupon=>true},
    :clearbit=>{}, # deprecated
  },
  @mrr=3000, 
  @arr=36000, 
  @billing_system_type="Stripe", 
  @billing_system_url="https://dashboard.stripe.com/customers/cus_4Z2ZpyJFuQ0XMb", 
  @chartmogul_url="https://app.chartmogul.com/#customers/25647-Example_Company", 
  @currency="USD", 
  @currency_sign="$",
	@owner=nil,
  @website_url="https://example.com"
>
{
  id: 25647,
  uuid: 'cus_de305d54-75b4-431b-adb2-eb6b9e546012',
  external_id: '34916129',
  external_ids: [ '34916129' ],
  data_source_uuid: 'ds_fef05d54-47b4-431b-aed2-eb6b9e545430',
  data_source_uuids: [ 'ds_fef05d54-47b4-431b-aed2-eb6b9e545430'],
  name: 'Example Company',
  email: '[email protected]',
  company: '',
  status: 'Active',
  lead_created_at: null,
  free_trial_started_at: null,
  'customer-since': '2023-06-09T13:16:00-04:00',
  zip: '0185128',
  city: 'Nowhereville',
  state: 'AK',
  country: 'US',
  address: {
    address_zip: '0185128',
    city: 'Nowhereville',
    state: 'Alaska',
    country: 'US',
  },
  attributes: {
    tags: [ 'engage', 'unit loss', 'discountable' ],
    custom: {
      CAC: 213,
      utmCampaign: 'social media 1',
      convertedAt: '2023-09-08 00:00:00',
      pro: false,
      salesRep: 'Gabi',
    },
    stripe: { uid: 7, coupon: true },
    clearbit: {}, // deprecated
  },
  mrr: 3000,
  arr: 36000,
  'billing-system-type': 'Stripe',
  'billing-system-url': 'https://dashboard.stripe.com/customers/cus_4Z2ZpyJFuQ0XMb',
  'chartmogul-url': 'https://app.chartmogul.com/#customers/25647-Example_Company',
  currency: 'USD',
  'currency-sign': '$',
	owner: null,
  website_url: 'https://example.com',
}
ChartMogul\Customer::__set_state(array(
   "id" => 25647,
   "uuid" => "cus_de305d54-75b4-431b-adb2-eb6b9e546012",
   "external_id" => "34916129",
   "external_ids" => array(
     0 => "34916129",
   ),
   "data_source_uuid" => "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
   "data_source_uuids" => array(
     0 => "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
   ),
   "name" => "Example Company",
   "email" => "[email protected]",
   "company" => "",
   "status" => "Active",
   "lead_created_at" => null,
   "free_trial_started_at" => null,
   "customer_since" => "2023-06-09T13:16:00-04:00",
   "zip" => "0185128",
   "state" => "AK",
   "country" => "US",
   "city" => "Nowhereville",
   "address" => array(
     "address_zip" => "0185128",
     "city" => "Nowhereville",
     "state" => "Alaska",
     "country" => "US"
   ),
   "attributes" => array(
     "tags" => array(
       0 => "engage",
       1 => "unit loss",
       2 => "discountable",
     ),
     "custom" => array(
       "CAC" => 213,
       "utmCampaign" => "social media 1",
       "convertedAt" => "2023-09-08 00 =>00 =>00",
       "pro" => false,
       "salesRep" => "Gabi",
     ),
     "stripe" => array (
       "uid" => 7,
       "coupon" => true,
     ),
     "clearbit" => array(), // deprecated
   ),
   "mrr" => 3000,
   "arr" => 36000,
   "billing_system_type" => "Stripe",
   "billing_system_url" => "https://dashboard.stripe.com/customers/cus_4Z2ZpyJFuQ0XMb",
   "chartmogul_url" => "https://app.chartmogul.com/#customers/25647-Example_Company",
   "currency" => "USD",
   "currency_sign" => "$",
	 "owner" => null,
   "website_url" => "https://example.com",
));
(*chartmogul.Customer)(0xc04207e6e0)({
  ID: (uint32) 25647,
  UUID: (string) (len=40) "cus_de305d54-75b4-431b-adb2-eb6b9e546012",
  ExternalID: (string) (len=8) "34916129",
  ExternalIDs: ([]string) {
    (len=8) "34916129"
  },
  DataSourceUUID: (string) (len=39) "ds_80686670-cc45-11e6-b9da-ff67b9895fe3",
  DataSourceUUIDs: ([]string) {
    (len=39) "ds_fef05d54-47b4-431b-aed2-eb6b9e545430"
  },
  Name: (string) (len=10) "Adam Smith",
  Email: (string) (len=14) "[email protected]",
  Company: (string) "",
  Status: (string) (len=6) "Active",
  LeadCreatedAt: (string) "",
  FreeTrialStartedAt: (string) "",
  CustomerSince: (string) (len=25) "2023-06-09T13:16:00-04:00",
  Zip: (string) "",
  City: (string) (len=8) "New York",
  State: (string) "",
  Country: (string) (len=2) "US",
  Address: (*chartmogul.Address)(0xc042009800)({
    AddressZIP: (string) "",
    City: (string) (len=8) "New York",
    State: (string) "",
    Country: (string) (len=13) "United States",
  }),
  Attributes: (*chartmogul.Attributes)(0xc042132b10)({
    Tags: ([]string) {
      (len=6) "engage",
      (len=9) "unit loss",
      (len=12) "discountable", 
    },
    Custom: (map[string]interface {}) (len=2) {
      (string) (len=3) "CAC": (float64) 213,
      (string) (len=11) "utmCampaign": (string) (len=14) "social media 1",
      (string) (len=11) "convertedAt": (string) (len=19) "2023-09-08 00:00:00",
      (string) (len=3) "pro": (bool) false,
      (string) (len=8) "salesRep": (string) (len=4) "Gabi",
    },
    Stripe: (map[string]interface {}) (len=2) {
      (string) (len=3) "UID": (uint64) 0,
      (string) (len=6) "Coupon": (bool) false,
    },
    Clearbit: (map[string]interface {}) {}, // deprecated
  }),
  Mrr: (float64) 4100,
  Arr: (float64) 49200,
  BillingSystemType: (string) (len=10) "Custom",
  BillingSystemURL: (string) "",
  ChartmogulURL: (string) (len=54) "https://app.chartmogul.com/#customers/25647-Example_Company",
  Currency: (string) (len=3) "USD",
  CurrencySign: (string) (len=1) "$",
  Owner: (string) "",
  WebsiteUrl: (string) (len=19) "https://example.com",
  Errors: (chartmogul.Errors) chartmogul: map[],
})
<Customer{
    id=25647, 
    uuid='cus_de305d54-75b4-431b-adb2-eb6b9e546012', 
    external_id='cus_0001', 
    external_ids=['cus_0001'], 
    data_source_uuid='ds_fef05d54-47b4-431b-aed2-eb6b9e545430', 
    data_source_uuids=['ds_fef05d54-47b4-431b-aed2-eb6b9e545430'], 
    name='Adam Smith', 
    email='[email protected]', 
    company='', 
    status='Active', 
    free_trial_started_at=None, 
    lead_created_at=None, 
    customer_since=datetime.datetime(2023, 6, 9, 13, 16), 
    zip=None,
    city='New York', 
    state=None, 
    country='US', 
    address=<Address{
        address_zip=None,
        city='New York',
        state=None,
        country='United States', 
    }>,
    attributes=<Attributes{
        tags=['engage', 'unit loss', 'discountable'],
        custom: {
            CAC: 213,
            utmCampaign: 'social media 1',
            convertedAt: '2023-09-08 00:00:00',
            pro: False,
            salesRep: 'Gabi',
        },
	      stripe={uid: 7, coupon: True},
        clearbit={}, # deprecated
    }>,
    mrr=4100.0, 
    arr=49200.0, 
    billing_system_type='Custom', 
    billing_system_url='https://dashboard.stripe.com/customers/cus_4Z2ZpyJFuQ0XMb',
    chartmogul_url='https://app.chartmogul.com/#customers/25647-Example_Company', 
    currency='USD', 
    currency_sign='$', 
	  owner=None,
    website_url='https://example.com',
}>

The response object contains the following data:

KeyDescription
idThe internal ChartMogul ID for the customer object.
uuidThe ChartMogul UUID for the customer.
external_idThe unique external identifier for the customer. It usually originates from a billing system outside of ChartMogul.
external_idsAn array containing the unique external identifiers of both the customer itself as well as all customer records that have been merged into it.
data_source_uuidThe ChartMogul UUID for the source the customer is from.
data_source_uuidsAn array containing the ChartMogul UUIDs for the source the customer is from as well as the UUIDs for the sources of customers merged into it.
nameThe customer's name.
emailThe customer's email address.
companyThe customer's company name.
statusThe customer status. One of New Lead, Working Lead, Qualified Lead, Unqualified Lead, Active, Past Due, or Cancelled.
lead_created_atThe time the customer was established as lead. This is given as ISO 8601-formatted string, except in the Ruby and Python libraries (where they are given as datetime objects).
free_trial_started_atThe time at which the customer started a free trial. This is given as ISO 8601-formatted string, except in the Ruby and Python libraries (where they are given as datetime objects).
customer-sinceThe time at which the customer started their first subscription. This is given as ISO 8601-formatted string, except in the Ruby and Python libraries (where they are given as datetime objects).
zipThe zip code from the customer's address, as a string.
cityThe city from the customer's address.
stateThe US state where the customer is located — the US state code as per the ISO-3166 alpha-2 standard. For example, US-CA or US-NY.
countryThe country from customer's address, as ISO 3166-1 alpha-2-formatted string.
addressAn object containing the customer's address.
address.address_zipThe zip code from the customer's address.
address.cityThe full name for the city from the customer's address.
address.stateThe full name for the state from the customer's address.
address.countryThe full name for the country from the customer's address.
attributesAn object containing tags, custom attributes, and Stripe metadata.
attributes.tagsAn array of tags on the customer.
attributes.customAn object containing the custom attributes on the custom, as key-value pairs.
attributes.stripeAn object with the customer's Stripe metadata. An empty object if the customer is not a Stripe customer.
attributes.clearbit[deprecated] A legacy field, formerly containing publicly available information about the customer. However, ChartMogul no longer utilizes Clearbit, thus the value will always be an empty object.
mrrThe current monthly recurring revenue for this customer, expressed in your account currency, as an integer number of cents. For the actual amount, divide by 100.
arrThe current annual run rate for this customer, expressed in your account currency, as an integer number of cents. For the actual amount, divide by 100.
billing-system-typeThe billing system the customer was imported from. For example Stripe, Recurly, Chargify, Custom, etcetera.
billing-system-urlA URL for this customer linking to the customer record in your billing system, if available.
chartmogul-urlA URL for this customer linking to the customer record in ChartMogul.
currencyYour account currency. This is used to express MRR and ARR in.
currency-signThe symbol(s) used to represent the currency, e.g. $, or .
ownerThe user responsible for the customer relationship.
website_urlThe URL of the customer's website.
Language
Authorization
Basic
base64
: