Retrieve Custom Attributes for a Subscription
GET https://api.chartmogul.com/v1/subscriptions/{SUBSCRIPTION_UUID}/attributes
Retrieves the custom attributes of a given subscription.
curl -X GET "https://api.chartmogul.com/v1/subscriptions/sub_d1c0c885-add0-48db-8fa9-0bdf5017d6b0/attributes" \
-u YOUR_API_KEY:
{
"custom": {
"pre_sold": true,
"renewal_owner": "[email protected]"
}
}
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_uuidstring required- The ChartMogul UUID of the subscription whose custom attributes you’re retrieving. To retrieve subscription UUIDs for a customer, use the List Customer Subscriptions endpoint.
Response
custom- A JSON object containing the custom attributes for this subscription. Returns an empty object if no custom attributes have been set.