---
title: "POST /api/subscriptions/addons/add/"
method: POST
path: "/api/subscriptions/addons/add/"
tags: ["api"]
---

# POST /api/subscriptions/addons/add/

`POST /api/subscriptions/addons/add/`

## Request body

- AddOnSubscriptionRecordCreateRequest
  - `attach_to_customer_id` string, nullable, required — The add-on will be applied to this customer's subscription.
  - `attach_to_plan_id` string, uuid, required — The add-on will be applied to the subscription with this plan ID.
  - `attach_to_subscription_filters` SubscriptionCategoricalFilterRequest[] — In the case the customer has multiple subscriptions with the same plan ID, the subscription filters should be used to specify which subscription to apply the add-on to.
    - `value` string, required
    - `property_name` string, required — The string name of the property to filter on. Example: 'product_id'
  - `addon_id` string, uuid, required — The add-on to be applied to the subscription.
  - `quantity` 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.

## Response `200`

- AddOnSubscriptionRecord
  - `customer` LightweightCustomer, required
    - `customer_name` string, nullable, required — The display name of the customer
    - `email` string, email, nullable, required — The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider
    - `customer_id` string, nullable, required — The id provided when creating the customer, we suggest matching with your internal customer id in your backend
  - `addon` LightweightAddon, required
    - `addon_name` string, required — The name of the add-on plan.
    - `addon_id` string, required — The ID of the add-on plan.
    - `addon_type` 'flat' | 'usage_based', required
    - `billing_frequency` 'one_time' | 'recurring', required
  - `start_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
  - `end_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
  - `parent` LightweightSubscriptionRecord, required
    - `fully_billed` boolean, required — Whether the subscription has been fully billed and finalized.
    - `is_new` boolean, required — Whether this subscription came from a renewal or from a first-time. Defaults to true on creation.
    - `billing_plan` LightweightPlanVersion, required
      - `plan_name` string, required
      - `plan_id` string, required
      - `version` integer, required
      - `version_id` string, required
    - `plan_detail` LightweightPlanVersion, required
      - `plan_name` string, required
      - `plan_id` string, required
      - `version` integer, required
      - `version_id` string, required
    - `customer` LightweightCustomer, required
      - `customer_name` string, nullable, required — The display name of the customer
      - `email` string, email, nullable, required — The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider
      - `customer_id` string, nullable, required — The id provided when creating the customer, we suggest matching with your internal customer id in your backend
    - `addons` LightweightAddonSubscriptionRecord[], required
      - `start_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
      - `end_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
      - `addon` LightweightAddon, required
        - `addon_name` string, required — The name of the add-on plan.
        - `addon_id` string, required — The ID of the add-on plan.
        - `addon_type` 'flat' | 'usage_based', required
        - `billing_frequency` 'one_time' | 'recurring', required
      - `fully_billed` boolean, required — Whether the subscription has been fully billed and finalized.
    - `end_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
    - `auto_renew` boolean, required — Whether the subscription automatically renews. Defaults to true.
    - `subscription_filters` SubscriptionCategoricalFilter[], required
      - `value` string, required
      - `property_name` string, required — The string name of the property to filter on. Example: 'product_id'
    - `start_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
  - `fully_billed` boolean, required — Whether the subscription has been fully billed and finalized.
  - `auto_renew` boolean, required — Whether the subscription automatically renews. Defaults to true.

## Changes

- **2023-02-20** `d246ebbb528d` — 2 breaking, 3 info
  - the response property `customer/customer_id` became nullable for the status `200`
  - the response property `parent/customer/customer_id` became nullable for the status `200`
  - the request property `attach_to_customer_id` became nullable (media type: application/json)
  - the request property `attach_to_customer_id` became nullable (media type: application/x-www-form-urlencoded)
  - …1 more
- **2023-02-19** `33a8ac13f9bf` — 2 info
  - the `customer/customer_id` response's property pattern `^[-a-zA-Z0-9_]+$` was removed for the status `200`
  - the `parent/customer/customer_id` response's property pattern `^[-a-zA-Z0-9_]+$` was removed for the status `200`
- **2023-02-17** `ecc2be015e66` — 2 breaking
  - the `addon/addon_id` response's property type/format changed from `string`/`uuid` to `string`/`` for status `200`
  - the `parent/addons/items/addon/addon_id` response's property type/format changed from `string`/`uuid` to `string`/`` for status `200`
- **2023-02-03** `fe43d7855824` — 2 breaking
  - the `addon/billing_frequency` response's property type/format changed from `string`/`` to ``/`` for status `200`
  - the `parent/addons/items/addon/billing_frequency` response's property type/format changed from `string`/`` to ``/`` for status `200`
- **2023-01-30** `7addd852ed0c` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/uselotus/apis/lotus-api/changes/api/subscriptions/addons/add/post.md)

---

[API](https://skmtc.dev/uselotus/apis/lotus-api.md) · [All operations](https://skmtc.dev/uselotus/apis/lotus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uselotus/lotus-api/revisions/d246ebbb528d/schema)
