Remove Custom Attributes from a Subscription
DELETE https://api.chartmogul.com/v1/subscriptions/{SUBSCRIPTION_UUID}/attributes/custom
Clears the values of custom attributes on a given subscription or subscription set.
curl -X DELETE "https://api.chartmogul.com/v1/subscriptions/sub_d1c0c885-add0-48db-8fa9-0bdf5017d6b0/attributes/custom" \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"custom": ["pre_sold", "renewal_owner"]
}'
{
"custom": {},
"message": "success"
}
Subscription set custom attributes. Subscription custom attributes can be added to either subscriptions or subscription sets. For subscription sets, use /subscription_sets/ as the URL.
If your subscriptions belong to a set, consider managing custom attributes at the set level. Set-level attributes are inherited by all subscriptions in the set and persist when subscriptions change (for example, on a plan switch).
Path parameters
subscription_uuidstring required- The ChartMogul UUID of the subscription or subscription set. Both can be retrieved using the List Customer Subscriptions endpoint.
Body parameters
customarray(string) required- An array containing the keys of the custom attributes to remove from the subscription or subscription set.
Response
custom- A JSON object containing the remaining custom attributes on this subscription or subscription set.
message- The outcome of the operation. One of
success(at least one value was cleared) ornoop(none of the specified attribute names had stored values).