curl --request POST \
--url https://api.example.com/api/v1/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"components": [
{
"fee": {
"rates": [
{
"price": "<string>",
"term": "MONTHLY"
}
]
},
"name": "<string>",
"product_id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
}
],
"currency": "<string>",
"name": "<string>",
"plan_type": "STANDARD",
"product_family_id": "<string>",
"status": "DRAFT",
"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>",
"self_service_rank": 123,
"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,
"plan_type": "STANDARD",
"price_components": [
{
"id": "<string>",
"name": "<string>",
"fee": {
"rates": [
{
"price": "<string>",
"term": "MONTHLY"
}
]
},
"product_id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
}
],
"product_family": {
"id": "<string>",
"name": "<string>"
},
"status": "DRAFT",
"version": 123,
"version_id": "<string>",
"billing_cycles": 123,
"description": "<string>",
"period_start_day": 123,
"self_service_rank": 123,
"trial": {
"duration_days": 1,
"is_free": true,
"trialing_plan_id": "plan_7n42DGM5Tflk9n8mt7Fhc7"
}
}Create a new plan with components and pricing. Set status to ACTIVE to
publish immediately, or DRAFT to stage for review.
curl --request POST \
--url https://api.example.com/api/v1/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"components": [
{
"fee": {
"rates": [
{
"price": "<string>",
"term": "MONTHLY"
}
]
},
"name": "<string>",
"product_id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
}
],
"currency": "<string>",
"name": "<string>",
"plan_type": "STANDARD",
"product_family_id": "<string>",
"status": "DRAFT",
"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>",
"self_service_rank": 123,
"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,
"plan_type": "STANDARD",
"price_components": [
{
"id": "<string>",
"name": "<string>",
"fee": {
"rates": [
{
"price": "<string>",
"term": "MONTHLY"
}
]
},
"product_id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
}
],
"product_family": {
"id": "<string>",
"name": "<string>"
},
"status": "DRAFT",
"version": 123,
"version_id": "<string>",
"billing_cycles": 123,
"description": "<string>",
"period_start_day": 123,
"self_service_rank": 123,
"trial": {
"duration_days": 1,
"is_free": true,
"trialing_plan_id": "plan_7n42DGM5Tflk9n8mt7Fhc7"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Show child attributes
STANDARD, FREE, CUSTOM "pf_7n42DGM5Tflk9n8mt7Fhc7"
DRAFT, ACTIVE, INACTIVE, ARCHIVED Show child attributes
Show child attributes
Show child attributes
Plan created
Show child attributes
"plan_7n42DGM5Tflk9n8mt7Fhc7"
STANDARD, FREE, CUSTOM Show child attributes
Show child attributes
DRAFT, ACTIVE, INACTIVE, ARCHIVED "plv_7n42DGM5Tflk9n8mt7Fhc7"
Show child attributes