Retrieve Customer’s Tags and Attributes

GET https://api.chartmogul.com/v1/customers/{CUSTOMER_UUID}/attributes

Retrieves the customer attributes of a given customer.

curl -X GET "https://api.chartmogul.com/v1/customers/cus_de305d54-75b4-431b-adb2-eb6b9e546012/attributes?with_overrides=true&attributes_with_history=custom.salesRep" \
     -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");
$customer = ChartMogul\Customer::retrieve("cus_de305d54-75b4-431b-adb2-eb6b9e546012");

$customer->attributes;
api.RetrieveCustomersAttributes("cus_de305d54-75b4-431b-adb2-eb6b9e546012")
chartmogul.Attributes.retrieve(config, uuid="cus_de305d54-75b4-431b-adb2-eb6b9e546012")
{
  "tags": ["engage", "unit loss", "discountable"],
  "stripe": {
    "uid": 7,
    "coupon": true
  },
  "custom": {
    "CAC": 213,
    "utmCampaign": "social media 1",
    "convertedAt": "2022-09-08 00:00:00",
    "pro": false,
    "salesRep": "Gabi"
  },
  "overrides": { "custom": { "salesRep": true } },
  "historical_values": {
    "custom": {
      "salesRep": [
        { "value": "Gabi", "update_performed_at": "2026-06-02T11:20:05Z", "update_performed_by": "API", "initial": false },
        { "value": null, "update_performed_at": null, "update_performed_by": null, "initial": true }
      ]
    }
  }
}
{
  :tags => ["engage", "unit loss", "discountable"],
  :stripe => {
    :uid => 7,
    :coupon => true,
  },
  :custom => {
    :CAC => 213,
    :utmCampaign => "social media 1",
    :convertedAt => "2022-09-08 00:00:00",
    :pro => false,
    :salesRep => "Gabi",
  },
}
{
  tags: ["engage", "unit loss", "discountable"],
  stripe: {
    uid: 7,
    coupon: true
  },
  custom: {
    CAC: 213,
    utmCampaign: "social media 1",
    convertedAt: "2022-09-08 00:00:00",
    pro: false,
    salesRep: "Gabi"
  }
}
array (
  "custom" =>
  array (
    "CAC" => 213,
    "utmCampaign" => "social media 1",
    "convertedAt" => "2022-09-08T00:00:00.000Z",
    "pro" => false,
    "salesRep" => "Gabi",
  ),
  "stripe" =>
  array (
    "uid" => 7,
    "coupon" => true
  ),
  "tags" => 
  array (
    0 => "engage",
    1 => "unit loss",
    2 => "discountable",
  ),
)
(*chartmogul.Attributes)(0xc042042f30)({
  Tags: ([]string) (len=3) {
    (string) (len=6) "engage",
    (string) (len=9) "unit loss",
    (string) (len=12) "discountable"
  },
  Stripe: (*chartmogul.Stripe)(0xc04200c5b0)({
    UID: (uint64) 7,
    Coupon: (bool) true
  }),
  Clearbit: (*chartmogul.Clearbit)(0xc0420da3c0)({
  }),
  Custom: (map[string]interface {}) (len=5) {
    (string) (len=3) "CAC": (float64) 213,
    (string) (len=11) "utmCampaign": (string) (len=14) "social media 1",
    (string) (len=11) "convertedAt": (string) (len=25) "2022-09-08T00:00:00-04:00",
    (string) (len=3) "pro": (string) (bool) false,
    (string) (len=8) "salesRep": (string) (len=4) "Gabi"
  }
 })
<Attributes{
  custom={
    "CAC": 213, 
    "utmCampaign": "social media 1",
    "convertedAt": "2022-09-08 00:00:00",
    "pro": False,
    "salesRep": "Gabi"}, 
  tags=["engage", "unit loss", "discountable"]
}>

Path parameters

customer_uuid string required
The ChartMogul UUID of the customer whose attributes are required.

Query parameters

with_overrides boolean optional default: false
When true, the response includes an overrides object flagging the customer’s currently overridden custom attributes.
attributes_with_history string optional
A comma-separated list of custom attribute names by their namespaced name, e.g. custom.channel. The response then includes a historical_values object with the edit history of each listed attribute. Standard customer fields are not accepted here — use the Retrieve a Customer endpoint for those. Unknown names fail the request with a 422.

Response

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.
custom
A JSON object representing custom attributes that you have added to this customer.
overrides
An object flagging the currently overridden custom attributes with true, nested by namespace, e.g. {"custom": {"channel": true}}. Overridden values are protected from being overwritten by updates from your billing system. Only included when with_overrides is true.
historical_values
Up to the 10 most recent edit history entries per attribute named in attributes_with_history, newest first, nested by namespace. Each entry carries the attribute’s value at that point, update_performed_at, update_performed_by (a team member’s name, an integration’s name, or API), and initial — true on the entry holding the attribute’s initial value, whose update_performed_at and update_performed_by are null. Values that an override blocked also appear: the attempt is recorded in the edit history even though it was never applied, and removing the override reverts to the latest recorded value. Only included when attributes_with_history is given.