Remove Custom Attributes from a Customer
DELETE https://api.chartmogul.com/v1/customers/{CUSTOMER_UUID}/attributes/custom
Removes custom attributes from a given customer.
curl -X DELETE "https://api.chartmogul.com/v1/customers/cus_de305d54-75b4-431b-adb2-eb6b9e546012/attributes/custom" \ -u YOUR_API_KEY: \ -H "Content-Type: application/json" \ -d '{ "custom": ["age", "salesRep"] }' customer = ChartMogul::Customer.retrieve("cus_de305d54-75b4-431b-adb2-eb6b9e546012") customer.remove_custom_attributes!(:age, :salesRep) ChartMogul.CustomAttribute.remove( config, "cus_de305d54-75b4-431b-adb2-eb6b9e546012", { custom: ["age", "salesRep"], } ); $customer = ChartMogul\Customer::retrieve("cus_de305d54-75b4-431b-adb2-eb6b9e546012"); $customer->removeCustomAttributes("age", "salesRep"); api.RemoveCustomAttributes( "cus_c0dc8d74-edfd-11e6-a357-832dddba822f", []string{"age", "salesRep"}, ) chartmogul.CustomAttributes.remove( config, uuid="cus_c0dc8d74-edfd-11e6-a357-832dddba822f", data={"custom": ["age", "salesRep"]}, ) { "custom": { "CAC": 213, "utmCampaign": "social media 1", "convertedAt": "2022-09-08 00:00:00", "pro": false, "channel": "Facebook" } } { :CAC => 213, :utmCampaign => "social media 1", :convertedAt => "2022-09-08 00:00:00", :pro => false, :channel => "Facebook", } { custom: { CAC: 213, utmCampaign: "social media 1", convertedAt: "2022-09-08 00:00:00", pro: true, channel: "Twitter" } } array ( "CAC" => 213, "utmCampaign" => "social media 1", "convertedAt" => "2022-09-08 00:00:00", "pro" => false, "channel" => "Facebook" ) (*chartmogul.CustomAttributes)(0xc04202e038)({ 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=19) "2022-09-08 00:00:00", (string) (len=3) "pro": (string) (bool) false, (string) (len=7) "channel": (string) (len=8) "Facebook" } }) <CustomAttributes{ custom={ "CAC": 213, "utmCampaign": "social media 1", "convertedAt": "2022-09-08 00:00:00", "pro": False, "channel": "Facebook" } }> Path parameters
customer_uuidstring required- The ChartMogul UUID of the customer.
Body parameters
customarray(string) required- An
Arraycontaining thekeys of all the custom attributes to be removed from the customer.
Response
In the response, custom contains all the custom attributes now on this customer.