Subscriptions
Attach an Add-On
POST

/api/subscriptions/{subscription_id}/addons/attach/

X-API-KEY*
Authorization*
curl --request POST \
  --url https://api.uselotus.io/api/subscriptions/{subscription_id}/addons/attach/ \
  --header 'Authorization: <authorization>' \
  --header 'X-API-KEY: <x-api-key>'
lotus.attach_addon(
  subscription_id='sub_e953bfbf42a442ca90079c8f1656d306',
  addon_id='addon_5af61a194ca144478fb2721dd34c9049',
  quantity=3,
)

Authorizations

Authorization[header]required
string

Token-based authentication with required prefix "Token"

Path Parameters

subscription_idrequired
string

The ID of the subscription to add an addon to.

Body

addon_id
string

The add-on to be applied to the subscription.

quantityDefault: 1
integer

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.

metadata
object

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.

Response

addon_subscription_idrequired
string
customerrequired
object
addonrequired
object
start_daterequired
string

The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.

end_daterequired
string

The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.

parentrequired
object
fully_billedrequired
boolean
auto_renewrequired
boolean

Whether the subscription automatically renews. Defaults to true.

metadatarequired
object