get https://api.chartmogul.com/v1/customers//attributes
Retrieves the customer attributes of a given customer.
Examples
curl -X GET "https://api.chartmogul.com/v1/customers/cus_de305d54-75b4-431b-adb2-eb6b9e546012/attributes" \
-u YOUR_API_KEY:
customer = ChartMogul::Customer.retrieve('cus_de305d54-75b4-431b-adb2-eb6b9e546012')
customer.attributes
ChartMogul.Customer.attributes(config, "cus_de305d54-75b4-431b-adb2-eb6b9e546012", function (err, res) {
// asynchronously called
});
<?php
$customer = ChartMogul\Customer::retrieve(
"cus_de305d54-75b4-431b-adb2-eb6b9e546012");
$customer->attributes;
?>
api.RetrieveCustomersAttributes("cus_c0dc8d74-edfd-11e6-a357-832dddba822f")
chartmogul.Attributes.retrieve(
config,
uuid='cus_c0dc8d74-edfd-11e6-a357-832dddba822f')
Result Format
{
"tags": ["engage", "unit loss", "discountable"],
"stripe": {
"uid": 7,
"coupon": true
},
"clearbit": {
"company": {
"name": "Example Company",
"legalName": "Example Company Inc.",
"domain": "examplecompany.com",
"url": "http://examplecompany.com",
"category": {
"sector": "Information Technology",
"industryGroup": "Software and Services",
"industry": "Software",
"subIndustry": "Application Software"
},
"metrics": {
"raised": 1502450000,
"employees": 1000,
"googleRank": 7,
"alexaGlobalRank": 2319,
"marketCap": null
},
},
"person": {
"name": {
"fullName": "Bob Kramer"
},
"employment": {
"name": "Example Company"
}
}
},
"custom": {
"CAC": 213,
"utmCampaign": "social media 1",
"convertedAt": "2015-09-08 00:00:00",
"pro": false,
"salesRep": "Gabi"
}
}
{
:tags=>["engage", "unit loss", "discountable"],
:stripe=>{
:uid=>7,
:coupon=>true
},
:clearbit=>{
:id=>"027b0d40-016c-40ea-8925-a076fa640992",
:name=>"Acme",
:legalName=> "Acme Inc.",
:domain=> "acme.com",
:url=> "http://acme.com",
:metrics=> {
:raised=> 1502450000,
:employees=> 1000,
:googleRank=> 7,
:alexaGlobalRank=> 2319,
:marketCap=> null
},
:category=> {
:sector=> "Information Technology",
:industryGroup=> "Software and Services",
:industry=> "Software",
:subIndustry=> "Application Software"
}
},
:custom=> {
:CAC=> 213,
:utmCampaign=> "social media 1",
:convertedAt=> "2015-09-08 00:00:00",
:pro=> false,
:salesRep=> "Gabi"
}
}
{
"tags": ["engage", "unit loss", "discountable"],
"stripe": {
"uid": 7,
"coupon": true
},
"clearbit": {
"company": {
"name": "Example Company",
"legalName": "Example Company Inc.",
"domain": "examplecompany.com",
"url": "http://examplecompany.com",
"category": {
"sector": "Information Technology",
"industryGroup": "Software and Services",
"industry": "Software",
"subIndustry": "Application Software"
},
"metrics": {
"raised": 1502450000,
"employees": 1000,
"googleRank": 7,
"alexaGlobalRank": 2319,
"marketCap": null
},
},
"person": {
"name": {
"fullName": "Bob Kramer"
},
"employment": {
"name": "Example Company"
}
}
},
"custom": {
"CAC": 213,
"utmCampaign": "social media 1",
"convertedAt": "2015-09-08 00:00:00",
"pro": false,
"salesRep": "Gabi"
}
}
<?php
array (
'custom' =>
array (
'CAC' => 213,
'utmCampaign' => 'social media 1',
'convertedAt' => '2015-09-08T00:00:00.000Z',
'pro' => false,
'salesRep' => 'Gabi',
),
'clearbit' =>
array (
"company" => array (
"name" => "Example Company",
"legalName" => "Example Company Inc.",
"domain" => "examplecompany.com",
"url" => "http =>//examplecompany.com",
"category" => array (
"sector" => "Information Technology",
"industryGroup" => "Software and Services",
"industry" => "Software",
"subIndustry" => "Application Software"
),
"metrics" => array (
"raised" => 1502450000,
"employees" => 1000,
"googleRank" => 7,
"alexaGlobalRank" => 2319,
"marketCap" => null
),
),
"person" => array (
"name" => array (
"fullName" => "Bob Kramer"
),
"employment" => array (
"name" => "Example Company"
)
)
),
'stripe' =>
array (
"uid" => 7,
"coupon" => true
),
'tags' =>
array (
0 => 'engage',
1 => 'unit loss',
2 => 'discountable',
),
)
?>
(*chartmogul.Attributes)(0xc042042f30)({
Tags: ([]string) (len=2) {
(string) (len=15) "merged-customer",
(string) (len=10) "high-value"
},
Stripe: (*chartmogul.Stripe)(<nil>),
Clearbit: (*chartmogul.Clearbit)(<nil>),
Custom: (map[string]interface {}) (len=2) {
(string) (len=3) "CAC": (float64) 25,
(string) (len=7) "channel": (string) (len=8) "Facebook"
}
})
<Attributes{
custom={
'CAC': 25,
'channel': 'Facebook'},
tags=['merged-customer',
'high-value']}>
The response contains the customer's attributes with the following data:
tags
- An Array of tags that you have added to this customer.stripe
- A JSON object representing any metadata on this customer object in your Stripe account.clearbit
- A JSON object representing publicly available information about this customer retrieved from Clearbit.custom
- A JSON object representing custom attributes that you have added to this customer.