The subscription group object
A subscription group gives a user access to some number of assets. It groups subscription plans.
Attributes
- name String
- Name of the subscription group
- description string
- Description of the subscription group
- metadata_fields Array
- Array of metafields associated with the subscription group
- currency string
- Default currency for group.
- target_amount Number
- Target amount for a campign group. Its null for other types of groups.
- target_amount_validation_enabled Boolean
- If true, subscription cannot be created once target amount is collected. Applicable for subscription groups of type campaign. Its false for others.
- campaign_active Boolean
- If false, campaign has ended and further payments to campaign will be rejected. Applicable for subscription groups of type campaign. It is false for others.
- collected_amount Number
- Amount collected so far. Applicable for subscription groups of type campaign only.
- collected_amount_percentage Number
- Pencentage of amount collected with respect to target_amount. Applicable for subscription groups of type campaign only.
- subscription_type string
- Can be one of Subscription Types
- subscription_plans Array
- Array of Subscription plans
- image_s3_key string
- S3 Key of the main image uploaded for the group
- custom_attributes Array
- Array of json objects with each json object containing keys - name, type, value (type can be plain_text, rich_text or image)
{
"name": "Is Delhi prepared for a Covid surge?",
"description": "Is the capital prepared to deal with the impending crisis?",
"subscription_type": "campaign",
"public": true,
"created_at": "2019-12-12T09:26:05.418Z",
"updated_at": "2020-01-03T05:33:05.130Z",
"deleted_at": null,
"preferred_identity_provider": "email",
"metadata_fields": ["full-name", "email", "mobile-or-contact-number"],
"currency": "INR",
"campaign_active": false,
"target_amount": 2000,
"target_amount_validation_enabled": true,
"target_reached": false,
"collected_amount_cents": 100000,
"collected_amount": 1000.0,
"collected_amount_percentage": 50.0,
"image_s3_key": null,
"image_url": null,
"custom_attributes": [
{
"name": "Attribute Name 1",
"type": "plain_text",
"value": "Attribute value"
},
{
"name": "Attribute Name 2",
"type": "rich_text",
"value": "<p><strong>Attribute value</strong></p>"
},
{
"name": "Attribute Name 3",
"type": "image",
"value": "https://gumlet.assettype.com/accesstype/assets/1685077868911/img1.jpeg"
}
],
"subscription_plans": [
{
"id": 14,
"subscription_group_id": 6,
"duration_length": 1,
"price_cents": 5000,
"price_currency": "INR",
"created_at": "2020-04-28T06:28:01.995Z",
"updated_at": "2020-04-28T06:28:01.995Z",
"duration_unit": "months",
"description": "plan with user limit 5",
"title": "plan with user limit 5",
"max_trial_period_length": null,
"max_trial_period_unit": null,
"recurring": false,
"metadata": {},
"deleted_at": null,
"enabled": true,
"trial_period_enabled": false,
"trial_period_type": null,
"paid_trial_price_cents": null,
"supported_payment_providers": [
"razorpay",
"paytm",
"paypal"
],
"user_limit": 5,
"assets": [
{
"title": "site",
"metadata": {},
"type": "site",
"published_at": {}
}
],
"display_assets": [
{
"title": "site",
"metadata": {},
"type": "site",
"published_at": {}
}
]
}
]
}