Skip to content

Merge a plan into another

POST
/v1/plans/:id/merge
curl -X POST "https://api.summerbase.com/v1/plans/:id/merge" \
-H "Authorization: Bearer sb_..." \
-H "Content-Type: application/json" \
-d '{
"merged_plan_id": "stripe:prod_QhR2sT4uV6wX8y"
}'

Merge another plan into this one: its prices, identities and properties move here, and it is deleted. Every chart by plan then reads its prices under this plan, as far back as they go.

It cannot be undone. Moving a price back onto a plan of its own is a PATCH of the price.

id
required
string

The plan’s Summerbase id, or an identity ref: a source slug and that source’s own id for it, joined by a colon — stripe:prod_123.

Example

backend:growth
expand[]
Array<string>
<= 10 items
Allowed values: prices

Relationships to include in the response instead of fetching separately. A dotted path expands what an expanded record can expand in turn — at most 4 deep, 10 paths a request, and never back to a record already on the path.

Media typeapplication/json
object
merged_plan_id
required

The plan to merge into this one, which is deleted — a Summerbase id, or a source identity.

string
>= 1 characters <= 320 characters

Example

{
"merged_plan_id": "stripe:prod_QhR2sT4uV6wX8y"
}

Returns the plan object.

Media typeapplication/json

Example

{
"archived": false,
"created_at": "2025-09-08T14:12:30Z",
"id": "0198f1a4-1d2e-7a40-9b31-5c6d7e8f9a0b",
"identities": [
"stripe:prod_QhR2sT4uV6wX8y"
],
"name": "Growth",
"object": "plan",
"price_count": 2,
"properties": {
"tier": "mid"
},
"properties_by_source": {
"backend": {
"tier": "mid"
}
}
}