Attach an Add-On
curl --request POST \
--url https://api.uselotus.io/api/subscriptions/{subscription_id}/addons/attach/ \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"addon_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"quantity": 2
}'
{
"addon": {
"addon_id": "<string>",
"addon_name": "<string>",
"addon_type": "flat",
"billing_frequency": "one_time"
},
"addon_subscription_id": "<string>",
"auto_renew": true,
"customer": {
"customer_id": "<string>",
"customer_name": "<string>",
"email": "jsmith@example.com"
},
"end_date": "2023-11-07T05:31:56Z",
"fully_billed": true,
"metadata": {},
"parent": {
"addons": [],
"auto_renew": true,
"billing_plan": {
"plan_id": "<string>",
"plan_name": "<string>",
"version": 123,
"version_id": "<string>"
},
"customer": {
"customer_id": "<string>",
"customer_name": "<string>",
"email": "jsmith@example.com"
},
"end_date": "2023-11-07T05:31:56Z",
"fully_billed": true,
"is_new": true,
"metadata": {},
"plan_detail": {
"plan_id": "<string>",
"plan_name": "<string>",
"version": 123,
"version_id": "<string>"
},
"start_date": "2023-11-07T05:31:56Z",
"subscription_filters": [],
"subscription_id": "<string>"
},
"start_date": "2023-11-07T05:31:56Z"
}
lotus.attach_addon(
subscription_id='sub_e953bfbf42a442ca90079c8f1656d306',
addon_id='addon_5af61a194ca144478fb2721dd34c9049',
quantity=3,
)
Authorizations
Token-based authentication with required prefix "Token"
Path Parameters
The ID of the subscription to add an addon to.
Body
The add-on to be applied to the subscription.
A JSON object containing additional information about the add-on subscription. This will be returned in the response when you retrieve the add-on subscription.
The quantity of the add-on to be applied to the subscription. Flat fees of add-ons will be multiplied by this quantity. Usage-based components of add-ons will be unaffected by the quantity.
Response
Whether the subscription automatically renews. Defaults to true.
The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
curl --request POST \
--url https://api.uselotus.io/api/subscriptions/{subscription_id}/addons/attach/ \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"addon_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"quantity": 2
}'
{
"addon": {
"addon_id": "<string>",
"addon_name": "<string>",
"addon_type": "flat",
"billing_frequency": "one_time"
},
"addon_subscription_id": "<string>",
"auto_renew": true,
"customer": {
"customer_id": "<string>",
"customer_name": "<string>",
"email": "jsmith@example.com"
},
"end_date": "2023-11-07T05:31:56Z",
"fully_billed": true,
"metadata": {},
"parent": {
"addons": [],
"auto_renew": true,
"billing_plan": {
"plan_id": "<string>",
"plan_name": "<string>",
"version": 123,
"version_id": "<string>"
},
"customer": {
"customer_id": "<string>",
"customer_name": "<string>",
"email": "jsmith@example.com"
},
"end_date": "2023-11-07T05:31:56Z",
"fully_billed": true,
"is_new": true,
"metadata": {},
"plan_detail": {
"plan_id": "<string>",
"plan_name": "<string>",
"version": 123,
"version_id": "<string>"
},
"start_date": "2023-11-07T05:31:56Z",
"subscription_filters": [],
"subscription_id": "<string>"
},
"start_date": "2023-11-07T05:31:56Z"
}