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.

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. This endpoint is for subscriptions only.

Managing custom attributes for subscription sets via the API is not currently supported, but you can do this in the Subscriptions table of a customer profile. API support for subscription sets is coming soon.

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_uuid string required
The ChartMogul UUID of the subscription. To retrieve subscription UUIDs for a customer, use the List Customer Subscriptions endpoint.

Body parameters

custom array(string) required
An array containing the keys of the custom attributes to remove from the subscription.

Response

custom
A JSON object containing the remaining custom attributes on this subscription.
message
The outcome of the operation. One of success (at least one value was cleared) or noop (none of the specified attribute names had stored values).