Skip to main content
PUT
/
api
/
v1
/
plans
/
{plan_id}
Replace a plan
curl --request PUT \
  --url https://api.example.com/api/v1/plans/{plan_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "components": [
    {
      "fee": {
        "rates": [
          {
            "price": "<string>"
          }
        ]
      },
      "name": "<string>",
      "product_id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
    }
  ],
  "currency": "<string>",
  "name": "<string>",
  "add_ons": [
    {
      "add_on_id": "<string>",
      "max_instances": 123,
      "price_id": "pri_7n42DGM5Tflk9n8mt7Fhc7",
      "self_serviceable": true
    }
  ],
  "billing": {
    "billing_cycles": 123,
    "net_terms": 123,
    "period_start_day": 123
  },
  "description": "<string>",
  "minimum_commitment": {
    "amount": "<string>",
    "scope": {}
  },
  "trial": {
    "duration_days": 1,
    "is_free": true,
    "trialing_plan_id": "plan_7n42DGM5Tflk9n8mt7Fhc7"
  }
}
'
{
  "available_parameters": {
    "billing_periods": {},
    "capacity_thresholds": {},
    "slot_components": [
      "<string>"
    ]
  },
  "created_at": "2023-11-07T05:31:56Z",
  "currency": "<string>",
  "id": "<string>",
  "name": "<string>",
  "net_terms": 123,
  "price_components": [
    {
      "id": "<string>",
      "name": "<string>",
      "fee": {
        "rates": [
          {
            "price": "<string>"
          }
        ]
      },
      "product_id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
    }
  ],
  "product_family": {
    "id": "<string>",
    "name": "<string>"
  },
  "version": 123,
  "version_id": "<string>",
  "billing_cycles": 123,
  "description": "<string>",
  "entitlements": [
    {
      "created_at": "2023-11-07T05:31:56Z",
      "feature_id": "<string>",
      "id": "<string>",
      "updated_at": "2023-11-07T05:31:56Z",
      "value": {
        "enabled": true
      }
    }
  ],
  "minimum_commitment": {
    "amount": "<string>",
    "scope": {}
  },
  "period_start_day": 123,
  "self_service_rank": 123,
  "trial": {
    "duration_days": 1,
    "is_free": true,
    "trialing_plan_id": "plan_7n42DGM5Tflk9n8mt7Fhc7"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

plan_id
string<MeteroidId>
required

Plan ID

Example:

"plan_7n42DGM5Tflk9n8mt7Fhc7"

Body

application/json
components
object[]
required
currency
string
required
name
string
required
add_ons
object[]
billing
null | object
description
string | null
minimum_commitment
null | object

Optional plan-level period minimum commitment. Component scope must reference names that exist in components (matched by name, not by ID, since component IDs are assigned by the server). Use MinimumCommitmentInput so the client can express scope by component name.

status
null | enum<string>
Available options:
DRAFT,
ACTIVE,
INACTIVE,
ARCHIVED
trial
null | object

Response

Plan updated

available_parameters
object
required
created_at
string<date-time>
required
currency
string
required
id
string<MeteroidId>
required
Example:

"plan_7n42DGM5Tflk9n8mt7Fhc7"

name
string
required
net_terms
integer<int32>
required
plan_type
enum<string>
required
Available options:
STANDARD,
FREE,
CUSTOM
price_components
object[]
required
product_family
object
required
status
enum<string>
required
Available options:
DRAFT,
ACTIVE,
INACTIVE,
ARCHIVED
version
integer<int32>
required
version_id
string<MeteroidId>
required
Example:

"plv_7n42DGM5Tflk9n8mt7Fhc7"

billing_cycles
integer<int32> | null
description
string | null
entitlements
object[]
minimum_commitment
null | object

Plan-level minimum commitment (period true-up floor). When set, every billing-period invoice for this plan is guaranteed to be at least minimum_commitment.amount after discounts, with a "Minimum commitment" line filling any shortfall.

period_start_day
integer<int32> | null
self_service_rank
integer<int32> | null
trial
null | object